commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a Author: Linus Torvalds Date: Sun May 15 15:43:13 2016 -0700 Linux 4.6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f95063c686a86e7214988e04f08b9c0003cf83f Merge: 272911b 9a7a076 Author: Linus Torvalds Date: Sun May 15 08:07:35 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "Just the missing compat entry for the new pread/writev2" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Use compat version for preadv2 and pwritev2 commit 272911b889f47aa5bc3e004804fc2382f0ac6ce6 Merge: 6ba5b85 98397fc Author: Linus Torvalds Date: Sat May 14 14:15:06 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix mvneta/bm dependencies, from Arnd Bergmann. 2) RX completion hw bug workaround in bnxt_en, from Michael Chan. 3) Kernel pointer leak in nf_conntrack, from Linus. 4) Hoplimit route attribute limits not enforced properly, from Paolo Abeni. 5) qlcnic driver NULL deref fix from Dan Carpenter. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: arm64: bpf: jit JMP_JSET_{X,K} net/route: enforce hoplimit max value nf_conntrack: avoid kernel pointer value leak in slab name drivers: net: xgene: fix register offset drivers: net: xgene: fix statistics counters race condition drivers: net: xgene: fix ununiform latency across queues drivers: net: xgene: fix sharing of irqs drivers: net: xgene: fix IPv4 forward crash xen-netback: fix extra_info handling in xenvif_tx_err() net: mvneta: bm: fix dependencies again bnxt_en: Add workaround to detect bad opaque in rx completion (part 2) bnxt_en: Add workaround to detect bad opaque in rx completion (part 1) qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template() commit 98397fc547e3f4553553a30ea56fa34d613f0a4c Author: Zi Shen Lim Date: Thu May 12 23:37:58 2016 -0700 arm64: bpf: jit JMP_JSET_{X,K} Original implementation commit e54bcde3d69d ("arm64: eBPF JIT compiler") had the relevant code paths, but due to an oversight always fail jiting. As a result, we had been falling back to BPF interpreter whenever a BPF program has JMP_JSET_{X,K} instructions. With this fix, we confirm that the corresponding tests in lib/test_bpf continue to pass, and also jited. ... [ 2.784553] test_bpf: #30 JSET jited:1 188 192 197 PASS [ 2.791373] test_bpf: #31 tcpdump port 22 jited:1 325 677 625 PASS [ 2.808800] test_bpf: #32 tcpdump complex jited:1 323 731 991 PASS ... [ 3.190759] test_bpf: #237 JMP_JSET_K: if (0x3 & 0x2) return 1 jited:1 110 PASS [ 3.192524] test_bpf: #238 JMP_JSET_K: if (0x3 & 0xffffffff) return 1 jited:1 98 PASS [ 3.211014] test_bpf: #249 JMP_JSET_X: if (0x3 & 0x2) return 1 jited:1 120 PASS [ 3.212973] test_bpf: #250 JMP_JSET_X: if (0x3 & 0xffffffff) return 1 jited:1 89 PASS ... Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler") Signed-off-by: Zi Shen Lim Acked-by: Will Deacon Acked-by: Yang Shi Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 1 + 1 file changed, 1 insertion(+) commit 626abd59e51d4d8c6367e03aae252a8aa759ac78 Author: Paolo Abeni Date: Fri May 13 18:33:41 2016 +0200 net/route: enforce hoplimit max value Currently, when creating or updating a route, no check is performed in both ipv4 and ipv6 code to the hoplimit value. The caller can i.e. set hoplimit to 256, and when such route will be used, packets will be sent with hoplimit/ttl equal to 0. This commit adds checks for the RTAX_HOPLIMIT value, in both ipv4 ipv6 route code, substituting any value greater than 255 with 255. This is consistent with what is currently done for ADVMSS and MTU in the ipv4 code. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 2 ++ net/ipv6/route.c | 2 ++ 2 files changed, 4 insertions(+) commit 31b0b385f69d8d5491a4bca288e25e63f1d945d0 Author: Linus Torvalds Date: Sat May 14 11:11:44 2016 -0700 nf_conntrack: avoid kernel pointer value leak in slab name The slab name ends up being visible in the directory structure under /sys, and even if you don't have access rights to the file you can see the filenames. Just use a 64-bit counter instead of the pointer to the 'net' structure to generate a unique name. This code will go away in 4.7 when the conntrack code moves to a single kmemcache, but this is the backportable simple solution to avoiding leaking kernel pointers to user space. Fixes: 5b3501faa874 ("netfilter: nf_conntrack: per netns nf_conntrack_cachep") Signed-off-by: Linus Torvalds Acked-by: Eric Dumazet Cc: stable@vger.kernel.org Signed-off-by: David S. Miller net/netfilter/nf_conntrack_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6ba5b85fd4b1bd72ba26cb7d50c7580004df68ac Merge: 1410b74 e4d35be Author: Linus Torvalds Date: Sat May 14 11:59:43 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Overlayfs fixes from Miklos, assorted fixes from me. Stable fodder of varying severity, all sat in -next for a while" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ovl: ignore permissions on underlying lookup vfs: add lookup_hash() helper vfs: rename: check backing inode being equal vfs: add vfs_select_inode() helper get_rock_ridge_filename(): handle malformed NM entries ecryptfs: fix handling of directory opening atomic_open(): fix the handling of create_error fix the copy vs. map logics in blk_rq_map_user_iov() do_splice_to(): cap the size before passing to ->splice_read() commit b91506586206140154b0b44cccf88c8cc0a4dca5 Merge: 72eec92 e2f2d9a Author: David S. Miller Date: Fri May 13 21:12:07 2016 -0400 Merge branch 'xgene-fixes' Iyappan Subramanian says: ==================== drivers: net: xgene: Bug fixes This patch set addresses the following bug fixes that were found during testing. 1. IPv4 forward test crash - drivers: net: xgene: fix IPv4 forward crash 2. Sharing of irqs - drivers: net: xgene: fix sharing of irqs 3. Ununiform latency across queues - drivers: net: xgene: fix ununiform latency across queues 4. Fix statistics counters race condition - drivers: net: xgene: fix statistics counters race condition 5. Correcting register offset and field lengths - drivers: net: xgene: fix register offset v2: Address review comments from v1 - Defer TSO fix, and reposting all other patches from v1 v1: - Initial version ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller commit e2f2d9a72605666ec772c865dbe89edbab896d27 Author: Iyappan Subramanian Date: Fri May 13 16:53:01 2016 -0700 drivers: net: xgene: fix register offset This patch fixes SG_RX_DV_GATE_REG_0_ADDR register offset and ring state field lengths. Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 6 +++--- drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3bb502f83080ad28abdd7404f29aa2fc743b28b5 Author: Iyappan Subramanian Date: Fri May 13 16:53:00 2016 -0700 drivers: net: xgene: fix statistics counters race condition This patch fixes the race condition on updating the statistics counters by moving the counters to the ring structure. Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 19 ++++++----- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 2 ++ drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 41 +++++++++++++++++------- drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 10 ++++++ 4 files changed, 53 insertions(+), 19 deletions(-) commit 1b090a4839f6c74af2dc42872c9e9dc9d7c60a99 Author: Iyappan Subramanian Date: Fri May 13 16:52:59 2016 -0700 drivers: net: xgene: fix ununiform latency across queues This patch addresses ununiform latency across queues by adding more queues to match with, upto number of CPU cores. Also, number of interrupts are increased and the channel numbers are reordered. Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 30 ++++++++++++++++++------ drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 8 +++---- 2 files changed, 27 insertions(+), 11 deletions(-) commit 46a22d29a51e40704c2260168c124e260b7d660e Author: Iyappan Subramanian Date: Fri May 13 16:52:58 2016 -0700 drivers: net: xgene: fix sharing of irqs Since hardware doesn't allow sharing of interrupts, this patch fixes the same by removing IRQF_SHARED flag. Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b30cfd241fbc6818c7de0cbf89ae83c70a1dac9a Author: Iyappan Subramanian Date: Fri May 13 16:52:57 2016 -0700 drivers: net: xgene: fix IPv4 forward crash This patch fixes the crash observed during IPv4 forward test by setting the drop field in the dbptr. Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | 11 ++++++----- drivers/net/ethernet/apm/xgene/xgene_enet_cle.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 1410b74e4061e05a5d2bffb1f99829efce27c8a9 Merge: da92223 09be4c8 Author: Linus Torvalds Date: Fri May 13 16:26:46 2016 -0700 Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "During v4.6-rc1 cgroup namespace support was merged. There is an issue where it's impossible to tell whether a given cgroup mount point is bind mounted or namespaced. Serge has been working on the issue but it took longer than expected to resolve, so the late pull request. Given that it's a completely new feature and the patches don't touch anything else, the risk seems acceptable. However, if this is too late, an alternative is plugging new cgroup ns creation for v4.6 and retrying for v4.7" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix compile warning kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces kernfs_path_from_node_locked: don't overwrite nlen commit da92223908f309d5ba63ce7dd568dfb6a7e5d7d2 Merge: 65643e3 f7c17d2 Author: Linus Torvalds Date: Fri May 13 16:16:51 2016 -0700 Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "CPU hotplug callbacks can invoke DOWN_FAILED w/o preceding DOWN_PREPARE which can trigger a WARN_ON() in workqueue. The bug has been there for a very long time. It only triggers if CPU down fails at a specific point and I don't think it has adverse effects other than the warning messages. The fix is very low impact" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix rebind bound workers warning commit 65643e3abe71e970bef656ea0b125dace7c7a1b3 Merge: f7f4d43 53d3bc7 Author: Linus Torvalds Date: Fri May 13 12:21:17 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "This is a revert to fix an interactivity problem. The proper fixes for the problems that the reverted commit exposed are now in sched/core (consisting of 3 patches), but were too risky for v4.6 and will arrive in the v4.7 merge window" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/fair: Fix fairness issue on migration" commit f7f4d43b23047492903b63b7df3ce2b24cdc58b8 Merge: 1875946 636fa4a Author: Linus Torvalds Date: Fri May 13 11:54:02 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: "An uncharacteristically large number of bugs popped up in the last week: - various tooling fixes, two crashes and build problems - two Intel PT fixes - an KNL uncore driver fix - an Intel PMU driver fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf stat: Fallback to user only counters when perf_event_paranoid > 1 perf evsel: Handle EACCESS + perf_event_paranoid=2 in fallback() perf evsel: Improve EPERM error handling in open_strerror() tools lib traceevent: Do not reassign parg after collapse_tree() perf probe: Check if dwarf_getlocations() is available perf dwarf: Guard !x86_64 definitions under #ifdef else clause perf tools: Use readdir() instead of deprecated readdir_r() perf thread_map: Use readdir() instead of deprecated readdir_r() perf script: Use readdir() instead of deprecated readdir_r() perf tools: Use readdir() instead of deprecated readdir_r() perf/core: Disable the event on a truncated AUX record perf/x86/intel/pt: Generate PMI in the STOP region as well perf/x86: Fix undefined shift on 32-bit kernels perf/x86/msr: Fix SMI overflow perf/x86/intel/uncore: Fix CHA registers configuration procedure for Knights Landing platform perf diff: Fix duplicated output column commit 18759462b6dd8de0f668a346cfe3776fe9370bac Merge: c3548b7 8a934cc Author: Linus Torvalds Date: Fri May 13 09:52:00 2016 -0700 Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Three more bug fixes for ARM SoCs this week: - The Atmel sama5d2 was registering the wrong NFC device type - On Atmel sam9x5, the power management controller had an incorrect register area size - On ARM64 Allwinner machine was not secting the generic irqchip code, causing build errors in some configurations" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip ARM: dts: at91: sama5d2: use "atmel,sama5d3-nfc" compatible for nfc commit c3548b730dceecf6197d629a425c99801dadfa5e Merge: c42b8fe 9689dab Author: Linus Torvalds Date: Fri May 13 09:46:00 2016 -0700 Merge tag 'regulator-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "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" * tag 'regulator-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: da9063: Correct module alias prefix to fix module autoloading regulator: axp20x: Fix axp22x ldo_io registration error on cold boot regulator: axp20x: Fix axp22x ldo_io voltage ranges regulator: axp20x: Fix LDO4 linear voltage range regulator: s2mps11: Fix invalid selector mask and voltages for buck9 regulator: gpio: check return value of of_get_named_gpio commit c42b8fe941e361bb05de23a11c04d5a4adc61cc8 Merge: 90fa7c7 2a2cd52 Author: Linus Torvalds Date: Fri May 13 09:40:32 2016 -0700 Merge tag 'regmap-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "This is rather too late so it'd be completely understandable if you don't want to pull it at this point, I had thought I'd sent this earlier but it seems I didn't. Everything has been in -next for some time now. The main set of fixes here are mopping up some more issues with MMIO, fixing handling of endianness configuration in DT (which just wasn't working at all) and cases where the register and value endianness are different. There is also a fix for bulk register reads on SPMI" * tag 'regmap-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case regmap: mmio: Explicitly say little endian is the defualt in the bus config regmap: mmio: Parse endianness definitions from DT regmap: Fix implicit inclusion of device.h regmap: mmio: Fix value endianness selection regmap: fix documentation to match code commit 90fa7c7fa38730f918c950ecf05120f223718b89 Merge: 9dcf8a5 93f0750 Author: Linus Torvalds Date: Fri May 13 09:34:59 2016 -0700 Merge tag 'media/v4.6-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "A revert fixing a breakage that caused an OOPS on all VB2-based DVB drivers. We already have a proper fix, but it sounds safer to keep it being tested for a while and not hurry, to avoid the risk of another regression, specially since this is meant to be c/c to stable. So, for now, let's just revert the broken patch" * tag 'media/v4.6-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing" commit 9dcf8a58c702e8b25a84baf0882dc6492002831e Merge: dc0f2f8 e02aacb Author: Linus Torvalds Date: Fri May 13 09:27:05 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A bunch of radeon displayport mode setting fixes, and some misc i915 fixes. There is one revert, the MST audio code in i915 was causing some oopses, so we've decided just to drop it until next kernel when we can fix it properly" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: fix DP mode validation drm/radeon: fix DP mode validation drm/i915: Bail out of pipe config compute loop on LPT drm/radeon: fix PLL sharing on DCE6.1 (v2) drm/radeon: fix DP link training issue with second 4K monitor Revert "drm/i915: start adding dp mst audio" drm/i915/bdw: Add missing delay during L3 SQC credit programming drm/i915/lvds: separate border enable readout from panel fitter drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency commit dc0f2f87eaf92a1c04fc8fdad4a9d855160d6448 Merge: a2ccb68 df27b26 Author: Linus Torvalds Date: Fri May 13 09:21:31 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: "This fixes a bug in the RSA self-test that may cause crashes on some architectures such as SPARC" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: testmgr - Use kmalloc memory for RSA input commit 9689dab30a52f5df313771e07206d7b3d8ca44f7 Merge: 44549e8 f40d489 ac40b44 8d48794 3b67262 Author: Mark Brown Date: Fri May 13 11:11:08 2016 +0100 Merge remote-tracking branches 'regulator/fix/axp20x', 'regulator/fix/da9063', 'regulator/fix/gpio' and 'regulator/fix/s2mps11' into regulator-linus commit 2a2cd5219023ea2e485c3e37486c24177a6da55a Merge: 066a0e0 0dbdb76 2596e07 dec8e8f Author: Mark Brown Date: Fri May 13 10:36:10 2016 +0100 Merge remote-tracking branches 'regmap/fix/be', 'regmap/fix/doc' and 'regmap/fix/spmi' into regmap-linus commit 066a0e0b49afe9531f0e464a1ef05b24d0c95986 Merge: 44549e8 2ed94f6 Author: Mark Brown Date: Fri May 13 10:36:09 2016 +0100 Merge remote-tracking branch 'regmap/fix/mmio' into regmap-linus commit e02aacb6dec0c656379f0c1ff06c5bbb2bcb1e53 Merge: 58a6e2e c47b9e0 Author: Dave Airlie Date: Fri May 13 16:03:39 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes DP mode validation regression fix. * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix DP mode validation drm/radeon: fix DP mode validation commit 72eec92accabe3ec34f27a9d3cd459bf5a877c33 Author: Paul Durrant Date: Thu May 12 14:43:03 2016 +0100 xen-netback: fix extra_info handling in xenvif_tx_err() Patch 562abd39 "xen-netback: support multiple extra info fragments passed from frontend" contained a mistake which can result in an in- correct number of responses being generated when handling errors encountered when processing packets containing extra info fragments. This patch fixes the problem. Signed-off-by: Paul Durrant Reported-by: Jan Beulich Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/netback.c | 1 + 1 file changed, 1 insertion(+) commit 636fa4a7b0d2987b7395cd2e259962cdca16e887 Merge: 9f448cd 42ef8a7 Author: Ingo Molnar Date: Fri May 13 07:35:12 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160512' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fallback to usermode-only counters when perf_event_paranoid > 1, which is the case now (Arnaldo Carvalho de Melo) - Do not reassign parg after collapse_tree() in libtraceevent, which may cause tool crashes (Steven Rostedt) - Fix the build on Fedora Rawhide, where readdir_r() is deprecated and also wrt -Werror=unused-const-variable= + x86_32_regoffset_table on !x86_64 (Arnaldo Carvalho de Melo) - Fix the build on Ubuntu 12.04.5, where dwarf_getlocations() isn't available, i.e. libdw-dev < 0.157 (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a2ccb68b1e6add42c0bf3ade73cd11c98d32b890 Merge: 02c9c0e 6d0a07e Author: Linus Torvalds Date: Thu May 12 18:44:24 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "4 fixes" * emailed patches from Andrew Morton : mm: thp: calculate the mapcount correctly for THP pages during WP faults ksm: fix conflict between mmput and scan_get_next_rmap_item ocfs2: fix posix_acl_create deadlock ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang commit 6d0a07edd17cfc12fdc1f36de8072fa17cc3666f Author: Andrea Arcangeli Date: Thu May 12 15:42:25 2016 -0700 mm: thp: calculate the mapcount correctly for THP pages during WP faults This will provide fully accuracy to the mapcount calculation in the write protect faults, so page pinning will not get broken by false positive copy-on-writes. total_mapcount() isn't the right calculation needed in reuse_swap_page(), so this introduces a page_trans_huge_mapcount() that is effectively the full accurate return value for page_mapcount() if dealing with Transparent Hugepages, however we only use the page_trans_huge_mapcount() during COW faults where it strictly needed, due to its higher runtime cost. This also provide at practical zero cost the total_mapcount information which is needed to know if we can still relocate the page anon_vma to the local vma. If page_trans_huge_mapcount() returns 1 we can reuse the page no matter if it's a pte or a pmd_trans_huge triggering the fault, but we can only relocate the page anon_vma to the local vma->anon_vma if we're sure it's only this "vma" mapping the whole THP physical range. Kirill A. Shutemov discovered the problem with moving the page anon_vma to the local vma->anon_vma in a previous version of this patch and another problem in the way page_move_anon_rmap() was called. Andrew Morton discovered that CONFIG_SWAP=n wouldn't build in a previous version, because reuse_swap_page must be a macro to call page_trans_huge_mapcount from swap.h, so this uses a macro again instead of an inline function. With this change at least it's a less dangerous usage than it was before, because "page" is used only once now, while with the previous code reuse_swap_page(page++) would have called page_mapcount on page+1 and it would have increased page twice instead of just once. Dean Luick noticed an uninitialized variable that could result in a rmap inefficiency for the non-THP case in a previous version. Mike Marciniszyn said: : Our RDMA tests are seeing an issue with memory locking that bisects to : commit 61f5d698cc97 ("mm: re-enable THP") : : The test program registers two rather large MRs (512M) and RDMA : writes data to a passive peer using the first and RDMA reads it back : into the second MR and compares that data. The sizes are chosen randomly : between 0 and 1024 bytes. : : The test will get through a few (<= 4 iterations) and then gets a : compare error. : : Tracing indicates the kernel logical addresses associated with the individual : pages at registration ARE correct , the data in the "RDMA read response only" : packets ARE correct. : : The "corruption" occurs when the packet crosse two pages that are not physically : contiguous. The second page reads back as zero in the program. : : It looks like the user VA at the point of the compare error no longer points to : the same physical address as was registered. : : This patch totally resolves the issue! Link: http://lkml.kernel.org/r/1462547040-1737-2-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reviewed-by: "Kirill A. Shutemov" Reviewed-by: Dean Luick Tested-by: Alex Williamson Tested-by: Mike Marciniszyn Tested-by: Josh Collier Cc: Marc Haber Cc: [4.5] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 9 +++++++ include/linux/swap.h | 6 ++--- mm/huge_memory.c | 71 +++++++++++++++++++++++++++++++++++++++++++++------- mm/memory.c | 22 ++++++++++------ mm/swapfile.c | 13 +++++----- 5 files changed, 95 insertions(+), 26 deletions(-) commit 7496fea9a6bf644afe360af795b121a77635b37d Author: Zhou Chengming Date: Thu May 12 15:42:21 2016 -0700 ksm: fix conflict between mmput and scan_get_next_rmap_item A concurrency issue about KSM in the function scan_get_next_rmap_item. task A (ksmd): |task B (the mm's task): | mm = slot->mm; | down_read(&mm->mmap_sem); | | ... | | spin_lock(&ksm_mmlist_lock); | | ksm_scan.mm_slot go to the next slot; | | spin_unlock(&ksm_mmlist_lock); | |mmput() -> | ksm_exit(): | |spin_lock(&ksm_mmlist_lock); |if (mm_slot && ksm_scan.mm_slot != mm_slot) { | if (!mm_slot->rmap_list) { | easy_to_free = 1; | ... | |if (easy_to_free) { | mmdrop(mm); | ... | |So this mm_struct may be freed in the mmput(). | up_read(&mm->mmap_sem); | As we can see above, the ksmd thread may access a mm_struct that already been freed to the kmem_cache. Suppose a fork will get this mm_struct from the kmem_cache, the ksmd thread then call up_read(&mm->mmap_sem), will cause mmap_sem.count to become -1. As suggested by Andrea Arcangeli, unmerge_and_remove_all_rmap_items has the same SMP race condition, so fix it too. My prev fix in function scan_get_next_rmap_item will introduce a different SMP race condition, so just invert the up_read/spin_unlock order as Andrea Arcangeli said. Link: http://lkml.kernel.org/r/1462708815-31301-1-git-send-email-zhouchengming1@huawei.com Signed-off-by: Zhou Chengming Suggested-by: Andrea Arcangeli Reviewed-by: Andrea Arcangeli Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Geliang Tang Cc: Minchan Kim Cc: Hanjun Guo Cc: Ding Tianhong Cc: Li Bin Cc: Zhen Lei Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c25a1e0671fbca7b2c0d0757d533bd2650d6dc0c Author: Junxiao Bi Date: Thu May 12 15:42:18 2016 -0700 ocfs2: fix posix_acl_create deadlock Commit 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure") refactored code to use posix_acl_create. The problem with this function is that it is not mindful of the cluster wide inode lock making it unsuitable for use with ocfs2 inode creation with ACLs. For example, when used in ocfs2_mknod, this function can cause deadlock as follows. The parent dir inode lock is taken when calling posix_acl_create -> get_acl -> ocfs2_iop_get_acl which takes the inode lock again. This can cause deadlock if there is a blocked remote lock request waiting for the lock to be downconverted. And same deadlock happened in ocfs2_reflink. This fix is to revert back using ocfs2_init_acl. Fixes: 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure") Signed-off-by: Tariq Saeed Signed-off-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/acl.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/acl.h | 4 ++++ fs/ocfs2/namei.c | 23 ++---------------- fs/ocfs2/refcounttree.c | 17 ++----------- fs/ocfs2/xattr.c | 14 ++++------- fs/ocfs2/xattr.h | 4 +--- 6 files changed, 77 insertions(+), 48 deletions(-) commit 5ee0fbd50fdf1c1329de8bee35ea9d7c6a81a2e0 Author: Junxiao Bi Date: Thu May 12 15:42:15 2016 -0700 ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang Commit 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()") introduced this issue. ocfs2_setattr called by chmod command holds cluster wide inode lock when calling posix_acl_chmod. This latter function in turn calls ocfs2_iop_get_acl and ocfs2_iop_set_acl. These two are also called directly from vfs layer for getfacl/setfacl commands and therefore acquire the cluster wide inode lock. If a remote conversion request comes after the first inode lock in ocfs2_setattr, OCFS2_LOCK_BLOCKED will be set. And this will cause the second call to inode lock from the ocfs2_iop_get_acl() to block indefinetly. The deleted version of ocfs2_acl_chmod() calls __posix_acl_chmod() which does not call back into the filesystem. Therefore, we restore ocfs2_acl_chmod(), modify it slightly for locking as needed, and use that instead. Fixes: 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()") Signed-off-by: Tariq Saeed Signed-off-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/acl.c | 24 ++++++++++++++++++++++++ fs/ocfs2/acl.h | 1 + fs/ocfs2/file.c | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) commit 2073dbad172f5d55545c1aadc5f7ce8792dfc060 Author: Arnd Bergmann Date: Wed May 11 22:13:23 2016 +0200 net: mvneta: bm: fix dependencies again I tried to fix this before, but my previous fix was incomplete and we can still get the same link error in randconfig builds because of the way that Kconfig treats the default y if MVNETA=y && MVNETA_BM_ENABLE line that does not actually trigger when MVNETA_BM_ENABLE=m, unlike I intended. Changing the line to use MVNETA_BM_ENABLE!=n however has the desired effect and hopefully makes all configurations work as expected. Signed-off-by: Arnd Bergmann Fixes: 019ded3aa7c9 ("net: mvneta: bm: clarify dependencies") Acked-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02c9c0e9b9d9e26f56aa74245c1a5a843878f899 Merge: e5ad8b6 23c8a81 Author: Linus Torvalds Date: Thu May 12 13:00:33 2016 -0700 Merge tag 'keys-fixes-20160512' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull keyring fix from David Howells: "Fix ASN.1 indefinite length object parsing" * tag 'keys-fixes-20160512' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: KEYS: Fix ASN.1 indefinite length object parsing commit e5ad8b6d1ef82a83b1469fe66e40e06f07f46222 Merge: ed1e33d 84add30 Author: Linus Torvalds Date: Thu May 12 12:55:42 2016 -0700 Merge tag 'sound-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This is a pretty boring pull request as you wish: including a few small and trivial HD-audio and USB-audio quirks and a couple of small regression fixes in HD-audio" * tag 'sound-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Yet another Phoneix Audio device quirk ALSA: hda - Fix regression on ATI HDMI audio ALSA: hda - Fix subwoofer pin on ASUS N751 and N551 ALSA: hda - Fix broken reconfig ALSA: hda - Fix white noise on Asus UX501VW headset ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2) commit ed1e33dded773ead96d047a34286e27feafd0505 Merge: 422ce5a c52c545 Author: Linus Torvalds Date: Thu May 12 12:47:49 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: twl6040-vibra - fix DT node memory management Input: max8997-haptic - fix NULL pointer dereference Input: byd - update copyright header commit 42ef8a78c1f49f53f29f0f3a6f9a5bcbc653233e Author: Arnaldo Carvalho de Melo Date: Thu May 12 16:25:18 2016 -0300 perf stat: Fallback to user only counters when perf_event_paranoid > 1 After 0161028b7c8a ("perf/core: Change the default paranoia level to 2") 'perf stat' fails for users without CAP_SYS_ADMIN, so just use 'perf_evsel__fallback()' to have the same behaviour as 'perf record', i.e. set perf_event_attr.exclude_kernel to 1. Now: [acme@jouet linux]$ perf stat usleep 1 Performance counter stats for 'usleep 1': 0.352536 task-clock:u (msec) # 0.423 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 49 page-faults:u # 0.139 M/sec 309,407 cycles:u # 0.878 GHz 243,791 instructions:u # 0.79 insn per cycle 49,622 branches:u # 140.757 M/sec 3,884 branch-misses:u # 7.83% of all branches 0.000834174 seconds time elapsed [acme@jouet linux]$ Reported-by: Ingo Molnar Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Kees Cook Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b20jmx4dxt5hpaa9t2rroi0o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 08094828b711dd32de57e9e3314935e19db71b3d Author: Arnaldo Carvalho de Melo Date: Thu May 12 16:07:47 2016 -0300 perf evsel: Handle EACCESS + perf_event_paranoid=2 in fallback() Now with the default for the kernel.perf_event_paranoid sysctl being 2 [1] we need to fall back to :u, i.e. to set perf_event_attr.exclude_kernel to 1. Before: [acme@jouet linux]$ perf record usleep 1 Error: You may not have permission to collect stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid, which controls use of the performance events system by unprivileged users (without CAP_SYS_ADMIN). The current value is 2: -1: Allow use of (almost) all events by all users >= 0: Disallow raw tracepoint access by users without CAP_IOC_LOCK >= 1: Disallow CPU event access by users without CAP_SYS_ADMIN >= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN [acme@jouet linux]$ After: [acme@jouet linux]$ perf record usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.016 MB perf.data (7 samples) ] [acme@jouet linux]$ perf evlist cycles:u [acme@jouet linux]$ perf evlist -v cycles:u: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, exclude_kernel: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1 [acme@jouet linux]$ And if the user turns on verbose mode, an explanation will appear: [acme@jouet linux]$ perf record -v usleep 1 Warning: kernel.perf_event_paranoid=2, trying to fall back to excluding kernel samples mmap size 528384B [ perf record: Woken up 1 times to write data ] Looking at the vmlinux_path (8 entries long) Using /lib/modules/4.6.0-rc7+/build/vmlinux for symbols [ perf record: Captured and wrote 0.016 MB perf.data (7 samples) ] [acme@jouet linux]$ [1] 0161028b7c8a ("perf/core: Change the default paranoia level to 2") Reported-by: Ingo Molnar Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Kees Cook Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b20jmx4dxt5hpaa9t2rroi0o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c47b9e0944e483309d66c807d650ac8b8ceafb57 Author: Alex Deucher Date: Wed May 11 16:21:03 2016 -0400 drm/amdgpu: fix DP mode validation Switch the order of the loops to walk the rates on the top so we exhaust all DP 1.1 rate/lane combinations before trying DP 1.2 rate/lane combos. This avoids selecting rates that are supported by the monitor, but not the connector leading to valid modes getting rejected. bug: https://bugs.freedesktop.org/show_bug.cgi?id=95206 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff0bd441bdfbfa09d05fdba9829a0401a46635c1 Author: Alex Deucher Date: Wed May 11 16:16:53 2016 -0400 drm/radeon: fix DP mode validation Switch the order of the loops to walk the rates on the top so we exhaust all DP 1.1 rate/lane combinations before trying DP 1.2 rate/lane combos. This avoids selecting rates that are supported by the monitor, but not the connector leading to valid modes getting rejected. bug: https://bugs.freedesktop.org/show_bug.cgi?id=95206 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/atombios_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d173913a6420f2818afeca70b268f064441f69b Author: Arnaldo Carvalho de Melo Date: Thu May 12 15:44:55 2016 -0300 perf evsel: Improve EPERM error handling in open_strerror() We were showing a hardcoded default value for the kernel.perf_event_paranoid sysctl, now that it became more paranoid (1 -> 2 [1]), this would need to be updated, instead show the current value: [acme@jouet linux]$ perf record ls Error: You may not have permission to collect stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid, which controls use of the performance events system by unprivileged users (without CAP_SYS_ADMIN). The current value is 2: -1: Allow use of (almost) all events by all users >= 0: Disallow raw tracepoint access by users without CAP_IOC_LOCK >= 1: Disallow CPU event access by users without CAP_SYS_ADMIN >= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN [acme@jouet linux]$ [1] 0161028b7c8a ("perf/core: Change the default paranoia level to 2") Reported-by: Ingo Molnar Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Kees Cook Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-0gc4rdpg8d025r5not8s8028@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 422ce5a97570cb8a37d016b6bc2021ae4dac5499 Merge: 685764b 5305a7b Author: Linus Torvalds Date: Thu May 12 11:23:08 2016 -0700 Merge tag 'pinctrl-v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fix from Linus Walleij: "A single last pin control fix for v4.6. t's tagged for stable and only hits a single driver with two added lines so should be safe. Tested in linux-next. - The pull up/down logic for the AT91 PIO4 controller was tilted: we need to mask the reverse pull when unmasking a pull direction. Setting both pull up & pull down is illegal and makes no sense" * tag 'pinctrl-v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: at91-pio4: fix pull-up/down logic commit f7c17d26f43d5cc1b7a6b896cd2fa24a079739b9 Author: Wanpeng Li Date: Wed May 11 17:55:18 2016 +0800 workqueue: fix rebind bound workers warning ------------[ cut here ]------------ WARNING: CPU: 0 PID: 16 at kernel/workqueue.c:4559 rebind_workers+0x1c0/0x1d0 Modules linked in: CPU: 0 PID: 16 Comm: cpuhp/0 Not tainted 4.6.0-rc4+ #31 Hardware name: IBM IBM System x3550 M4 Server -[7914IUW]-/00Y8603, BIOS -[D7E128FUS-1.40]- 07/23/2013 0000000000000000 ffff881037babb58 ffffffff8139d885 0000000000000010 0000000000000000 0000000000000000 0000000000000000 ffff881037babba8 ffffffff8108505d ffff881037ba0000 000011cf3e7d6e60 0000000000000046 Call Trace: dump_stack+0x89/0xd4 __warn+0xfd/0x120 warn_slowpath_null+0x1d/0x20 rebind_workers+0x1c0/0x1d0 workqueue_cpu_up_callback+0xf5/0x1d0 notifier_call_chain+0x64/0x90 ? trace_hardirqs_on_caller+0xf2/0x220 ? notify_prepare+0x80/0x80 __raw_notifier_call_chain+0xe/0x10 __cpu_notify+0x35/0x50 notify_down_prepare+0x5e/0x80 ? notify_prepare+0x80/0x80 cpuhp_invoke_callback+0x73/0x330 ? __schedule+0x33e/0x8a0 cpuhp_down_callbacks+0x51/0xc0 cpuhp_thread_fun+0xc1/0xf0 smpboot_thread_fn+0x159/0x2a0 ? smpboot_create_threads+0x80/0x80 kthread+0xef/0x110 ? wait_for_completion+0xf0/0x120 ? schedule_tail+0x35/0xf0 ret_from_fork+0x22/0x50 ? __init_kthread_worker+0x70/0x70 ---[ end trace eb12ae47d2382d8f ]--- notify_down_prepare: attempt to take down CPU 0 failed This bug can be reproduced by below config w/ nohz_full= all cpus: CONFIG_BOOTPARAM_HOTPLUG_CPU0=y CONFIG_DEBUG_HOTPLUG_CPU0=y CONFIG_NO_HZ_FULL=y As Thomas pointed out: | If a down prepare callback fails, then DOWN_FAILED is invoked for all | callbacks which have successfully executed DOWN_PREPARE. | | But, workqueue has actually two notifiers. One which handles | UP/DOWN_FAILED/ONLINE and one which handles DOWN_PREPARE. | | Now look at the priorities of those callbacks: | | CPU_PRI_WORKQUEUE_UP = 5 | CPU_PRI_WORKQUEUE_DOWN = -5 | | So the call order on DOWN_PREPARE is: | | CB 1 | CB ... | CB workqueue_up() -> Ignores DOWN_PREPARE | CB ... | CB X ---> Fails | | So we call up to CB X with DOWN_FAILED | | CB 1 | CB ... | CB workqueue_up() -> Handles DOWN_FAILED | CB ... | CB X-1 | | So the problem is that the workqueue stuff handles DOWN_FAILED in the up | callback, while it should do it in the down callback. Which is not a good idea | either because it wants to be called early on rollback... | | Brilliant stuff, isn't it? The hotplug rework will solve this problem because | the callbacks become symetric, but for the existing mess, we need some | workaround in the workqueue code. The boot CPU handles housekeeping duty(unbound timers, workqueues, timekeeping, ...) on behalf of full dynticks CPUs. It must remain online when nohz full is enabled. There is a priority set to every notifier_blocks: workqueue_cpu_up > tick_nohz_cpu_down > workqueue_cpu_down So tick_nohz_cpu_down callback failed when down prepare cpu 0, and notifier_blocks behind tick_nohz_cpu_down will not be called any more, which leads to workers are actually not unbound. Then hotplug state machine will fallback to undo and online cpu 0 again. Workers will be rebound unconditionally even if they are not unbound and trigger the warning in this progress. This patch fix it by catching !DISASSOCIATED to avoid rebind bound workers. Cc: Tejun Heo Cc: Lai Jiangshan Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Frédéric Weisbecker Cc: stable@vger.kernel.org Suggested-by: Lai Jiangshan Signed-off-by: Wanpeng Li kernel/workqueue.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8a934ccbf90959877beec27780469e85f1c3f101 Merge: 2348548 aab0a4c Author: Arnd Bergmann Date: Thu May 12 17:44:53 2016 +0200 Merge tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes Merge "Second AT91 fix PR for 4.6" from Nicolas Ferre: - fix a regression on the clock subsystem while switching to syscon/regmap due to a stricter check of the register map. * tag 'at91-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC commit 09be4c824ebdbf3c043a07d2d9537a0164a1ecfe Author: Felipe Balbi Date: Thu May 12 12:34:38 2016 +0300 cgroup: fix compile warning commit 4f41fc59620f ("cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces") added the following compile warning: kernel/cgroup.c: In function ‘cgroup_show_path’: kernel/cgroup.c:1634:15: warning: unused variable ‘ret’ [-Wunused-variable] int len = 0, ret = 0; ^ fix it. Fixes: 4f41fc59620f ("cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces") Signed-off-by: Felipe Balbi Signed-off-by: Tejun Heo kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cc9b23c8137e9bb4eaf6d97d825b7f0dc711d0c Author: Serge E. Hallyn Date: Thu May 12 00:29:45 2016 -0500 kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call Our caller expects 0 on success, not >0. This fixes a bug in the patch cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces where /sys does not show up in mountinfo, breaking criu. Thanks for catching this, Andrei. Reported-by: Andrei Vagin Signed-off-by: Serge Hallyn Signed-off-by: Tejun Heo fs/kernfs/mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 106b816cb46ebd87408b4ed99a2e16203114daa6 Author: Steven Rostedt Date: Wed May 11 15:09:36 2016 -0400 tools lib traceevent: Do not reassign parg after collapse_tree() At the end of process_filter(), collapse_tree() was changed to update the parg parameter, but the reassignment after the call wasn't removed. What happens is that the "current_op" gets modified and freed and parg is assigned to the new allocated argument. But after the call to collapse_tree(), parg is assigned again to the just freed "current_op", and this causes the tool to crash. The current_op variable must also be assigned to NULL in case of error, otherwise it will cause it to be free()ed twice. Signed-off-by: Steven Rostedt Acked-by: Namhyung Kim Cc: stable@vger.kernel.org # 3.14+ Fixes: 42d6194d133c ("tools lib traceevent: Refactor process_filter()") Link: http://lkml.kernel.org/r/20160511150936.678c18a1@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/parse-filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4924734570a073049450b11f7c59ce5992b03343 Author: Arnaldo Carvalho de Melo Date: Tue Apr 5 11:33:41 2016 -0300 perf probe: Check if dwarf_getlocations() is available If not, tell the user that: config/Makefile:273: Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.157 And return -ENOTSUPP in die_get_var_range(), failing features that need it, like the one pointed out above. This fixes the build on older systems, such as Ubuntu 12.04.5. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Vinson Lee Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-9l7luqkq4gfnx7vrklkq4obs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 2 ++ tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 5 +++++ tools/build/feature/test-dwarf_getlocations.c | 12 ++++++++++++ tools/perf/config/Makefile | 6 ++++++ tools/perf/util/dwarf-aux.c | 9 +++++++++ 6 files changed, 38 insertions(+) commit 62aa0e177d278462145a29c30d3c8501ae57e200 Author: Arnaldo Carvalho de Melo Date: Fri Apr 8 12:04:29 2016 -0300 perf dwarf: Guard !x86_64 definitions under #ifdef else clause To fix the build on Fedora Rawhide (gcc 6.0.0 20160311 (Red Hat 6.0.0-0.17): CC /tmp/build/perf/arch/x86/util/dwarf-regs.o arch/x86/util/dwarf-regs.c:66:36: error: 'x86_32_regoffset_table' defined but not used [-Werror=unused-const-variable=] static const struct pt_regs_offset x86_32_regoffset_table[] = { ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-fghuksc1u8ln82bof4lwcj0o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/dwarf-regs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 22a9f41b555673e7499b97acf3ffb07bf0af31ad Author: Arnaldo Carvalho de Melo Date: Fri Apr 8 11:53:02 2016 -0300 perf tools: Use readdir() instead of deprecated readdir_r() The readdir() function is thread safe as long as just one thread uses a DIR, which is the case when parsing tracepoint event definitions, to avoid breaking the build with glibc-2.23.90 (upcoming 2.24), use it instead of readdir_r(). See: http://man7.org/linux/man-pages/man3/readdir.3.html "However, in modern implementations (including the glibc implementation), concurrent calls to readdir() that specify different directory streams are thread-safe. In cases where multiple threads must read from the same directory stream, using readdir() with external synchronization is still preferable to the use of the deprecated readdir_r(3) function." Noticed while building on a Fedora Rawhide docker container. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wddn49r6bz6wq4ee3dxbl7lo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 7839b9f32e45075d9eb48da8480faef3dbd019f0 Author: Arnaldo Carvalho de Melo Date: Fri Apr 8 11:31:24 2016 -0300 perf thread_map: Use readdir() instead of deprecated readdir_r() The readdir() function is thread safe as long as just one thread uses a DIR, which is the case in thread_map, so, to avoid breaking the build with glibc-2.23.90 (upcoming 2.24), use it instead of readdir_r(). See: http://man7.org/linux/man-pages/man3/readdir.3.html "However, in modern implementations (including the glibc implementation), concurrent calls to readdir() that specify different directory streams are thread-safe. In cases where multiple threads must read from the same directory stream, using readdir() with external synchronization is still preferable to the use of the deprecated readdir_r(3) function." Noticed while building on a Fedora Rawhide docker container. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-del8h2a0f40z75j4r42l96l0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread_map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9a5f3bf332bbd42625b71553ca9ffdffa9fc4785 Author: Arnaldo Carvalho de Melo Date: Fri Apr 8 11:25:59 2016 -0300 perf script: Use readdir() instead of deprecated readdir_r() The readdir() function is thread safe as long as just one thread uses a DIR, which is the case in 'perf script', so, to avoid breaking the build with glibc-2.23.90 (upcoming 2.24), use it instead of readdir_r(). See: http://man7.org/linux/man-pages/man3/readdir.3.html "However, in modern implementations (including the glibc implementation), concurrent calls to readdir() that specify different directory streams are thread-safe. In cases where multiple threads must read from the same directory stream, using readdir() with external synchronization is still preferable to the use of the deprecated readdir_r(3) function." Noticed while building on a Fedora Rawhide docker container. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-mt3xz7n2hl49ni2vx7kuq74g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 70 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 36 deletions(-) commit 2515e614834f362eed36fb5ea5d359d94a525263 Author: Arnaldo Carvalho de Melo Date: Fri Apr 8 11:32:15 2016 -0300 perf tools: Use readdir() instead of deprecated readdir_r() The readdir() function is thread safe as long as just one thread uses a DIR, which is the case when synthesizing events for pre-existing threads by traversing /proc, so, to avoid breaking the build with glibc-2.23.90 (upcoming 2.24), use it instead of readdir_r(). See: http://man7.org/linux/man-pages/man3/readdir.3.html "However, in modern implementations (including the glibc implementation), concurrent calls to readdir() that specify different directory streams are thread-safe. In cases where multiple threads must read from the same directory stream, using readdir() with external synchronization is still preferable to the use of the deprecated readdir_r(3) function." Noticed while building on a Fedora Rawhide docker container. CC /tmp/build/perf/util/event.o util/event.c: In function '__event__synthesize_thread': util/event.c:466:2: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations] while (!readdir_r(tasks, &dirent, &next) && next) { ^~~~~ In file included from /usr/include/features.h:368:0, from /usr/include/stdint.h:25, from /usr/lib/gcc/x86_64-redhat-linux/6.0.0/include/stdint.h:9, from /git/linux/tools/include/linux/types.h:6, from util/event.c:1: /usr/include/dirent.h:189:12: note: declared here Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-i1vj7nyjp2p750rirxgrfd3c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9f448cd3cbcec8995935e60b27802ae56aac8cc0 Author: Alexander Shishkin 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 Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/1462886313-13660-3-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ab92b232ae05c382c3df0e3d6a5c6d16b639ac8c Author: Alexander Shishkin 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 Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/1462886313-13660-2-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 2 ++ 1 file changed, 2 insertions(+) commit 9a7a076e8e4ffcfec05e3cafe4c4e31d41ddbaa0 Author: Dmitry V. Levin Date: Wed May 11 11:48:17 2016 +0300 x86: Use compat version for preadv2 and pwritev2 Similar to preadv and pwritev, preadv2 and pwritev2 need compat entries in the 32-bit syscall table. This bug was found by strace test suite. Fixes: 4babf2c5efb7 ("x86: wire up preadv2 and pwritev2") Signed-off-by: Dmitry V. Levin Acked-by: Christoph Hellwig Link: http://lkml.kernel.org/r/20160511084817.GA29823@altlinux.org Signed-off-by: Thomas Gleixner arch/x86/entry/syscalls/syscall_32.tbl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa Author: David Howells Date: Tue Feb 23 11:03:12 2016 +0000 KEYS: Fix ASN.1 indefinite length object parsing This fixes CVE-2016-0758. In the ASN.1 decoder, when the length field of an ASN.1 value is extracted, it isn't validated against the remaining amount of data before being added to the cursor. With a sufficiently large size indicated, the check: datalen - dp < 2 may then fail due to integer overflow. Fix this by checking the length indicated against the amount of remaining data in both places a definite length is determined. Whilst we're at it, make the following changes: (1) Check the maximum size of extended length does not exceed the capacity of the variable it's being stored in (len) rather than the type that variable is assumed to be (size_t). (2) Compare the EOC tag to the symbolic constant ASN1_EOC rather than the integer 0. (3) To reduce confusion, move the initialisation of len outside of: for (len = 0; n > 0; n--) { since it doesn't have anything to do with the loop counter n. Signed-off-by: David Howells Reviewed-by: Mimi Zohar Acked-by: David Woodhouse Acked-by: Peter Jones lib/asn1_decoder.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 6d6f2833bfbf296101f9f085e10488aef2601ba5 Author: Andrey Ryabinin Date: Wed May 11 16:51:51 2016 +0300 perf/x86: Fix undefined shift on 32-bit kernels Jim reported: UBSAN: Undefined behaviour in arch/x86/events/intel/core.c:3708:12 shift exponent 35 is too large for 32-bit type 'long unsigned int' The use of 'unsigned long' type obviously is not correct here, make it 'unsigned long long' instead. Reported-by: Jim Cromie Signed-off-by: Andrey Ryabinin Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: H. Peter Anvin Cc: Imre Palik Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 2c33645d366d ("perf/x86: Honor the architectural performance monitoring version") Link: http://lkml.kernel.org/r/1462974711-10037-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c3116b745c08dc76ccbed7223c4edddcfd9a186 Author: Peter Zijlstra Date: Tue May 10 14:16:54 2016 +0200 perf/x86/msr: Fix SMI overflow We compute 'delta' and properly sign extend it and then ignore it and recompute the raw value, loosing the sign extention. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Cc: linux-kernel@vger.kernel.org Cc: luto@kernel.org Cc: ray.huang@amd.com Signed-off-by: Ingo Molnar arch/x86/events/msr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec336c879c3b422d2876085be1cbb110e44dc0de Author: hchrzani Date: Mon May 9 09:36:59 2016 +0200 perf/x86/intel/uncore: Fix CHA registers configuration procedure for Knights Landing platform CHA events in Knights Landing platform require programming filter registers properly. Remote node, local node and NonNearMemCachable bits should be set to 1 at all times. Signed-off-by: Hubert Chrzaniuk Signed-off-by: Lawrence F Meadows Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: bp@suse.de Cc: harish.chegondi@intel.com Cc: hpa@zytor.com Cc: izumi.taku@jp.fujitsu.com Cc: kan.liang@intel.com Cc: lukasz.anaczkowski@intel.com Cc: vthakkar1994@gmail.com Fixes: 77af0037de0a ('perf/x86/intel/uncore: Add Knights Landing uncore PMU support') Link: http://lkml.kernel.org/r/1462779419-17115-2-git-send-email-hubert.chrzaniuk@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1b7cc307a88377b0c948f9cbc36d026b272fe6e3 Merge: 5f46fea fa7e281 Author: David S. Miller Date: Wed May 11 23:46:09 2016 -0400 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Add workaround to detect bad opaque in rx completion. 2-part workaround for this hardware bug. ==================== Signed-off-by: David S. Miller commit fa7e28127a5ad9fd55ac9c7707d8c8b835113a7c Author: Michael Chan Date: Tue May 10 19:18:00 2016 -0400 bnxt_en: Add workaround to detect bad opaque in rx completion (part 2) Add detection and recovery code when the hardware returned opaque value does not match the expected consumer index. Once the issue is detected, we skip the processing of all RX and LRO/GRO packets. These completion entries are discarded without sending the SKB to the stack and without producing new buffers. The function will be reset from a workqueue. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 60 +++++++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 61 insertions(+) commit 376a5b8647d6c56cb8f104d7ad0390b4f4057e70 Author: Michael Chan Date: Tue May 10 19:17:59 2016 -0400 bnxt_en: Add workaround to detect bad opaque in rx completion (part 1) There is a rare hardware bug that can cause a bad opaque value in the RX or TPA completion. When this happens, the hardware may have used the same buffer twice for 2 rx packets. In addition, the driver will also crash later using the bad opaque as the index into the ring. The rx opaque value is predictable and is always monotonically increasing. The workaround is to keep track of the expected next opaque value and compare it with the one returned by hardware during RX and TPA start completions. If they miscompare, we will not process any more RX and TPA completions and exit NAPI. We will then schedule a workqueue to reset the function. This patch adds the logic to keep track of the next rx consumer index. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 4 insertions(+) commit 5f46feab87bb105d6a217d966b327fdc56696802 Author: Dan Carpenter Date: Tue May 10 22:20:04 2016 +0300 qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template() If qlcnic_fw_cmd_get_minidump_temp() fails then "fw_dump->tmpl_hdr" is NULL or possibly freed. It can lead to an oops later. Fixes: d01a6d3c8ae1 ('qlcnic: Add support to enable capability to extend minidump for iSCSI') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 58a6e2e5794d2aeacf6a84afeaed46e3a5e0fbb0 Merge: a81a360 e3c00d8 Author: Dave Airlie Date: Thu May 12 10:05:36 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Two some radeon display fixes. * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: fix PLL sharing on DCE6.1 (v2) drm/radeon: fix DP link training issue with second 4K monitor commit a81a36065b5895f2467eb89cb089ba640e160321 Merge: 44549e8 2700818 Author: Dave Airlie Date: Thu May 12 10:05:06 2016 +1000 Merge tag 'drm-intel-fixes-2016-05-11' of git://anongit.freedesktop.org/drm-intel into drm-fixes Misc intel fixes, reverting MST audio which was causing oops for now. * tag 'drm-intel-fixes-2016-05-11' of git://anongit.freedesktop.org/drm-intel: drm/i915: Bail out of pipe config compute loop on LPT Revert "drm/i915: start adding dp mst audio" drm/i915/bdw: Add missing delay during L3 SQC credit programming drm/i915/lvds: separate border enable readout from panel fitter drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency commit 93f0750dcdaed083d6209b01e952e98ca730db66 Author: Mauro Carvalho Chehab Date: Wed May 11 13:09:34 2016 -0300 Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing" This patch causes a Kernel panic when called on a DVB driver. This was also reported by David R : May 7 14:47:35 server kernel: [ 501.247123] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 May 7 14:47:35 server kernel: [ 501.247239] IP: [] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2] May 7 14:47:35 server kernel: [ 501.247354] PGD cae6f067 PUD ca99c067 PMD 0 May 7 14:47:35 server kernel: [ 501.247426] Oops: 0000 [#1] SMP May 7 14:47:35 server kernel: [ 501.247482] Modules linked in: xfs tun xt_connmark xt_TCPMSS xt_tcpmss xt_owner xt_REDIRECT nf_nat_redirect xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ts_kmp ts_bm xt_string ipt_REJECT nf_reject_ipv4 xt_recent xt_conntrack xt_multiport xt_pkttype xt_tcpudp xt_mark nf_log_ipv4 nf_log_common xt_LOG xt_limit iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables ip6table_filter ip6_tables x_tables pppoe pppox dm_crypt ts2020 regmap_i2c ds3000 cx88_dvb dvb_pll cx88_vp3054_i2c mt352 videobuf2_dvb cx8800 cx8802 cx88xx pl2303 tveeprom videobuf2_dma_sg ppdev videobuf2_memops videobuf2_v4l2 videobuf2_core dvb_usb_digitv snd_hda_codec_via snd_hda_codec_hdmi snd_hda_codec_generic radeon dvb_usb snd_hda_intel amd64_edac_mod serio_raw snd_hda_codec edac_core fbcon k10temp bitblit softcursor snd_hda_core font snd_pcm_oss i2c_piix4 snd_mixer_oss tileblit drm_kms_helper syscopyarea snd_pcm snd_seq_dummy sysfillrect snd_seq_oss sysimgblt fb_sys_fops ttm snd_seq_midi r8169 snd_rawmidi drm snd_seq_midi_event e1000e snd_seq snd_seq_device snd_timer snd ptp pps_core i2c_algo_bit soundcore parport_pc ohci_pci shpchp tpm_tis tpm nfsd auth_rpcgss oid_registry hwmon_vid exportfs nfs_acl mii nfs bonding lockd grace lp sunrpc parport May 7 14:47:35 server kernel: [ 501.249564] CPU: 1 PID: 6889 Comm: vb2-cx88[0] Not tainted 4.5.3 #3 May 7 14:47:35 server kernel: [ 501.249644] Hardware name: System manufacturer System Product Name/M4A785TD-V EVO, BIOS 0211 07/08/2009 May 7 14:47:35 server kernel: [ 501.249767] task: ffff8800aebf3600 ti: ffff8801e07a0000 task.ti: ffff8801e07a0000 May 7 14:47:35 server kernel: [ 501.249861] RIP: 0010:[] [] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2] May 7 14:47:35 server kernel: [ 501.250002] RSP: 0018:ffff8801e07a3de8 EFLAGS: 00010086 May 7 14:47:35 server kernel: [ 501.250071] RAX: 0000000000000283 RBX: ffff880210dc5000 RCX: 0000000000000283 May 7 14:47:35 server kernel: [ 501.250161] RDX: ffffffffa0222cf0 RSI: 0000000000000000 RDI: ffff880210dc5014 May 7 14:47:35 server kernel: [ 501.250251] RBP: ffff8801e07a3df8 R08: ffff8801e07a0000 R09: 0000000000000000 May 7 14:47:35 server kernel: [ 501.250348] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8800cda2a9d8 May 7 14:47:35 server kernel: [ 501.250438] R13: ffff880210dc51b8 R14: 0000000000000000 R15: ffff8800cda2a828 May 7 14:47:35 server kernel: [ 501.250528] FS: 00007f5b77fff700(0000) GS:ffff88021fc40000(0000) knlGS:00000000adaffb40 May 7 14:47:35 server kernel: [ 501.250631] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b May 7 14:47:35 server kernel: [ 501.250704] CR2: 0000000000000004 CR3: 00000000ca19d000 CR4: 00000000000006e0 May 7 14:47:35 server kernel: [ 501.250794] Stack: May 7 14:47:35 server kernel: [ 501.250822] ffff8801e07a3df8 ffffffffa0222cfd ffff8801e07a3e70 ffffffffa0236beb May 7 14:47:35 server kernel: [ 501.250937] 0000000000000283 ffff8801e07a3e94 0000000000000000 0000000000000000 May 7 14:47:35 server kernel: [ 501.251051] ffff8800aebf3600 ffffffff8108d8e0 ffff8801e07a3e38 ffff8801e07a3e38 May 7 14:47:35 server kernel: [ 501.251165] Call Trace: May 7 14:47:35 server kernel: [ 501.251200] [] ? __verify_planes_array_core+0xd/0x10 [videobuf2_v4l2] May 7 14:47:35 server kernel: [ 501.251306] [] vb2_core_dqbuf+0x2eb/0x4c0 [videobuf2_core] May 7 14:47:35 server kernel: [ 501.251398] [] ? prepare_to_wait_event+0x100/0x100 May 7 14:47:35 server kernel: [ 501.251482] [] vb2_thread+0x1cb/0x220 [videobuf2_core] May 7 14:47:35 server kernel: [ 501.251569] [] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core] May 7 14:47:35 server kernel: [ 501.251662] [] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core] May 7 14:47:35 server kernel: [ 501.255982] [] kthread+0xc4/0xe0 May 7 14:47:35 server kernel: [ 501.260292] [] ? kthread_park+0x50/0x50 May 7 14:47:35 server kernel: [ 501.264615] [] ret_from_fork+0x3f/0x70 May 7 14:47:35 server kernel: [ 501.268962] [] ? kthread_park+0x50/0x50 May 7 14:47:35 server kernel: [ 501.273216] Code: 0d 01 74 16 48 8b 46 28 48 8b 56 30 48 89 87 d0 01 00 00 48 89 97 d8 01 00 00 5d c3 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 <8b> 46 04 48 89 e5 8d 50 f7 31 c0 83 fa 01 76 02 5d c3 48 83 7e May 7 14:47:35 server kernel: [ 501.282146] RIP [] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2] May 7 14:47:35 server kernel: [ 501.286391] RSP May 7 14:47:35 server kernel: [ 501.290619] CR2: 0000000000000004 May 7 14:47:35 server kernel: [ 501.294786] ---[ end trace b2b354153ccad110 ]--- This reverts commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab. Cc: Sakari Ailus Cc: Hans Verkuil Cc: stable@vger.kernel.org Fixes: 2c1f6951a8a8 ("[media] videobuf2-v4l2: Verify planes array in buffer dequeueing") Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ------ 1 file changed, 6 deletions(-) commit 685764b108a7e5fe9f5ee213d6a627c1166d7c88 Merge: 4d8bbbf 2bcbc81 Author: Linus Torvalds Date: Wed May 11 13:17:12 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 couple of small fixes: one is a potential uninitialised error variable in the alua code, potentially causing spurious failures and the other is a problem caused by the conversion of SCSI to hostwide tags which resulted in the qla1280 driver always failing in host initialisation" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: qla1280: Don't allocate 512kb of host tags scsi_dh_alua: uninitialized variable in alua_rtpg() commit 4d8bbbff1227bbb27fdb02b6db17f080c06eedad Merge: 50c7389 e271c7b Author: Linus Torvalds Date: Wed May 11 12:52:05 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Hopefully the last round of fixes this release, fingers crossed :) 1) Initialize static nf_conntrack_locks_all_lock properly, from Florian Westphal. 2) Need to cancel pending work when destroying IDLETIMER entries, from Liping Zhang. 3) Fix TX param usage when sending TSO over iwlwifi devices, from Emmanuel Grumbach. 4) NFACCT quota params not validated properly, from Phil Turnbull. 5) Resolve more glibc vs. kernel header conflicts, from Mikko Tapeli. 6) Missing IRQ free in ravb_close(), from Geert Uytterhoeven. 7) Fix infoleak in x25, from Kangjie Lu. 8) Similarly in thunderx driver, from Heinrich Schuchardt. 9) tc_ife.h uapi header not exported properly, from Jamal Hadi Salim. 10) Don't reenable PHY interreupts if device is in polling mode, from Shaohui Xie. 11) Packet scheduler actions late binding was not being handled properly at all, from Jamal Hadi Salim. 12) Fix binding of conntrack entries to helpers in openvswitch, from Joe Stringer" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits) gre: do not keep the GRE header around in collect medata mode openvswitch: Fix cached ct with helper. net sched: ife action fix late binding net sched: skbedit action fix late binding net sched: simple action fix late binding net sched: mirred action fix late binding net sched: ipt action fix late binding net sched: vlan action fix late binding net: phylib: fix interrupts re-enablement in phy_start tcp: refresh skb timestamp at retransmit time net: nps_enet: bug fix - handle lost tx interrupts net: nps_enet: Tx handler synchronization export tc ife uapi header net: thunderx: avoid exposing kernel stack net: fix a kernel infoleak in x25 module ravb: Add missing free_irq() call to ravb_close() uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter iwlwifi: mvm: don't override the rate with the AMSDU len netfilter: IDLETIMER: fix race condition when destroy the target ... commit e271c7b4420ddbb9fae82a2b31a5ab3edafcf4fe Author: Jiri Benc Date: Wed May 11 15:53:57 2016 +0200 gre: do not keep the GRE header around in collect medata mode For ipgre interface in collect metadata mode, it doesn't make sense for the interface to be of ARPHRD_IPGRE type. The outer header of received packets is not needed, as all the information from it is present in metadata_dst. We already don't set ipgre_header_ops for collect metadata interfaces, which is the only consumer of mac_header pointing to the outer IP header. Just set the interface type to ARPHRD_NONE in collect metadata mode for ipgre (not gretap, that still correctly stays ARPHRD_ETHER) and reset mac_header. Fixes: a64b04d86d14 ("gre: do not assign header_ops in collect metadata mode") Fixes: 2e15ea390e6f4 ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 16ec3d4fbb967bd0e1c8d9dce9ef70e915a86615 Author: Joe Stringer Date: Wed May 11 10:29:26 2016 -0700 openvswitch: Fix cached ct with helper. When using conntrack helpers from OVS, a common configuration is to perform a lookup without specifying a helper, then go through a firewalling policy, only to decide to attach a helper afterwards. In this case, the initial lookup will cause a ct entry to be attached to the skb, then the later commit with helper should attach the helper and confirm the connection. However, the helper attachment has been missing. If the user has enabled automatic helper attachment, then this issue will be masked as it will be applied in init_conntrack(). It is also masked if the action is executed from ovs_packet_cmd_execute() as that will construct a fresh skb. This patch fixes the issue by making an explicit call to try to assign the helper if there is a discrepancy between the action's helper and the current skb->nfct. Fixes: cae3a2627520 ("openvswitch: Allow attaching helpers to ct action") Signed-off-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 50c73890d314921e2097d47e98c2ca59b3876ec7 Author: Mathias Krause Date: Tue May 10 23:07:02 2016 +0200 x86/extable: ensure entries are swapped completely when sorting The x86 exception table sorting was changed in commit 29934b0fb8ff ("x86/extable: use generic search and sort routines") to use the arch independent code in lib/extable.c. However, the patch was mangled somehow on its way into the kernel from the last version posted at [1]. The committed version kind of attempted to incorporate the changes of commit 548acf19234d ("x86/mm: Expand the exception table logic to allow new handling options") as in _completely_ _ignoring_ the x86 specific 'handler' member of struct exception_table_entry. This effectively broke the sorting as entries will only partly be swapped now. Fortunately, the x86 Kconfig selects BUILDTIME_EXTABLE_SORT, so the exception table doesn't need to be sorted at runtime. However, in case that ever changes, we better not break the exception table sorting just because of that. [ Ard Biesheuvel points out that BUILDTIME_EXTABLE_SORT applies to the core image only, but we still rely on the sorting routines for modules in that case - Linus ] Fix this by providing a swap_ex_entry_fixup() macro that takes care of the 'handler' member. [1] https://lkml.org/lkml/2016/1/27/232 Signed-off-by: Mathias Krause Fixes: 29934b0fb8f ("x86/extable: use generic search and sort routines") Reviewed-by: Ard Biesheuvel Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Tony Luck Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit e0d09e32c9d34edafd790020222050d7701f986f Merge: d32917e 9b1f189 Author: Linus Torvalds Date: Wed May 11 10:21:16 2016 -0700 Merge tag 'spi-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A bunch of small driver specific fixes that have come up, none of them remarkable in themselves. One fixes a regression introduced in the merge window and another two are targetted at stable" * tag 'spi-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT spi: spi-ti-qspi: Handle truncated frames properly spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden spi: omap2-mcspi: Undo broken fix for dma transfer of vmalloced buffer spi: spi-fsl-dspi: Fix cs_change handling in message transfer commit d32917eedc3b8a21f40206c8dd655beae5be8795 Merge: c511462 44ca941 Author: Linus Torvalds Date: Wed May 11 10:11:44 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Two small x86 patches, improving "make kvmconfig" and fixing an objtool warning for CONFIG_PROFILE_ALL_BRANCHES" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvmconfig: add more virtio drivers x86/kvm: Add stack frame dependency to fastop() inline asm commit 84add303ef950b8d85f54bc2248c2bc73467c329 Author: Takashi Iwai Date: Wed May 11 17:48:00 2016 +0200 ALSA: usb-audio: Yet another Phoneix Audio device quirk Phoenix Audio has yet another device with another id (even a different vendor id, 0556:0014) that requires the same quirk for the sample rate. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221 Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit e9d848cb65d5f6f7731d12bd1b6d994bfdbcc94f Author: Namhyung Kim Date: Tue May 10 11:26:24 2016 -0300 perf diff: Fix duplicated output column The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string") moved initialization of column headers but it missed to check the sort__mode. As 'perf diff' doesn't call perf_hpp__init(), the setup_overhead() also should not be called. Before: # Baseline Delta Children Overhead Shared Object Symbol # ........ ....... ........ ........ ................... ....................... # 28.48% -28.47% 28.48% 28.48% [kernel.vmlinux ] [k] intel_idle 11.51% -11.47% 11.51% 11.51% libxul.so [.] 0x0000000001a360f7 3.49% -3.49% 3.49% 3.49% [kernel.vmlinux] [k] generic_exec_single 2.91% -2.89% 2.91% 2.91% libdbus-1.so.3.8.11 [.] 0x000000000000cdc2 2.86% -2.85% 2.86% 2.86% libxcb.so.1.1.0 [.] 0x000000000000c890 2.44% -2.39% 2.44% 2.44% [kernel.vmlinux] [k] perf_event_aux_ctx After: # Baseline Delta Shared Object Symbol # ........ ....... ................... ....................... # 28.48% -28.47% [kernel.vmlinux] [k] intel_idle 11.51% -11.47% libxul.so [.] 0x0000000001a360f7 3.49% -3.49% [kernel.vmlinux] [k] generic_exec_single 2.91% -2.89% libdbus-1.so.3.8.11 [.] 0x000000000000cdc2 2.86% -2.85% libxcb.so.1.1.0 [.] 0x000000000000c890 2.44% -2.39% [kernel.vmlinux] [k] perf_event_aux_ctx Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: # 4.5+ Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string") Link: http://lkml.kernel.org/r/1462890384-12486-2-git-send-email-acme@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+) commit aab0a4c83ceb344d2327194bf354820e50607af6 Author: Boris Brezillon Date: Wed May 11 11:00:02 2016 +0200 ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC The memory range assigned to the PMC (Power Management Controller) was not including the PMC_PCR register which are used to control peripheral clocks. This was working fine thanks to the page granularity of ioremap(), but started to fail when we switched to syscon/regmap, because regmap is making sure that all accesses are falling into the reserved range. Signed-off-by: Boris Brezillon Reported-by: Richard Genoud Tested-by: Richard Genoud Fixes: 863a81c3be1d ("clk: at91: make use of syscon to share PMC registers in several drivers") Cc: Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91sam9x5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3966922548f0ea297a219c5a1c548058d2bd59f6 Author: Takashi Iwai Date: Wed May 11 14:56:12 2016 +0200 ALSA: hda - Fix regression on ATI HDMI audio The HDMI/DP audio output on ATI/AMD chips got broken due to the recent restructuring of chmap. Fortunately, Daniel Exner could bisect, and pointed the culprit commit [739ffee97ed5: ALSA: hda - Add hdmi chmap verb programming ops to chmap object]. This commit moved some ops from hdmi_ops to chmap_ops, and reassigned the ops in the embedded chmap object in hdmi_spec instead. Unfortunately, the reassignment of these ops in patch_atihdmi() were moved into an if block that is performed only for old chips. Thus, on newer chips, the generic ops is still used, which doesn't work for such ATI/AMD chips. This patch addresses the regression, simply by moving the assignment of chmap ops to the right place. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114981 Fixes: 739ffee97ed5 ('ALSA: hda - Add hdmi chmap verb programming ops to chmap object') Reported-and-tested-by: Daniel Exner Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 53d3bc773eaa7ab1cf63585e76af7ee869d5e709 Author: Ingo Molnar Date: Wed May 11 08:25:53 2016 +0200 Revert "sched/fair: Fix fairness issue on migration" Mike reported that this recent commit: 3a47d5124a95 ("sched/fair: Fix fairness issue on migration") ... broke interactivity and the signal starvation test. We have a proper fix series in the works but ran out of time for v4.6, so revert the commit. Reported-by: Mike Galbraith Acked-by: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit e4d35be584be88a3db3fa5635a97c62a2ec5aafe Merge: 99d8258 38b78a5 Author: Al Viro Date: Wed May 11 00:00:29 2016 -0400 Merge branch 'ovl-fixes' into for-linus commit 38b78a5f18584db6fa7441e0f4531b283b0e6725 Author: Miklos Szeredi Date: Wed May 11 01:16:37 2016 +0200 ovl: ignore permissions on underlying lookup Generally permission checking is not necessary when overlayfs looks up a dentry on one of the underlying layers, since search permission on base directory was already checked in ovl_permission(). More specifically using lookup_one_len() causes a problem when the lower directory lacks search permission for a specific user while the upper directory does have search permission. Since lookups are cached, this causes inconsistency in behavior: success depends on who did the first lookup. So instead use lookup_hash() which doesn't do the permission check. Reported-by: Ignacy Gawędzki Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3c9fe8cdff1b889a059a30d22f130372f2b3885f Author: Miklos Szeredi Date: Wed May 11 01:16:37 2016 +0200 vfs: add lookup_hash() helper Overlayfs needs lookup without inode_permission() and already has the name hash (in form of dentry->d_name on overlayfs dentry). It also doesn't support filesystems with d_op->d_hash() so basically it only needs the actual hashed lookup from lookup_one_len_unlocked() So add a new helper that does unlocked lookup of a hashed name. Signed-off-by: Miklos Szeredi fs/namei.c | 33 ++++++++++++++++++++++++++++----- include/linux/namei.h | 2 ++ 2 files changed, 30 insertions(+), 5 deletions(-) commit 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca Author: Miklos Szeredi Date: Wed May 11 01:16:37 2016 +0200 vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Overlayfs itself detects this condition and returns success without doing anything, but then vfs_rename() will proceed as if this was a successful rename (detach_mounts(), d_move()). The correct thing to do is to detect this condition before even calling into overlayfs. This patch does this by calling vfs_select_inode() to get the underlying inodes. Signed-off-by: Miklos Szeredi Cc: # v4.2+ fs/namei.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 54d5ca871e72f2bb172ec9323497f01cd5091ec7 Author: Miklos Szeredi Date: Wed May 11 01:16:37 2016 +0200 vfs: add vfs_select_inode() helper Signed-off-by: Miklos Szeredi Cc: # v4.2+ fs/open.c | 12 ++++-------- include/linux/dcache.h | 12 ++++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) commit 6e14313f01f02f324d5dd68a49d34ec1e4bb569e Merge: 84a527a 4e8c861 Author: David S. Miller Date: Tue May 10 23:50:16 2016 -0400 Merge branch 'net-sched-fixes' Jamal Hadi Salim says: ==================== Some actions were broken in allowing for late binding of actions. Late binding workflow is as follows: a) create an action and provide all necessary parameters for it Optionally provide an index or let the kernel give you one. Example: sudo tc actions add action police rate 1kbit burst 90k drop index 1 b) later on bind to the pre-created action from a filter definition by merely specifying the index. Example: sudo tc filter add dev lo parent ffff: protocol ip prio 8 \ u32 match ip src 127.0.0.8/32 flowid 1:8 action police index 1 ==================== Signed-off-by: David S. Miller commit 4e8c861550105f7aaa85a19b2571151cb8eceaa2 Author: Jamal Hadi Salim Date: Tue May 10 16:49:31 2016 -0400 net sched: ife action fix late binding The process below was broken and is fixed with this patch. //add an ife action and give it an instance id of 1 sudo tc actions add action ife encode \ type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1 //create a filter which binds to ife action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\ match ip dst 17.0.0.1/32 flowid 1:11 action ife index 1 Message before fix was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_ife.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 5e1567aeb7fe0ca478bfad5d17791cce3ddd45c9 Author: Jamal Hadi Salim Date: Tue May 10 16:49:30 2016 -0400 net sched: skbedit action fix late binding The process below was broken and is fixed with this patch. //add a skbedit action and give it an instance id of 1 sudo tc actions add action skbedit mark 10 index 1 //create a filter which binds to skbedit action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\ match ip dst 17.0.0.1/32 flowid 1:10 action skbedit index 1 Message before fix was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_skbedit.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 0e5538ab2b59ec205411949d839de6dbab663730 Author: Jamal Hadi Salim Date: Tue May 10 16:49:29 2016 -0400 net sched: simple action fix late binding The process below was broken and is fixed with this patch. //add a simple action and give it an instance id of 1 sudo tc actions add action simple sdata "foobar" index 1 //create a filter which binds to simple action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\ match ip dst 17.0.0.1/32 flowid 1:10 action simple index 1 Message before fix was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_simple.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 87dfbdc6c7478018c5489897d4495a27a626cda1 Author: Jamal Hadi Salim Date: Tue May 10 16:49:28 2016 -0400 net sched: mirred action fix late binding The process below was broken and is fixed with this patch. //add an mirred action and give it an instance id of 1 sudo tc actions add action mirred egress mirror dev $MDEV index 1 //create a filter which binds to mirred action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\ match ip dst 17.0.0.1/32 flowid 1:10 action mirred index 1 Message before bug fix was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_mirred.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit a57f19d30b2d5fb632b73729b39d05bae188eaed Author: Jamal Hadi Salim Date: Tue May 10 16:49:27 2016 -0400 net sched: ipt action fix late binding This was broken and is fixed with this patch. //add an ipt action and give it an instance id of 1 sudo tc actions add action ipt -j mark --set-mark 2 index 1 //create a filter which binds to ipt action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\ match ip dst 17.0.0.1/32 flowid 1:10 action ipt index 1 Message before bug fix was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_ipt.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 5026c9b1bafcb309bf467b60494b3bcd6364b99c Author: Jamal Hadi Salim Date: Tue May 10 16:49:26 2016 -0400 net sched: vlan action fix late binding Late vlan action binding was broken and is fixed with this patch. //add a vlan action to pop and give it an instance id of 1 sudo tc actions add action vlan pop index 1 //create filter which binds to vlan action id 1 sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32 \ match ip dst 17.0.0.1/32 flowid 1:1 action vlan index 1 current message(before bug fix) was: RTNETLINK answers: Invalid argument We have an error talking to the kernel Signed-off-by: Jamal Hadi Salim Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_vlan.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 84a527a41f38a80353f185d05e41b021e1ff672b Author: Shaohui Xie Date: Tue May 10 17:42:26 2016 +0800 net: phylib: fix interrupts re-enablement in phy_start If phy was suspended and is starting, current driver always enable phy's interrupts, if phy works in polling, phy can raise unexpected interrupt which will not be handled, the interrupt will block system enter suspend again. So interrupts should only be re-enabled if phy works in interrupt. Signed-off-by: Shaohui Xie Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 10a81980fc47e64ffac26a073139813d3f697b64 Author: Eric Dumazet Date: Mon May 9 20:55:16 2016 -0700 tcp: refresh skb timestamp at retransmit time In the very unlikely case __tcp_retransmit_skb() can not use the cloning done in tcp_transmit_skb(), we need to refresh skb_mstamp before doing the copy and transmit, otherwise TCP TS val will be an exact copy of original transmit. Fixes: 7faee5c0d514 ("tcp: remove TCP_SKB_CB(skb)->when") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2348548282d9a2450cc667c2f75ec1d2f0778a40 Author: Suzuki K Poulose Date: Mon May 9 23:37:35 2016 +0100 arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"), added support for ARCH_SUNXI on arm64, but failed to select GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c and causes build failures like : UPD include/generated/compile.h CC init/version.o LD init/built-in.o drivers/built-in.o: In function `sunxi_sc_nmi_set_type': drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip' drivers/built-in.o: In function `irq_domain_add_linear': include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops' include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops' drivers/built-in.o: In function `sunxi_sc_nmi_irq_init': drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips' drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip' drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit' drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit' drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit' drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit' Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option") Signed-off-by: Suzuki K Poulose Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Arnd Bergmann arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 3b0d190aeb21cf5aabf7157161468970296bb88c Merge: d99079e 05c00d8 Author: David S. Miller Date: Tue May 10 15:04:57 2016 -0400 Merge branch 'nps_enet-fixes' Elad Kanfi says: ==================== nps_enet: Net driver bugs fix v3: tx_packet_sent flag is not necessary, use socket buffer pointer instead. Use wmb() instead of smp_wmb(). v2: Remove code style commit for now. Code style commit will be added after the bugs fix will be approved. Summary: 1. Bug description: TX done interrupts that arrives while interrupts are masked, during NAPI poll, will not trigger an interrupt handling. Since TX interrupt is of level edge we will lose the TX done interrupt. As a result all pending tx frames will get no service. Solution: Check if there is a pending tx request after unmasking the interrupt and if answer is yes then re-add ourselves to the NAPI poll list. 2. Bug description: CPU-A before sending a frame will set a variable to true. CPU-B that executes the tx done interrupt service routine might read a non valid value of that variable. Solution: Use the socket buffer pointer instead of the variable, and add a write memory barrier at the tx sending function after the pointer is set. ==================== Signed-off-by: David S. Miller commit 05c00d82f4d170987ac29607e7f3c27223b52d1e Author: Elad Kanfi Date: Mon May 9 20:13:20 2016 +0300 net: nps_enet: bug fix - handle lost tx interrupts The tx interrupt is of edge type, and in case such interrupt is triggered while it is masked it will not be handled even after tx interrupts are re-enabled in the end of NAPI poll. This will cause tx network to stop in the following scenario: * Rx is being handled, hence interrupts are masked. * Tx interrupt is triggered after checking if there is some tx to handle and before re-enabling the interrupts. In this situation only rx transaction will release tx requests. In order to handle the tx that was missed( if there was one ), a NAPI reschdule was added after enabling the interrupts. Signed-off-by: Elad Kanfi Acked-by: Noam Camus Acked-by: Gilad Ben-Yossef Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e5df49d564fe993c68f5cff6d96972a6358b4958 Author: Elad Kanfi Date: Mon May 9 20:13:19 2016 +0300 net: nps_enet: Tx handler synchronization Below is a description of a possible problematic sequence. CPU-A is sending a frame and CPU-B handles the interrupt that indicates the frame was sent. CPU-B reads an invalid value of tx_packet_sent. CPU-A CPU-B ----- ----- nps_enet_send_frame . . tx_skb = skb tx_packet_sent = true order HW to start tx . . HW complete tx ------> get tx complete interrupt . . if(tx_packet_sent == true) handle tx_skb end memory transaction (tx_packet_sent actually written) Furthermore there is a dependency between tx_skb and tx_packet_sent. There is no assurance that tx_skb contains a valid pointer at CPU B when it sees tx_packet_sent == true. Solution: Initialize tx_skb to NULL and use it to indicate that packet was sent, in this way tx_packet_sent can be removed. Add a write memory barrier after setting tx_skb in order to make sure that it is valid before HW is informed and IRQ is fired. Fixed sequence will be: CPU-A CPU-B ----- ----- tx_skb = skb wmb() . . order HW to start tx . . HW complete tx ------> get tx complete interrupt . . if(tx_skb != NULL) handle tx_skb tx_skb = NULL Signed-off-by: Elad Kanfi Acked-by: Noam Camus Acked-by: Gilad Ben-Yossef Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 15 +++++++++------ drivers/net/ethernet/ezchip/nps_enet.h | 2 -- 2 files changed, 9 insertions(+), 8 deletions(-) commit c5114626f33b62fa7595e57d87f33d9d1f8298a2 Merge: 7ec02e3 9a2a5a6 Author: Linus Torvalds Date: Tue May 10 12:04:40 2016 -0700 Merge tag 'pci-v4.6-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Since v4.5, we've WARNed during resume if a PCI device, including a Thunderbolt device, was added while we were suspended. A change we merged for v4.6-rc1 turned that warning into a system hang. These enumeration patches from Lukas Wunner fix this issue: - Fix BUG on device attach failure - Do not treat EPROBE_DEFER as device attach failure" * tag 'pci-v4.6-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Do not treat EPROBE_DEFER as device attach failure PCI: Fix BUG on device attach failure commit ac40b441742b7af76fc04ecfd77c9e86c27d9e36 Author: Geert Uytterhoeven Date: Tue May 10 20:57:57 2016 +0200 regulator: da9063: Correct module alias prefix to fix module autoloading s/paltform/platform/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/regulator/da9063-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ec02e3bf45e0e7502db7f8d50c19abc1ebbab00 Merge: ac24406 8d415ee Author: Linus Torvalds Date: Tue May 10 11:41:05 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: "Two topology corner case fixes, and a MAINTAINERS file update for mmiotrace maintenance" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology: Set x86_max_cores to 1 for CONFIG_SMP=n MAINTAINERS: Add mmiotrace entry x86/topology: Handle CPUID bogosity gracefully commit ac2440654df6ac7314e2f8819fe05e7c863a2392 Merge: 2d0bd95 13b5ab0 Author: Linus Torvalds Date: Tue May 10 11:32:01 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: "A UP kernel cpufreq fix and a rt/dl scheduler corner case fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt, sched/dl: Don't push if task's scheduling class was changed sched/fair: Fix !CONFIG_SMP kernel cpufreq governor breakage commit 44ca941a677323b28366835428ec289a55f764d8 Author: Andrey Utkin Date: Mon May 9 18:04:19 2016 +0300 kvmconfig: add more virtio drivers "make defconfig kvmconfig" is supposed to end up with usable kernel for KVM guest. In practice, it won't work for e.g. Hetzner VPS (KVM-based) unless you add these options. Signed-off-by: Andrey Utkin Signed-off-by: Paolo Bonzini arch/x86/configs/kvm_guest.config | 3 +++ 1 file changed, 3 insertions(+) commit 4548f63e65116458da5245d89aa213b4f8b2ab16 Author: Josh Poimboeuf Date: Wed Mar 9 12:59:50 2016 -0600 x86/kvm: Add stack frame dependency to fastop() inline asm The kbuild test robot reported this objtool warning [1]: arch/x86/kvm/emulate.o: warning: objtool: fastop()+0x69: call without frame pointer save/setup The issue seems to be caused by CONFIG_PROFILE_ALL_BRANCHES. With that option, for some reason gcc decides not to create a stack frame in fastop() before doing the inline asm call, which can result in a bad stack trace. Force a stack frame to be created if CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output operand for the inline asm statement. This change has no effect for !CONFIG_PROFILE_ALL_BRANCHES. [1] https://lists.01.org/pipermail/kbuild-all/2016-March/018249.html Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Acked-by: Ingo Molnar Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3231e2053eaeee70bdfb216a78a30f11e88e2243 Author: Yura Pakhuchiy Date: Sat May 7 23:53:36 2016 +0700 ALSA: hda - Fix subwoofer pin on ASUS N751 and N551 Subwoofer does not work out of the box on ASUS N751/N551 laptops. This patch fixes it. Patch tested on N751 laptop. N551 part is not tested, but according to [1] and [2] this laptop requires similar changes, so I included them in the patch. 1. https://github.com/honsiorovskyi/asus-n551-hda-fix 2. https://bugs.launchpad.net/ubuntu/+source/alsa-tools/+bug/1405691 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117781 Signed-off-by: Yura Pakhuchiy Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e061b5695ad52c987d4ee9033a6d09163da6607a Merge: 44549e8 b8453d4 Author: Arnd Bergmann Date: Tue May 10 11:27:45 2016 +0200 Merge tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes Merge "at91: fixes for 4.6 #1" from Nicolas Ferre: Here is a late fix for AT91. Sorry to have figure it out so late in the development cycle but we had to confirm it was an error with the documentation of two products. So, as the compatibility string is in since 4.6-rc1 and that the previous one works okay, it's a good opportunity to switch back to the one that works without introducing a intermediary bug. The revert on driver code and the removal of the useless additional compatibility string will be queued for 4.7 through NAND/MTD. * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sama5d2: use "atmel,sama5d3-nfc" compatible for nfc commit addacd801e1638f41d659cb53b9b73fc14322cb1 Author: Takashi Iwai Date: Tue May 10 10:24:02 2016 +0200 ALSA: hda - Fix broken reconfig The HD-audio reconfig function got broken in the recent kernels, typically resulting in a failure like: snd_hda_intel 0000:00:1b.0: control 3:0:0:Playback Channel Map:0 is already present This is because of the code restructuring to move the PCM and control instantiation into the codec drive probe, by the commit [bcd96557bd0a: ALSA: hda - Build PCMs and controls at codec driver probe]. Although the commit above removed the calls of snd_hda_codec_build_pcms() and *_build_controls() at the controller driver probe, the similar calls in the reconfig were still left forgotten. This caused the conflicting and duplicated PCMs and controls. The fix is trivial: just remove these superfluous calls from reconfig_codec(). Fixes: bcd96557bd0a ('ALSA: hda - Build PCMs and controls at codec driver probe') Reported-by: Jochen Henneberg Cc: # v4.1+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_sysfs.c | 8 -------- 1 file changed, 8 deletions(-) commit 13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 Author: Xunlei Pang Date: Mon May 9 12:11:31 2016 +0800 sched/rt, sched/dl: Don't push if task's scheduling class was changed We got this warning: WARNING: CPU: 1 PID: 2468 at kernel/sched/core.c:1161 set_task_cpu+0x1af/0x1c0 [...] Call Trace: dump_stack+0x63/0x87 __warn+0xd1/0xf0 warn_slowpath_null+0x1d/0x20 set_task_cpu+0x1af/0x1c0 push_dl_task.part.34+0xea/0x180 push_dl_tasks+0x17/0x30 __balance_callback+0x45/0x5c __sched_setscheduler+0x906/0xb90 SyS_sched_setattr+0x150/0x190 do_syscall_64+0x62/0x110 entry_SYSCALL64_slow_path+0x25/0x25 This corresponds to: WARN_ON_ONCE(p->state == TASK_RUNNING && p->sched_class == &fair_sched_class && (p->on_rq && !task_on_rq_migrating(p))) It happens because in find_lock_later_rq(), the task whose scheduling class was changed to fair class is still pushed away as if it were a deadline task ... So, check in find_lock_later_rq() after double_lock_balance(), if the scheduling class of the deadline task was changed, break and retry. Apply the same logic to RT tasks. Signed-off-by: Xunlei Pang Reviewed-by: Steven Rostedt Acked-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Juri Lelli Link: http://lkml.kernel.org/r/1462767091-1215-1-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 1 + kernel/sched/rt.c | 1 + 2 files changed, 2 insertions(+) commit 2700818ac9f935d8590715eecd7e8cadbca552b6 Author: Daniel Vetter Date: Tue May 3 10:33:01 2016 +0200 drm/i915: Bail out of pipe config compute loop on LPT LPT is pch, so might run into the fdi bandwidth constraint (especially since it has only 2 lanes). But right now we just force pipe_bpp back to 24, resulting in a nice loop (which we bail out with a loud WARN_ON). Fix this. Cc: Chris Wilson Cc: Maarten Lankhorst References: https://bugs.freedesktop.org/show_bug.cgi?id=93477 Signed-off-by: Daniel Vetter Tested-by: Chris Wilson Signed-off-by: Maarten Lankhorst Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1462264381-7573-1-git-send-email-daniel.vetter@ffwll.ch (cherry picked from commit f58a1acc7e4a1f37d26124ce4c875c647fbcc61f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_crt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8d415ee225a3d15d3e3029524350e8237a4de7b8 Author: Thomas Gleixner Date: Tue May 10 09:20:33 2016 +0200 x86/topology: Set x86_max_cores to 1 for CONFIG_SMP=n Josef reported that the uncore driver trips over with CONFIG_SMP=n because x86_max_cores is 16 instead of 12. The reason is, that for SMP=n the extended topology detection is a NOOP and the cache leaf is used to determine the number of cores. That's wrong in two aspects: 1) The cache leaf enumerates the maximum addressable number of cores in the package, which is obviously not correct 2) UP has no business with topology bits at all. Make intel_num_cpu_cores() return 1 for CONFIG_SMP=n Reported-by: Josef Bacik Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: kernel-team Cc: Kan Liang Link: http://lkml.kernel.org/r/761b4a2a-0332-7954-f030-c6639f949612@fb.com arch/x86/kernel/cpu/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8453d4ee9e24c6590dd0eecbab1c3cc2028317f Author: Wenyou Yang Date: Mon May 9 14:51:19 2016 +0800 ARM: dts: at91: sama5d2: use "atmel,sama5d3-nfc" compatible for nfc An error in documentation of the NAND Flash Controller (NFC) led to choose another compatibility string for sama5d2 with an impact on the NAND flash ready/busy information. It was producing the error message: atmel_nand 80000000.nand: Time out to wait for interrupt: 0x08000000 and had an impact on performance. So, switch back to the classical "atmel,sama5d3-nfc" compatibility string for this SoC which gives the proper ready/busy bit information. The NAND flash driver will be updated to remove the support for this different implementation. Signed-off-by: Wenyou Yang Acked-by: Romain Izard [nicolas.ferre@atmel.com: change commit message] Signed-off-by: Nicolas Ferre arch/arm/boot/dts/sama5d2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d99079e2fbd5ac38884f498ca99435d525152a88 Author: Jamal Hadi Salim Date: Mon May 9 08:05:06 2016 -0400 export tc ife uapi header Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/uapi/linux/tc_act/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 5e769ada93b2111010d3ca96213fc0b37c95afc8 Merge: adc0a8b cbbba30 Author: David S. Miller Date: Tue May 10 01:02:51 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.6 iwlwifi * fix P2P rates (and possibly other issues) ==================== Signed-off-by: David S. Miller commit adc0a8bfdc52cbbfe76730b166a17cb0d5cbc0f4 Merge: 161de2c eda3fc5 Author: David S. Miller Date: Tue May 10 00:50:20 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contain Netfilter simple fixes for your net tree, two one-liner and one two-liner: 1) Oneliner to fix missing spinlock definition that triggers 'BUG: spinlock bad magic on CPU#' when spinlock debugging is enabled, from Florian Westphal. 2) Fix missing workqueue cancelation on IDLETIMER removal, from Liping Zhang. 3) Fix insufficient validation of netlink of NFACCT_QUOTA in nfnetlink_acct, from Phil Turnbull. ==================== Signed-off-by: David S. Miller commit 161de2caf68c549c266e571ffba8e2163886fb10 Author: xypron.glpk@gmx.de Date: Mon May 9 00:46:18 2016 +0200 net: thunderx: avoid exposing kernel stack Reserved fields should be set to zero to avoid exposing bits from the kernel stack. Signed-off-by: Heinrich Schuchardt Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 4 ++++ 1 file changed, 4 insertions(+) commit 79e48650320e6fba48369fccf13fd045315b19b8 Author: Kangjie Lu Date: Sun May 8 12:10:14 2016 -0400 net: fix a kernel infoleak in x25 module Stack object "dte_facilities" is allocated in x25_rx_call_request(), which is supposed to be initialized in x25_negotiate_facilities. However, 5 fields (8 bytes in total) are not initialized. This object is then copied to userland via copy_to_user, thus infoleak occurs. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller net/x25/x25_facilities.c | 1 + 1 file changed, 1 insertion(+) commit 7fa816b92c52e2c304f2ff6401e0d51e1d229ca5 Author: Geert Uytterhoeven Date: Sat May 7 13:17:11 2016 +0200 ravb: Add missing free_irq() call 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:ch24:emac) vs. 00000000 (eth0:ch24:emac) ravb e6800000.ethernet eth0: cannot request IRQ eth0:ch24:emac 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 the R-Car Gen3-specific secondary IRQ. Add the missing free_irq() call to fix this. Fixes: 22d4df8ff3a3cc72 ("ravb: Add support for r8a7795 SoC") Signed-off-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 4a91cb61bb995e5571098188092e296192309c77 Author: Mikko Rapeli Date: Sun Apr 24 17:45:00 2016 +0200 uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h glibc's net/if.h contains copies of definitions from linux/if.h and these conflict and cause build failures if both files are included by application source code. Changes in uapi headers, which fixed header file dependencies to include linux/if.h when it was needed, e.g. commit 1ffad83d, made the net/if.h and linux/if.h incompatibilities visible as build failures for userspace applications like iproute2 and xtables-addons. This patch fixes compile errors when glibc net/if.h is included before linux/if.h: ./linux/if.h:99:21: error: redeclaration of enumerator ‘IFF_NOARP’ ./linux/if.h:98:23: error: redeclaration of enumerator ‘IFF_RUNNING’ ./linux/if.h:97:26: error: redeclaration of enumerator ‘IFF_NOTRAILERS’ ./linux/if.h:96:27: error: redeclaration of enumerator ‘IFF_POINTOPOINT’ ./linux/if.h:95:24: error: redeclaration of enumerator ‘IFF_LOOPBACK’ ./linux/if.h:94:21: error: redeclaration of enumerator ‘IFF_DEBUG’ ./linux/if.h:93:25: error: redeclaration of enumerator ‘IFF_BROADCAST’ ./linux/if.h:92:19: error: redeclaration of enumerator ‘IFF_UP’ ./linux/if.h:252:8: error: redefinition of ‘struct ifconf’ ./linux/if.h:203:8: error: redefinition of ‘struct ifreq’ ./linux/if.h:169:8: error: redefinition of ‘struct ifmap’ ./linux/if.h:107:23: error: redeclaration of enumerator ‘IFF_DYNAMIC’ ./linux/if.h:106:25: error: redeclaration of enumerator ‘IFF_AUTOMEDIA’ ./linux/if.h:105:23: error: redeclaration of enumerator ‘IFF_PORTSEL’ ./linux/if.h:104:25: error: redeclaration of enumerator ‘IFF_MULTICAST’ ./linux/if.h:103:21: error: redeclaration of enumerator ‘IFF_SLAVE’ ./linux/if.h:102:22: error: redeclaration of enumerator ‘IFF_MASTER’ ./linux/if.h:101:24: error: redeclaration of enumerator ‘IFF_ALLMULTI’ ./linux/if.h:100:23: error: redeclaration of enumerator ‘IFF_PROMISC’ The cases where linux/if.h is included before net/if.h need a similar fix in the glibc side, or the order of include files can be changed userspace code as a workaround. This change was tested in x86 userspace on Debian unstable with scripts/headers_compile_test.sh: $ make headers_install && \ cd usr/include && ../../scripts/headers_compile_test.sh -l -k ... cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i586-linux-gnu/5/include-fixed -I . -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH/i586-linux-gnu -o /dev/null ./linux/if.h_libc_before_kernel.h PASSED libc before kernel test: ./linux/if.h Reported-by: Jan Engelhardt Reported-by: Josh Boyer Reported-by: Stephen Hemminger Reported-by: Waldemar Brodkorb Cc: Gabriel Laskar Signed-off-by: Mikko Rapeli Signed-off-by: David S. Miller include/uapi/linux/if.h | 28 +++++++++++++++++++++++++ include/uapi/linux/libc-compat.h | 44 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) commit 2d0bd9534c8ddaebee64e1b4b7d621915f65e994 Merge: 0161028 1b8d2af Author: Linus Torvalds Date: Mon May 9 18:24:04 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm build fix from Dan Williams: "A build fix for the usage of HPAGE_SIZE in the last libnvdimm pull request. I have taken note that the kbuild robot build success test does not include results for alpha_allmodconfig. Thanks to Guenter for the report. It's tagged for -stable since the original fix will land there and cause build problems" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pfn: fix ARCH=alpha allmodconfig build failure commit 0161028b7c8aebef64194d3d73e43bc3b53b5c66 Author: Andy Lutomirski Date: Mon May 9 15:48:51 2016 -0700 perf/core: Change the default paranoia level to 2 Allowing unprivileged kernel profiling lets any user dump follow kernel control flow and dump kernel registers. This most likely allows trivial kASLR bypassing, and it may allow other mischief as well. (Off the top of my head, the PERF_SAMPLE_REGS_INTR output during /dev/urandom reads could be quite interesting.) Signed-off-by: Andy Lutomirski Acked-by: Kees Cook Signed-off-by: Linus Torvalds Documentation/sysctl/kernel.txt | 2 +- kernel/events/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5c56b563b4486281bff80658194f0d1da6feba67 Merge: b507146 44f43e9 Author: Linus Torvalds Date: Mon May 9 17:54:59 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "2 fixes" * emailed patches from Andrew Morton : zsmalloc: fix zs_can_compact() integer overflow Revert "proc/base: make prompt shell start from new line after executing "cat /proc/$pid/wchan"" commit 44f43e99fe70833058482d183e99fdfd11220996 Author: Sergey Senozhatsky Date: Mon May 9 16:28:49 2016 -0700 zsmalloc: fix zs_can_compact() integer overflow zs_can_compact() has two race conditions in its core calculation: unsigned long obj_wasted = zs_stat_get(class, OBJ_ALLOCATED) - zs_stat_get(class, OBJ_USED); 1) classes are not locked, so the numbers of allocated and used objects can change by the concurrent ops happening on other CPUs 2) shrinker invokes it from preemptible context Depending on the circumstances, thus, OBJ_ALLOCATED can become less than OBJ_USED, which can result in either very high or negative `total_scan' value calculated later in do_shrink_slab(). do_shrink_slab() has some logic to prevent those cases: vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-64 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62 However, due to the way `total_scan' is calculated, not every shrinker->count_objects() overflow can be spotted and handled. To demonstrate the latter, I added some debugging code to do_shrink_slab() (x86_64) and the results were: vmscan: OVERFLOW: shrinker->count_objects() == -1 [18446744073709551615] vmscan: but total_scan > 0: 92679974445502 vmscan: resulting total_scan: 92679974445502 [..] vmscan: OVERFLOW: shrinker->count_objects() == -1 [18446744073709551615] vmscan: but total_scan > 0: 22634041808232578 vmscan: resulting total_scan: 22634041808232578 Even though shrinker->count_objects() has returned an overflowed value, the resulting `total_scan' is positive, and, what is more worrisome, it is insanely huge. This value is getting used later on in shrinker->scan_objects() loop: while (total_scan >= batch_size || total_scan >= freeable) { unsigned long ret; unsigned long nr_to_scan = min(batch_size, total_scan); shrinkctl->nr_to_scan = nr_to_scan; ret = shrinker->scan_objects(shrinker, shrinkctl); if (ret == SHRINK_STOP) break; freed += ret; count_vm_events(SLABS_SCANNED, nr_to_scan); total_scan -= nr_to_scan; cond_resched(); } `total_scan >= batch_size' is true for a very-very long time and 'total_scan >= freeable' is also true for quite some time, because `freeable < 0' and `total_scan' is large enough, for example, 22634041808232578. The only break condition, in the given scheme of things, is shrinker->scan_objects() == SHRINK_STOP test, which is a bit too weak to rely on, especially in heavy zsmalloc-usage scenarios. To fix the issue, take a pool stat snapshot and use it instead of racy zs_stat_get() calls. Link: http://lkml.kernel.org/r/20160509140052.3389-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: [4.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1e92a61c4c7ed85c1bec037c046e92d6dc762f32 Author: Robin Humble Date: Mon May 9 16:28:46 2016 -0700 Revert "proc/base: make prompt shell start from new line after executing "cat /proc/$pid/wchan"" This reverts the 4.6-rc1 commit 7e2bc81da333 ("proc/base: make prompt shell start from new line after executing "cat /proc/$pid/wchan") because it breaks /proc/$PID/whcan formatting in ps and top. Revert also because the patch is inconsistent - it adds a newline at the end of only the '0' wchan, and does not add a newline when /proc/$PID/wchan contains a symbol name. eg. $ ps -eo pid,stat,wchan,comm PID STAT WCHAN COMMAND ... 1189 S - dbus-launch 1190 Ssl 0 dbus-daemon 1198 Sl 0 lightdm 1299 Ss ep_pol systemd 1301 S - (sd-pam) 1304 Ss wait sh Signed-off-by: Robin Humble Cc: Minfei Huang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c52c545ead97fcc2f4f8ea38f1ae3c23211e09a8 Author: H. Nikolaus Schaller Date: Mon May 9 17:01:01 2016 -0700 Input: twl6040-vibra - fix DT node memory management commit e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") made the separate vibra DT node to a subnode of the twl6040. It now calls of_find_node_by_name() to locate the "vibra" subnode. This function has a side effect to call of_node_put on() for the twl6040 parent node passed in as a parameter. This causes trouble later on. Solution: we must call of_node_get() before of_find_node_by_name() Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 1 + 1 file changed, 1 insertion(+) commit b507146bb6b9ac0c0197100ba3e299825a21fed3 Merge: 26acc79 58446fe Author: Linus Torvalds Date: Mon May 9 12:24:19 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: - bug in ahash SG list walking that may lead to crashes - resource leak in qat - missing RSA dependency that causes it to fail" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: rsa - select crypto mgr dependency crypto: hash - Fix page length clamping in hash walk crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq crypto: qat - fix invalid pf2vf_resp_wq logic commit 26acc792c90c6fa1066ba128074b20d2e21790ef Merge: 8634de6 8846a12 Author: Linus Torvalds Date: Mon May 9 12:11:37 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Check klogctl failure correctly, from Colin Ian King. 2) Prevent OOM when under memory pressure in flowcache, from Steffen Klassert. 3) Fix info leak in llc and rtnetlink ifmap code, from Kangjie Lu. 4) Memory barrier and multicast handling fixes in bnxt_en, from Michael Chan. 5) Endianness bug in mlx5, from Daniel Jurgens. 6) Fix disconnect handling in VSOCK, from Ian Campbell. 7) Fix locking of netdev list walking in get_bridge_ifindices(), from Nikolay Aleksandrov. 8) Bridge multicast MLD parser can look at wrong packet offsets, fix from Linus Lüssing. 9) Fix chip hang in qede driver, from Sudarsana Reddy Kalluru. 10) Fix missing setting of encapsulation before inner handling completes in udp_offload code, from Jarno Rajahalme. 11) Missing rollbacks during LAG join and flood configuration failures in mlxsw driver, from Ido Schimmel. 12) Fix error code checks in netxen driver, from Dan Carpenter. 13) Fix key size in new macsec driver, from Sabrina Dubroca. 14) Fix mlx5/VXLAN dependencies, from Arnd Bergmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits) net/mlx5e: make VXLAN support conditional Revert "net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue" macsec: key identifier is 128 bits, not 64 Documentation/networking: more accurate LCO explanation macvtap: segmented packet is consumed tools: bpf_jit_disasm: check for klogctl failure qede: uninitialized variable in qede_start_xmit() netxen: netxen_rom_fast_read() doesn't return -1 netxen: reversed condition in netxen_nic_set_link_parameters() netxen: fix error handling in netxen_get_flash_block() mlxsw: spectrum: Add missing rollback in flood configuration mlxsw: spectrum: Fix rollback order in LAG join failure udp_offload: Set encapsulation before inner completes. udp_tunnel: Remove redundant udp_tunnel_gro_complete(). qede: prevent chip hang when increasing channels net: ipv6: tcp reset, icmp need to consider L3 domain bridge: fix igmp / mld query parsing net: bridge: fix old ioctl unlocked net device walk VSOCK: do not disconnect socket when peer has shutdown SEND only net/mlx4_en: Fix endianness bug in IPV6 csum calculation ... commit 8634de6d254462e6953b7dac772a1df4f44c8030 Author: Josh Poimboeuf Date: Fri May 6 09:22:25 2016 -0500 compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() gcc support for __builtin_bswap16() was supposedly added for powerpc in gcc 4.6, and was then later added for other architectures in gcc 4.8. However, Stephen Rothwell reported that attempting to use it on powerpc in gcc 4.6 fails with: lib/vsprintf.c:160:2: error: initializer element is not constant lib/vsprintf.c:160:2: error: (near initialization for 'decpair[0]') lib/vsprintf.c:160:2: error: initializer element is not constant lib/vsprintf.c:160:2: error: (near initialization for 'decpair[1]') ... I'm not entirely sure what those errors mean, but I don't see them on gcc 4.8. So let's consider gcc 4.8 to be the official starting point for __builtin_bswap16(). Arnd Bergmann adds: "I found the commit in gcc-4.8 that replaced the powerpc-specific implementation of __builtin_bswap16 with an architecture-independent one. Apparently the powerpc version (gcc-4.6 and 4.7) just mapped to the lhbrx/sthbrx instructions, so it ended up not being a constant, though the intent of the patch was mainly to add support for the builtin to x86: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 has the patch that went into gcc-4.8 and more information." Fixes: 7322dd755e7d ("byteswap: try to avoid __builtin_constant_p gcc bug") Reported-by: Stephen Rothwell Tested-by: Stephen Rothwell Acked-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ae645d5fa385f3787bf1723639cd907fe5865e7 Author: Marek Szyprowski Date: Mon May 9 09:31:47 2016 -0700 Input: max8997-haptic - fix NULL pointer dereference NULL pointer derefence happens when booting with DTB because the platform data for haptic device is not set in supplied data from parent MFD device. The MFD device creates only platform data (from Device Tree) for itself, not for haptic child. Unable to handle kernel NULL pointer dereference at virtual address 0000009c pgd = c0004000 [0000009c] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM (max8997_haptic_probe) from [] (platform_drv_probe+0x4c/0xb0) (platform_drv_probe) from [] (driver_probe_device+0x214/0x2c0) (driver_probe_device) from [] (__driver_attach+0xac/0xb0) (__driver_attach) from [] (bus_for_each_dev+0x68/0x9c) (bus_for_each_dev) from [] (bus_add_driver+0x1a0/0x218) (bus_add_driver) from [] (driver_register+0x78/0xf8) (driver_register) from [] (do_one_initcall+0x90/0x1d8) (do_one_initcall) from [] (kernel_init_freeable+0x15c/0x1fc) (kernel_init_freeable) from [] (kernel_init+0x8/0x114) (kernel_init) from [] (ret_from_fork+0x14/0x3c) Signed-off-by: Marek Szyprowski Cc: Fixes: 104594b01ce7 ("Input: add driver support for MAX8997-haptic") [k.kozlowski: Write commit message, add CC-stable] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dmitry Torokhov drivers/input/misc/max8997_haptic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 82aaa086019ce0e6fcd3a44c0a2e4329afe988b6 Author: Chris Diamand Date: Mon May 9 09:30:39 2016 -0700 Input: byd - update copyright header As pointed out by Richard, the changes to the comment got missed off the absolute mode patch somehow. Signed-off-by: Chris Diamand Signed-off-by: Dmitry Torokhov drivers/input/mouse/byd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4f41fc59620fcedaa97cbdf3d7d2956d80fcd922 Author: Serge E. Hallyn Date: Mon May 9 09:59:55 2016 -0500 cgroup, kernfs: make mountinfo show properly scoped path for cgroup namespaces Patch summary: When showing a cgroupfs entry in mountinfo, show the path of the mount root dentry relative to the reader's cgroup namespace root. Short explanation (courtesy of mkerrisk): If we create a new cgroup namespace, then we want both /proc/self/cgroup and /proc/self/mountinfo to show cgroup paths that are correctly virtualized with respect to the cgroup mount point. Previous to this patch, /proc/self/cgroup shows the right info, but /proc/self/mountinfo does not. Long version: When a uid 0 task which is in freezer cgroup /a/b, unshares a new cgroup namespace, and then mounts a new instance of the freezer cgroup, the new mount will be rooted at /a/b. The root dentry field of the mountinfo entry will show '/a/b'. cat > /tmp/do1 << EOF mount -t cgroup -o freezer freezer /mnt grep freezer /proc/self/mountinfo EOF unshare -Gm bash /tmp/do1 > 330 160 0:34 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer > 355 133 0:34 /a/b /mnt rw,relatime - cgroup freezer rw,freezer The task's freezer cgroup entry in /proc/self/cgroup will simply show '/': grep freezer /proc/self/cgroup 9:freezer:/ If instead the same task simply bind mounts the /a/b cgroup directory, the resulting mountinfo entry will again show /a/b for the dentry root. However in this case the task will find its own cgroup at /mnt/a/b, not at /mnt: mount --bind /sys/fs/cgroup/freezer/a/b /mnt 130 25 0:34 /a/b /mnt rw,nosuid,nodev,noexec,relatime shared:21 - cgroup cgroup rw,freezer In other words, there is no way for the task to know, based on what is in mountinfo, which cgroup directory is its own. Example (by mkerrisk): First, a little script to save some typing and verbiage: echo -e "\t/proc/self/cgroup:\t$(cat /proc/self/cgroup | grep freezer)" cat /proc/self/mountinfo | grep freezer | awk '{print "\tmountinfo:\t\t" $4 "\t" $5}' Create cgroup, place this shell into the cgroup, and look at the state of the /proc files: 2653 2653 # Our shell 14254 # cat(1) /proc/self/cgroup: 10:freezer:/a/b mountinfo: / /sys/fs/cgroup/freezer Create a shell in new cgroup and mount namespaces. The act of creating a new cgroup namespace causes the process's current cgroups directories to become its cgroup root directories. (Here, I'm using my own version of the "unshare" utility, which takes the same options as the util-linux version): Look at the state of the /proc files: /proc/self/cgroup: 10:freezer:/ mountinfo: / /sys/fs/cgroup/freezer The third entry in /proc/self/cgroup (the pathname of the cgroup inside the hierarchy) is correctly virtualized w.r.t. the cgroup namespace, which is rooted at /a/b in the outer namespace. However, the info in /proc/self/mountinfo is not for this cgroup namespace, since we are seeing a duplicate of the mount from the old mount namespace, and the info there does not correspond to the new cgroup namespace. However, trying to create a new mount still doesn't show us the right information in mountinfo: # propagating to other mountns /proc/self/cgroup: 7:freezer:/ mountinfo: /a/b /mnt/freezer The act of creating a new cgroup namespace caused the process's current freezer directory, "/a/b", to become its cgroup freezer root directory. In other words, the pathname directory of the directory within the newly mounted cgroup filesystem should be "/", but mountinfo wrongly shows us "/a/b". The consequence of this is that the process in the cgroup namespace cannot correctly construct the pathname of its cgroup root directory from the information in /proc/PID/mountinfo. With this patch, the dentry root field in mountinfo is shown relative to the reader's cgroup namespace. So the same steps as above: /proc/self/cgroup: 10:freezer:/a/b mountinfo: / /sys/fs/cgroup/freezer /proc/self/cgroup: 10:freezer:/ mountinfo: /../.. /sys/fs/cgroup/freezer /proc/self/cgroup: 10:freezer:/ mountinfo: / /mnt/freezer cgroup.clone_children freezer.parent_freezing freezer.state tasks cgroup.procs freezer.self_freezing notify_on_release 3164 2653 # First shell that placed in this cgroup 3164 # Shell started by 'unshare' 14197 # cat(1) Signed-off-by: Serge Hallyn Tested-by: Michael Kerrisk Acked-by: Michael Kerrisk Signed-off-by: Tejun Heo fs/kernfs/mount.c | 14 +++++++++++ include/linux/kernfs.h | 2 ++ kernel/cgroup.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) commit df27b26f04ed388ff4cc2b5d8cfdb5d97678816f Author: Herbert Xu Date: Thu May 5 16:42:49 2016 +0800 crypto: testmgr - Use kmalloc memory for RSA input As akcipher uses an SG interface, you must not use vmalloc memory as input for it. This patch fixes testmgr to copy the vmalloc test vectors to kmalloc memory before running the test. This patch also removes a superfluous sg_virt call in do_test_rsa. Cc: Reported-by: Anatoly Pugachev Signed-off-by: Herbert Xu crypto/testmgr.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 2da2dc9ead232f25601404335cca13c0f722d41b Author: Kaho Ng Date: Mon May 9 00:27:49 2016 +0800 ALSA: hda - Fix white noise on Asus UX501VW headset For reducing the noise from the headset output on ASUS UX501VW, call the existing fixup, alc_fixup_headset_mode_alc668(), additionally. Thread: https://bbs.archlinux.org/viewtopic.php?id=209554 Signed-off-by: Kaho Ng Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 8846a125de97f96be64ca234906eedfd26ad778e Merge: 8acca6a 7dbb291 Author: David S. Miller Date: Mon May 9 00:21:13 2016 -0400 Merge branch 'mlx5-build-fix' Saeed Mahameed says: ==================== net/mlx5e: Kconfig fixes for VxLAN Reposting to net the build errors fixes posted by Arnd last week. Originally Arnd posted those fixes to net-next, while the issue is also seen in net. For net-next a different approach is required for fixing the issue as VXLAN and Device Drivers are no longer dependent, but there is no harm for those fixes to get into net-next. Optionally, once net is merged into net-next we can Revert "net/mlx5e: make VXLAN support conditional" as the CONFIG_MLX5_CORE_EN_VXLAN will no longer be required. Applied on top: 288928658583 ('mlxsw: spectrum: Add missing rollback in flood configuration') ==================== Signed-off-by: David S. Miller commit 7dbb29172d415ccccad1166700d6be78dee9f2bc Author: Arnd Bergmann Date: Sun May 8 14:55:25 2016 +0300 net/mlx5e: make VXLAN support conditional VXLAN can be disabled at compile-time or it can be a loadable module while mlx5 is built-in, which leads to a link error: drivers/net/built-in.o: In function `mlx5e_create_netdev': ntb_netdev.c:(.text+0x106de4): undefined reference to `vxlan_get_rx_port' This avoids the link error and makes the vxlan code optional, like the other ethernet drivers do as well. Link: https://patchwork.ozlabs.org/patch/589296/ Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Arnd Bergmann Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 7 +++++++ drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 11 +++++++++-- 5 files changed, 24 insertions(+), 3 deletions(-) commit 7fd7406d9c7e3c6f235aec224a811dc0fd29e049 Author: Arnd Bergmann Date: Sun May 8 14:55:24 2016 +0300 Revert "net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue" This reverts commit 69976fb1045850a742deb9790ea49cbc6f497531. We cannot select VXLAN when IPv4 support is disabled, that just gives us additional build errors, including: warning: (MLX5_CORE_EN) selects VXLAN which has unmet direct dependencies (NETDEVICES && NET_CORE && INET) In file included from ../drivers/net/vxlan.c:36:0: include/net/udp_tunnel.h: In function 'udp_tunnel_handle_offloads': include/net/udp_tunnel.h:112:9: error: implicit declaration of function 'iptunnel_handle_offloads' [-Werror=implicit-function-declaration] return iptunnel_handle_offloads(skb, type); ^~~~~~~~~~~~~~~~~~~~~~~~ I'm sending a proper fix for the original bug in a separate patch. Signed-off-by: Arnd Bergmann Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 8acca6acebd07b238af2e61e4f7d55e6232c7e3a Author: Sabrina Dubroca Date: Sat May 7 20:19:29 2016 +0200 macsec: key identifier is 128 bits, not 64 The MACsec standard mentions a key identifier for each key, but doesn't specify anything about it, so I arbitrarily chose 64 bits. IEEE 802.1X-2010 specifies MKA (MACsec Key Agreement), and defines the key identifier to be 128 bits (96 bits "member identifier" + 32 bits "key number"). Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 19 +++++++++++++------ include/uapi/linux/if_macsec.h | 4 +++- 2 files changed, 16 insertions(+), 7 deletions(-) commit c81aa7979432aa10f23656ef6fa113764eab5e5c Author: Shmulik Ladkani Date: Fri May 6 20:27:43 2016 +0300 Documentation/networking: more accurate LCO explanation In few places the term "ones-complement sum" was used but the actual meaning is "the complement of the ones-complement sum". Also, avoid enclosing long statements with underscore, to ease readability. Signed-off-by: Shmulik Ladkani Acked-by: Edward Cree Signed-off-by: David S. Miller Documentation/networking/checksum-offloads.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit be0bd3160165e42783d8215f426e41c07179c08a Author: Eric Dumazet Date: Fri May 6 05:58:21 2016 -0700 macvtap: segmented packet is consumed If GSO packet is segmented and its segments are properly queued, we call consume_skb() instead of kfree_skb() to be drop monitor friendly. Fixes: 3e4f8b7873709 ("macvtap: Perform GSO on forwarding path.") Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Reviewed-by: Shmulik Ladkani Signed-off-by: David S. Miller drivers/net/macvtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25a54342fde903b6abc2680594cf3e4864686339 Author: Colin Ian King Date: Thu May 5 23:39:33 2016 +0100 tools: bpf_jit_disasm: check for klogctl failure klogctl can fail and return -ve len, so check for this and return NULL to avoid passing a (size_t)-1 to malloc. Signed-off-by: Colin Ian King Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/net/bpf_jit_disasm.c | 3 +++ 1 file changed, 3 insertions(+) commit 810810ffb2f6d46365d0790bbe77698a5534393a Author: Dan Carpenter Date: Thu May 5 16:21:30 2016 +0300 qede: uninitialized variable in qede_start_xmit() "data_split" was never set to false. It's just uninitialized. Fixes: 2950219d87b0 ('qede: Add basic network device support') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44549e8f5eea4e0a41b487b63e616cb089922b99 Author: Linus Torvalds Date: Sun May 8 14:38:32 2016 -0700 Linux 4.6-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4abac0d0bbc628df5f26845fe05ffc6b3a6533dd Author: Ingo Molnar Date: Sun May 8 10:27:33 2016 +0200 MAINTAINERS: Add mmiotrace entry The Nouveau maintainers would like to follow and review mmiotrace changes as well, so create a separate entry for that code. The high level bits are living in the tracing code, the low level bits in the x86 code. Acked-by: Steven Rostedt Acked-by: Pekka Paalanen Acked-by: karol herbst Cc: linux-kernel@vger.kernel.org Cc: Linus Torvalds Cc: Andrew Morton Cc: Thomas Gleixner Cc: Peter Zijlstra Signed-off-by: Ingo Molnar MAINTAINERS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 99d825822eade8d827a1817357cbf3f889a552d6 Author: Al Viro Date: Thu May 5 16:25:35 2016 -0400 get_rock_ridge_filename(): handle malformed NM entries Payloads of NM entries are not supposed to contain NUL. When we run into such, only the part prior to the first NUL goes into the concatenation (i.e. the directory entry name being encoded by a bunch of NM entries). We do stop when the amount collected so far + the claimed amount in the current NM entry exceed 254. So far, so good, but what we return as the total length is the sum of *claimed* sizes, not the actual amount collected. And that can grow pretty large - not unlimited, since you'd need to put CE entries in between to be able to get more than the maximum that could be contained in one isofs directory entry / continuation chunk and we are stop once we'd encountered 32 CEs, but you can get about 8Kb easily. And that's what will be passed to readdir callback as the name length. 8Kb __copy_to_user() from a buffer allocated by __get_free_page() Cc: stable@vger.kernel.org # 0.98pl6+ (yes, really) Signed-off-by: Al Viro fs/isofs/rock.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 8c1f454625743d60763a23c58fa65681d3c98b6f Author: Dan Carpenter Date: Thu May 5 16:20:20 2016 +0300 netxen: netxen_rom_fast_read() doesn't return -1 The error handling is broken here. netxen_rom_fast_read() returns zero on success and -EIO on error. It never returns -1. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c755ffa4fa3e2d4112cadd30142344789ad2fd2 Author: Dan Carpenter Date: Thu May 5 16:19:44 2016 +0300 netxen: reversed condition in netxen_nic_set_link_parameters() My static checker complains that we are using "autoneg" without initializing it. The problem is the ->phy_read() condition is reversed so we only set this on error instead of success. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 545fea54916af5e88f02346d85301ba0ecc143f3 Author: Dan Carpenter Date: Thu May 5 16:18:46 2016 +0300 netxen: fix error handling in netxen_get_flash_block() My static checker complained that "v" can be used unintialized if netxen_rom_fast_read() returns -EIO. That function never actually returns -1. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 32cf95db22d49cf4a3b421ba9fd156bb5f920ebb Merge: 630aac5 d1306eb Author: Linus Torvalds Date: Sat May 7 10:53:32 2016 -0700 Merge tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull misc driver fixes from Gfreg KH: "Here are three small fixes for some driver problems that were reported. Full details in the shortlog below. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: nvmem: mxs-ocotp: fix buffer overflow in read Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() misc: mic: Fix for double fetch security bug in VOP driver commit 630aac5ab6d6708c2cf715ddb5a77928e0aacb04 Merge: 3f8f0cf 2b86c4a Author: Linus Torvalds Date: Sat May 7 10:50:48 2016 -0700 Merge tag 'staging-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO driver fixes from Grek KH: "It's really just IIO drivers here, some small fixes that resolve some 'crash on boot' errors that have shown up in the -rc series, and other bugfixes that are required. All have been in linux-next with no reported problems" * tag 'staging-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: imu: mpu6050: Fix name/chip_id when using ACPI iio: imu: mpu6050: fix possible NULL dereferences iio:adc:at91-sama5d2: Repair crash on module removal iio: ak8975: fix maybe-uninitialized warning iio: ak8975: Fix NULL pointer exception on early interrupt commit 3f8f0cf2eddb558e5ccf9b155e758f4b950d8697 Merge: 9125aeb 9be427e Author: Linus Torvalds Date: Sat May 7 10:47:03 2016 -0700 Merge tag 'usb-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some last-remaining fixes for USB drivers to resolve issues that have shown up in testing. And two new device ids as well. All of these have been in linux-next with no reported issues" * tag 'usb-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" usb: musb: jz4740: fix error check of usb_get_phy() Revert "usb: musb: musb_host: Enable HCD_BH flag to handle urb return in bottom half" usb: musb: gadget: nuke endpoint before setting its descriptor to NULL USB: serial: cp210x: add Straizona Focusers device ids USB: serial: cp210x: add ID for Link ECU commit 9125aeb3e2fe278ac70fda039a3c0cd7f05eb800 Merge: 67601c3b ec953b7 Author: Linus Torvalds Date: Sat May 7 08:27:35 2016 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "These are a number of updates to fix a few problems found in the ARM nommu code over the last couple of years, caused mostly by changes on the mmu side" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8573/1: domain: move {set,get}_domain under config guard ARM: 8572/1: nommu: change memory reserve for the vectors ARM: 8571/1: nommu: fix PMSAv7 setup commit 67601c3b64616c3bdb98c966e8f7cd5bb895e996 Merge: 35cd3f4 b34ecd5 Author: Linus Torvalds Date: Sat May 7 08:17:45 2016 -0700 Merge tag 'media/v4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - deadlock fixes on driver probe at exynos4-is and s43-camif drivers - a build breakage if media controller is enabled and USB or PCI is built as module. * tag 'media/v4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] media-device: fix builds when USB or PCI is compiled as module [media] media: s3c-camif: fix deadlock on driver probe() [media] media: exynos4-is: fix deadlock on driver probe commit 35cd3f4563c4a0fc99be300afc7b82a822e634c7 Merge: b4184cb 535dac4 Author: Linus Torvalds Date: Sat May 7 08:13:42 2016 -0700 Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "An ahci driver addition and updates to ahci port enable handling for some platform devices" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ata: add AMD Seattle platform driver ARM: dts: apq8064: add ahci ports-implemented mask ata: ahci-platform: Add ports-implemented DT bindings. libahci: save port map for forced port map commit b4184cbff393d9ede2d80efd7088126706c1ce08 Merge: 0783783 9c674815 Author: Linus Torvalds Date: Sat May 7 08:10:08 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fix from Doug Ledford: "Fix for max sector calculation in iSER" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/iser: Fix max_sectors calculation commit 56402d63eefe22179f7311a51ff2094731420406 Author: Thomas Gleixner Date: Fri May 6 20:48:16 2016 +0200 x86/topology: Handle CPUID bogosity gracefully Joseph reported that a XEN guest dies with a division by 0 in the package topology setup code. This happens if cpu_info.x86_max_cores is zero. Handle that case and emit a warning. This does not fix the underlying XEN bug, but makes the code more robust. Reported-and-tested-by: Joseph Salisbury Cc: Peter Zijlstra Cc: Boris Ostrovsky Cc: David Vrabel Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1605062046270.3540@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/smpboot.c | 5 +++++ 1 file changed, 5 insertions(+) commit 536bd00cdbb7b908573e5a93bae67b64cbae60d8 Author: Rafael J. Wysocki Date: Fri May 6 14:58:43 2016 +0200 sched/fair: Fix !CONFIG_SMP kernel cpufreq governor breakage The following commit: 34e2c555f3e1 ("cpufreq: Add mechanism for registering utilization update callbacks") overlooked the fact that update_load_avg(), where CFS invokes cpufreq utilization update callbacks, becomes an empty stub on UP kernels. In consequence, if !CONFIG_SMP, cpufreq governors are never invoked from CFS and they do not have a chance to evaluate CPU performace levels and update them often enough. Needless to say, things don't work as expected then. Fix the problem by making the !CONFIG_SMP stub of update_load_avg() invoke cpufreq update callbacks too. Reported-by: Steve Muckle Tested-by: Steve Muckle Signed-off-by: Rafael J. Wysocki Acked-by: Steve Muckle Cc: Linus Torvalds Cc: Linux PM list Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Thomas Gleixner Cc: Viresh Kumar Fixes: 34e2c555f3e1 (cpufreq: Add mechanism for registering utilization update callbacks) Link: http://lkml.kernel.org/r/6282396.VVEdgVYxO3@vostro.rjw.lan Signed-off-by: Ingo Molnar kernel/sched/fair.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 288928658583a27256c6c295aeccd95a3ddcefce Author: Ido Schimmel Date: Fri May 6 22:18:40 2016 +0200 mlxsw: spectrum: Add missing rollback in flood configuration When we fail to set the flooding configuration for the broadcast and unregistered multicast traffic, we should revert the flooding configuration of the unknown unicast traffic. Fixes: 0293038e0c36 ("mlxsw: spectrum: Add support for flood control") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 51554db2d23f71989e040df838613bbae554d4e0 Author: Ido Schimmel Date: Fri May 6 22:18:39 2016 +0200 mlxsw: spectrum: Fix rollback order in LAG join failure Make the leave procedure in the error path symmetric to the join procedure and first remove the port from the collector before potentially destroying the LAG. Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 229740c63169462a838a8b8e16391ed000934631 Author: Jarno Rajahalme Date: Tue May 3 16:10:21 2016 -0700 udp_offload: Set encapsulation before inner completes. UDP tunnel segmentation code relies on the inner offsets being set for an UDP tunnel GSO packet, but the inner *_complete() functions will set the inner offsets only if 'encapsulation' is set before calling them. Currently, udp_gro_complete() sets 'encapsulation' only after the inner *_complete() functions are done. This causes the inner offsets having invalid values after udp_gro_complete() returns, which in turn will make it impossible to properly segment the packet in case it needs to be forwarded, which would be visible to the user either as invalid packets being sent or as packet loss. This patch fixes this by setting skb's 'encapsulation' in udp_gro_complete() before calling into the inner complete functions, and by making each possible UDP tunnel gro_complete() callback set the inner_mac_header to the beginning of the tunnel payload. Signed-off-by: Jarno Rajahalme Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/geneve.c | 3 +++ drivers/net/vxlan.c | 3 +++ include/linux/netdevice.h | 3 +++ net/ipv4/fou.c | 4 ++++ net/ipv4/udp_offload.c | 8 +++++--- 5 files changed, 18 insertions(+), 3 deletions(-) commit 43b8448cd7b42a4c39476c9a12c960c1408f1946 Author: Jarno Rajahalme Date: Tue May 3 16:10:20 2016 -0700 udp_tunnel: Remove redundant udp_tunnel_gro_complete(). The setting of the UDP tunnel GSO type is already performed by udp[46]_gro_complete(). Signed-off-by: Jarno Rajahalme Signed-off-by: David S. Miller drivers/net/geneve.c | 2 -- drivers/net/vxlan.c | 2 -- include/net/udp_tunnel.h | 9 --------- net/ipv4/fou.c | 2 -- 4 files changed, 15 deletions(-) commit 07837831047fb72856d1f61a726a4094397facd8 Merge: 3f86ba5 74d3694 Author: Linus Torvalds Date: Fri May 6 13:08:35 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull writeback fix from Jens Axboe: "Just a single fix for domain aware writeback, fixing a regression that can cause balance_dirty_pages() to keep looping while not getting any work done" * 'for-linus' of git://git.kernel.dk/linux-block: writeback: Fix performance regression in wb_over_bg_thresh() commit 3f86ba5d0c1c34a4469da1f62d3707e32a20d6ba Merge: 01ec716 886123f Author: Linus Torvalds Date: Fri May 6 12:59:27 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: "This contains two fixes: a boot fix for older SGI/UV systems, and an APIC calibration fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO x86/platform/UV: Bring back the call to map_low_mmrs in uv_system_init commit 8e0ddc040a87a3b700bdf67394d24fe30a0f1eb9 Author: Sudarsana Reddy Kalluru Date: Thu May 5 00:35:16 2016 -0400 qede: prevent chip hang when increasing channels qede requires qed to provide enough resources to accommodate 16 combined channels, but that upper-bound isn't actually being enforced by it. Instead, qed inform back to qede how many channels can be opened based on available resources - but that calculation doesn't really take into account the resources requested by qede; Instead it considers other FW/HW available resources. As a result, if a user would increase the number of channels to more than 16 [e.g., using ethtool] the chip would hang. This change increments the resources requested by qede to 64 combined channels instead of 16; This value is an upper bound on the possible available channels [due to other FW/HW resources]. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1d2f7b2d956e242179aaf4a08f3545f99c81f9a3 Author: David Ahern Date: Wed May 4 21:26:08 2016 -0700 net: ipv6: tcp reset, icmp need to consider L3 domain Responses for packets to unused ports are getting lost with L3 domains. IPv4 has ip_send_unicast_reply for sending TCP responses which accounts for L3 domains; update the IPv6 counterpart tcp_v6_send_response. For icmp the L3 master check needs to be moved up in icmp6_send to properly respond to UDP packets to a port with no listener. Fixes: ca254490c8df ("net: Add VRF support to IPv6 stack") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/icmp.c | 5 ++--- net/ipv6/tcp_ipv6.c | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) commit 01ec7167615417dd8f6f4d3a0baeadbb4a686091 Merge: 17d25a3 5f2f88e Author: Linus Torvalds Date: Fri May 6 11:58:45 2016 -0700 Merge tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "Fixes for problems introduced or discovered recently (intel_pstate, sti-cpufreq, ARM64 cpuidle, Operating Performance Points framework, generic device properties framework) and one fix for a hotplug-related deadlock in ACPICA that's been there forever, but is nasty enough. Specifics: - Fix for a recent regression in the intel_pstate driver causing it to fail to restore the HWP (HW-managed P-states) configuration of the boot CPU after suspend-to-RAM (Rafael Wysocki). - Fix for two recent regressions in the intel_pstate driver, one that can trigger a divide by zero if the driver is accessed via sysfs before it manages to take the first sample and one causing it to fail to update a structure field used in a trace point, so the information coming from it is less useful (Rafael Wysocki). - Fix for a problem in the sti-cpufreq driver introduced during the 4.5 cycle that causes it to break CPU PM in multi-platform kernels by registering cpufreq-dt (which subsequently doesn't work) unconditionally and preventing the driver that would actually work from registering (Sudeep Holla). - Stable-candidate fix for an ARM64 cpuidle issue causing idle state usage counters to be incorrectly updated for idle states that were not entered due to errors (James Morse). - Fix for a recently introduced issue in the OPP (Operating Performance Points) framework causing it to print bogus error messages for missing optional regulators (Viresh Kumar). - Fix for a recently introduced issue in the generic device properties framework that may cause it to attempt to dereferece and invalid pointer in some cases (Heikki Krogerus). - Fix for a deadlock in the ACPICA core that may be triggered by device (eg Thunderbolt) hotplug (Prarit Bhargava)" * tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / OPP: Remove useless check ACPICA: Dispatcher: Update thread ID for recursive method calls intel_pstate: Fix intel_pstate_get() cpufreq: intel_pstate: Fix HWP on boot CPU after system resume cpufreq: st: enable selective initialization based on the platform ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value device property: Avoid potential dereferences of invalid pointers commit 17d25a337b75d656a34bdd52a477596c303b7f59 Merge: 18fb92c 2548d54 Author: Linus Torvalds Date: Fri May 6 11:53:27 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "This contains a single fix that fixes a nohz tick stopping bug when mixed-poliocy SCHED_FIFO and SCHED_RR tasks are present on a runqueue" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: nohz/full, sched/rt: Fix missed tick-reenabling bug in sched_can_stop_tick() commit 18fb92c30c766a5fb4593ecd0d9155b33d139e8e Merge: cade818 8482716 Author: Linus Torvalds Date: Fri May 6 11:40:24 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: "This tree contains two fixes: new Intel CPU model numbers and an AMD/iommu uncore PMU driver fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs perf/x86: Add model numbers for Kabylake CPUs commit cade818463f8ae47e19466c2fe321fe30c3fe57e Merge: 83a395d c10fcb1 Author: Linus Torvalds Date: Fri May 6 11:33:02 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: "This tree contains three fixes: a console spam fix, a file pattern fix and a sysfb_efi fix for a bug that triggered on older ThinkPads" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sysfb_efi: Fix valid BAR address range check x86/efi-bgrt: Switch all pr_err() to pr_notice() for invalid BGRT MAINTAINERS: Remove asterisk from EFI directory names commit 83a395d332ec43ded7bb36d2065f3a4d2e473038 Merge: dd28769 f0b22d1 Author: Linus Torvalds Date: Fri May 6 11:27:05 2016 -0700 Merge branch 'parisc-4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "Patch from Dmitry V Levin to fix a kernel crash when a straced process calls the (invalid) syscall which is equal to value of __NR_Linux_syscalls" * 'parisc-4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls commit dd287690b0aa4b0d22e8dd7dd2cb3055f5141a27 Merge: 4883d11 26f9d5f Author: Linus Torvalds Date: Fri May 6 11:14:38 2016 -0700 Merge tag 'arc-4.6-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "Late in the cycle, but this has fixes for couple of issues: a PAE40 boot crash and Arnd spotting lack of barriers in BE io-accessors. The 3rd patch for enabling highmem in low physical mem ;-) honestly is more than a "fix" but its been in works for some time, seems to be stable in testing and enables 2 of our customers to go forward with 4.6 kernel. - Fix for PTE truncation in PAE40 builds - Fix for big endian IO accessors lacking IO barrier - Allow HIGHMEM to work with low physical addresses" * tag 'arc-4.6-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: support HIGHMEM even without PAE40 ARC: Fix PAE40 boot failures due to PTE truncation ARC: Add missing io barriers to io{read,write}{16,32}be() commit 4883d11e06b5a02a73ee3a554168ec92ab44c0f5 Merge: 659a182 b4c1121 Author: Linus Torvalds Date: Fri May 6 11:05:07 2016 -0700 Merge tag 'powerpc-4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Fix bad inline asm constraint in create_zero_mask() from Anton Blanchard" * tag 'powerpc-4.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Fix bad inline asm constraint in create_zero_mask() commit 659a1823273873027a19e190012a7b0c5d7b541c Merge: 9caa7e7 fca0971 Author: Linus Torvalds Date: Fri May 6 10:59:53 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Fixes for i915, amdgpu/radeon and imx. The IMX fix is for an autoloading regression found in Fedora. The radeon fixes, are the same fix to amdgpu/radeon to avoid a hardware lockup in some circumstances with a bad mode, and a double free bug I took a few hours chasing down the other morning. The i915 fixes are across the board, all stable material, and fixing some hangs and suspend/resume issues, along with a live status regressions" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading drm/amdgpu: make sure vertical front porch is at least 1 drm/radeon: make sure vertical front porch is at least 1 drm/amdgpu: set metadata pointer to NULL after freeing. drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW drm/i915: Fake HDMI live status drm/i915: Fix eDP low vswing for Broadwell drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume drm/i915: Fix system resume if PCI device remained enabled drm/i915: Avoid stalling on pending flips for legacy cursor updates commit 9b1f189e6dfb0483b715e19364c782d2ddee96a0 Merge: 04974df 92dc20d 8070954 66ec246 1ff7760 Author: Mark Brown Date: Fri May 6 18:20:37 2016 +0100 Merge remote-tracking branches 'spi/fix/fsl-dspi', 'spi/fix/omap2-mcspi', 'spi/fix/pxa2xx' and 'spi/fix/ti-qspi' into spi-linus commit 1b8d2afde54fade94339f573c4e05644f9ae9866 Author: Dan Williams Date: Fri May 6 10:20:10 2016 -0700 libnvdimm, pfn: fix ARCH=alpha allmodconfig build failure I had relied on the kbuild robot for cross build coverage, however it only builds alpha_defconfig. Switch from HPAGE_SIZE to PMD_SIZE, which is more widely defined. Fixes: 658922e57b84 ("libnvdimm, pfn: fix memmap reservation sizing") Cc: Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 856ce5d083e14571d051301fe3c65b32b8cbe321 Author: Linus Lüssing Date: Wed May 4 17:25:02 2016 +0200 bridge: fix igmp / mld query parsing With the newly introduced helper functions the skb pulling is hidden in the checksumming function - and undone before returning to the caller. The IGMP and MLD query parsing functions in the bridge still assumed that the skb is pointing to the beginning of the IGMP/MLD message while it is now kept at the beginning of the IPv4/6 header. If there is a querier somewhere else, then this either causes the multicast snooping to stay disabled even though it could be enabled. Or, if we have the querier enabled too, then this can create unnecessary IGMP / MLD query messages on the link. Fixing this by taking the offset between IP and IGMP/MLD header into account, too. Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code") Reported-by: Simon Wunderlich Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller net/bridge/br_multicast.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f0b22d1bb2a37a665a969e95785c75a4f49d1499 Author: Dmitry V. Levin Date: Wed Apr 27 04:56:11 2016 +0300 parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls Do not load one entry beyond the end of the syscall table when the syscall number of a traced process equals to __NR_Linux_syscalls. Similar bug with regular processes was fixed by commit 3bb457af4fa8 ("[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls"). This bug was found by strace test suite. Cc: stable@vger.kernel.org Signed-off-by: Dmitry V. Levin Acked-by: Helge Deller Signed-off-by: Helge Deller arch/parisc/kernel/syscall.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbbba30f1ac95a04aae9c61a55aebe5e6fdf29f0 Merge: e2841ea 5c08b0f Author: Kalle Valo Date: Fri May 6 14:27:48 2016 +0300 Merge tag 'iwlwifi-for-kalle-2016-05-04' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * fix P2P rates (and possibly other issues) commit 5f2f88e330e7ee2d2d7c5e0984b86108b00ac800 Merge: 7c21b38 21f8a99 6d45b71 625fe4f Author: Rafael J. Wysocki Date: Fri May 6 13:16:22 2016 +0200 Merge branches 'pm-opp-fixes', 'pm-cpufreq-fixes' and 'pm-cpuidle-fixes' * pm-opp-fixes: PM / OPP: Remove useless check * pm-cpufreq-fixes: intel_pstate: Fix intel_pstate_get() cpufreq: intel_pstate: Fix HWP on boot CPU after system resume cpufreq: st: enable selective initialization based on the platform * pm-cpuidle-fixes: ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value commit 7c21b38ca937603741d1ec00a944eeb578cb653f Merge: 93d6884 0224a4a Author: Rafael J. Wysocki Date: Fri May 6 13:15:52 2016 +0200 Merge branches 'acpica-fixes' and 'device-properties-fixes' * acpica-fixes: ACPICA: Dispatcher: Update thread ID for recursive method calls * device-properties-fixes: device property: Avoid potential dereferences of invalid pointers commit 886123fb3a8656699dff40afa0573df359abeb18 Author: Chen Yu Date: Fri May 6 11:33:39 2016 +0800 x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Currently we read the tsc radio: ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f; Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the SDM (35.5), the ratio bits are bit 8-15. Ignoring the upper bits can result in an incorrect tsc ratio, which causes the TSC calibration and the Local APIC timer frequency to be incorrect. Fix this problem by masking 0xff instead. [ tglx: Massaged changelog ] Fixes: 7da7c1561366 "x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs" Signed-off-by: Chen Yu Cc: "Rafael J. Wysocki" Cc: stable@vger.kernel.org Cc: Bin Gao Cc: Len Brown Link: http://lkml.kernel.org/r/1462505619-5516-1-git-send-email-yu.c.chen@intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc_msr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9caa7e78481f17fb6ff77dfaca774998e7440430 Merge: 43a3e83 7322dd7 Author: Linus Torvalds Date: Thu May 5 20:48:35 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "14 fixes" * emailed patches from Andrew Morton : byteswap: try to avoid __builtin_constant_p gcc bug lib/stackdepot: avoid to return 0 handle mm: fix kcompactd hang during memory offlining modpost: fix module autoloading for OF devices with generic compatible property proc: prevent accessing /proc//environ until it's ready mm/zswap: provide unique zpool name mm: thp: kvm: fix memory corruption in KVM with THP enabled MAINTAINERS: fix Rajendra Nayak's address mm, cma: prevent nr_isolated_* counters from going negative mm: update min_free_kbytes from khugepaged after core initialization huge pagecache: mmap_sem is unlocked when truncation splits pmd rapidio/mport_cdev: fix uapi type definitions mm: memcontrol: let v2 cgroups follow changes in system swappiness mm: thp: correct split_huge_pages file permission commit 31ca0458a61a502adb7ed192bf9716c6d05791a5 Author: Nikolay Aleksandrov Date: Wed May 4 16:18:45 2016 +0200 net: bridge: fix old ioctl unlocked net device walk get_bridge_ifindices() is used from the old "deviceless" bridge ioctl calls which aren't called with rtnl held. The comment above says that it is called with rtnl but that is not really the case. Here's a sample output from a test ASSERT_RTNL() which I put in get_bridge_ifindices and executed "brctl show": [ 957.422726] RTNL: assertion failed at net/bridge//br_ioctl.c (30) [ 957.422925] CPU: 0 PID: 1862 Comm: brctl Tainted: G W O 4.6.0-rc4+ #157 [ 957.423009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 [ 957.423009] 0000000000000000 ffff880058adfdf0 ffffffff8138dec5 0000000000000400 [ 957.423009] ffffffff81ce8380 ffff880058adfe58 ffffffffa05ead32 0000000000000001 [ 957.423009] 00007ffec1a444b0 0000000000000400 ffff880053c19130 0000000000008940 [ 957.423009] Call Trace: [ 957.423009] [] dump_stack+0x85/0xc0 [ 957.423009] [] br_ioctl_deviceless_stub+0x212/0x2e0 [bridge] [ 957.423009] [] sock_ioctl+0x22b/0x290 [ 957.423009] [] do_vfs_ioctl+0x95/0x700 [ 957.423009] [] SyS_ioctl+0x79/0x90 [ 957.423009] [] entry_SYSCALL_64_fastpath+0x23/0xc1 Since it only reads bridge ifindices, we can use rcu to safely walk the net device list. Also remove the wrong rtnl comment above. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dedc58e067d8c379a15a8a183c5db318201295bb Author: Ian Campbell Date: Wed May 4 14:21:53 2016 +0100 VSOCK: do not disconnect socket when peer has shutdown SEND only The peer may be expecting a reply having sent a request and then done a shutdown(SHUT_WR), so tearing down the whole socket at this point seems wrong and breaks for me with a client which does a SHUT_WR. Looking at other socket family's stream_recvmsg callbacks doing a shutdown here does not seem to be the norm and removing it does not seem to have had any adverse effects that I can see. I'm using Stefan's RFC virtio transport patches, I'm unsure of the impact on the vmci transport. Signed-off-by: Ian Campbell Cc: "David S. Miller" Cc: Stefan Hajnoczi Cc: Claudio Imbrenda Cc: Andy King Cc: Dmitry Torokhov Cc: Jorgen Hansen Cc: Adit Ranadive Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 82d69203df634b4dfa765c94f60ce9482bcc44d6 Author: Daniel Jurgens Date: Wed May 4 15:00:33 2016 +0300 net/mlx4_en: Fix endianness bug in IPV6 csum calculation Use htons instead of unconditionally byte swapping nexthdr. On a little endian systems shifting the byte is correct behavior, but it results in incorrect csums on big endian architectures. Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE') Signed-off-by: Daniel Jurgens Reviewed-by: Carol Soto Tested-by: Carol Soto Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43a3e837e22818c2c79dad95745a6b54d4e232f7 Author: Linus Torvalds Date: Thu May 5 20:07:14 2016 -0700 mailmap: add John Paul Adrian Glaubitz Apparently patchwork ended up truncating the full name. Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit 7270a3f761a2eb8ca38e093608f31879b368249b Merge: 85f397a 2eea658 Author: Linus Torvalds Date: Thu May 5 18:10:01 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: - a fix for the persistent memory 'struct page' driver. The implementation overlooked the fact that pages are allocated in 2MB units leading to -ENOMEM when establishing some configurations. It's tagged for -stable as the problem was introduced with the initial implementation in 4.5. - The new "error status translation" routine, introduced with the 4.6 updates to the nfit driver, missed a necessary path in acpi_nfit_ctl(). The end result is that we are falsely assuming commands complete successfully when the embedded status says otherwise. * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit: fix translation of command status results libnvdimm, pfn: fix memmap reservation sizing commit 7322dd755e7dd34bc5359aa27abeed1687e0f628 Author: Arnd Bergmann Date: Thu May 5 16:22:39 2016 -0700 byteswap: try to avoid __builtin_constant_p gcc bug This is another attempt to avoid a regression in wwn_to_u64() after that started using get_unaligned_be64(), which in turn ran into a bug on gcc-4.9 through 6.1. The regression got introduced due to the combination of two separate workarounds (commits e3bde9568d99: "include/linux/unaligned: force inlining of byteswap operations" and ef3fb2422ffe: "scsi: fc: use get/put_unaligned64 for wwn access") that each try to sidestep distinct problems with gcc behavior (code growth and increased stack usage). Unfortunately after both have been applied, a more serious gcc bug has been uncovered, leading to incorrect object code that discards part of a function and causes undefined behavior. As part of this problem is how __builtin_constant_p gets evaluated on an argument passed by reference into an inline function, this avoids the use of __builtin_constant_p() for all architectures that set CONFIG_ARCH_USE_BUILTIN_BSWAP. Most architectures do not set ARCH_SUPPORTS_OPTIMIZED_INLINING, which means they probably do not suffer from the problem in the qla2xxx driver, but they might still run into it elsewhere. Both of the original workarounds were only merged in the 4.6 kernel, and the bug that is fixed by this patch should only appear if both are there, so we probably don't need to backport the fix. On the other hand, it works by simplifying the code path and should not have any negative effects. [arnd@arndb.de: fix older gcc warnings] (http://lkml.kernel.org/r/12243652.bxSxEgjgfk@wuerfel) Link: https://lkml.org/lkml/headers/2016/4/12/1103 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70232 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 Fixes: e3bde9568d99 ("include/linux/unaligned: force inlining of byteswap operations") Fixes: ef3fb2422ffe ("scsi: fc: use get/put_unaligned64 for wwn access") Link: http://lkml.kernel.org/r/1780465.XdtPJpi8Tt@wuerfel Signed-off-by: Arnd Bergmann Reviewed-by: Josh Poimboeuf Tested-by: Josh Poimboeuf # on gcc-5.3 Tested-by: Quinn Tran Cc: Martin Jambor Cc: "Martin K. Petersen" Cc: James Bottomley Cc: Denys Vlasenko Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Cc: Ingo Molnar Cc: Himanshu Madhani Cc: Jan Hubicka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/swab.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 7c31190bcfdbff225950902a9f226e4eb79ca94f Author: Joonsoo Kim Date: Thu May 5 16:22:35 2016 -0700 lib/stackdepot: avoid to return 0 handle Recently, we allow to save the stacktrace whose hashed value is 0. It causes the problem that stackdepot could return 0 even if in success. User of stackdepot cannot distinguish whether it is success or not so we need to solve this problem. In this patch, 1 bit are added to handle and make valid handle none 0 by setting this bit. After that, valid handle will not be 0 and 0 handle will represent failure correctly. Fixes: 33334e25769c ("lib/stackdepot.c: allow the stack trace hash to be zero") Link: http://lkml.kernel.org/r/1462252403-1106-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Cc: Alexander Potapenko Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/stackdepot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 172400c69cb0d0d684b7cd75ac75872b3d7c61a1 Author: Vlastimil Babka Date: Thu May 5 16:22:32 2016 -0700 mm: fix kcompactd hang during memory offlining Assume memory47 is the last online block left in node1. This will hang: # echo offline > /sys/devices/system/node/node1/memory47/state After a couple of minutes, the following pops up in dmesg: INFO: task bash:957 blocked for more than 120 seconds. Not tainted 4.6.0-rc6+ #6 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. bash D ffff8800b7adbaf8 0 957 951 0x00000000 Call Trace: schedule+0x35/0x80 schedule_timeout+0x1ac/0x270 wait_for_completion+0xe1/0x120 kthread_stop+0x4f/0x110 kcompactd_stop+0x26/0x40 __offline_pages.constprop.28+0x7e6/0x840 offline_pages+0x11/0x20 memory_block_action+0x73/0x1d0 memory_subsys_offline+0x47/0x60 device_offline+0x86/0xb0 store_mem_state+0xda/0xf0 dev_attr_store+0x18/0x30 sysfs_kf_write+0x37/0x40 kernfs_fop_write+0x11d/0x170 __vfs_write+0x37/0x120 vfs_write+0xa9/0x1a0 SyS_write+0x55/0xc0 entry_SYSCALL_64_fastpath+0x1a/0xa4 kcompactd is waiting for kcompactd_max_order > 0 when it's woken up to actually exit. Check kthread_should_stop() to break out of the wait. Fixes: 698b1b306 ("mm, compaction: introduce kcompactd"). Reported-by: Reza Arbab Tested-by: Reza Arbab Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit acbef7b7662953cec96c243db4009ac561d88989 Author: Philipp Zabel Date: Thu May 5 16:22:29 2016 -0700 modpost: fix module autoloading for OF devices with generic compatible property Since the wildcard at the end of OF module aliases is gone, autoloading of modules that don't match a device's last (most generic) compatible value fails. For example the CODA960 VPU on i.MX6Q has the SoC specific compatible "fsl,imx6q-vpu" and the generic compatible "cnm,coda960". Since the driver currently only works with knowledge about the SoC specific integration, it doesn't list "cnm,cod960" in the module device table. This results in the device compatible "of:NvpuTCfsl,imx6q-vpuCcnm,coda960" not matching the module alias "of:N*T*Cfsl,imx6q-vpu" anymore, whereas before commit 2f632369ab79 ("modpost: don't add a trailing wildcard for OF module aliases") it matched the module alias "of:N*T*Cfsl,imx6q-vpu*". This patch adds two module aliases for each compatible, one without the wildcard and one with "C*" appended. $ modinfo coda | grep imx6q alias: of:N*T*Cfsl,imx6q-vpuC* alias: of:N*T*Cfsl,imx6q-vpu Fixes: 2f632369ab79 ("modpost: don't add a trailing wildcard for OF module aliases") Link: http://lkml.kernel.org/r/1462203339-15340-1-git-send-email-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel Cc: Javier Martinez Canillas Cc: Brian Norris Cc: Sjoerd Simons Cc: Rusty Russell Cc: Greg Kroah-Hartman Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/mod/file2alias.c | 69 +++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 24 deletions(-) commit 8148a73c9901a8794a50f950083c00ccf97d43b3 Author: Mathias Krause Date: Thu May 5 16:22:26 2016 -0700 proc: prevent accessing /proc//environ until it's ready If /proc//environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, making the range calculation underflow, allowing to read beyond the end of what has been written. Fix this as it is done for /proc//cmdline by testing env_end for zero. It is, apparently, intentionally set last in create_*_tables(). This bug was found by the PaX size_overflow plugin that detected the arithmetic underflow of 'this_len = env_end - (env_start + src)' when env_end is still zero. The expected consequence is that userland trying to access /proc//environ of a not yet fully set up process may get inconsistent data as we're in the middle of copying in the environment variables. Fixes: https://forums.grsecurity.net/viewtopic.php?f=3&t=4363 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116461 Signed-off-by: Mathias Krause Cc: Emese Revfy Cc: Pax Team Cc: Al Viro Cc: Mateusz Guzik Cc: Alexey Dobriyan Cc: Cyrill Gorcunov Cc: Jarod Wilson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32a4e169039927bfb6ee9f0ccbbe3a8aaf13a4bc Author: Dan Streetman Date: Thu May 5 16:22:23 2016 -0700 mm/zswap: provide unique zpool name Instead of using "zswap" as the name for all zpools created, add an atomic counter and use "zswap%x" with the counter number for each zpool created, to provide a unique name for each new zpool. As zsmalloc, one of the zpool implementations, requires/expects a unique name for each pool created, zswap should provide a unique name. The zsmalloc pool creation does not fail if a new pool with a conflicting name is created, unless CONFIG_ZSMALLOC_STAT is enabled; in that case, zsmalloc pool creation fails with -ENOMEM. Then zswap will be unable to change its compressor parameter if its zpool is zsmalloc; it also will be unable to change its zpool parameter back to zsmalloc, if it has any existing old zpool using zsmalloc with page(s) in it. Attempts to change the parameters will result in failure to create the zpool. This changes zswap to provide a unique name for each zpool creation. Fixes: f1c54846ee45 ("zswap: dynamic pool creation") Signed-off-by: Dan Streetman Reported-by: Sergey Senozhatsky Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zswap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 127393fbe597dd85863a9bdccaa11007e7d4948f Author: Andrea Arcangeli Date: Thu May 5 16:22:20 2016 -0700 mm: thp: kvm: fix memory corruption in KVM with THP enabled After the THP refcounting change, obtaining a compound pages from get_user_pages() no longer allows us to assume the entire compound page is immediately mappable from a secondary MMU. A secondary MMU doesn't want to call get_user_pages() more than once for each compound page, in order to know if it can map the whole compound page. So a secondary MMU needs to know from a single get_user_pages() invocation when it can map immediately the entire compound page to avoid a flood of unnecessary secondary MMU faults and spurious atomic_inc()/atomic_dec() (pages don't have to be pinned by MMU notifier users). Ideally instead of the page->_mapcount < 1 check, get_user_pages() should return the granularity of the "page" mapping in the "mm" passed to get_user_pages(). However it's non trivial change to pass the "pmd" status belonging to the "mm" walked by get_user_pages up the stack (up to the caller of get_user_pages). So the fix just checks if there is not a single pte mapping on the page returned by get_user_pages, and in turn if the caller can assume that the whole compound page is mapped in the current "mm" (in a pmd_trans_huge()). In such case the entire compound page is safe to map into the secondary MMU without additional get_user_pages() calls on the surrounding tail/head pages. In addition of being faster, not having to run other get_user_pages() calls also reduces the memory footprint of the secondary MMU fault in case the pmd split happened as result of memory pressure. Without this fix after a MADV_DONTNEED (like invoked by QEMU during postcopy live migration or balloning) or after generic swapping (with a failure in split_huge_page() that would only result in pmd splitting and not a physical page split), KVM would map the whole compound page into the shadow pagetables, despite regular faults or userfaults (like UFFDIO_COPY) may map regular pages into the primary MMU as result of the pte faults, leading to the guest mode and userland mode going out of sync and not working on the same memory at all times. Any other secondary MMU notifier manager (KVM is just one of the many MMU notifier users) will need the same information if it doesn't want to run a flood of get_user_pages_fast and it can support multiple granularity in the secondary MMU mappings, so I think it is justified to be exposed not just to KVM. The other option would be to move transparent_hugepage_adjust to mm/huge_memory.c but that currently has all kind of KVM data structures in it, so it's definitely not a cut-and-paste work, so I couldn't do a fix as cleaner as this one for 4.6. Signed-off-by: Andrea Arcangeli Cc: "Dr. David Alan Gilbert" Cc: "Kirill A. Shutemov" Cc: "Li, Liang Z" Cc: Amit Shah Cc: Paolo Bonzini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kvm/mmu.c | 2 +- arch/x86/kvm/mmu.c | 4 ++-- include/linux/page-flags.h | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) commit ff2de822c94ca733a3f6177691eb0dca5ee2e658 Author: Eric Engestrom Date: Thu May 5 16:22:17 2016 -0700 MAINTAINERS: fix Rajendra Nayak's address Signed-off-by: Eric Engestrom Cc: Rajendra Nayak Cc: Afzal Mohammed Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14af4a5e9b26ad251f81c174e8a43f3e179434a5 Author: Hugh Dickins Date: Thu May 5 16:22:15 2016 -0700 mm, cma: prevent nr_isolated_* counters from going negative /proc/sys/vm/stat_refresh warns nr_isolated_anon and nr_isolated_file go increasingly negative under compaction: which would add delay when should be none, or no delay when should delay. The bug in compaction was due to a recent mmotm patch, but much older instance of the bug was also noticed in isolate_migratepages_range() which is used for CMA and gigantic hugepage allocations. The bug is caused by putback_movable_pages() in an error path decrementing the isolated counters without them being previously incremented by acct_isolated(). Fix isolate_migratepages_range() by removing the error-path putback, thus reaching acct_isolated() with migratepages still isolated, and leaving putback to caller like most other places do. Fixes: edc2ca612496 ("mm, compaction: move pageblock checks up from isolate_migratepages_range()") [vbabka@suse.cz: expanded the changelog] Signed-off-by: Hugh Dickins Signed-off-by: Vlastimil Babka Acked-by: Joonsoo Kim Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit bc22af74f271ef76b2e6f72f3941f91f0da3f5f8 Author: Jason Baron Date: Thu May 5 16:22:12 2016 -0700 mm: update min_free_kbytes from khugepaged after core initialization Khugepaged attempts to raise min_free_kbytes if its set too low. However, on boot khugepaged sets min_free_kbytes first from subsys_initcall(), and then the mm 'core' over-rides min_free_kbytes after from init_per_zone_wmark_min(), via a module_init() call. Khugepaged used to use a late_initcall() to set min_free_kbytes (such that it occurred after the core initialization), however this was removed when the initialization of min_free_kbytes was integrated into the starting of the khugepaged thread. The fix here is simply to invoke the core initialization using a core_initcall() instead of module_init(), such that the previous initialization ordering is restored. I didn't restore the late_initcall() since start_stop_khugepaged() already sets min_free_kbytes via set_recommended_min_free_kbytes(). This was noticed when we had a number of page allocation failures when moving a workload to a kernel with this new initialization ordering. On an 8GB system this restores min_free_kbytes back to 67584 from 11365 when CONFIG_TRANSPARENT_HUGEPAGE=y is set and either CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y or CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y. Fixes: 79553da293d3 ("thp: cleanup khugepaged startup") Signed-off-by: Jason Baron Acked-by: Kirill A. Shutemov Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 684283988f703811b8a05136d0d54f1c31025ad3 Author: Hugh Dickins Date: Thu May 5 16:22:09 2016 -0700 huge pagecache: mmap_sem is unlocked when truncation splits pmd zap_pmd_range()'s CONFIG_DEBUG_VM !rwsem_is_locked(&mmap_sem) BUG() will be invalid with huge pagecache, in whatever way it is implemented: truncation of a hugely-mapped file to an unhugely-aligned size would easily hit it. (Although anon THP could in principle apply khugepaged to private file mappings, which are not excluded by the MADV_HUGEPAGE restrictions, in practice there's a vm_ops check which excludes them, so it never hits this BUG() - there's no interface to "truncate" an anonymous mapping.) We could complicate the test, to check i_mmap_rwsem also when there's a vm_file; but my inclination was to make zap_pmd_range() more readable by simply deleting this check. A search has shown no report of the issue in the years since commit e0897d75f0b2 ("mm, thp: print useful information when mmap_sem is unlocked in zap_pmd_range") expanded it from VM_BUG_ON() - though I cannot point to what commit I would say then fixed the issue. But there are a couple of other patches now floating around, neither yet in the tree: let's agree to retain the check as a VM_BUG_ON_VMA(), as Matthew Wilcox has done; but subject to a vma_is_anonymous() check, as Kirill Shutemov has done. And let's get this in, without waiting for any particular huge pagecache implementation to reach the tree. Matthew said "We can reproduce this BUG() in the current Linus tree with DAX PMDs". Signed-off-by: Hugh Dickins Tested-by: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Andres Lagar-Cavilla Cc: Yang Shi Cc: Ning Qu Cc: Mel Gorman Cc: Andres Lagar-Cavilla Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 4e1016dac1ccce6d8a960775526cdc3a5baa690b Author: Alexandre Bounine Date: Thu May 5 16:22:06 2016 -0700 rapidio/mport_cdev: fix uapi type definitions Fix problems in uapi definitions reported by Gabriel Laskar: (see https://lkml.org/lkml/2016/4/5/205 for details) - move public header file rio_mport_cdev.h to include/uapi/linux directory - change types in data structures passed as IOCTL parameters - improve parameter checking in some IOCTL service routines Signed-off-by: Alexandre Bounine Reported-by: Gabriel Laskar Tested-by: Barry Wood Cc: Gabriel Laskar Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Cc: Barry Wood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 115 +++++++------ include/linux/rio_mport_cdev.h | 271 ------------------------------ include/uapi/linux/rio_mport_cdev.h | 277 +++++++++++++++++++++++++++++++ 3 files changed, 341 insertions(+), 322 deletions(-) commit 4550c4e157ca3da929593bb6c64080a59141af35 Author: Johannes Weiner Date: Thu May 5 16:22:03 2016 -0700 mm: memcontrol: let v2 cgroups follow changes in system swappiness Cgroup2 currently doesn't have a per-cgroup swappiness setting. We might want to add one later - that's a different discussion - but until we do, the cgroups should always follow the system setting. Otherwise it will be unchangeably set to whatever the ancestor inherited from the system setting at the time of cgroup creation. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Vladimir Davydov Cc: [4.5] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 4 ++++ 1 file changed, 4 insertions(+) commit 145bdaa1501bf1c8a6cfa8ea5e347b9a46aad1b7 Author: Yang Shi Date: Thu May 5 16:22:00 2016 -0700 mm: thp: correct split_huge_pages file permission split_huge_pages doesn't support get method at all, so the read permission sounds confusing, change the permission to write only. And, add "\n" to the output of set method to make it more readable. Signed-off-by: Yang Shi Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85f397a97aadbea151a42eea6cdab64e2a544e80 Merge: c4781a8 1f93e9f Author: Linus Torvalds Date: Thu May 5 15:40:38 2016 -0700 Merge tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic syscall fix from Arnd Bergmann: "My last pull request for asm-generic had just one patch that added two new system calls to asm/unistd.h, but unfortunately it turned out to be wrong, pointing arch/tile compat mode at the native handlers rather than the compat ones. This was spotted by Yury Norov, who is working on ILP32 mode for arch/arm64, which would have the same problem when merged. This fixes the table to use the correct compat syscalls, like the other 64-bit architectures do. I'll try to find the time to come up with a solution that prevents this problem from happening again, by allowing all future system calls to just get added in a single file for use by all architectures" * tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: use compat version for preadv2 and pwritev2 commit 2b86c4a84377b74a6ec0ec9463feb0803bcb1066 Merge: 431adc0 393dbe4 Author: Greg Kroah-Hartman Date: Thu May 5 15:38:07 2016 -0700 Merge tag 'iio-fixes-for-4.6d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Fourth set of IIO fixes for the 4.6 cycle. This last minute set is concerned with a regression in the mpu6050 driver. The regression causes a null pointer dereference on any ACPI device that has one of these present such as the ASUS T100TA Baytrail/T. The issue was known but thought (i.e. missunderstood by me) to only be a possible with no reports, so was routed via the normal merge window. Turns out this was wrong (thanks to Alan for reporting the crash). The pull is just for the null dereference fix and a followup fix that also stops the reported name of the device being NULL. * mpu6050 - Fix a 'possible' NULL dereference introduced as part of splitting the driver to allow both i2c and spi to be supported. The issue affects ACPI systems with this device. - Fix a follow up issue where the name and chip id both get set to null if the device driver instance is instantiated from ACPI tables. commit c4781a8df9566ca13bf3ac6a65f6aae8d3f6e499 Merge: 54176cc ed19ca7 Author: Linus Torvalds Date: Thu May 5 15:31:35 2016 -0700 Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Here are a couple last-minute fixes for ARM SoCs. Most of them are for the OMAP platforms, the rest are all for different platforms. OMAP: All dts fixes, mostly affecting voltages and pinctrl for various device drivers: - Regulator minimum voltage fixes for omap5 - ISP syscon register offset fix for omap3 - Fix regulator initial modes for n900 - Fix omap5 pinctrl wkup instance size Allwinner: Remove incorrect constraints from a dcdc1 regulator Alltera SoCFPGA: Fix compilation in thumb2 mode Samsung exynos: Fix a potential oops in the pm-domain error handling Davinci: Avoid a link error if NVMEM is disabled Renesas: Do not mark an external uart clock as disabled, to allow probing the uarts" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: davinci: only use NVMEM when available ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel ARM: dts: omap5: fix range of permitted wakeup pinmux registers ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode ARM: dts: omap3: Fix ISP syscon register offset ARM: dts: omap5-cm-t54: fix ldo1_reg and ldo4_reg ranges ARM: dts: omap5-board-common: fix ldo1_reg and ldo4_reg ranges arm64: dts: r8a7795: Don't disable referenced optional scif clock ARM: EXYNOS: Properly skip unitialized parent clock in power domain on ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator commit 54176cc6803844613b3dca13174c13c47e9686db Author: Russell King Date: Thu May 5 17:12:54 2016 +0100 maintainers: update rmk's email address(es) Update my email and web addresses in the kernel maintainers file. Signed-off-by: Russell King Signed-off-by: Linus Torvalds MAINTAINERS | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 74d369443325063a5f0260e63971decb950fd8fa Author: Howard Cochran Date: Thu Mar 10 01:12:39 2016 -0500 writeback: Fix performance regression in wb_over_bg_thresh() Commit 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use wb_domain aware operations") unintentionally changed this function's meaning from "are there more dirty pages than the background writeback threshold" to "are there more dirty pages than the writeback threshold". The background writeback threshold is typically half of the writeback threshold, so this had the effect of raising the number of dirty pages required to cause a writeback worker to perform background writeout. This can cause a very severe performance regression when a BDI uses BDI_CAP_STRICTLIMIT because balance_dirty_pages() and the writeback worker can now disagree on whether writeback should be initiated. For example, in a system having 1GB of RAM, a single spinning disk, and a "pass-through" FUSE filesystem mounted over the disk, application code mmapped a 128MB file on the disk and was randomly dirtying pages in that mapping. Because FUSE uses strictlimit and has a default max_ratio of only 1%, in balance_dirty_pages, thresh is ~200, bg_thresh is ~100, and the dirty_freerun_ceiling is the average of those, ~150. So, it pauses the dirtying processes when we have 151 dirty pages and wakes up a background writeback worker. But the worker tests the wrong threshold (200 instead of 100), so it does not initiate writeback and just returns. Thus, balance_dirty_pages keeps looping, sleeping and then waking up the worker who will do nothing. It remains stuck in this state until the few dirty pages that we have finally expire and we write them back for that reason. Then the whole process repeats, resulting in near-zero throughput through the FUSE BDI. The fix is to call the parameterized variant of wb_calc_thresh, so that the worker will do writeback if the bg_thresh is exceeded which was the behavior before the referenced commit. Fixes: 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use wb_domain aware operations") Signed-off-by: Howard Cochran Acked-by: Tejun Heo Signed-off-by: Miklos Szeredi Cc: # v4.2+ Tested-by Sedat Dilek Signed-off-by: Jens Axboe mm/page-writeback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ec953b70f368330e806a94df6fe2dd1d72176b2d Author: Vladimir Murzin Date: Wed May 4 10:39:02 2016 +0100 ARM: 8573/1: domain: move {set,get}_domain under config guard Recursive undefined instrcution falut is seen with R-class taking an exception. The reson for that is __show_regs() tries to get domain information, but domains is not available on !MMU cores, like R/M class. Fix it by puting {set,get}_domain functions under CONFIG_CPU_CP15_MMU guard and providing stubs for the case where domains is not supported. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/domain.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5b526bd92511a12807a51b7bedd16af03e99bc33 Author: Jean-Philippe Brucker Date: Wed May 4 10:38:12 2016 +0100 ARM: 8572/1: nommu: change memory reserve for the vectors Commit 19accfd3 (ARM: move vector stubs) moved the vector stubs in an additional page above the base vector one. This change wasn't taken into account by the nommu memreserve. This patch ensures that the kernel won't overwrite any vector stub on nommu. [changed the MPU side too] Signed-off-by: Jean-Philippe Brucker Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/kernel/head-nommu.S | 2 +- arch/arm/mm/nommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 695665b0c5237bee8a3d0099ea856282d5d8f25b Author: Jean-Philippe Brucker Date: Wed May 4 10:37:22 2016 +0100 ARM: 8571/1: nommu: fix PMSAv7 setup Commit 1c2f87c (ARM: 8025/1: Get rid of meminfo) broke the support for MPU on ARMv7-R. This patch adapts the code inside CONFIG_ARM_MPU to use memblocks appropriately. MPU initialisation only uses the first memory region, and removes all subsequent ones. Because looping over all regions that need removal is inefficient, and memblock_remove already handles memory ranges, we can flatten the 'for_each_memblock' part. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/nommu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9c674815d346305068b27bf03b5e86b659a1b111 Author: Christoph Hellwig Date: Mon Apr 18 17:06:28 2016 -0400 IB/iser: Fix max_sectors calculation iSER currently has a couple places that set max_sectors in either the host template or SCSI host, and all of them get it wrong. This patch instead uses a single assignment that (hopefully) gets it right: the max_sectors value must be derived from the number of segments in the FR or FMR structure, but actually be one lower than the page size multiplied by the number of sectors, as it has to handle the case of non-aligned I/O. Without this I get trivial to reproduce hangs when running xfstests (on XFS) over iSER to Linux targets. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c5e0666c5a3ccabdf16bb88451886cdf81849b66 Merge: 3cedbec 5ec0811 Author: Linus Torvalds Date: Thu May 5 08:41:57 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 fix for a nasty oops" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: propogate_mnt: Handle the first propogated copy being a slave commit 3cedbec301015d8fb914e7e3af0fc0e034b87d34 Merge: 21a9703 e00f7bd Author: Linus Torvalds Date: Thu May 5 08:26:54 2016 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/qemu fixes from Michael Tsirkin: "A couple of fixes for virtio and for the new QEMU fw cfg driver" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio: Silence uninitialized variable warning firmware: qemu_fw_cfg.c: potential unintialized variable commit e3c00d87845ab375f90fa6e10a5e72a3a5778cd3 Author: Lucas Stach Date: Thu May 5 10:16:44 2016 -0400 drm/radeon: fix PLL sharing on DCE6.1 (v2) On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should not be taken into consideration when looking for an already enabled PLL to be shared with other outputs. This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my Richland based laptop, where the internal display is connected to UNIPHYA through a TRAVIS DP->LVDS bridge. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78987 v2: agd: add check in radeon_get_shared_nondp_ppll as well, drop extra parameter. Signed-off-by: Lucas Stach Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/atombios_crtc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1a738347df2ee4977459a8776fe2c62196bdcb1b Author: Arindam Nath Date: Wed May 4 23:39:59 2016 +0530 drm/radeon: fix DP link training issue with second 4K monitor There is an issue observed when we hotplug a second DP 4K monitor to the system. Sometimes, the link training fails for the second monitor after HPD interrupt generation. The issue happens when some queued or deferred transactions are already present on the AUX channel when we initiate a new transcation to (say) get DPCD or during link training. We set AUX_IGNORE_HPD_DISCON bit in the AUX_CONTROL register so that we can ignore any such deferred transactions when a new AUX transaction is initiated. Signed-off-by: Arindam Nath Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_dp_auxch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ec0811d30378ae104f250bfc9b3640242d81e3f Author: Eric W. Biederman Date: Thu May 5 09:29:29 2016 -0500 propogate_mnt: Handle the first propogated copy being a slave When the first propgated copy was a slave the following oops would result: > BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 > IP: [] propagate_one+0xbe/0x1c0 > PGD bacd4067 PUD bac66067 PMD 0 > Oops: 0000 [#1] SMP > Modules linked in: > CPU: 1 PID: 824 Comm: mount Not tainted 4.6.0-rc5userns+ #1523 > Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 > task: ffff8800bb0a8000 ti: ffff8800bac3c000 task.ti: ffff8800bac3c000 > RIP: 0010:[] [] propagate_one+0xbe/0x1c0 > RSP: 0018:ffff8800bac3fd38 EFLAGS: 00010283 > RAX: 0000000000000000 RBX: ffff8800bb77ec00 RCX: 0000000000000010 > RDX: 0000000000000000 RSI: ffff8800bb58c000 RDI: ffff8800bb58c480 > RBP: ffff8800bac3fd48 R08: 0000000000000001 R09: 0000000000000000 > R10: 0000000000001ca1 R11: 0000000000001c9d R12: 0000000000000000 > R13: ffff8800ba713800 R14: ffff8800bac3fda0 R15: ffff8800bb77ec00 > FS: 00007f3c0cd9b7e0(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000000000000010 CR3: 00000000bb79d000 CR4: 00000000000006e0 > Stack: > ffff8800bb77ec00 0000000000000000 ffff8800bac3fd88 ffffffff811fbf85 > ffff8800bac3fd98 ffff8800bb77f080 ffff8800ba713800 ffff8800bb262b40 > 0000000000000000 0000000000000000 ffff8800bac3fdd8 ffffffff811f1da0 > Call Trace: > [] propagate_mnt+0x105/0x140 > [] attach_recursive_mnt+0x120/0x1e0 > [] graft_tree+0x63/0x70 > [] do_add_mount+0x9b/0x100 > [] do_mount+0x2aa/0xdf0 > [] ? strndup_user+0x4e/0x70 > [] SyS_mount+0x75/0xc0 > [] do_syscall_64+0x4b/0xa0 > [] entry_SYSCALL64_slow_path+0x25/0x25 > Code: 00 00 75 ec 48 89 0d 02 22 22 01 8b 89 10 01 00 00 48 89 05 fd 21 22 01 39 8e 10 01 00 00 0f 84 e0 00 00 00 48 8b 80 d8 00 00 00 <48> 8b 50 10 48 89 05 df 21 22 01 48 89 15 d0 21 22 01 8b 53 30 > RIP [] propagate_one+0xbe/0x1c0 > RSP > CR2: 0000000000000010 > ---[ end trace 2725ecd95164f217 ]--- This oops happens with the namespace_sem held and can be triggered by non-root users. An all around not pleasant experience. To avoid this scenario when finding the appropriate source mount to copy stop the walk up the mnt_master chain when the first source mount is encountered. Further rewrite the walk up the last_source mnt_master chain so that it is clear what is going on. The reason why the first source mount is special is that it it's mnt_parent is not a mount in the dest_mnt propagation tree, and as such termination conditions based up on the dest_mnt mount propgation tree do not make sense. To avoid other kinds of confusion last_dest is not changed when computing last_source. last_dest is only used once in propagate_one and that is above the point of the code being modified, so changing the global variable is meaningless and confusing. Cc: stable@vger.kernel.org fixes: f2ebb3a921c1ca1e2ddd9242e95a1989a50c4c68 ("smarter propagate_mnt()") Reported-by: Tycho Andersen Reviewed-by: Seth Forshee Tested-by: Seth Forshee Signed-off-by: "Eric W. Biederman" fs/pnode.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit eda3fc50daa93b08774a18d51883c5a5d8d85e15 Author: Phil Turnbull Date: Tue May 3 16:39:19 2016 -0400 netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter If a quota bit is set in NFACCT_FLAGS but the NFACCT_QUOTA parameter is missing then a NULL pointer dereference is triggered. CAP_NET_ADMIN is required to trigger the bug. Signed-off-by: Phil Turnbull Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_acct.c | 2 ++ 1 file changed, 2 insertions(+) commit c10fcb14c7afd6688c7b197a814358fecf244222 Author: Wang YanQing Date: Thu May 5 14:14:21 2016 +0100 x86/sysfb_efi: Fix valid BAR address range check The code for checking whether a BAR address range is valid will break out of the loop when a start address of 0x0 is encountered. This behaviour is wrong since by breaking out of the loop we may miss the BAR that describes the EFI frame buffer in a later iteration. Because of this bug I can't use video=efifb: boot parameter to get efifb on my new ThinkPad E550 for my old linux system hard disk with 3.10 kernel. In 3.10, efifb is the only choice due to DRM/I915 not supporting the GPU. This patch also add a trivial optimization to break out after we find the frame buffer address range without testing later BARs. Signed-off-by: Wang YanQing [ Rewrote changelog. ] Signed-off-by: Matt Fleming Reviewed-by: Peter Jones Cc: Cc: Ard Biesheuvel Cc: David Herrmann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1462454061-21561-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/kernel/sysfb_efi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 26f9d5fd82ca20fe536cb493ec7cf5628f8997e5 Author: Vineet Gupta Date: Mon Apr 18 10:49:56 2016 +0530 ARC: support HIGHMEM even without PAE40 Initial HIGHMEM support on ARC was introduced for PAE40 where the low memory (0x8000_0000 based) and high memory (0x1_0000_0000) were physically contiguous. So CONFIG_FLATMEM sufficed (despite a peipheral hole in the middle, which wasted a bit of struct page memory, but things worked). However w/o PAE, highmem was not possible and we could only reach ~1.75GB of DDR. Now there is a use case to access ~4GB of DDR w/o PAE40 The idea is to have low memory at canonical 0x8000_0000 and highmem at 0 so enire 4GB address space is available for physical addressing This needs additional platform/interconnect mapping to convert the non contiguous physical addresses into linear bus adresses. From Linux point of view, non contiguous divide means FLATMEM no longer works and DISCONTIGMEM is needed to track the pfns in the 2 regions. This scheme would also work for PAE40, only better in that we don't waste struct page memory for the peripheral hole. The DT description will be something like memory { ... reg = <0x80000000 0x200000000 /* 512MB: lowmem */ 0x00000000 0x10000000>; /* 256MB: highmem */ } Signed-off-by: Noam Camus Signed-off-by: Vineet Gupta arch/arc/Kconfig | 13 +++++++++++ arch/arc/include/asm/mmzone.h | 43 ++++++++++++++++++++++++++++++++++ arch/arc/include/asm/page.h | 6 ++--- arch/arc/mm/init.c | 54 +++++++++++++++++++++++++++++++------------ 4 files changed, 98 insertions(+), 18 deletions(-) commit 2519d753676bdf2460fbbcde276d5b6ba8d6b695 Author: Vineet Gupta Date: Thu May 5 14:53:48 2016 +0530 ARC: Fix PAE40 boot failures due to PTE truncation So a benign looking cleanup which macro'ized PAGE_SHIFT shifts turned out to be bad (since it was done non-sensically across the board). It caused boot failures with PAE40 as forced cast to (unsigned long) from newly introduced virt_to_pfn() was causing truncatiion of the (long long) pte/paddr values. It is OK to use this in accessors dealing with kernel virtual address, pointers etc, but not for PTE values themelves. Fixes: cJ2ff5cf2735c ("ARC: mm: Use virt_to_pfn() for addr >> PAGE_SHIFT pattern) Signed-off-by: Vineet Gupta arch/arc/include/asm/page.h | 9 ++++++++- arch/arc/include/asm/pgtable.h | 13 ++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) commit e5bc0478ab6cf565619224536d75ecb2aedca43b Author: Vineet Gupta Date: Thu May 5 13:32:34 2016 +0530 ARC: Add missing io barriers to io{read,write}{16,32}be() While reviewing a different change to asm-generic/io.h Arnd spotted that ARC ioread32 and ioread32be both of which come from asm-generic versions are not symmetrical in terms of calling the io barriers. generic ioread32 -> ARC readl() [ has barriers] generic ioread32be -> __be32_to_cpu(__raw_readl()) [ lacks barriers] While generic ioread32be is being remediated to call readl(), that involves a swab32(), causing double swaps on ioread32be() on Big Endian systems. So provide our versions of big endian IO accessors to ensure io barrier calls while also keeping them optimal Suggested-by: Arnd Bergmann Acked-by: Arnd Bergmann Cc: stable@vger.kernel.org [4.2+] Signed-off-by: Vineet Gupta arch/arc/include/asm/io.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit b34ecd5aa34800aefa9e2990a805243ec9348437 Author: Mauro Carvalho Chehab Date: Thu May 5 08:01:34 2016 -0300 [media] media-device: fix builds when USB or PCI is compiled as module Just checking ifdef CONFIG_USB is not enough, if the USB is compiled as module. The same applies to PCI. Tested with the following .config alternatives: CONFIG_USB=m CONFIG_MEDIA_CONTROLLER=y CONFIG_MEDIA_SUPPORT=m CONFIG_VIDEO_AU0828=m CONFIG_USB=m CONFIG_MEDIA_CONTROLLER=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_AU0828=m CONFIG_USB=y CONFIG_MEDIA_CONTROLLER=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_AU0828=m CONFIG_USB=y CONFIG_MEDIA_CONTROLLER=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_AU0828=y Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8482716b9d865db34c55d4bf2fed19498e7195b9 Author: Peter Zijlstra Date: Sun Apr 24 00:42:55 2016 +0200 perf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs The new sanity check introduced by: 26657848502b ("perf/core: Verify we have a single perf_hw_context PMU") ... triggered on the AMD IOMMU driver. IOMMUs are not per logical CPU, they cannot have per-task counters. Fix it. Reported-by: Borislav Petkov Tested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: jroedel@suse.de Cc: suravee.suthikulpanit@amd.com Link: http://lkml.kernel.org/r/20160423224255.GB3430@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 1 + 1 file changed, 1 insertion(+) commit 08914f436bdd2ed60923f49cbc402307aba20fe4 Author: Alex Thorlton Date: Wed May 4 17:39:52 2016 -0500 x86/platform/UV: Bring back the call to map_low_mmrs in uv_system_init A while back the following commit: d394f2d9d8e1 ("x86/platform/UV: Remove EFI memmap quirk for UV2+") changed uv_system_init() to only call map_low_mmrs() on older UV1 hardware, which requires EFI_OLD_MEMMAP to be set in order to boot. The recent changes to the EFI memory mapping code in: d2f7cbe7b26a ("x86/efi: Runtime services virtual mapping") exposed some issues with the fact that we were relying on the EFI memory mapping mechanisms to map in our MMRs for us, after commit d394f2d9d8e1. Rather than revert the entire commit and go back to forcing EFI_OLD_MEMMAP on all UVs, we're going to add the call to map_low_mmrs() back into uv_system_init(), and then fix up our EFI runtime calls to use the appropriate page table. For now, UV2+ will still need efi=old_map to boot, but there will be other changes soon that should eliminate the need for this. Signed-off-by: Alex Thorlton Cc: Matt Fleming Cc: Adam Buchbinder Cc: Len Brown Cc: Borislav Petkov Cc: Russ Anderson Cc: Dimitri Sivanich Link: http://lkml.kernel.org/r/1462401592-120735-1-git-send-email-athorlton@sgi.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cba1b3798e2c4c094f2079a0d4c1ba4ec2c5a9ac Author: Andi Kleen Date: Fri Apr 29 17:55:48 2016 -0700 perf/x86: Add model numbers for Kabylake CPUs Everything the same as Skylake, just new model numbers. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/1461977748-17616-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 58446fef579e5214dc6fffd28cc538051efe1f24 Author: Tadeusz Struk Date: Wed May 4 06:38:46 2016 -0700 crypto: rsa - select crypto mgr dependency The pkcs1pad template needs CRYPTO_MANAGER so it needs to be explicitly selected by CRYPTO_RSA. Reported-by: Jamie Heilman Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 Author: Herbert Xu Date: Wed May 4 17:52:56 2016 +0800 crypto: hash - Fix page length clamping in hash walk The crypto hash walk code is broken when supplied with an offset greater than or equal to PAGE_SIZE. This patch fixes it by adjusting walk->pg and walk->offset when this happens. Cc: Reported-by: Steffen Klassert Signed-off-by: Herbert Xu crypto/ahash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fca097169faf8b9cfe92d8926da7a1fa2d3cd452 Merge: 80623de 4ea3959 Author: Dave Airlie Date: Thu May 5 12:12:09 2016 +1000 Merge tag 'drm-intel-fixes-2016-05-02' of git://anongit.freedesktop.org/drm-intel into drm-fixes i915 fixes for 4.6. A bit more than I'd like at this stage, but OTOH they're all stable material. * tag 'drm-intel-fixes-2016-05-02' of git://anongit.freedesktop.org/drm-intel: drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW drm/i915: Fake HDMI live status drm/i915: Fix eDP low vswing for Broadwell drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume drm/i915: Fix system resume if PCI device remained enabled drm/i915: Avoid stalling on pending flips for legacy cursor updates commit 80623de03b97efef8df4c8067ab606585663e042 Merge: 503fe87 0126d4b Author: Dave Airlie Date: Thu May 5 10:37:25 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes two fixes for hw lockups and one for a double free * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: make sure vertical front porch is at least 1 drm/radeon: make sure vertical front porch is at least 1 drm/amdgpu: set metadata pointer to NULL after freeing. commit 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 Author: Philipp Zabel Date: Wed Apr 27 10:17:51 2016 +0200 gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading If of_node is set before calling platform_device_add, the driver core will try to use of: modalias matching, which fails because the device tree nodes don't have a compatible property set. This patch fixes imx-ipuv3-crtc module autoloading by setting the of_node property only after the platform modalias is set. Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports") Reported-by: Dennis Gilmore Signed-off-by: Philipp Zabel Tested-By: Dennis Gilmore Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Dave Airlie drivers/gpu/ipu-v3/ipu-common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 21f8a99ce61b2d4b74bd425a5bf7e9efbe162788 Author: Viresh Kumar Date: Wed May 4 18:49:55 2016 +0530 PM / OPP: Remove useless check Regulators are optional for devices using OPPs and the OPP core shouldn't be printing any errors for such missing regulators. It was fine before the commit 0c717d0f9cb4, but that failed to update this part of the code to remove an 'always true' check and an extra unwanted print message. Fix that now. Fixes: 0c717d0f9cb4 (PM / OPP: Initialize regulator pointer to an error value) Reported-by: Marc Gonzalez Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 3 --- 1 file changed, 3 deletions(-) commit 21a9703de3045cda0b3aaa5bc193d2e1062908d2 Merge: 4810d96 eb43335 Author: Linus Torvalds Date: Wed May 4 16:07:50 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: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset Input: zforce_ts - fix dual touch recognition Input: twl6040-vibra - fix atomic schedule panic commit 1f93e9f2318b598e6775a1fc9701604993c512b1 Author: Yury Norov Date: Mon May 2 19:12:47 2016 +0300 asm-generic: use compat version for preadv2 and pwritev2 Compat architectures that does not use generic unistd (mips, s390), declare compat version in their syscall tables for preadv2 and pwritev2. Generic unistd syscall table should do it as well. [arnd: this initially slipped through the review and an incorrect patch got merged. arch/tile/ is the only architecture that could be affected for their 32-bit compat mode, every other architecture we support today is fine.] Signed-off-by: Yury Norov Signed-off-by: Arnd Bergmann include/uapi/asm-generic/unistd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2cf530d42437fa2a1fce7b56ea4b478ec35b42a Merge: 32b583a 7d2837d Author: David S. Miller Date: Wed May 4 17:11:39 2016 -0400 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: 2 bug fixes. Fix crash on ppc64 due to missing memory barrier and restore multicast after reset. ==================== Signed-off-by: David S. Miller commit 7d2837dd7a3239e8201d9bef75c1a708e451e123 Author: Michael Chan Date: Wed May 4 16:56:44 2016 -0400 bnxt_en: Setup multicast properly after resetting device. The multicast/all-multicast internal flags are not properly restored after device reset. This could lead to unreliable multicast operations after an ethtool configuration change for example. Call bnxt_mc_list_updated() and setup the vnic->mask in bnxt_init_chip() to fix the issue. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 67a95e2022c7f0405408fb1f910283785ece354a Author: Michael Chan Date: Wed May 4 16:56:43 2016 -0400 bnxt_en: Need memory barrier when processing the completion ring. The code determines if the next ring entry is valid before proceeding further to read the rest of the entry. The CPU can re-order and read the rest of the entry first, possibly reading a stale entry, if DMA of a new entry happens right after reading it. This issue can be readily seen on a ppc64 system, causing it to crash. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 93d68841a23a5779cef6fb9aa0ef32e7c5bd00da Author: Prarit Bhargava Date: Wed May 4 13:48:56 2016 +0800 ACPICA: Dispatcher: Update thread ID for recursive method calls ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25 Set the mutex owner thread ID. Original patch from: Prarit Bhargava Link: https://bugzilla.kernel.org/show_bug.cgi?id=115121 Link: https://github.com/acpica/acpica/commit/7a3bd2d9 Signed-off-by: Prarit Bhargava Tested-by: Andy Lutomirski # On a Dell XPS 13 9350 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsmethod.c | 3 +++ 1 file changed, 3 insertions(+) commit 32b583a0cb9b757d68c44f2819fa6ccf95dbb953 Merge: 5f8e447 d6af1a3 Author: David S. Miller Date: Wed May 4 16:35:31 2016 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2016-05-04 1) The flowcache can hit an OOM condition if too many entries are in the gc_list. Fix this by counting the entries in the gc_list and refuse new allocations if the value is too high. 2) The inner headers are invalid after a xfrm transformation, so reset the skb encapsulation field to ensure nobody tries access the inner headers. Otherwise tunnel devices stacked on top of xfrm may build the outer headers based on wrong informations. 3) Add pmtu handling to vti, we need it to report pmtu informations for local generated packets. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 Author: Kangjie Lu Date: Tue May 3 16:46:24 2016 -0400 net: fix infoleak in rtnetlink The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller net/core/rtnetlink.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b8670c09f37bdf2847cc44f36511a53afc6161fd Author: Kangjie Lu Date: Tue May 3 16:35:05 2016 -0400 net: fix infoleak in llc The stack object “info” has a total size of 12 bytes. Its last byte is padding which is not initialized and leaked via “put_cmsg”. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller net/llc/af_llc.c | 1 + 1 file changed, 1 insertion(+) commit 4810d9682971e8eee659f96e4f9d9154e3c6c0b4 Merge: 41143b7 cf90ea9 Author: Linus Torvalds Date: Wed May 4 11:14:00 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull IMA fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ima: fix the string representation of the LSM/IMA hook enumeration ordering commit 1c021bb717a70aaeaa4b25c91f43c2aeddd922de Author: Uwe Kleine-König Date: Tue May 3 16:38:53 2016 +0200 net: fec: only clear a queue's work bit if the queue was emptied In the receive path a queue's work bit was cleared unconditionally even if fec_enet_rx_queue only read out a part of the available packets from the hardware. This resulted in not reading any packets in the next napi turn and so packets were delayed or lost. The obvious fix is to only clear a queue's bit when the queue was emptied. Fixes: 4d494cdc92b3 ("net: fec: change data structure to support multiqueue") Signed-off-by: Uwe Kleine-König Reviewed-by: Lucas Stach Tested-by: Fugang Duan Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6a480a7842545ec520a91730209ec0bae41694c1 Author: Al Viro Date: Wed May 4 14:04:13 2016 -0400 ecryptfs: fix handling of directory opening First of all, trying to open them r/w is idiocy; it's guaranteed to fail. Moreover, assigning ->f_pos and assuming that everything will work is blatantly broken - try that with e.g. tmpfs as underlying layer and watch the fireworks. There may be a non-trivial amount of state associated with current IO position, well beyond the numeric offset. Using the single struct file associated with underlying inode is really not a good idea; we ought to open one for each ecryptfs directory struct file. Additionally, file_operations both for directories and non-directories are full of pointless methods; non-directories should *not* have ->iterate(), directories should not have ->flush(), ->fasync() and ->splice_read(). Signed-off-by: Al Viro fs/ecryptfs/file.c | 71 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 55 insertions(+), 16 deletions(-) commit 20decb7e486d7eefff3931f58d092d2d7c024a1c Author: Matthias Brugger Date: Tue May 3 16:05:07 2016 +0200 drivers: net: xgene: Fix error handling When probe bails out with an error, we try to unregister the netdev before we have even registered it. Fix the goto statements for that. Signed-off-by: Matthias Brugger Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 41143b774af2b37c24026521e6eae4c914bd731d Merge: 83858a7 27e0e63 Author: Linus Torvalds Date: Wed May 4 11:00:05 2016 -0700 Merge tag 'for-linus-4.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen regression fixes from David Vrabel: - Fix two regressions causing crashes in 32-bit PV guests - Fix a regression in the evtchn driver * tag 'for-linus-4.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/evtchn: fix ring resize when binding new events xen/balloon: Fix crash when ballooning on x86 32 bit PAE xen: Fix page <-> pfn conversion on 32 bit systems commit 5c08b0f5026fcc13efb947c4d1f2ca3558145f68 Author: Emmanuel Grumbach Date: Tue May 3 12:08:43 2016 +0300 iwlwifi: mvm: don't override the rate with the AMSDU len The TSO code creates A-MSDUs from a single large send. Each A-MSDU is an skb and skb->len doesn't include the number of bytes which need to be added for the headers being added (subframe header, TCP header, IP header, SNAP, padding). To be able to set the right value in the Tx command, we put the number of bytes added by those headers in driver_data in iwl_mvm_tx_tso and use this value in iwl_mvm_set_tx_cmd. The problem by setting this value in driver_data is that it overrides the ieee80211_tx_info. The bug manifested itself when we send P2P related frames in CCK since the rate in ieee80211_tx_info is zero-ed. This of course is a violation of the P2P specification. To fix this, copy the original ieee80211_tx_info to the stack and pass it to the functions which need it. Assign the number of bytes added by the headers to the driver_data inside the skb itself. Fixes: a6d5e32f247c ("iwlwifi: mvm: send large SKBs to the transport") Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 83 +++++++++++++++++------------ 1 file changed, 48 insertions(+), 35 deletions(-) commit 27e0e6385377c4dc68a4ddaf1a35a2dfa951f3c5 Author: Jan Beulich Date: Wed May 4 07:02:36 2016 -0600 xen/evtchn: fix ring resize when binding new events The copying of ring data was wrong for two cases: For a full ring nothing got copied at all (as in that case the canonicalized producer and consumer indexes are identical). And in case one or both of the canonicalized (after the resize) indexes would point into the second half of the buffer, the copied data ended up in the wrong (free) part of the new buffer. In both cases uninitialized data would get passed back to the caller. Fix this by simply copying the old ring contents twice: Once to the low half of the new buffer, and a second time to the high half. This addresses the inability to boot a HVM guest with 64 or more vCPUs. This regression was caused by 8620015499101090 (xen/evtchn: dynamically grow pending event channel ring). Reported-by: Konrad Rzeszutek Wilk Signed-off-by: Jan Beulich Cc: # 4.4+ Signed-off-by: David Vrabel drivers/xen/evtchn.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 6d45b719cbd51f014bb1b5dd8ed99068d78d36af Author: Rafael J. Wysocki Date: Wed May 4 14:01:10 2016 +0200 intel_pstate: Fix intel_pstate_get() After commit 8fa520af5081 "intel_pstate: Remove freq calculation from intel_pstate_calc_busy()" intel_pstate_get() calls get_avg_frequency() to compute the average frequency, which is problematic for two reasons. First, intel_pstate_get() may be invoked before the driver reads the CPU feedback registers for the first time and if that happens, get_avg_frequency() will attempt to divide by zero. Second, the get_avg_frequency() call in intel_pstate_get() is racy with respect to intel_pstate_sample() and it may end up returning completely meaningless values for this reason. Moreover, after commit 7349ec0470b6 "intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance()" sample.core_pct_busy is never computed on Atom, but it is used in intel_pstate_adjust_busy_pstate() in that case too. To address those problems notice that if sample.core_pct_busy was used in the average frequency computation carried out by get_avg_frequency(), both the divide by zero problem and the race with respect to intel_pstate_sample() would be avoided. Accordingly, move the invocation of intel_pstate_calc_busy() from get_target_pstate_use_performance() to intel_pstate_update_util(), which also will take care of the uninitialized sample.core_pct_busy on Atom, and modify get_avg_frequency() to use sample.core_pct_busy as per the above. Reported-by: kernel test robot Link: http://marc.info/?l=linux-kernel&m=146226437623173&w=4 Fixes: 8fa520af5081 "intel_pstate: Remove freq calculation from intel_pstate_calc_busy()" Fixes: 7349ec0470b6 "intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance()" Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cf90ea934028375805e2d39c796eb276001574d7 Author: Mimi Zohar Date: Tue Apr 19 17:42:43 2016 -0400 ima: fix the string representation of the LSM/IMA hook enumeration ordering This patch fixes the string representation of the LSM/IMA hook enumeration ordering used for displaying the IMA policy. Fixes: d9ddf077bb85 ("ima: support for kexec image and initramfs") Signed-off-by: Mimi Zohar Tested-by: Eric Richter Signed-off-by: James Morris security/integrity/ima/ima_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 393dbe4e18dd5b17b3952c7d36ac88f61ec40924 Author: Daniel Baluta Date: Thu Mar 17 18:32:44 2016 +0200 iio: imu: mpu6050: Fix name/chip_id when using ACPI When using ACPI, id is NULL and the current code automatically defaults name to NULL and chip id to 0. We should instead use the data provided in the ACPI device table. Fixes: c816d9e7a57b ("iio: imu: mpu6050: fix possible NULL dereferences") Signed-off-by: Daniel Baluta Reviewed-By: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 140afdd9626cdaaf54223e82931213de785c7c94 Author: Matt Ranostay Date: Wed Mar 2 19:18:12 2016 -0800 iio: imu: mpu6050: fix possible NULL dereferences Fix possible null dereferencing of i2c and spi driver data. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 3 ++- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 26792526cc3e29e3ccbc15c996beb61fa64be5af Author: Lyude Date: Tue May 3 11:01:32 2016 -0400 Revert "drm/i915: start adding dp mst audio" Right now MST audio is causing too many kernel panics to really keep around in the kernel. On top of that, even after fixing said panics it's still basically non-functional (at least on all the setups I've tested it on). Revert until we have a proper solution for this. This reverts commit 3d52ccf52f2c51f613e42e65be0f06e4e6788093. Signed-off-by: Lyude Fixes: 3d52ccf52f2c ("drm/i915: start adding dp mst audio") Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1462287692-28570-1-git-send-email-cpaul@redhat.com (cherry picked from commit 5a8f97ea04c98201deeb973c3f711c3c156115e9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 16 ---------------- drivers/gpu/drm/i915/intel_audio.c | 9 +++------ drivers/gpu/drm/i915/intel_ddi.c | 24 +++++------------------- drivers/gpu/drm/i915/intel_dp_mst.c | 22 ---------------------- drivers/gpu/drm/i915/intel_drv.h | 2 -- 5 files changed, 8 insertions(+), 65 deletions(-) commit d6a862fe8c48229ba342648bcd535b2404724603 Author: Imre Deak Date: Tue May 3 15:54:19 2016 +0300 drm/i915/bdw: Add missing delay during L3 SQC credit programming BSpec requires us to wait ~100 clocks before re-enabling clock gating, so make sure we do this. CC: stable@vger.kernel.org CC: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1462280061-1457-2-git-send-email-imre.deak@intel.com (cherry picked from commit 48e5d68d28f00c0cadac5a830980ff3222781abb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8bea61f0585f9851d3fd69315861248d72960833 Author: Jani Nikula Date: Fri Apr 29 15:34:02 2016 +0300 drm/i915/lvds: separate border enable readout from panel fitter The LVDS border enable is independent from the panel fitter. Move the readout of the "border bits" from i9xx_get_pfit_config() to intel_lvds_get_config(), where it will be read if LVDS is enabled even if the panel fitter is not. This fixes the state checker warning: [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in gmch_pfit.lvds_border_bits (expected 0x00008000, found 0x00000000) Cc: Ville Syrjälä Cc: drm-intel-fixes@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87632 Reviewed-by: Ville Syrjälä Tested-by: Sitsofe Wheeler Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1461933243-2140-1-git-send-email-jani.nikula@intel.com (cherry picked from commit a0cbe6a3f1c0e86342965430b4a775b5d35b416b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_lvds.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) commit a04e23d42a1ce5d5f421692bb1c7e9352832819d Author: Ville Syrjälä Date: Tue Apr 26 19:46:32 2016 +0300 drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency Update CDCLK_FREQ on BDW after changing the cdclk frequency. Not sure if this is a late addition to the spec, or if I simply overlooked this step when writing the original code. This is what Bspec has to say about CDCLK_FREQ: "Program this field to the CD clock frequency minus one. This is used to generate a divided down clock for miscellaneous timers in display." And the "Broadwell Sequences for Changing CD Clock Frequency" section clarifies this further: "For CD clock 337.5 MHz, program 337 decimal. For CD clock 450 MHz, program 449 decimal. For CD clock 540 MHz, program 539 decimal. For CD clock 675 MHz, program 674 decimal." Cc: stable@vger.kernel.org Cc: Mika Kahola Fixes: b432e5cfd5e9 ("drm/i915: BDW clock change support") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1461689194-6079-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola (cherry picked from commit 7f1052a8fa38df635ab0dc0e6025b64ab9834824) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 2 ++ 2 files changed, 4 insertions(+) commit 7f9b474c92713067237c8188f32791cc4007b5da Author: Josh Boyer Date: Tue May 3 20:29:41 2016 +0100 x86/efi-bgrt: Switch all pr_err() to pr_notice() for invalid BGRT The promise of pretty boot splashes from firmware via BGRT was at best only that; a promise. The kernel diligently checks to make sure the BGRT data firmware gives it is valid, and dutifully warns the user when it isn't. However, it does so via the pr_err log level which seems unnecessary. The user cannot do anything about this and there really isn't an error on the part of Linux to correct. This lowers the log level by using pr_notice instead. Users will no longer have their boot process uglified by the kernel reminding us that firmware can and often is broken when the 'quiet' kernel parameter is specified. Ironic, considering BGRT is supposed to make boot pretty to begin with. Signed-off-by: Josh Boyer Signed-off-by: Matt Fleming Reviewed-by: Josh Triplett Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Môshe van der Sterre Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1462303781-8686-4-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi-bgrt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 Author: Matt Fleming Date: Tue May 3 20:29:39 2016 +0100 MAINTAINERS: Remove asterisk from EFI directory names Mark reported that having asterisks on the end of directory names confuses get_maintainer.pl when it encounters subdirectories, and that my name does not appear when run on drivers/firmware/efi/libstub. Reported-by: Mark Rutland Signed-off-by: Matt Fleming Cc: Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1462303781-8686-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83858a701cf3271f81dd321c2a81e5666c6ca8f4 Merge: 7391daf 854145e Author: Linus Torvalds Date: Tue May 3 18:02:38 2016 -0700 Merge tag 'trace-fixes-v4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Chunyu Hu noticed that if one writes into the trigger files within the ftrace subsystem of events that it can cause an oops. This file is only writable by root, but still is a bug that needs to be fixed" * tag 'trace-fixes-v4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Don't display trigger file for events that can't be enabled commit 7391daf2ffc780679d6ab3fad1db2619e5dd2c2a Merge: 610603a 79e8dc8 Author: Linus Torvalds Date: Tue May 3 15:07:50 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Some straggler bug fixes: 1) Batman-adv DAT must consider VLAN IDs when choosing candidate nodes, from Antonio Quartulli. 2) Fix botched reference counting of vlan objects and neigh nodes in batman-adv, from Sven Eckelmann. 3) netem can crash when it sees GSO packets, the fix is to segment then upon ->enqueue. Fix from Neil Horman with help from Eric Dumazet. 4) Fix VXLAN dependencies in mlx5 driver Kconfig, from Matthew Finlay. 5) Handle VXLAN ops outside of rcu lock, via a workqueue, in mlx5, since it can sleep. Fix also from Matthew Finlay. 6) Check mdiobus_scan() return values properly in pxa168_eth and macb drivers. From Sergei Shtylyov. 7) If the netdevice doesn't support checksumming, disable segmentation. From Alexandery Duyck. 8) Fix races between RDS tcp accept and sending, from Sowmini Varadhan. 9) In macb driver, probe MDIO bus before we register the netdev, otherwise we can try to open the device before it is really ready for that. Fix from Florian Fainelli. 10) Netlink attribute size for ILA "tunnels" not calculated properly, fix from Nicolas Dichtel" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: ipv6/ila: fix nlsize calculation for lwtunnel net: macb: Probe MDIO bus before registering netdev RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. RDS:TCP: Synchronize rds_tcp_accept_one with rds_send_xmit when resetting t_sock vxlan: Add checksum check to the features check function net: Disable segmentation if checksumming is not supported net: mvneta: Remove superfluous SMP function call macb: fix mdiobus_scan() error check pxa168_eth: fix mdiobus_scan() error check net/mlx5e: Use workqueue for vxlan ops net/mlx5e: Implement a mlx5e workqueue net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue net/mlx5: Unmap only the relevant IO memory mapping netem: Segment GSO packets on enqueue batman-adv: Fix reference counting of hardif_neigh_node object for neigh_node batman-adv: Fix reference counting of vlan object for tt_local_entry batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event batman-adv: fix DAT candidate selection (must use vid) commit 610603a520bdeb35bd838835f36cfd6b4a563995 Merge: 1248ded 4441f63 Author: Linus Torvalds Date: Tue May 3 14:23:58 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: "Fix a regression and update the MAINTAINERS entry for fuse" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: update mailing list in MAINTAINERS fuse: Fix return value from fuse_get_user_pages() commit 79e8dc8b80bff0bc5bbb90ca5e73044bf207c8ac Author: Nicolas Dichtel Date: Tue May 3 09:58:27 2016 +0200 ipv6/ila: fix nlsize calculation for lwtunnel The handler 'ila_fill_encap_info' adds one attribute: ILA_ATTR_LOCATOR. Fixes: 65d7ab8de582 ("net: Identifier Locator Addressing module") CC: Tom Herbert Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv6/ila/ila_lwt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cf6696608a069aaac10a253207deeb63dcd6a653 Author: Florian Fainelli Date: Mon May 2 18:38:45 2016 -0700 net: macb: Probe MDIO bus before registering netdev The current sequence makes us register for a network device prior to registering and probing the MDIO bus which could lead to some unwanted consequences, like a thread of execution calling into ndo_open before register_netdev() returns, while the MDIO bus is not ready yet. Rework the sequence to register for the MDIO bus, and therefore attach to a PHY prior to calling register_netdev(), which implies reworking the error path a bit. Signed-off-by: Florian Fainelli Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit b365d955f3f8dad71845fee8092330039f67c428 Merge: 42c8819 bd7c5f9 Author: David S. Miller Date: Tue May 3 16:03:45 2016 -0400 Merge branch 'rds-fixes' Sowmini Varadhan says: ==================== RDS: TCP: sychronization during connection startup This patch series ensures that the passive (accept) side of the TCP connection used for RDS-TCP is correctly synchronized with any concurrent active (connect) attempts for a given pair of peers. Patch 1 in the series makes sure that the t_sock in struct rds_tcp_connection is only reset after any threads in rds_tcp_xmit have completed (otherwise a null-ptr deref may be encountered). Patch 2 synchronizes rds_tcp_accept_one() with the rds_tcp*connect() path. v2: review comments from Santosh Shilimkar, other spelling corrections ==================== Signed-off-by: David S. Miller commit bd7c5f983f3185b75cc23bdd5dbc3a676aef3d1e Author: Sowmini Varadhan Date: Mon May 2 11:24:52 2016 -0700 RDS: TCP: Synchronize accept() and connect() paths on t_conn_lock. An arbitration scheme for duelling SYNs is implemented as part of commit 241b271952eb ("RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()") which ensures that both nodes involved will arrive at the same arbitration decision. However, this needs to be synchronized with an outgoing SYN to be generated by rds_tcp_conn_connect(). This commit achieves the synchronization through the t_conn_lock mutex in struct rds_tcp_connection. The rds_conn_state is checked in rds_tcp_conn_connect() after acquiring the t_conn_lock mutex. A SYN is sent out only if the RDS connection is not already UP (an UP would indicate that rds_tcp_accept_one() has completed 3WH, so no SYN needs to be generated). Similarly, the rds_conn_state is checked in rds_tcp_accept_one() after acquiring the t_conn_lock mutex. The only acceptable states (to allow continuation of the arbitration logic) are UP (i.e., outgoing SYN was SYN-ACKed by peer after it sent us the SYN) or CONNECTING (we sent outgoing SYN before we saw incoming SYN). Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 1 + net/rds/tcp.h | 4 ++++ net/rds/tcp_connect.c | 8 ++++++++ net/rds/tcp_listen.c | 30 ++++++++++++++++++++---------- 4 files changed, 33 insertions(+), 10 deletions(-) commit eb192840266fab3e3da644018121eed30153355d Author: Sowmini Varadhan Date: Mon May 2 11:24:51 2016 -0700 RDS:TCP: Synchronize rds_tcp_accept_one with rds_send_xmit when resetting t_sock There is a race condition between rds_send_xmit -> rds_tcp_xmit and the code that deals with resolution of duelling syns added by commit 241b271952eb ("RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()"). Specifically, we may end up derefencing a null pointer in rds_send_xmit if we have the interleaving sequence: rds_tcp_accept_one rds_send_xmit conn is RDS_CONN_UP, so invoke rds_tcp_xmit tc = conn->c_transport_data rds_tcp_restore_callbacks /* reset t_sock */ null ptr deref from tc->t_sock The race condition can be avoided without adding the overhead of additional locking in the xmit path: have rds_tcp_accept_one wait for rds_tcp_xmit threads to complete before resetting callbacks. The synchronization can be done in the same manner as rds_conn_shutdown(). First set the rds_conn_state to something other than RDS_CONN_UP (so that new threads cannot get into rds_tcp_xmit()), then wait for RDS_IN_XMIT to be cleared in the conn->c_flags indicating that any threads in rds_tcp_xmit are done. Fixes: 241b271952eb ("RDS-TCP: Reset tcp callbacks if re-using an outgoing socket in rds_tcp_accept_one()") Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 2 +- net/rds/tcp_listen.c | 40 ++++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 17 deletions(-) commit 42c8819b8d7245f54d5cfa6c2ec5a436818aeda9 Merge: 0e28bf9 af67eb9 Author: David S. Miller Date: Tue May 3 16:00:55 2016 -0400 Merge branch 'tunnel-csum-and-sg-offloads' Alexander Duyck says: ==================== Fixes for tunnel checksum and segmentation offloads This patch series is a subset of patches I had submitted for net-next. I plan to drop these two patches from the v3 of "Fix Tunnel features and enable GSO partial for several drivers" and I am instead submitting them for net since these are truly fixes and likely will need to be backported to stable branches. This series addresses 2 specific issues. The first is that we could request TSO on a v4 inner header while not supporting checksum offload of the outer IPv6 header. The second is that we could request an IPv6 inner checksum offload without validating that we could actually support an inner IPv6 checksum offload. ==================== Signed-off-by: David S. Miller commit af67eb9e7e1ab37880459f83153d34b3c42b0075 Author: Alexander Duyck Date: Mon May 2 09:25:16 2016 -0700 vxlan: Add checksum check to the features check function We need to perform an additional check on the inner headers to determine if we can offload the checksum for them. Previously this check didn't occur so we would generate an invalid frame in the case of an IPv6 header encapsulated inside of an IPv4 tunnel. To fix this I added a secondary check to vxlan_features_check so that we can verify that we can offload the inner checksum. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller include/linux/if_ether.h | 5 +++++ include/net/vxlan.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 996e802187889f1cd412e6929c9344b92ccb78c4 Author: Alexander Duyck Date: Mon May 2 09:25:10 2016 -0700 net: Disable segmentation if checksumming is not supported In the case of the mlx4 and mlx5 driver they do not support IPv6 checksum offload for tunnels. With this being the case we should disable GSO in addition to the checksum offload features when we find that a device cannot perform a checksum on a given packet type. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e28bf93a273cce0db67a17428697abb722c36b8 Author: Anna-Maria Gleixner Date: Mon May 2 11:02:51 2016 +0200 net: mvneta: Remove superfluous SMP function 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 SMP function calls are no longer required. Replace smp_call_function_single() with a direct call to mvneta_percpu_enable() or mvneta_percpu_disable(). The functions do not require to be called with interrupts disabled, therefore the smp_call_function_single() calling convention is not preserved. Cc: Thomas Petazzoni Cc: netdev@vger.kernel.org Signed-off-by: Anna-Maria Gleixner Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ce24c2b8a904753701fe4df313b4cbc2b0649e3e Author: Sergei Shtylyov Date: Sun May 1 01:47:36 2016 +0300 macb: fix mdiobus_scan() error check Now mdiobus_scan() returns ERR_PTR(-ENODEV) instead of NULL if the PHY device ID was read as all ones. As this was not an error before, this value should be filtered out now in this driver. Fixes: b74766a0a0fe ("phylib: don't return NULL from get_phy_device()") Signed-off-by: Sergei Shtylyov Reviewed-by: Florian Fainelli Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6dd745425807dc977bbea810ef703b935002fcc3 Author: Sergei Shtylyov Date: Sat Apr 30 23:35:11 2016 +0300 pxa168_eth: fix mdiobus_scan() error check Since mdiobus_scan() returns either an error code or NULL on error, the driver should check for both, not only for NULL, otherwise a crash is imminent... Reported-by: Arnd Bergmann Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/marvell/pxa168_eth.c | 2 ++ 1 file changed, 2 insertions(+) commit 0126d4b9a516256f2432ca0dc78ab293a8255378 Author: Alex Deucher Date: Mon May 2 18:54:39 2016 -0400 drm/amdgpu: make sure vertical front porch is at least 1 hw doesn't like a 0 value. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3104b8128d4d646a574ed9d5b17c7d10752cd70b Author: Alex Deucher Date: Mon May 2 18:53:27 2016 -0400 drm/radeon: make sure vertical front porch is at least 1 hw doesn't like a 0 value. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/atombios_encoders.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1248ded656d8afb64be01b2985b7b3e562eac914 Merge: 1f6211a eff6ca9 Author: Linus Torvalds Date: Tue May 3 11:06:01 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: "Fixes for the HID subsystem: - regression fix for Wacom driver; commit introduced in 4.6-rc1 mistakenly removed line that should be kept. Fix by Ping Cheng - two device-specific quirks, by Ping Cheng and Nazar Mokrynskyi" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: add missed stylus_in_proximity line back HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk HID: wacom: Add support for DTK-1651 commit 1f6211a4ea0c38c4e162c7e8518e09ce43538905 Merge: 689de1d 2c49477 Author: Linus Torvalds Date: Tue May 3 10:58:29 2016 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One small bug fix for the imx6qp CAN clk definition that was causing failures and division by zeros in the kernel on those devices" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx6q: fix typo in CAN clock definition commit 3df8f4c6e928685e6fdf72b8d0d25e0c3a61cf7a Merge: 6071bd1 d8cf2dd Author: David S. Miller Date: Tue May 3 13:37:27 2016 -0400 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes for 4.6-rc This small series provides some bug fixes for mlx5 driver. A small bug fix for iounmap of a null pointer, which dumps a warning on some archs. One patch to fix the VXLAN/MLX5_EN dependency issue reported by Arnd. Two patches to fix the scheduling while atomic issue for ndo_add/del_vxlan_port NDOs. The first will add an internal mlx5e workqueue and the second will delegate vxlan ports add/del requests to that workqueue. Note: ('net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue') is only needed for net and not net-next as the issue was globally fixed for all device drivers by: b7aade15485a ('vxlan: break dependency with netdev drivers') in net-next. Applied on top: f27337e16f2d ('ip_tunnel: fix preempt warning in ip tunnel creation/updating') ==================== Signed-off-by: David S. Miller commit d8cf2dda3de6e6293fb01539fb4e180a7ab42afd Author: Matthew Finlay Date: Sun May 1 22:59:57 2016 +0300 net/mlx5e: Use workqueue for vxlan ops The vxlan add/delete port NDOs are called under rcu lock. The current mlx5e implementation can potentially block in these calls, which is not allowed. Move to using the mlx5e workqueue to handle these NDOs. 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/en_main.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 50 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 11 ++++- 3 files changed, 49 insertions(+), 16 deletions(-) commit 7bb2975599210097115021e542b6137781a09588 Author: Matthew Finlay Date: Sun May 1 22:59:56 2016 +0300 net/mlx5e: Implement a mlx5e workqueue Implement a mlx5e workqueue to handle all mlx5e specific tasks. Move all tasks currently using the system workqueue to the new workqueue. This is in preparation for vxlan using the mlx5e workqueue in order to schedule port add/remove operations. Signed-off-by: Matthew Finlay 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 | 30 ++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) commit 69976fb1045850a742deb9790ea49cbc6f497531 Author: Matthew Finlay Date: Sun May 1 22:59:55 2016 +0300 net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue When MLX5_EN=y MLX5_CORE=y and VXLAN=m there is a linker error for vxlan_get_rx_port() due to the fact that VXLAN is a module. Change Kconfig to select VXLAN when MLX5_CORE=y. When MLX5_CORE=m there is no dependency on the value of VXLAN. Fixes: b3f63c3d5e2c ('net/mlx5e: Add netdev support for VXLAN tunneling') Signed-off-by: Matthew Finlay Reported-by: Arnd Bergmann Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5f8a02a441b861fd3b1b5135a1a6e1c13ee4bb33 Author: Gal Pressman Date: Sun May 1 22:59:54 2016 +0300 net/mlx5: Unmap only the relevant IO memory mapping When freeing UAR the driver tries to unmap uar->map and uar->bf_map which are mutually exclusive thus always unmapping a NULL pointer. Make sure we only call iounmap() once, for the actual mapping. Fixes: 0ba422410bbf ('net/mlx5: Fix global UAR mapping') Signed-off-by: Gal Pressman Reported-by: Doron Tsur Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/uar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 854145e0a8e9a05f7366d240e2f99d9c1ca6d6dd Author: Chunyu Hu Date: Tue May 3 19:34:34 2016 +0800 tracing: Don't display trigger file for events that can't be enabled Currently register functions for events will be called through the 'reg' field of event class directly without any check when seting up triggers. Triggers for events that don't support register through debug fs (events under events/ftrace are for trace-cmd to read event format, and most of them don't have a register function except events/ftrace/functionx) can't be enabled at all, and an oops will be hit when setting up trigger for those events, so just not creating them is an easy way to avoid the oops. Link: http://lkml.kernel.org/r/1462275274-3911-1-git-send-email-chuhu@redhat.com Cc: stable@vger.kernel.org # 3.14+ Fixes: 85f2b08268c01 ("tracing: Add basic event trigger framework") Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt kernel/trace/trace_events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0092d3edcb23fcdb8cbe4159ba94a534290ff982 Author: Dave Airlie Date: Tue May 3 12:44:29 2016 +1000 drm/amdgpu: set metadata pointer to NULL after freeing. Without this there was a double free of the metadata, which ended up freeing the fd table for me here, and taking out the machine more often than not. I reproduced with X.org + modesetting DDX + latest llvm/mesa, also required using dri3. Cc: stable@vger.kernel.org Reviewed-by: Christian König Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + 1 file changed, 1 insertion(+) commit eff6ca97998386447b795362cc20213114af2870 Author: Ping Cheng Date: Mon May 2 21:17:34 2016 -0700 HID: wacom: add missed stylus_in_proximity line back Commit 7e12978 ("HID: wacom: break out wacom_intuos_get_tool_type") by accident removed stylus_in_proximity flag for Intuos series while shuffling the code around. Fix that by reintroducing that flag setting in wacom_intuos_inout(), where it originally was. Fixes: 7e12978 ("HID: wacom: break out wacom_intuos_get_tool_type") Signed-off-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+) commit 4441f63ab7e581ae460c9f7e06fba8a2be192e81 Author: Miklos Szeredi Date: Tue May 3 11:19:33 2016 +0200 fuse: update mailing list in MAINTAINERS The fuse mailing list seems not to be open anymore. The discussion on fuse-devel@... is mostly userspace related anyway. Reported-by: Andreas Gruenbacher Signed-off-by: Miklos Szeredi MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dc5df71ee5c8b44607928bfe27be50314dcf848 Author: Tadeusz Struk Date: Fri Apr 29 10:43:40 2016 -0700 crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq Fix undefined reference issue reported by kbuild test robot. Cc: Reported-by: kbuild test robot Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_common_drv.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 6071bd1aa13ed9e41824bafad845b7b7f4df5cfd Author: Neil Horman Date: Mon May 2 12:20:15 2016 -0400 netem: Segment GSO packets on enqueue This was recently reported to me, and reproduced on the latest net kernel, when attempting to run netperf from a host that had a netem qdisc attached to the egress interface: [ 788.073771] ---------------------[ cut here ]--------------------------- [ 788.096716] WARNING: at net/core/dev.c:2253 skb_warn_bad_offload+0xcd/0xda() [ 788.129521] bnx2: caps=(0x00000001801949b3, 0x0000000000000000) len=2962 data_len=0 gso_size=1448 gso_type=1 ip_summed=3 [ 788.182150] Modules linked in: sch_netem kvm_amd kvm crc32_pclmul ipmi_ssif ghash_clmulni_intel sp5100_tco amd64_edac_mod aesni_intel lrw gf128mul glue_helper ablk_helper edac_mce_amd cryptd pcspkr sg edac_core hpilo ipmi_si i2c_piix4 k10temp fam15h_power hpwdt ipmi_msghandler shpchp acpi_power_meter pcc_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ahci ata_generic pata_acpi ttm libahci crct10dif_pclmul pata_atiixp tg3 libata crct10dif_common drm crc32c_intel ptp serio_raw bnx2 r8169 hpsa pps_core i2c_core mii dm_mirror dm_region_hash dm_log dm_mod [ 788.465294] CPU: 16 PID: 0 Comm: swapper/16 Tainted: G W ------------ 3.10.0-327.el7.x86_64 #1 [ 788.511521] Hardware name: HP ProLiant DL385p Gen8, BIOS A28 12/17/2012 [ 788.542260] ffff880437c036b8 f7afc56532a53db9 ffff880437c03670 ffffffff816351f1 [ 788.576332] ffff880437c036a8 ffffffff8107b200 ffff880633e74200 ffff880231674000 [ 788.611943] 0000000000000001 0000000000000003 0000000000000000 ffff880437c03710 [ 788.647241] Call Trace: [ 788.658817] [] dump_stack+0x19/0x1b [ 788.686193] [] warn_slowpath_common+0x70/0xb0 [ 788.713803] [] warn_slowpath_fmt+0x5c/0x80 [ 788.741314] [] ? ___ratelimit+0x93/0x100 [ 788.767018] [] skb_warn_bad_offload+0xcd/0xda [ 788.796117] [] skb_checksum_help+0x17c/0x190 [ 788.823392] [] netem_enqueue+0x741/0x7c0 [sch_netem] [ 788.854487] [] dev_queue_xmit+0x2a8/0x570 [ 788.880870] [] ip_finish_output+0x53d/0x7d0 ... The problem occurs because netem is not prepared to handle GSO packets (as it uses skb_checksum_help in its enqueue path, which cannot manipulate these frames). The solution I think is to simply segment the skb in a simmilar fashion to the way we do in __dev_queue_xmit (via validate_xmit_skb), with some minor changes. When we decide to corrupt an skb, if the frame is GSO, we segment it, corrupt the first segment, and enqueue the remaining ones. tested successfully by myself on the latest net kernel, to which this applies Signed-off-by: Neil Horman CC: Jamal Hadi Salim CC: "David S. Miller" CC: netem@lists.linux-foundation.org CC: eric.dumazet@gmail.com CC: stephen@networkplumber.org Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_netem.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) commit 9b40d5aaef542f5b2bcba41fb1e24cfcba793774 Merge: 33656a1 abe59c6 Author: David S. Miller Date: Tue May 3 00:17:38 2016 -0400 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== In this small batch of patches you have: - a fix for our Distributed ARP Table that makes sure that the input provided to the hash function during a query is the same as the one provided during an insert (so to prevent false negatives), by Antonio Quartulli - a fix for our new protocol implementation B.A.T.M.A.N. V that ensures that a hard interface is properly re-activated when it is brought down and then up again, by Antonio Quartulli - two fixes respectively to the reference counting of the tt_local_entry and neigh_node objects, by Sven Eckelmann. Such bug is rather severe as it would prevent the netdev objects references by batman-adv from being released after shutdown. ==================== Signed-off-by: David S. Miller commit 689de1d6ca95b3b5bd8ee446863bf81a4883ea25 Author: Linus Torvalds Date: Mon May 2 12:46:42 2016 -0700 Minimal fix-up of bad hashing behavior of hash_64() This is a fairly minimal fixup to the horribly bad behavior of hash_64() with certain input patterns. In particular, because the multiplicative value used for the 64-bit hash was intentionally bit-sparse (so that the multiply could be done with shifts and adds on architectures without hardware multipliers), some bits did not get spread out very much. In particular, certain fairly common bit ranges in the input (roughly bits 12-20: commonly with the most information in them when you hash things like byte offsets in files or memory that have block factors that mean that the low bits are often zero) would not necessarily show up much in the result. There's a bigger patch-series brewing to fix up things more completely, but this is the fairly minimal fix for the 64-bit hashing problem. It simply picks a much better constant multiplier, spreading the bits out a lot better. NOTE! For 32-bit architectures, the bad old hash_64() remains the same for now, since 64-bit multiplies are expensive. The bigger hashing cleanup will replace the 32-bit case with something better. The new constants were picked by George Spelvin who wrote that bigger cleanup series. I just picked out the constants and part of the comment from that series. Cc: stable@vger.kernel.org Cc: George Spelvin Cc: Thomas Gleixner Signed-off-by: Linus Torvalds include/linux/hash.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 98bcf28636ac2397489e230b107a051524b1233b Merge: 33656a1 b8a0b8e Author: Linus Torvalds Date: Mon May 2 12:22:51 2016 -0700 Merge tag 'md/4.6-rc6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "This update includes several trival fixes. The only important one is to fix MD bio merge, which has big performance impact" * tag 'md/4.6-rc6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: raid5: delete unnecessary warnning MD: make bio mergeable md/raid0: remove empty line printk from dump_zones md/raid0: fix uninitialized variable bug commit 9a2a5a638f8eb9c612a7a9af0afab93f506f6ba4 Author: Lukas Wunner Date: Mon May 2 13:48:31 2016 -0500 PCI: Do not treat EPROBE_DEFER as device attach failure Linux 4.5 introduced a behavioral change in device probing during the suspend process with commit 013c074f8642 ("PM / sleep: prohibit devices probing during suspend/hibernation"): It defers device probing during the entire suspend process, starting from the prepare phase and ending with the complete phase. A rule existed before that "we rely on subsystems not to do any probing once a device is suspended" but it is enforced only now (Alan Stern, https://lkml.org/lkml/2015/9/15/908). This resulted in a WARN splat if a PCI device (e.g., Thunderbolt) is plugged in while the system is asleep: Upon waking up, pciehp_resume() discovers new devices in the resume phase and immediately tries to bind them to a driver. Since probing is now deferred, device_attach() returns -EPROBE_DEFER, which provoked a WARN in pci_bus_add_device(). Linux 4.6-rc1 aggravates the situation with commit ab1a187bba5c ("PCI: Check device_attach() return value always"): If device_attach() returns a negative value, pci_bus_add_device() now removes the sysfs and procfs entries for the device and pci_bus_add_devices() subsequently locks up with a BUG. Even with the BUG fixed we're still in trouble because the device remains on the deferred probing list even though its sysfs and procfs entries are gone and its children won't be added. Fix by not interpreting -EPROBE_DEFER as failure. The device will be probed eventually (through device_unblock_probing() in dpm_complete()) and there is proper locking in place to avoid races (e.g., if devices are unplugged again und thus deleted from the system before deferred probing happens, I have tested this). Also, those functions which dereference dev->driver (e.g. pci_pm_*()) do contain proper NULL pointer checks. So it seems safe to ignore -EPROBE_DEFER. Fixes: ab1a187bba5c ("PCI: Check device_attach() return value always") Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki Cc: Grygorii Strashko Cc: Alan Stern drivers/pci/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e398eae8407abdc02cde8a449b14d17ed193d56 Author: Lukas Wunner Date: Mon May 2 13:48:25 2016 -0500 PCI: Fix BUG on device attach failure Previously when pci_bus_add_device() called device_attach() and it returned a negative value, we emitted a WARN but carried on. Commit ab1a187bba5c ("PCI: Check device_attach() return value always"), introduced in Linux 4.6-rc1, changed this to unwind all steps preceding device_attach() and to not set dev->is_added = 1. The latter leads to a BUG if pci_bus_add_device() was called from pci_bus_add_devices(). Fix by not recursing to a child bus if device_attach() failed for the bridge leading to it. This can be triggered by plugging in a PCI device (e.g. Thunderbolt) while the system is asleep. The system locks up when woken because device_attach() returns -EPROBE_DEFER. Fixes: ab1a187bba5c ("PCI: Check device_attach() return value always") Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 33656a1f2ee5346c742d63ddd0e0970c95a56b70 Merge: 5f40adb c26f6c6 Author: Linus Torvalds Date: Mon May 2 09:59:57 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fix from Jan Kara: "A fix of a regression in UDF that got introduced in 4.6-rc1 by one of the charset encoding fixes" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Fix conversion of 'dstring' fields to UTF8 commit 5f40adbc3eebd7e1c55ec87315e762924a36fe76 Merge: 9c5d1bc 7df89e9 Author: Linus Torvalds Date: Mon May 2 09:54:22 2016 -0700 Merge tag 'gpio-v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here are some late but important fixes for the v4.6 kernel series. ACPI and RCAR, so two driver fixes (PM related) and a self-evident string lookup fix for ACPI GPIOs: - A serious ACPI fix targeted for stable: lookup strings were being free'd. - Revert two patches from the RCAR driver" * tag 'gpio-v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list Revert "gpio: rcar: Fine-grained Runtime PM support" Revert "gpio: rcar: Add Runtime PM handling for interrupts" commit 9c5d1bc2b73609ada2eaba75e9c8f4963e95b977 Merge: ba22906 b7f8fe2 Author: Linus Torvalds Date: Mon May 2 09:40:42 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) MODULE_FIRMWARE firmware string not correct for iwlwifi 8000 chips, from Sara Sharon. 2) Fix SKB size checks in batman-adv stack on receive, from Sven Eckelmann. 3) Leak fix on mac80211 interface add error paths, from Johannes Berg. 4) Cannot invoke napi_disable() with BH disabled in myri10ge driver, fix from Stanislaw Gruszka. 5) Fix sign extension problem when computing feature masks in net_gso_ok(), from Marcelo Ricardo Leitner. 6) lan78xx driver doesn't count packets and packet lengths in its statistics properly, fix from Woojung Huh. 7) Fix the buffer allocation sizes in pegasus USB driver, from Petko Manolov. 8) Fix refcount overflows in bpf, from Alexei Starovoitov. 9) Unified dst cache handling introduced a preempt warning in ip_tunnel, fix by resetting rather then setting the cached route. From Paolo Abeni. 10) Listener hash collision test fix in soreuseport, from Craig Gallak * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits) gre: do not pull header in ICMP error processing net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case tipc: only process unicast on intended node cxgb3: fix out of bounds read net/smscx5xx: use the device tree for mac address soreuseport: Fix TCP listener hash collision net: l2tp: fix reversed udp6 checksum flags ip_tunnel: fix preempt warning in ip tunnel creation/updating samples/bpf: fix trace_output example bpf: fix check_map_func_compatibility logic bpf: fix refcnt overflow drivers: net: cpsw: use of_phy_connect() in fixed-link case dt: cpsw: phy-handle, phy_id, and fixed-link are mutually exclusive drivers: net: cpsw: don't ignore phy-mode if phy-handle is used drivers: net: cpsw: fix segfault in case of bad phy-handle drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver gre: reject GUE and FOU in collect metadata mode pegasus: fixes reported packet length pegasus: fixes URB buffer allocation size; ... commit e99ed4de1731f79868b00a7ff9f479a55a4799a7 Author: Serge Hallyn Date: Sun Apr 17 15:04:31 2016 -0500 kernfs_path_from_node_locked: don't overwrite nlen We've calculated @len to be the bytes we need for '/..' entries from @kn_from to the common ancestor, and calculated @nlen to be the extra bytes we need to get from the common ancestor to @kn_to. We use them as such at the end. But in the loop copying the actual entries, we overwrite @nlen. Use a temporary variable for that instead. Without this, the return length, when the buffer is large enough, is wrong. (When the buffer is NULL or too small, the returned value is correct. The buffer contents are also correct.) Interestingly, no callers of this function are affected by this as of yet. However the upcoming cgroup_show_path() will be. Signed-off-by: Serge Hallyn fs/kernfs/dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba22906a9fdb197b10e3e062dc8c438efb7ea6f6 Merge: 04974df 49fa523 Author: Linus Torvalds Date: Mon May 2 09:32:50 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: 1) Fix panics with SR-IOV, from Babu Moger. 2) Wire up preadv2/pwritev2. 3) Allow proper auto-loading of VIO devices, from John Paul Adrian Glaubitz. 4) Recognize Sonoma cpus, from Khalid Aziz. 5) Fix bootup regressions caused by syscall trace fixes made recently. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix bootup regressions on some Kconfig combinations. sparc64: recognize and support Sonoma CPU type sparc: Implement and wire up vio_hotplug for vio. sparc: Implement and wire up modalias_show for vio. sparc/pci: Refactor dev_archdata initialization into pci_init_dev_archdata sparc/defconfigs: Remove CONFIG_IPV6_PRIVACY sparc: Write up preadv2/pwritev2 syscalls. sparc/PCI: Fix for panic while enabling SR-IOV commit 2eea65829dc6c20dccbe79726fd0f3fe7f8aa43b Author: Dan Williams Date: Mon May 2 09:11:53 2016 -0700 nfit: fix translation of command status results When transportation of the command completes successfully, it indicates that the 'status' result is valid. Fix the missed checking and translation of the status field at the end of acpi_nfit_ctl(). Otherwise, we fail to handle reported errors and assume commands complete successfully. Reported-by: Linda Knippers Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/acpi/nfit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9be427efc764464fbcbc1ca3f0d34f575cb0f037 Author: Johan Hovold Date: Mon May 2 15:35:57 2016 +0200 Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" This reverts commit e3345db85068ddb937fc0ba40dfc39c293dad977, which broke system resume for a large class of devices. Devices that after having been reset during resume need to be rebound due to a missing reset_resume callback, are now left in a suspended state. This specifically broke resume of common USB-serial devices, which are now unusable after system suspend (until disconnected and reconnected) when USB persist is enabled. During resume, usb_resume_interface will set the needs_binding flag for such interfaces, but unlike system resume, run-time resume does not honour it. Cc: stable # 4.5 Signed-off-by: Johan Hovold Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/port.c | 6 ------ drivers/usb/core/usb.c | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) commit d1306eb675ad7a9a760b6b8e8e189824b8db89e7 Author: Stanislav Meduna Date: Mon May 2 16:05:11 2016 +0100 nvmem: mxs-ocotp: fix buffer overflow in read This patch fixes the issue where the mxs_ocotp_read is reading the ocotp in reg_size steps but decrements the remaining size by 1. The number of iterations is thus four times higher, overwriting the area behind the output buffer. Fixes: c01e9a11ab6f ("nvmem: add driver for ocotp in i.MX23 and i.MX28") Tested-by: Stefan Wahren Signed-off-by: Stanislav Meduna Signed-off-by: Srinivas Kandagatla Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mxs-ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b15dfe0542fd6f7455c6aeca1cf711192343bf9 Author: Marek Szyprowski Date: Thu Apr 28 07:25:04 2016 -0300 [media] media: s3c-camif: fix deadlock on driver probe() Commit 0c426c472b5585ed6e59160359c979506d45ae49 ("[media] media: Always keep a graph walk large enough around") changed media_device_register_entity() function to take mdev->graph_mutex. This causes deadlock in driver probe, which calls (indirectly) this function with ->graph_mutex taken. This patch removes taking ->graph_mutex in driver probe to avoid deadlock. Other drivers don't take ->graph_mutex for entity registration, so this change should be safe. Signed-off-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s3c-camif/camif-core.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 243d4c0270a184e91ae589138652e19394edb1e7 Author: Marek Szyprowski Date: Thu Apr 28 07:25:03 2016 -0300 [media] media: exynos4-is: fix deadlock on driver probe Commit 0c426c472b5585ed6e59160359c979506d45ae49 ("[media] media: Always keep a graph walk large enough around") changed media_device_register_entity() function to take mdev->graph_mutex. This causes deadlock in driver probe, which calls (indirectly) this function with ->graph_mutex taken. This patch removes taking ->graph_mutex in driver probe to avoid deadlock. Other drivers don't take ->graph_mutex for entity registration, so this change should be safe. Signed-off-by: Marek Szyprowski Acked-by: Sakari Ailus Tested-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit ba41e1bc28bd862089b0fc00e8136aa258a62b21 Author: Rafael J. Wysocki Date: Mon May 2 02:27:19 2016 +0200 cpufreq: intel_pstate: Fix HWP on boot CPU after system resume Commit 41cfd64cf49fc "Update frequencies of policy->cpus only from ->set_policy()" changed the way the intel_pstate driver's ->set_policy callback updates the HWP (hardware-managed P-states) settings. A side effect of it is that if those settings are modified on the boot CPU during system suspend and wakeup, they will never be restored during subsequent system resume. To address this problem, allow cpufreq drivers that don't provide ->target or ->target_index callbacks to use ->suspend and ->resume callbacks and add a ->resume callback to intel_pstate to restore the HWP settings on the CPUs that belong to the given policy. Fixes: 41cfd64cf49fc "Update frequencies of policy->cpus only from ->set_policy()" Tested-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 26 +++++++++++++++----------- drivers/cpufreq/intel_pstate.c | 12 ++++++++++-- 2 files changed, 25 insertions(+), 13 deletions(-) commit b7f8fe251e4609e2a437bd2c2dea01e61db6849c Author: Jiri Benc Date: Fri Apr 29 23:31:32 2016 +0200 gre: do not pull header in ICMP error processing iptunnel_pull_header expects that IP header was already pulled; with this expectation, it pulls the tunnel header. This is not true in gre_err. Furthermore, ipv4_update_pmtu and ipv4_redirect expect that skb->data points to the IP header. We cannot pull the tunnel header in this path. It's just a matter of not calling iptunnel_pull_header - we don't need any of its effects. Fixes: bda7bb463436 ("gre: Allow multiple protocol listener for gre protocol.") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2c94b53738549d81dc7464a32117d1f5112c64d3 Author: Tim Bingham Date: Fri Apr 29 13:30:23 2016 -0400 net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case Prior to commit d92cff89a0c8 ("net_dbg_ratelimited: turn into no-op when !DEBUG") the implementation of net_dbg_ratelimited() was buggy for both the DEBUG and CONFIG_DYNAMIC_DEBUG cases. The bug was that net_ratelimit() was being called and, despite returning true, nothing was being printed to the console. This resulted in messages like the following - "net_ratelimit: %d callbacks suppressed" with no other output nearby. After commit d92cff89a0c8 ("net_dbg_ratelimited: turn into no-op when !DEBUG") the bug is fixed for the DEBUG case. However, there's no output at all for CONFIG_DYNAMIC_DEBUG case. This patch restores debug output (if enabled) for the CONFIG_DYNAMIC_DEBUG case. Add a definition of net_dbg_ratelimited() for the CONFIG_DYNAMIC_DEBUG case. The implementation takes care to check that dynamic debugging is enabled before calling net_ratelimit(). Fixes: d92cff89a0c8 ("net_dbg_ratelimited: turn into no-op when !DEBUG") Signed-off-by: Tim Bingham Signed-off-by: David S. Miller include/linux/net.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b4c112114aab9aff5ed4568ca5e662bb02cdfe74 Author: Anton Blanchard Date: Sat Apr 30 08:29:27 2016 +1000 powerpc: Fix bad inline asm constraint in create_zero_mask() In create_zero_mask() we have: addi %1,%2,-1 andc %1,%1,%2 popcntd %0,%1 using the "r" constraint for %2. r0 is a valid register in the "r" set, but addi X,r0,X turns it into an li: li r7,-1 andc r7,r7,r0 popcntd r4,r7 Fix this by using the "b" constraint, for which r0 is not a valid register. This was found with a kernel build using gcc trunk, narrowed down to when -frename-registers was enabled at -O2. It is just luck however that we aren't seeing this on older toolchains. Thanks to Segher for working with me to find this issue. Cc: stable@vger.kernel.org Fixes: d0cebfa650a0 ("powerpc: word-at-a-time optimization for 64-bit Little Endian") Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/include/asm/word-at-a-time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efe790502be85c60daa65c8aa51f05c333186e12 Author: Hamish Martin Date: Fri Apr 29 10:40:24 2016 -0400 tipc: only process unicast on intended node We have observed complete lock up of broadcast-link transmission due to unacknowledged packets never being removed from the 'transmq' queue. This is traced to nodes having their ack field set beyond the sequence number of packets that have actually been transmitted to them. Consider an example where node 1 has sent 10 packets to node 2 on a link and node 3 has sent 20 packets to node 2 on another link. We see examples of an ack from node 2 destined for node 3 being treated as an ack from node 2 at node 1. This leads to the ack on the node 1 to node 2 link being increased to 20 even though we have only sent 10 packets. When node 1 does get around to sending further packets, none of the packets with sequence numbers less than 21 are actually removed from the transmq. To resolve this we reinstate some code lost in commit d999297c3dbb ("tipc: reduce locking scope during packet reception") which ensures that only messages destined for the receiving node are processed by that node. This prevents the sequence numbers from getting out of sync and resolves the packet leakage, thereby resolving the broadcast-link transmission lock-ups we observed. While we are aware that this change only patches over a root problem that we still haven't identified, this is a sanity test that it is always legitimate to do. It will remain in the code even after we identify and fix the real problem. Reviewed-by: Chris Packham Reviewed-by: John Thompson Signed-off-by: Hamish Martin Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0b86a2a1e5807326f8eb44e9919d0baadeda3a69 Author: Michal Schmidt Date: Fri Apr 29 11:06:50 2016 +0200 cxgb3: fix out of bounds read An out of bounds read of 2 bytes was discovered in cxgb3 with KASAN. t3_config_rss() expects both arrays it gets as parameters to have terminators. setup_rss(), the caller, forgets to add a terminator to one of the arrays. Thankfully the iteration in t3_config_rss() stops anyway, but in the last iteration the check for the terminator is an out of bounds read. Add the missing terminator to rspq_map[]. Reported-by: Jan Stancek Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c489565b536ff5382460273fd9513f0adebec024 Author: Arnd Bergmann Date: Fri Apr 29 09:05:59 2016 +0200 net/smscx5xx: use the device tree for mac address This takes the MAC address for smsc75xx/smsc95xx USB network devices from a the device tree. This is required to get a usable persistent address on the popular beagleboard, whose hardware designers accidentally forgot that an ethernet device really requires an a MAC address to be functional. The Raspberry Pi also ships smsc9514 without a serial EEPROM, stores the MAC address in ROM accessible via VC4 firmware. The smsc75xx and smsc95xx drivers are just two copies of the same code, so better fix both. [lkundrak@v3.sk: updated to use of_get_property() as per suggestion from Arnd, reworded the message and comments a bit] Tested-by: Lubomir Rintel Signed-off-by: Arnd Bergmann Signed-off-by: Lubomir Rintel Signed-off-by: David S. Miller drivers/net/usb/smsc75xx.c | 12 +++++++++++- drivers/net/usb/smsc95xx.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit 90e5d0db2b221f0cbbb91e9e61fdb7dbb9e1afc2 Author: Craig Gallek Date: Thu Apr 28 19:24:32 2016 -0400 soreuseport: Fix TCP listener hash collision I forgot to include a check for listener port equality when deciding if two sockets should belong to the same reuseport group. This was not caught previously because it's only necessary when two listening sockets for the same user happen to hash to the same listener bucket. The same error does not exist in the UDP path. Fixes: c125e80b8868("soreuseport: fast reuseport TCP socket selection") Signed-off-by: Craig Gallek Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_hashtables.c | 2 ++ 1 file changed, 2 insertions(+) commit 018f8258582381bcce484312f0e9ec2970d0383e Author: Wang Shanker Date: Fri Apr 29 01:29:43 2016 +0800 net: l2tp: fix reversed udp6 checksum flags This patch fixes a bug which causes the behavior of whether to ignore udp6 checksum of udp6 encapsulated l2tp tunnel contrary to what userspace program requests. When the flag `L2TP_ATTR_UDP_ZERO_CSUM6_RX` is set by userspace, it is expected that udp6 checksums of received packets of the l2tp tunnel to create should be ignored. In `l2tp_netlink.c`: `l2tp_nl_cmd_tunnel_create()`, `cfg.udp6_zero_rx_checksums` is set according to the flag, and then passed to `l2tp_core.c`: `l2tp_tunnel_create()` and then `l2tp_tunnel_sock_create()`. In `l2tp_tunnel_sock_create()`, `udp_conf.use_udp6_rx_checksums` is set the same to `cfg.udp6_zero_rx_checksums`. However, if we want the checksum to be ignored, `udp_conf.use_udp6_rx_checksums` should be set to `false`, i.e. be set to the contrary. Similarly, the same should be done to `udp_conf.use_udp6_tx_checksums`. Signed-off-by: Miao Wang Acked-by: James Chapman Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04974df8049fc4240d22759a91e035082ccd18b4 Author: Linus Torvalds Date: Sun May 1 15:52:31 2016 -0700 Linux 4.6-rc6 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e00f7bd221292b318d4d09c3f0c2c8af9b1e5edf Author: Dan Carpenter Date: Fri Apr 15 17:45:10 2016 +0300 virtio: Silence uninitialized variable warning Smatch complains that we might not initialize "queue". The issue is callers like setup_vq() from virtio_pci_modern.c where "num" could be something like 2 and "vring_align" is 64. In that case, vring_size() is less than PAGE_SIZE. It won't happen in real life, but we're getting the value of "num" from a register so it's not really possible to tell what value it holds with static analysis. Let's just silence the warning. Signed-off-by: Dan Carpenter Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da9373d67c8a7adf7d820f24fe672c5540f231ac Merge: 1b46bac 15333e3 Author: Linus Torvalds Date: Sat Apr 30 18:57:42 2016 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal fixes from Eduardo Valentin: "A couple of minor fixes for the thermal subsystem. Specifics in this pull request: - Fixes in hisilicon thermal driver - More fixes of unsigned to int type change in thermal_core.c" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: use %d to print S32 parameters thermal: hisilicon: increase temperature resolution commit 1db488d12894f1936360779d6ab2aede3dd7f06a Author: K. Y. Srinivasan Date: Sat Apr 2 16:17:38 2016 -0700 Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() On the consumer side, we have interrupt driven flow management of the producer. It is sufficient to base the signaling decision on the amount of space that is available to write after the read is complete. The current code samples the previous available space and uses this in making the signaling decision. This state can be stale and is unnecessary. Since the state can be stale, we end up not signaling the host (when we should) and this can result in a hang. Fix this problem by removing the unnecessary check. I would like to thank Arseney Romanenko for pointing out this issue. Also, issue a full memory barrier before making the signaling descision to correctly deal with potential reordering of the write (read index) followed by the read of pending_sz. Signed-off-by: K. Y. Srinivasan Tested-by: Dexuan Cui Cc: Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 10c64cea04d3c75c306b3f990586ffb343b63287 Author: Al Viro Date: Wed Apr 27 01:11:55 2016 -0400 atomic_open(): fix the handling of create_error * if we have a hashed negative dentry and either CREAT|EXCL on r/o filesystem, or CREAT|TRUNC on r/o filesystem, or CREAT|EXCL with failing may_o_create(), we should fail with EROFS or the error may_o_create() has returned, but not ENOENT. Which is what the current code ends up returning. * if we have CREAT|TRUNC hitting a regular file on a read-only filesystem, we can't fail with EROFS here. At the very least, not until we'd done follow_managed() - we might have a writable file (or a device, for that matter) bound on top of that one. Moreover, the code downstream will see that O_TRUNC and attempt to grab the write access (*after* following possible mount), so if we really should fail with EROFS, it will happen. No need to do that inside atomic_open(). The real logics is much simpler than what the current code is trying to do - if we decided to go for simple lookup, ended up with a negative dentry *and* had create_error set, fail with create_error. No matter whether we'd got that negative dentry from lookup_real() or had found it in dcache. Cc: stable@vger.kernel.org # v3.6+ Acked-by: Miklos Szeredi Signed-off-by: Al Viro fs/namei.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 658922e57b847bb7112aa67f6441b6bbc6554412 Author: Dan Williams Date: Sat Apr 30 13:07:06 2016 -0700 libnvdimm, pfn: fix memmap reservation sizing When configuring a pfn-device instance to allocate the memmap array it needs to account for the fact that vmemmap_populate_hugepages() allocates struct page blocks in HPAGE_SIZE chunks. We need to align the reserved area size to 2MB otherwise arch_add_memory() runs out of memory while establishing the memmap: WARNING: CPU: 0 PID: 496 at arch/x86/mm/init_64.c:704 arch_add_memory+0xe7/0xf0 [..] Call Trace: [] dump_stack+0x85/0xc2 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] arch_add_memory+0xe7/0xf0 [] devm_memremap_pages+0x287/0x450 [] ? devm_memremap_pages+0x1ea/0x450 [] __wrap_devm_memremap_pages+0x58/0x70 [nfit_test_iomap] [] pmem_attach_disk+0x318/0x420 [nd_pmem] [] nd_pmem_probe+0x6f/0x90 [nd_pmem] [] nvdimm_bus_probe+0x69/0x110 [libnvdimm] [..] ndbus0: nd_pmem.probe(pfn3.0) = -12 nd_pmem: probe of pfn3.0 failed with error -12 libndctl: ndctl_pfn_enable: pfn3.0: failed to enable Reported-by: Namratha Kothapalli Cc: Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 2bcbc81421c511ef117cadcf0bee9c4340e68db0 Author: Johannes Thumshirn Date: Wed Apr 27 10:48:52 2016 +0200 qla1280: Don't allocate 512kb of host tags The qla1280 driver sets the scsi_host_template's can_queue field to 0xfffff which results in an allocation failure when allocating the block layer tags for the driver's queues. This was introduced with the change for host wide tags in commit 64d513ac31b - "scsi: use host wide tags by default". Reduce can_queue to MAX_OUTSTANDING_COMMANDS (512) to solve the allocation error. Signed-off-by: Johannes Thumshirn Fixes: 64d513ac31b - "scsi: use host wide tags by default" Cc: stable@vger.kernel.org # v4.4 Cc: Laura Abbott Cc: Michael Reed Reviewed-by: Laurence Oberman Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4bd85203190990ad808abbd4a5dc848a950002c Author: Dan Carpenter Date: Thu Apr 14 21:20:34 2016 +0300 scsi_dh_alua: uninitialized variable in alua_rtpg() It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche pointed out that we should probably re-initialize it for every iteration through the retry loop. Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinicke Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley drivers/scsi/device_handler/scsi_dh_alua.c | 1 + 1 file changed, 1 insertion(+) commit 7df89e92a56a3d2c8f84aa76c61471e4a7bc24f9 Author: Ville Syrjälä Date: Mon Apr 25 16:01:19 2016 +0300 gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list Calling gpiod_get() from a module and then unloading the module leads to an oops due to acpi_can_fallback_to_crs() storing the pointer to the passed 'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then try to access the string but the memory may now be gone with the module. Make a copy of the passed string instead, and store the copy on the list. BUG: unable to handle kernel paging request at ffffffffa03e7855 IP: [] strcmp+0x12/0x30 PGD 2a07067 PUD 2a08063 PMD 74720067 PTE 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: i915(+) drm_kms_helper drm intel_gtt snd_hda_codec snd_hda_core i2c_algo_bit syscopya rea sysfillrect sysimgblt fb_sys_fops agpgart snd_soc_sst_bytcr_rt5640 coretemp hwmon intel_rapl intel_soc_dts_thermal punit_atom_debug snd_soc_rt5640 snd_soc_rl6231 serio snd_intel_sst_acpi snd_intel_sst_core video snd_soc_sst_mfld_platf orm snd_soc_sst_match backlight int3402_thermal processor_thermal_device int3403_thermal int3400_thermal acpi_thermal_r el snd_soc_core intel_soc_dts_iosf int340x_thermal_zone snd_compress i2c_hid hid snd_pcm snd_timer snd soundcore evdev sch_fq_codel efivarfs ipv6 autofs4 [last unloaded: drm] CPU: 2 PID: 3064 Comm: modprobe Tainted: G U W 4.6.0-rc3-ffrd-ipvr+ #302 Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8 _X64_R_2014_13_1_00 03/24/2014 task: ffff8800701cd200 ti: ffff880070034000 task.ti: ffff880070034000 RIP: 0010:[] [] strcmp+0x12/0x30 RSP: 0000:ffff880070037748 EFLAGS: 00010286 RAX: 0000000080000000 RBX: ffff88007a342800 RCX: 0000000000000006 RDX: 0000000000000006 RSI: ffffffffa054f856 RDI: ffffffffa03e7856 RBP: ffff880070037748 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa054f855 R13: ffff88007281cae0 R14: 0000000000000010 R15: ffffffffffffffea FS: 00007faa51447700(0000) GS:ffff880079300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa03e7855 CR3: 0000000041eba000 CR4: 00000000001006e0 Stack: ffff880070037770 ffffffff8136ad28 ffffffffa054f855 0000000000000000 ffff88007a0a2098 ffff8800700377e8 ffffffff8136852e ffff88007a342800 00000007700377a0 ffff8800700377a0 ffffffff81412442 70672d6c656e6170 Call Trace: [] acpi_can_fallback_to_crs+0x88/0x100 [] gpiod_get_index+0x25e/0x310 [] ? mipi_dsi_attach+0x22/0x30 [] gpiod_get+0x12/0x20 [] intel_dsi_init+0x421/0x480 [i915] [] intel_modeset_init+0x853/0x16b0 [i915] [] ? intel_setup_gmbus+0x214/0x260 [i915] [] i915_driver_load+0xdc8/0x19b0 [i915] [] ? _raw_spin_unlock_irqrestore+0x43/0x70 [] drm_dev_register+0xab/0xc0 [drm] [] drm_get_pci_dev+0x93/0x1f0 [drm] [] ? _raw_spin_unlock_irqrestore+0x43/0x70 [] i915_pci_probe+0x34/0x50 [i915] [] pci_device_probe+0x91/0x100 [] driver_probe_device+0x20a/0x2d0 [] __driver_attach+0x9e/0xb0 [] ? driver_probe_device+0x2d0/0x2d0 [] bus_for_each_dev+0x69/0xa0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x1c0/0x240 [] driver_register+0x60/0xe0 [] __pci_register_driver+0x60/0x70 [] drm_pci_init+0xe4/0x110 [drm] [] ? trace_hardirqs_on+0xe/0x10 [] ? 0xffffffffa02f1000 [] i915_init+0x94/0x9b [i915] [] do_one_initcall+0x8b/0x1c0 [] ? rcu_read_lock_sched_held+0x86/0x90 [] ? kmem_cache_alloc_trace+0x1f6/0x270 [] do_init_module+0x60/0x1dc [] load_module+0x1d0d/0x2390 [] ? __symbol_put+0x70/0x70 [] ? kernel_read_file+0x92/0x120 [] SYSC_finit_module+0xa4/0xb0 [] SyS_finit_module+0xe/0x10 [] do_syscall_64+0x63/0x350 [] entry_SYSCALL64_slow_path+0x25/0x25 Code: f7 48 8d 76 01 48 8d 52 01 0f b6 4e ff 84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0 74 18 48 8d 7f 01 48 8d 76 01 <0f> b6 47 ff 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31 c0 5d c3 66 RIP [] strcmp+0x12/0x30 RSP CR2: ffffffffa03e7855 v2: Make the copied con_id const Cc: Dmitry Torokhov Cc: Mika Westerberg Cc: Alexandre Courbot Cc: stable@vger.kernel.org Fixes: 10cf4899f8af ("gpiolib: tighten up ACPI legacy gpio lookups") Signed-off-by: Ville Syrjälä Acked-by: Mika Westerberg Reviewed-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b46bac6275506db73592aa8b9bd1d67c79b95dc Merge: 65c4cbe d701cca Author: Linus Torvalds Date: Fri Apr 29 18:50:08 2016 -0700 Merge tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A few more powerpc fixes for 4.6: - cxl: Keep IRQ mappings on context teardown from Michael Neuling - cxl: Poll for outstanding IRQs when detaching a context from Michael Neuling - Wire up preadv2 and pwritev2 syscalls from Rui Salvaterra" * tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: wire up preadv2 and pwritev2 syscalls cxl: Poll for outstanding IRQs when detaching a context cxl: Keep IRQ mappings on context teardown commit 65c4cbeba797e3fce68aba899e066f50e638e08d Merge: b49a519 c4fc195 Author: Linus Torvalds Date: Fri Apr 29 17:59:26 2016 -0700 Merge tag 'edac_fix_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC fix from Borislav Petkov: "Make sure sb_edac and i7core_edac do not terminate MCE processing on the decoding callchain prematurely" * tag 'edac_fix_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback commit b49a5195e2e737d06144e024ae092ad915722250 Merge: a8feb78 81be193 Author: Linus Torvalds Date: Fri Apr 29 17:39:51 2016 -0700 Merge tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "One revert of a recent cpufreq commit that introduced a regression and a fix for intel_pstate's Turbo Activation Ratio handling code. Specifics: - Revert cpufreq commit that attempted to fix a problem in the ondemand/conservative governor code, but did that incorrectly and introduced another problem instead (Rafael Wysocki). - Fix incorrect decoding of MSR contents related to the Turbo Activation Ratio (TAR) handling in the intel_pstate driver (Srinivas Pandruvada)" * tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Fix processing for turbo activation ratio Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC" commit a8feb782092f01370c7999c3c0823f6120f29241 Merge: b9cc335 2963070 Author: Linus Torvalds Date: Fri Apr 29 17:32:19 2016 -0700 Merge tag 'mmc-v4.6-rc4' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are a two MMC host fixes: - sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs - sunxi: Disable eMMC HS-DDR for Allwinner A80" * tag 'mmc-v4.6-rc4' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: sunxi: Disable eMMC HS-DDR (MMC_CAP_1_8V_DDR) for Allwinner A80 mmc: sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs commit b9cc335ffae82255404507fcd0680a77cc215c5b Merge: 925d96a ea99697 Author: Linus Torvalds Date: Fri Apr 29 17:18:55 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A few fixes all over the place: radeon is probably the biggest standout, it's a fix for screen corruption or hung black outputs so I thought it was worth pulling in. Otherwise some amdgpu power control fixes, some misc vmwgfx fixes, one etnaviv fix, one virtio-gpu fix, two DP MST fixes, and a single TTM fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Fix order of operation drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION drm/amdgpu: disable vm interrupts with vm_fault_stop=2 drm/amdgpu: print a message if ATPX dGPU power control is missing Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control" drm/radeon: fix vertical bars appear on monitor (v2) drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail drm/virtio: send vblank event after crtc updates drm/dp/mst: Restore primary hub guid on resume drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1() drm/etnaviv: don't move linear memory window on 3D cores without MC2.0 commit 925d96a0c9af72e419dbca1db325e09d78f31502 Merge: 1d003af 4c8bb95 Author: Linus Torvalds Date: Fri Apr 29 17:07:54 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Final set of -rc fixes for 4.6. I've collected up a number of patches that are all pretty small with the exception of only a couple. The hfi1 driver has a number of important patches, and it is what really drives the line count of this pull request up. These are all small and I've got this kernel built and running in the test lab (I have most of the hardware, I think nes is the only thing in this patch set that I can't say I've personally tested and have up and running). Summary: - A number of collected fixes for oopses, memory corruptions, deadlocks, etc. All of these fixes are small (many only 5-10 lines), obvious, and tested. - Fix for the security issue related to the use of write for bi-directional communications" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: RDMA/nes: don't leak skb if carrier down IB/security: Restrict use of the write() interface IB/hfi1: Use kernel default llseek for ui device IB/hfi1: Don't attempt to free resources if initialization failed IB/hfi1: Fix missing lock/unlock in verbs drain callback IB/rdmavt: Fix send scheduling IB/hfi1: Prevent unpinning of wrong pages IB/hfi1: Fix deadlock caused by locking with wrong scope IB/hfi1: Prevent NULL pointer deferences in caching code MAINTAINERS: Update iser/isert maintainer contact info IB/mlx5: Expose correct max_sge_rd limit RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips iw_cxgb4: handle draining an idle qp iw_cxgb3: initialize ibdev.iwcm->ifname for port mapping iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping IB/core: Don't drain non-existent rq queue-pair IB/core: Fix oops in ib_cache_gid_set_default_gid commit 550af790882f82ed24bb6d75557c2b117a7a0c9d Merge: 97b9b7d 613ac23 Author: Greg Kroah-Hartman Date: Fri Apr 29 15:20:21 2016 -0700 Merge tag 'usb-serial-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.6-rc6 Here are some new device ids. Signed-off-by: Johan Hovold commit b8a0b8e94648179b92191e5cf4fd3c4379b31cc4 Author: Shaohua Li Date: Fri Apr 29 14:18:03 2016 -0700 raid5: delete unnecessary warnning If device has R5_LOCKED set, it's legit device has R5_SkipCopy set and page != orig_page. After R5_LOCKED is clear, handle_stripe_clean_event will clear the SkipCopy flag and set page to orig_page. So the warning is unnecessary. Reported-by: Joey Liao Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-) commit ed19ca7fa8bd44936aa3d5284bf38f5d96a28b35 Merge: 04b9665 dcf5341 Author: Kevin Hilman Date: Fri Apr 29 12:04:02 2016 -0700 Merge tag 'sunxi-fixes-for-4.6' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes Allwinner fixes for 4.6 A single regulator fix * tag 'sunxi-fixes-for-4.6' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator commit 04b9665b54f7cdc184ea03b0687aaa6d9711646e Author: Arnd Bergmann Date: Tue Mar 15 22:34:45 2016 +0100 ARM: davinci: only use NVMEM when available The davinci platform contains code that calls into the nvmem subsystem, but that might be a loadable module, causing a link error: arch/arm/mach-davinci/built-in.o: In function `davinci_get_mac_addr': :(.text+0x1088): undefined reference to `nvmem_device_read' arch/arm/mach-davinci/built-in.o: In function `read_factory_config': :(.text+0x214c): undefined reference to `nvmem_device_read' Also, when NVMEM is completely disabled, the functions fail with nonobvious error messages. This ensures we only call the API functions when the code is actually reachable from the board file, and otherwise prints a unique log message. Signed-off-by: Arnd Bergmann Fixes: bec3c11bad0e ("misc: at24: replace memory_accessor with nvmem_device_read") Signed-off-by: Sekhar Nori Signed-off-by: Kevin Hilman arch/arm/mach-davinci/board-mityomapl138.c | 5 +++++ arch/arm/mach-davinci/common.c | 5 +++++ 2 files changed, 10 insertions(+) commit 1d003af2effbf10ef7b08736606dd306a29b3396 Merge: 92c19ea 7c88a29 Author: Linus Torvalds Date: Fri Apr 29 11:21:22 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "20 fixes" * emailed patches from Andrew Morton : Documentation/sysctl/vm.txt: update numa_zonelist_order description lib/stackdepot.c: allow the stack trace hash to be zero rapidio: fix potential NULL pointer dereference mm/memory-failure: fix race with compound page split/merge ocfs2/dlm: return zero if deref_done message is successfully handled Ananth has moved kcov: don't profile branches in kcov kcov: don't trace the code coverage code mm: wake kcompactd before kswapd's short sleep .mailmap: add Frank Rowand mm/hwpoison: fix wrong num_poisoned_pages accounting mm: call swap_slot_free_notify() with page lock held mm: vmscan: reclaim highmem zone if buffer_heads is over limit numa: fix /proc//numa_maps for THP mm/huge_memory: replace VM_NO_THP VM_BUG_ON with actual VMA check mailmap: fix Krzysztof Kozlowski's misspelled name thp: keep huge zero page pinned until tlb flush mm: exclude HugeTLB pages from THP page_mapped() logic kexec: export OFFSET(page.compound_head) to find out compound tail page kexec: update VMCOREINFO for compound_order/dtor commit f27337e16f2d0e52a8d05ea599ed13cd266ac291 Author: Paolo Abeni Date: Thu Apr 28 11:04:51 2016 +0200 ip_tunnel: fix preempt warning in ip tunnel creation/updating After the commit e09acddf873b ("ip_tunnel: replace dst_cache with generic implementation"), a preemption debug warning is triggered on ip4 tunnels updating; the dst cache helper needs to be invoked in unpreemptible context. We don't need to load the cache on tunnel update, so this commit fixes the warning replacing the load with a dst cache reset, which is preempt safe. Fixes: e09acddf873b ("ip_tunnel: replace dst_cache with generic implementation") Reported-by: Eric Dumazet Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4fc1956fa31003bfbe4f597e359d751568e2954 Author: Tony Luck Date: Fri Apr 29 15:42:25 2016 +0200 EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback Both of these drivers can return NOTIFY_BAD, but this terminates processing other callbacks that were registered later on the chain. Since the driver did nothing to log the error it seems wrong to prevent other interested parties from seeing it. E.g. neither of them had even bothered to check the type of the error to see if it was a memory error before the return NOTIFY_BAD. Signed-off-by: Tony Luck Acked-by: Aristeu Rozanski Acked-by: Mauro Carvalho Chehab Cc: linux-edac Cc: Link: http://lkml.kernel.org/r/72937355dd92318d2630979666063f8a2853495b.1461864507.git.tony.luck@intel.com Signed-off-by: Borislav Petkov drivers/edac/i7core_edac.c | 2 +- drivers/edac/sb_edac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cec5913c1515e5619907016658838af4eff78dd3 Author: Liping Zhang Date: Thu Apr 21 00:47:08 2016 -0700 netfilter: IDLETIMER: fix race condition when destroy the target Workqueue maybe still in running while we destroy the IDLETIMER target, thus cause a use after free error, add cancel_work_sync() to avoid such situation. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_IDLETIMER.c | 1 + 1 file changed, 1 insertion(+) commit 81be193b7e2089dc34a4e3939f1b057f53995f56 Merge: 02da2d7 1becf03 Author: Rafael J. Wysocki Date: Fri Apr 29 14:22:25 2016 +0200 Merge branch 'pm-cpufreq-fixes' * pm-cpufreq-fixes: cpufreq: intel_pstate: Fix processing for turbo activation ratio Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC" commit abe59c65225ccd63a5964e2f2a73dd2995b948e7 Author: Sven Eckelmann Date: Fri Mar 11 16:44:06 2016 +0100 batman-adv: Fix reference counting of hardif_neigh_node object for neigh_node The batadv_neigh_node was specific to a batadv_hardif_neigh_node and held an implicit reference to it. But this reference was never stored in form of a pointer in the batadv_neigh_node itself. Instead batadv_neigh_node_release depends on a consistent state of hard_iface->neigh_list and that batadv_hardif_neigh_get always returns the batadv_hardif_neigh_node object which it has a reference for. But batadv_hardif_neigh_get cannot guarantee that because it is working only with rcu_read_lock on this list. It can therefore happen that a neigh_addr is in this list twice or that batadv_hardif_neigh_get cannot find the batadv_hardif_neigh_node for an neigh_addr due to some other list operations taking place at the same time. Instead add a batadv_hardif_neigh_node pointer directly in batadv_neigh_node which will be used for the reference counter decremented on release of batadv_neigh_node. Fixes: cef63419f7db ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 16 +++++----------- net/batman-adv/types.h | 2 ++ 2 files changed, 7 insertions(+), 11 deletions(-) commit a33d970d0b54b09746d5540af8271fad4eb10229 Author: Sven Eckelmann Date: Fri Mar 11 16:44:05 2016 +0100 batman-adv: Fix reference counting of vlan object for tt_local_entry The batadv_tt_local_entry was specific to a batadv_softif_vlan and held an implicit reference to it. But this reference was never stored in form of a pointer in the tt_local_entry itself. Instead batadv_tt_local_remove, batadv_tt_local_table_free and batadv_tt_local_purge_pending_clients depend on a consistent state of bat_priv->softif_vlan_list and that batadv_softif_vlan_get always returns the batadv_softif_vlan object which it has a reference for. But batadv_softif_vlan_get cannot guarantee that because it is working only with rcu_read_lock on this list. It can therefore happen that an vid is in this list twice or that batadv_softif_vlan_get cannot find the batadv_softif_vlan for an vid due to some other list operations taking place at the same time. Instead add a batadv_softif_vlan pointer directly in batadv_tt_local_entry which will be used for the reference counter decremented on release of batadv_tt_local_entry. Fixes: 35df3b298fc8 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/translation-table.c | 42 ++++---------------------------------- net/batman-adv/types.h | 2 ++ 2 files changed, 6 insertions(+), 38 deletions(-) commit b6cf5d499fddbfcffe751e81fb9f1a07d6348026 Author: Antonio Quartulli Date: Thu Apr 14 09:37:05 2016 +0800 batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event At the moment there is no explicit reactivation of an hard-interface upon NETDEV_UP event. In case of B.A.T.M.A.N. IV the interface is reactivated as soon as the next OGM is scheduled for sending, but this mechanism does not work with B.A.T.M.A.N. V. The latter does not rely on the same scheduling mechanism as its predecessor and for this reason the hard-interface remains deactivated forever after being brought down once. This patch fixes the reactivation mechanism by adding a new routing API which explicitly allows each algorithm to perform any needed operation upon interface re-activation. Such API is optional and is implemented by B.A.T.M.A.N. V only and it just takes care of setting the iface status to ACTIVE Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner net/batman-adv/bat_v.c | 12 ++++++++++++ net/batman-adv/hard-interface.c | 3 +++ net/batman-adv/types.h | 3 +++ 3 files changed, 18 insertions(+) commit 2871734e85e920503d49b3a8bc0afbe0773b6036 Author: Antonio Quartulli Date: Sat Mar 12 11:12:59 2016 +0100 batman-adv: fix DAT candidate selection (must use vid) Now that DAT is VLAN aware, it must use the VID when computing the DHT address of the candidate nodes where an entry is going to be stored/retrieved. Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware") Signed-off-by: Antonio Quartulli [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner net/batman-adv/distributed-arp-table.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 2d2c038a9999f423e820d89db2b5d7774b67ba49 Author: Takashi Iwai Date: Fri Apr 29 11:20:15 2016 +0200 ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2) Phoenix Audio MT202pcs (1de7:0114) and MT202exe (1de7:0013) need the same workaround as TMX320 for avoiding the firmware bug. It fixes the frequent error about the sample rate inquiries and the slow device probe as consequence. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117321 Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit f40d4896bf3284573f1e70e8840c1bcfe1c6bf2d Author: Hans de Goede Date: Wed Apr 27 20:38:44 2016 +0200 regulator: axp20x: Fix axp22x ldo_io registration error on cold boot The maximum supported voltage for ldo_io# is 3.3V, but on cold boot the selector comes up at 0x1f, which maps to 3.8V. This causes _regulator_get_voltage() to fail with -EINVAL which causes regulator registration to fail when constrains are used: [ 1.467788] vcc-touchscreen: failed to get the current voltage(-22) [ 1.474209] axp20x-regulator axp20x-regulator: Failed to register ldo_io1 [ 1.483363] axp20x-regulator: probe of axp20x-regulator failed with error -22 This commits makes the axp20x regulator driver accept the 0x1f register value, fixing this. The datasheet does not guarantee reliable operation above 3.3V, so on boards where this regulator is used the regulator-max-microvolt setting must be 3.3V or less. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 70d72b7e060e0a16b9ded9d0fbd3dff109743de3 Author: Florian Westphal Date: Sun Apr 24 01:17:14 2016 +0200 netfilter: conntrack: init all_locks to avoid debug warning Else we get 'BUG: spinlock bad magic on CPU#' on resize when spin lock debugging is enabled. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5305a7b7e860bb40ab226bc7d58019416073948a Author: Ludovic Desroches Date: Tue Apr 19 16:03:45 2016 +0200 pinctrl: at91-pio4: fix pull-up/down logic The default configuration of a pin is often with a value in the pull-up/down field at chip reset. So, even if the internal logic of the controller prevents writing a configuration with pull-up and pull-down at the same time, we must ensure explicitly this condition before writing the register. This was leading to a pull-down condition not taken into account for instance. Signed-off-by: Ludovic Desroches Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller") Cc: stable@vger.kernel.org #v4.4 and later Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++ 1 file changed, 2 insertions(+) commit ea99697814d6e64927e228675a6eb7fa76014648 Merge: d8ba5d6 afc4542 Author: Dave Airlie Date: Fri Apr 29 14:31:44 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few fixes for 4.6. - revert amdgpu PX commit that was previously reverted on the radeon side - cleaned up version of the NI+ MC update display fix for radeon - TTM kref fix * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: disable vm interrupts with vm_fault_stop=2 drm/amdgpu: print a message if ATPX dGPU power control is missing Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control" drm/radeon: fix vertical bars appear on monitor (v2) drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail commit d8ba5d60d59fd1db5b53c8a110c2f8321591a9d8 Merge: 9a11d2e 7851496 Author: Dave Airlie Date: Fri Apr 29 14:27:50 2016 +1000 Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes three misc vmwgfx fixes * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Fix order of operation drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION commit 92c19ea9535707701861b7533253a516c7d115c9 Merge: 814dd94 1bdb897 Author: Linus Torvalds Date: Thu Apr 28 20:24:27 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: "Two boot crash fixes and an IRQ handling crash fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Handle zero vector gracefully in clear_vector_irq() Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging" xen/qspinlock: Don't kick CPU if IRQ is not initialized commit 814dd9481d2045cc99a10a45d267a6167c5cd8ff Merge: 2113caed cf3beb7 Author: Linus Torvalds Date: Thu Apr 28 20:19:04 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: "x86 PMU driver fixes plus a core code race fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix incorrect lbr_sel_mask value perf/x86/intel/pt: Don't die on VMXON perf/core: Fix perf_event_open() vs. execve() race perf/x86/amd: Set the size of event map array to PERF_COUNT_HW_MAX perf/core: Make sysctl_perf_cpu_time_max_percent conform to documentation perf/x86/intel/rapl: Add missing Haswell model perf/x86/intel: Add model number for Skylake Server to perf commit 2113caed87dd372e5ca2d9b3cba415f4da38936b Merge: 8f3603a 75dd602 Author: Linus Torvalds Date: Thu Apr 28 19:59:17 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: "Two lockdep fixes" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Fix lock_chain::base size locking/lockdep: Fix ->irq_context calculation commit 8f3603a210970d665e7cecf6623331ce6b24f713 Merge: ba14e96 ede85e9 Author: Linus Torvalds Date: Thu Apr 28 19:54:50 2016 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Ingo Molnar: "This fixes a bug in the efivars code" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Fix out-of-bounds read in variable_matches() commit ba14e961b4fc0b0efcb1b2af7aab605bfce55fb8 Merge: e1f14a5 89a09566 Author: Linus Torvalds Date: Thu Apr 28 19:44:47 2016 -0700 Merge tag 'media/v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Some regression fixes: - videobuf2 core: avoid the risk of going past buffer on multi-planes and fix rw mode - fix support for 4K formats at V4L2 core - fix a trouble at davinci_fpe, caused by a bad patch - usbvision: revert a patch with a partial fixup. The fixup patch was merged already, and this one has some issues" * tag 'media/v4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] vb2-memops: Fix over allocation of frame vectors [media] media: vb2: Fix regression on poll() for RW mode [media] v4l2-dv-timings.h: fix polarity for 4k formats [media] davinci_vpfe: Revert "staging: media: davinci_vpfe: remove,unnecessary ret variable" [media] usbvision: revert commit 588afcc1 [media] videobuf2-v4l2: Verify planes array in buffer dequeueing [media] videobuf2-core: Check user space planes array in dqbuf commit e1f14a54694faa5cdc91d4933cd3412809ef5d67 Merge: 6fa9bff af9cc93 Author: Linus Torvalds Date: Thu Apr 28 19:38:45 2016 -0700 Merge tag 'sound-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Usually we get a big collection of fixes for ASoC once during rc. And this is it. At this time, most of fixes are about Intel Skylake ASoC driver, which is a new and still on-going development. Along with it, a slight large LOC is seen in legacy HD-audio driver, but it's merely a code move to the upper layer. Other than that, the rest are small or trivial fixes to various drivers, in addition to an ASoC dapm debugfs code fix" * tag 'sound-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits) ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW ALSA: hda - Add dock support for ThinkPad X260 ASoC: wm5102: Free compressed IRQ in CODEC remove ASoC: arizona: Free speaker thermal IRQs in CODEC remove ASoC: Intel: Skylake: Fix ibs/obs calc for non-integral sampling rates ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() ASoC: Intel: Skylake: Fix to turn OFF codec power when entering S3 ASoC: hdac_hdmi: Fix codec power state in S3 during playback ASoC: hdac_hdmi: Fix to use dev_pm ops instead soc pm ASoC: wm8962: Correct typo when setting DSPCLK rate ASoC: nau8825: Fix jack detection across suspend ASoC: Intel: Skylake: Fix DSP resource de-allocation ASoC: Intel: Skylake: Fix for unloading module only when it is loaded ASoC: Intel: Skylake: Fix kbuild dependency ASoC: dapm: Make sure we have a card when displaying component widgets ASoC: rt5640: Correct the digital interface data select ASoC: Intel: Skylake: remove call to pci_dev_put ASoC: Intel: Skylake: Call i915 exit last ASoC: Intel: Skylake: Unmap the address last ASoC: Intel: Skylake: Freeup properly on skl_dsp_free ... commit 7c88a292dfcd6979e839493ef18d04770eb3bad0 Author: Xishi Qiu Date: Thu Apr 28 16:19:11 2016 -0700 Documentation/sysctl/vm.txt: update numa_zonelist_order description Commit 3193913ce62c ("mm: page_alloc: default node-ordering on 64-bit NUMA, zone-ordering on 32-bit") changes the default value of numa_zonelist_order. Update the document. Signed-off-by: Xishi Qiu Cc: Mel Gorman Cc: Johannes Weiner Cc: Rik van Riel Cc: David Rientjes Cc: Kamezawa Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 33334e25769c6ad69b983379578f42581d99a2f9 Author: Alexander Potapenko Date: Thu Apr 28 16:19:09 2016 -0700 lib/stackdepot.c: allow the stack trace hash to be zero Do not bail out from depot_save_stack() if the stack trace has zero hash. Initially depot_save_stack() silently dropped stack traces with zero hashes, however there's actually no point in reserving this zero value. Reported-by: Joonsoo Kim Signed-off-by: Alexander Potapenko Acked-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/stackdepot.c | 4 ---- 1 file changed, 4 deletions(-) commit 99f23c2cded85a377325aa9fd374ffa3d55d1088 Author: Vladimir Zapolskiy Date: Thu Apr 28 16:19:06 2016 -0700 rapidio: fix potential NULL pointer dereference The change fixes improper check for a returned error value by class_create() function, which on error returns ERR_PTR() value, thus the original check always results in a dead code on error path. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2e7e00b715d3c65f301bec8559d6af4ef8098ab Author: Konstantin Khlebnikov Date: Thu Apr 28 16:19:03 2016 -0700 mm/memory-failure: fix race with compound page split/merge get_hwpoison_page() must recheck relation between head and tail pages. n-horiguchi said: without this recheck, the race causes kernel to pin an irrelevant page, and finally makes kernel crash for refcount mismatch. Signed-off-by: Konstantin Khlebnikov Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b73413647ee36406561618f68d0661d49dc47489 Author: xuejiufei Date: Thu Apr 28 16:19:01 2016 -0700 ocfs2/dlm: return zero if deref_done message is successfully handled dlm_deref_lockres_done_handler() should return zero if the message is successfully handled. Fixes: 60d663cb5273 ("ocfs2/dlm: add DEREF_DONE message"). Signed-off-by: xuejiufei Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 2 ++ 1 file changed, 2 insertions(+) commit a320817c68e3fa1fc3ddaa709a1ad45cf533693b Author: Ananth N Mavinakayanahalli Date: Thu Apr 28 16:18:58 2016 -0700 Ananth has moved The current ID is going away soon... update email address Signed-off-by: Ananth N Mavinakayanahalli Cc: Masami Hiramatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36f05ae8bce904b4c8105363e6227a79d343bda6 Author: Andrey Ryabinin Date: Thu Apr 28 16:18:55 2016 -0700 kcov: don't profile branches in kcov Profiling 'if' statements in __sanitizer_cov_trace_pc() leads to unbound recursion and crash: __sanitizer_cov_trace_pc() -> ftrace_likely_update -> __sanitizer_cov_trace_pc() ... Define DISABLE_BRANCH_PROFILING to disable this tracer. Signed-off-by: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 1 + 1 file changed, 1 insertion(+) commit bdab42dfc974d15303afbf259f340f374a453974 Author: James Morse Date: Thu Apr 28 16:18:52 2016 -0700 kcov: don't trace the code coverage code Kcov causes the compiler to add a call to __sanitizer_cov_trace_pc() in every basic block. Ftrace patches in a call to _mcount() to each function it has annotated. Letting these mechanisms annotate each other is a bad thing. Break the loop by adding 'notrace' to __sanitizer_cov_trace_pc() so that ftrace won't try to patch this code. This patch lets arm64 with KCOV and STACK_TRACER boot. Signed-off-by: James Morse Acked-by: Dmitry Vyukov Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd901c95388b3bd5a6f749ed1d677a672b992298 Author: Vlastimil Babka Date: Thu Apr 28 16:18:49 2016 -0700 mm: wake kcompactd before kswapd's short sleep When kswapd goes to sleep it checks if the node is balanced and at first it sleeps only for HZ/10 time, then rechecks if the node is still balanced and nobody has woken it during the initial sleep. Only then it goes fully sleep until an allocation slowpath wakes it up again. For higher-order allocations, waking up kcompactd is done only before the full sleep. This turns out to be an issue in case another high-order allocation fails during the initial sleep. It will wake kswapd up, however kswapd considers the zone balanced from the order-0 perspective, and will just quickly try to sleep again. So if there's a longer stream of high-order allocations hitting the slowpath and waking up kswapd, it might never actually wake up kcompactd, which may be considered a regression from kswapd-based compaction. In the worst case, it might be that a single allocation that cannot direct reclaim/compact itself is waking kswapd in the retry loop and preventing kcompactd from being woken up and unblocking it. This patch makes sure kcompactd is woken up in such situations by simply moving the wakeup before the short initial sleep. More efficient solution would be to wake kcompactd immediately instead of kswapd if the node is already order-0 balanced, but in that case we should also move reset_isolation_suitable() call to kcompactd so it's not adding to the allocator's latency. Since it's late in the 4.6 cycle, let's go with the simpler change for now. Fixes: accf62422b3a ("mm, kswapd: replace kswapd compaction with waking up kcompactd") Signed-off-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit eeb68d1d2d48b5bfe9d79d8eac35df576bb79a99 Author: Frank Rowand Date: Thu Apr 28 16:18:47 2016 -0700 .mailmap: add Frank Rowand Set current email address to replace obsolete email addresses. Signed-off-by: Frank Rowand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 3 +++ 1 file changed, 3 insertions(+) commit d7e69488bd04de165667f6bc741c1c0ec6042ab9 Author: Minchan Kim Date: Thu Apr 28 16:18:44 2016 -0700 mm/hwpoison: fix wrong num_poisoned_pages accounting Currently, migration code increses num_poisoned_pages on *failed* migration page as well as successfully migrated one at the trial of memory-failure. It will make the stat wrong. As well, it marks the page as PG_HWPoison even if the migration trial failed. It would mean we cannot recover the corrupted page using memory-failure facility. This patches fixes it. Signed-off-by: Minchan Kim Reported-by: Vlastimil Babka Acked-by: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b06bad17c7435b600a1d7a35b56eff25e1d3dbc0 Author: Minchan Kim Date: Thu Apr 28 16:18:41 2016 -0700 mm: call swap_slot_free_notify() with page lock held Kyeongdon reported below error which is BUG_ON(!PageSwapCache(page)) in page_swap_info. The reason is that page_endio in rw_page unlocks the page if read I/O is completed so we need to hold a PG_lock again to check PageSwapCache. Otherwise, the page can be removed from swapcache. Kernel BUG at c00f9040 [verbose debug info unavailable] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 4 PID: 13446 Comm: RenderThread Tainted: G W 3.10.84-g9f14aec-dirty #73 task: c3b73200 ti: dd192000 task.ti: dd192000 PC is at page_swap_info+0x10/0x2c LR is at swap_slot_free_notify+0x18/0x6c pc : [] lr : [] psr: 400f0113 sp : dd193d78 ip : c2deb1e4 fp : da015180 r10: 00000000 r9 : 000200da r8 : c120fe08 r7 : 00000000 r6 : 00000000 r5 : c249a6c0 r4 : = c249a6c0 r3 : 00000000 r2 : 40080009 r1 : 200f0113 r0 : = c249a6c0 .. .. Call Trace: page_swap_info+0x10/0x2c swap_slot_free_notify+0x18/0x6c swap_readpage+0x90/0x11c read_swap_cache_async+0x134/0x1ac swapin_readahead+0x70/0xb0 handle_pte_fault+0x320/0x6fc handle_mm_fault+0xc0/0xf0 do_page_fault+0x11c/0x36c do_DataAbort+0x34/0x118 Fixes: 3f2b1a04f44933f2 ("zram: revive swap_slot_free_notify") Signed-off-by: Minchan Kim Tested-by: Kyeongdon Kim Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_io.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7bf52fb891b64b8d61caf0b82060adb9db761aec Author: Minchan Kim Date: Thu Apr 28 16:18:38 2016 -0700 mm: vmscan: reclaim highmem zone if buffer_heads is over limit We have been reclaimed highmem zone if buffer_heads is over limit but commit 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()") changed the behavior so it doesn't reclaim highmem zone although buffer_heads is over the limit. This patch restores the logic. Fixes: 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()") Signed-off-by: Minchan Kim Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28093f9f34cedeaea0f481c58446d9dac6dd620f Author: Gerald Schaefer Date: Thu Apr 28 16:18:35 2016 -0700 numa: fix /proc//numa_maps for THP In gather_pte_stats() a THP pmd is cast into a pte, which is wrong because the layouts may differ depending on the architecture. On s390 this will lead to inaccurate numa_maps accounting in /proc because of misguided pte_present() and pte_dirty() checks on the fake pte. On other architectures pte_present() and pte_dirty() may work by chance, but there may be an issue with direct-access (dax) mappings w/o underlying struct pages when HAVE_PTE_SPECIAL is set and THP is available. In vm_normal_page() the fake pte will be checked with pte_special() and because there is no "special" bit in a pmd, this will always return false and the VM_PFNMAP | VM_MIXEDMAP checking will be skipped. On dax mappings w/o struct pages, an invalid struct page pointer would then be returned that can crash the kernel. This patch fixes the numa_maps THP handling by introducing new "_pmd" variants of the can_gather_numa_stats() and vm_normal_page() functions. Signed-off-by: Gerald Schaefer Cc: Naoya Horiguchi Cc: "Kirill A . Shutemov" Cc: Konstantin Khlebnikov Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jerome Marchand Cc: Johannes Weiner Cc: Dave Hansen Cc: Mel Gorman Cc: Dan Williams Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Michael Holzheu Cc: [4.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 33 ++++++++++++++++++++++++++++++--- include/linux/mm.h | 2 ++ mm/memory.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 3 deletions(-) commit 3486b85a29c1741db99d0c522211c82d2b7a56d0 Author: Konstantin Khlebnikov Date: Thu Apr 28 16:18:32 2016 -0700 mm/huge_memory: replace VM_NO_THP VM_BUG_ON with actual VMA check Khugepaged detects own VMAs by checking vm_file and vm_ops but this way it cannot distinguish private /dev/zero mappings from other special mappings like /dev/hpet which has no vm_ops and popultes PTEs in mmap. This fixes false-positive VM_BUG_ON and prevents installing THP where they are not expected. Link: http://lkml.kernel.org/r/CACT4Y+ZmuZMV5CjSFOeXviwQdABAgT7T+StKfTqan9YDtgEi5g@mail.gmail.com Fixes: 78f11a255749 ("mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups") Signed-off-by: Konstantin Khlebnikov Reported-by: Dmitry Vyukov Acked-by: Vlastimil Babka Acked-by: Kirill A. Shutemov Cc: Dmitry Vyukov Cc: Andrea Arcangeli Cc: stable Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 314e9b75b3f673a61ecbf0bba401830bc7dfe121 Author: Krzysztof Kozlowski Date: Thu Apr 28 16:18:30 2016 -0700 mailmap: fix Krzysztof Kozlowski's misspelled name Patchwork introduced a garbled Polish character in commit 1e3012d0fdc5 ("crypto: s5p-sss - Use memcpy_toio for iomem annotated memory") so fix the mail mapping. Additionally prefer to use kernel.org account for personal work, instead of my gmail address. Signed-off-by: Krzysztof Kozlowski Cc: Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit aa88b68c3b1dce8bc3fd54c8a7372a777ff265cd Author: Kirill A. Shutemov Date: Thu Apr 28 16:18:27 2016 -0700 thp: keep huge zero page pinned until tlb flush Andrea has found[1] a race condition on MMU-gather based TLB flush vs split_huge_page() or shrinker which frees huge zero under us (patch 1/2 and 2/2 respectively). With new THP refcounting, we don't need patch 1/2: mmu_gather keeps the page pinned until flush is complete and the pin prevents the page from being split under us. We still need patch 2/2. This is simplified version of Andrea's patch. We don't need fancy encoding. [1] http://lkml.kernel.org/r/1447938052-22165-1-git-send-email-aarcange@redhat.com Signed-off-by: Kirill A. Shutemov Reported-by: Andrea Arcangeli Reviewed-by: Andrea Arcangeli Cc: "Aneesh Kumar K.V" Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Cc: Dave Hansen Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 5 +++++ mm/huge_memory.c | 6 +++--- mm/swap.c | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) commit 66ee95d16a7f1b7b4f1dd74a2d81c6e19dc29a14 Author: Steve Capper Date: Thu Apr 28 16:18:24 2016 -0700 mm: exclude HugeTLB pages from THP page_mapped() logic HugeTLB pages cannot be split, so we use the compound_mapcount to track rmaps. Currently page_mapped() will check the compound_mapcount, but will also go through the constituent pages of a THP compound page and query the individual _mapcount's too. Unfortunately, page_mapped() does not distinguish between HugeTLB and THP compound pages and assumes that a compound page always needs to have HPAGE_PMD_NR pages querying. For most cases when dealing with HugeTLB this is just inefficient, but for scenarios where the HugeTLB page size is less than the pmd block size (e.g. when using contiguous bit on ARM) this can lead to crashes. This patch adjusts the page_mapped function such that we skip the unnecessary THP reference checks for HugeTLB pages. Fixes: e1534ae95004 ("mm: differentiate page_mapped() from page_mapcount() for compound pages") Signed-off-by: Steve Capper Acked-by: Kirill A. Shutemov Cc: Will Deacon Cc: Catalin Marinas Cc: Michal Hocko Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) commit d7f53518f713d3d9bf5ed150f943853fb94e7473 Author: Atsushi Kumagai Date: Thu Apr 28 16:18:21 2016 -0700 kexec: export OFFSET(page.compound_head) to find out compound tail page PageAnon() always look at head page to check PAGE_MAPPING_ANON and tail page's page->mapping has just a poisoned data since commit 1c290f642101 ("mm: sanitize page->mapping for tail pages"). If makedumpfile checks page->mapping of a compound tail page to distinguish anonymous page as usual, it must fail in newer kernel. So it's necessary to export OFFSET(page.compound_head) to avoid checking compound tail pages. The problem is that unnecessary hugepages won't be removed from a dump file in kernels 4.5.x and later. This means that extra disk space would be consumed. It's a problem, but not critical. Signed-off-by: Atsushi Kumagai Acked-by: Dave Young Cc: "Eric W. Biederman" Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_core.c | 1 + 1 file changed, 1 insertion(+) commit 8639a847b0e11f8d2daa3eafe15a9609c91fd357 Author: Atsushi Kumagai Date: Thu Apr 28 16:18:18 2016 -0700 kexec: update VMCOREINFO for compound_order/dtor makedumpfile refers page.lru.next to get the order of compound pages for page filtering. However, now the order is stored in page.compound_order, hence VMCOREINFO should be updated to export the offset of page.compound_order. The fact is, page.compound_order was introduced already in kernel 4.0, but the offset of it was the same as page.lru.next until kernel 4.3, so this was not actual problem. The above can be said also for page.lru.prev and page.compound_dtor, it's necessary to detect hugetlbfs pages. Further, the content was changed from direct address to the ID which means dtor. The problem is that unnecessary hugepages won't be removed from a dump file in kernels 4.4.x and later. This means that extra disk space would be consumed. It's a problem, but not critical. Signed-off-by: Atsushi Kumagai Acked-by: Dave Young Cc: "Eric W. Biederman" Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6fa9bffbccb91e07519e1deb05e001d191f0df43 Merge: cf681c2 d3767f0 Author: Linus Torvalds Date: Thu Apr 28 18:59:24 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: "There is a lifecycle fix in the auth code, a fix for a narrow race condition on map, and a helpful message in the log when there is a feature mismatch (which happens frequently now that the default server-side options have changed)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: report unsupported features to syslog rbd: fix rbd map vs notify races libceph: make authorizer destruction independent of ceph_auth_client commit cf681c2ebcb502ced998ca0659b2907b9ad9daf9 Merge: b75a2bf 532c34b5 Author: Linus Torvalds Date: Thu Apr 28 18:52:11 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 more bug fixes for 4.6 - Due to a race in the dynamic page table code a multi-threaded program can cause a translation specification exception. With panic_on_oops a user space program can crash the system. - An information leak with the /dev/sclp device. - A use after free in the s390 PCI code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/sclp_ctl: fix potential information leak with /dev/sclp s390/mm: fix asce_bits handling with dynamic pagetable levels s390/pci: fix use after free in dma_init commit 4c8bb95921e9ac01b9dd0c3abbaf6514ce88af92 Author: Florian Westphal Date: Sun Apr 24 22:18:59 2016 +0200 RDMA/nes: don't leak skb if carrier down Alternatively one could free the skb, OTOH I don't think this test is useful so just remove it. Cc: Signed-off-by: Florian Westphal Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_nic.c | 3 --- 1 file changed, 3 deletions(-) commit 1dfcd832b1a9ed45edac15b31d079b805fa0ae2a Merge: bd34cf6 569cc39 Author: David S. Miller Date: Thu Apr 28 17:29:46 2016 -0400 Merge branch 'bpf-fixes' Alexei Starovoitov says: ==================== bpf: fix several bugs First two patches address bugs found by Jann Horn. Last patch is a minor samples fix spotted during the testing. ==================== Signed-off-by: David S. Miller commit 569cc39d39385a74b23145496bca2df5ac8b2fb8 Author: Alexei Starovoitov Date: Wed Apr 27 18:56:22 2016 -0700 samples/bpf: fix trace_output example llvm cannot always recognize memset as builtin function and optimize it away, so just delete it. It was a leftover from testing of bpf_perf_event_output() with large data structures. Fixes: 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/trace_output_kern.c | 1 - 1 file changed, 1 deletion(-) commit 6aff67c85c9e5a4bc99e5211c1bac547936626ca Author: Alexei Starovoitov Date: Wed Apr 27 18:56:21 2016 -0700 bpf: fix check_map_func_compatibility logic The commit 35578d798400 ("bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter") introduced clever way to check bpf_helper<->map_type compatibility. Later on commit a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") adjusted the logic and inadvertently broke it. Get rid of the clever bool compare and go back to two-way check from map and from helper perspective. Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") Reported-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 65 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 25 deletions(-) commit 92117d8443bc5afacc8d5ba82e541946310f106e Author: Alexei Starovoitov Date: Wed Apr 27 18:56:20 2016 -0700 bpf: fix refcnt overflow On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK, the malicious application may overflow 32-bit bpf program refcnt. It's also possible to overflow map refcnt on 1Tb system. Impose 32k hard limit which means that the same bpf program or map cannot be shared by more than 32k processes. Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs") Reported-by: Jann Horn Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 3 ++- kernel/bpf/inode.c | 7 ++++--- kernel/bpf/syscall.c | 24 ++++++++++++++++++++---- kernel/bpf/verifier.c | 11 +++++++---- 4 files changed, 33 insertions(+), 12 deletions(-) commit bd34cf66cc48a5fb17deb7a1494845c45d71ba8e Merge: bbdd09e 06cd6d6 Author: David S. Miller Date: Thu Apr 28 17:27:31 2016 -0400 Merge branch 'cpsw-phy-handle-fixes' David Rivshin says: ==================== drivers: net: cpsw: phy-handle fixes This series fixes a number of related issues around using phy-handle properties in cpsw emac nodes. Patch 1 fixes a bug if more than one slave is used, and either slave uses the phy-handle property in the devicetree. Patch 2 fixes a NULL pointer dereference which can occur if a phy-handle property is used and of_phy_connect() return NULL, such as with a bad devicetree. Patch 3 fixes an issue where the phy-mode property would be ignored if a phy-handle property was used. This also fixes a bogus error message that would be emitted. Patch 4 fixes makes the binding documentation more explicit that exactly one PHY property should be used, and also marks phy_id as deprecated. Patch 5 cleans up the fixed-link case to work like the now-fixed phy-handle case. I have tested on the following hardware configurations: - (EVMSK) dual emac, phy_id property in both slaves - (EVMSK) dual emac, phy-handle property in both slaves - (EVMSK) a bad phy-handle property pointing to &mmc1 - (EVMSK) phy_id property with incorrect PHY address - (BeagleBoneBlack) single emac, phy_id property - (custom) single emac, fixed-link subnode Andrew Goodbody reported testing v2 on a board that doesn't use dual_emac mode, but with 2 PHYs using phy-handle properties [1]. Nicolas Chauvet reported testing v2 on an HP t410 (dm8148). Markus Brunner reported testing v1 on the following [2]: - emac0 with phy_id and emac1 with fixed phy - emac0 with phy-handle and emac1 with fixed phy - emac0 with fixed phy and emac1 with fixed phy [1] https://lkml.org/lkml/2016/4/22/537 [2] http://www.spinics.net/lists/netdev/msg357890.html ==================== Signed-off-by: David S. Miller commit 06cd6d6eda4bedbb826ed36e4c89734ea364ec4b Author: David Rivshin Date: Wed Apr 27 21:45:45 2016 -0400 drivers: net: cpsw: use of_phy_connect() in fixed-link case If a fixed-link DT subnode is used, the phy_device was looked up so that a PHY ID string could be constructed and passed to phy_connect(). This is not necessary, as the device_node can be passed directly to of_phy_connect() instead. This reuses the same codepath as if the phy-handle DT property was used. Signed-off-by: David Rivshin Tested-by: Nicolas Chauvet Tested-by: Andrew Goodbody Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit a5d2cb3b27441fe7432852d4198eadda1d9d19be Author: David Rivshin Date: Wed Apr 27 21:42:47 2016 -0400 dt: cpsw: phy-handle, phy_id, and fixed-link are mutually exclusive The phy-handle, phy_id, and fixed-link properties are mutually exclusive, and only one need be specified. Make this clear in the binding doc. Also mark the phy_id property as deprecated, as phy-handle should be used instead. Signed-off-by: David Rivshin Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/cpsw.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae092b5bded24d5dc7dae0e0aef4669c169ce874 Author: David Rivshin Date: Wed Apr 27 21:38:26 2016 -0400 drivers: net: cpsw: don't ignore phy-mode if phy-handle is used The phy-mode emac property was only being processed in the phy_id or fixed-link cases. However if phy-handle was specified instead, an error message would complain about the lack of phy_id or fixed-link, and then jump past the of_get_phy_mode(). This would result in the PHY mode defaulting to MII, regardless of what the devicetree specified. Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing") Signed-off-by: David Rivshin Tested-by: Nicolas Chauvet Tested-by: Andrew Goodbody Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d733f7542ad47cf73e033c90cf55158587e1d060 Author: David Rivshin Date: Wed Apr 27 21:32:31 2016 -0400 drivers: net: cpsw: fix segfault in case of bad phy-handle If an emac node has a phy-handle property that points to something which is not a phy, then a segmentation fault will occur when the interface is brought up. This is because while phy_connect() will return ERR_PTR() on failure, of_phy_connect() will return NULL. The common error check uses IS_ERR(), and so missed when of_phy_connect() fails. The NULL pointer is then dereferenced. Also, the common error message referenced slave->data->phy_id, which would be empty in the case of phy-handle. Instead, use the name of the device_node as a useful identifier. And in the phy_id case add the error code for completeness. Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing") Signed-off-by: David Rivshin Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 552165bcf7060b998b4a9b5b86110b6a5e04dfd9 Author: David Rivshin Date: Wed Apr 27 21:25:25 2016 -0400 drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config Commit 9e42f715264ff158478fa30eaed847f6e131366b ("drivers: net: cpsw: add phy-handle parsing") saved the "phy-handle" phandle into a new cpsw_priv field. However, phy connections are per-slave, so the phy_node field should be in cpsw_slave_data rather than cpsw_priv. This would go unnoticed in a single emac configuration. But in dual_emac mode, the last "phy-handle" property parsed for either slave would be used by both of them, causing them both to refer to the same phy_device. Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing") Signed-off-by: David Rivshin Tested-by: Nicolas Chauvet Tested-by: Andrew Goodbody Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 13 ++++++------- drivers/net/ethernet/ti/cpsw.h | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) commit bbdd09ebd7ce87d2122fcc7d97f35a4f8931bc55 Author: Andreas Larsson Date: Wed Apr 27 16:46:10 2016 +0200 MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver Signed-off-by: Andreas Larsson Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 946b636f1730c64e05ff7fe8cf7136422fa8ea70 Author: Jiri Benc Date: Wed Apr 27 14:08:01 2016 +0200 gre: reject GUE and FOU in collect metadata mode The collect metadata mode does not support GUE nor FOU. This might be implemented later; until then, we should reject such config. I think this is okay to be changed. It's unlikely anyone has such configuration (as it doesn't work anyway) and we may need a way to distinguish whether it's supported or not by the kernel later. For backwards compatibility with iproute2, it's not possible to just check the attribute presence (iproute2 always includes the attribute), the actual value has to be checked, too. Fixes: 2e15ea390e6f4 ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 5 +++++ 1 file changed, 5 insertions(+) commit 47ff58050a7449260d990ab95fafeb84be682e79 Merge: 6c76f3d 1a8deec Author: David S. Miller Date: Thu Apr 28 17:05:25 2016 -0400 Merge branch 'pegasus-sizes' Petko Manolov says: ==================== pegasus: correct buffer & packet sizes As noticed by Lincoln Ramsay some old (usb 1.1) Pegasus based devices may actually return more bytes than the specified in the datasheet amount. That would not be a problem if the allocated space for the SKB was equal to the parameter passed to usb_fill_bulk_urb(). Some poor bugger (i really hope it was not me, but 'git blame' is useless in this case, so anyway) decided to add '+ 8' to the buffer length parameter. Sometimes the usb transfer overflows and corrupts the socket structure, leading to kernel panic. The above doesn't seem to happen for newer (Pegasus2 based) devices which did help this bug to hide for so long. The new default is to not include the CRC at the end of each received package. So far CRC has been ignored which makes no sense to do it in a first place. The patch is against v4.6-rc5 and was tested on ADM8515 device by transferring multiple gigabytes of data over a couple of days without any complaints from the kernel. Please apply it to whatever net tree you deem fit. Changes since v1: - split the patch in two parts; - corrected the subject lines; Changes since v2: - do not append CRC by default (based on a discussion with Johannes Berg); ==================== Signed-off-by: David S. Miller commit 1a8deec09d12c1a2946f131aa171d5e0479333de Author: Petko Manolov Date: Wed Apr 27 14:24:50 2016 +0300 pegasus: fixes reported packet length The default Pegasus setup was to append the status and CRC at the end of each received packet. The status bits are used to update various stats, but CRC has been ignored. The new default is to not append CRC at the end of RX packets. Signed-off-by: Petko Manolov Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7302ca05871e50208bc328cbc8199a21f5d876e Author: Petko Manolov Date: Wed Apr 27 14:24:49 2016 +0300 pegasus: fixes URB buffer allocation size; usb_fill_bulk_urb() receives buffer length parameter 8 bytes larger than what's allocated by alloc_skb(); This seems to be a problem with older (pegasus usb-1.1) devices, which may silently return more data than the maximal packet length. Reported-by: Lincoln Ramsay Signed-off-by: Petko Manolov Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c76f3d2922115f4e1327a2dcce47e94453e3375 Merge: 12395d0 2090714 Author: David S. Miller Date: Thu Apr 28 17:02:45 2016 -0400 Merge branch 'gre-lwt-fixes' Jiri Benc says: ==================== gre: fix lwtunnel support This patchset fixes a few bugs in ipgre metadata mode implementation. As an example, in this setup: ip a a 192.168.1.1/24 dev eth0 ip l a gre1 type gre external ip l s gre1 up ip a a 192.168.99.1/24 dev gre1 ip r a 192.168.99.2/32 encap ip dst 192.168.1.2 ttl 10 dev gre1 ping 192.168.99.2 the traffic does not go through before this patchset and does as expected with it applied. v3: Back to v1 in order not to break existing users. Dropped patch 3, will be fixed in iproute2 instead. v2: Rejecting invalid configuration, added patch 3, dropped patch for ETH_P_TEB (will target net-next). ==================== Signed-off-by: David S. Miller commit 2090714e1d6e80979dd6926be22b0de9ca432273 Author: Jiri Benc Date: Wed Apr 27 11:29:07 2016 +0200 gre: build header correctly for collect metadata tunnels In ipgre (i.e. not gretap) + collect metadata mode, the skb was assumed to contain Ethernet header and was encapsulated as ETH_P_TEB. This is not the case, the interface is ARPHRD_IPGRE and the protocol to be used for encapsulation is skb->protocol. Fixes: 2e15ea390e6f4 ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a64b04d86d14c81f50f68e102f79ef301e3d0a0e Author: Jiri Benc Date: Wed Apr 27 11:29:06 2016 +0200 gre: do not assign header_ops in collect metadata mode In ipgre mode (i.e. not gretap) with collect metadata flag set, the tunnel is incorrectly assumed to be mGRE in NBMA mode (see commit 6a5f44d7a048c). This is not the case, we're controlling the encapsulation addresses by lwtunnel metadata. And anyway, assigning dev->header_ops in collect metadata mode does not make sense. Although it would be more user firendly to reject requests that specify both the collect metadata flag and a remote/local IP address, this would break current users of gretap or introduce ugly code and differences in handling ipgre and gretap configuration. Keep the current behavior of remote/local IP address being ignored in such case. v3: Back to v1, added explanation paragraph. v2: Reject configuration specifying both remote/local address and collect metadata flag. Fixes: 2e15ea390e6f4 ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 12395d0647dd0e4a594e091925fc4f2705b986a1 Merge: a05d7df e6436be Author: David S. Miller Date: Thu Apr 28 16:55:26 2016 -0400 Merge tag 'mac80211-for-davem-2016-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a single fix, for a per-CPU memory leak in a (root user triggerable) error case. ==================== Signed-off-by: David S. Miller commit a05d7dfc51417f6437ff35e4682fe547fb665286 Author: Timur Tabi Date: Tue Apr 26 12:44:18 2016 -0500 net: phy: at803x: only the AT8030 needs a hardware reset on link change Commit 13a56b44 ("at803x: Add support for hardware reset") added a work-around for a hardware bug on the AT8030. However, the work-around was being called for all 803x PHYs, even those that don't need it. Function at803x_link_change_notify() checks to make sure that it only resets the PHY on the 8030, but it makes more sense to not call that function at all if it isn't needed. Signed-off-by: Timur Tabi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 956a7ffe00b4e8b75d98881ae4d0bd1b580648cb Merge: eb63efb c4fdb6cf Author: David S. Miller Date: Thu Apr 28 16:42:40 2016 -0400 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== In this patchset you can find the following fixes: 1) check skb size to avoid reading beyond its border when delivering payloads, by Sven Eckelmann 2) initialize last_seen time in neigh_node object to prevent cleanup routine from accidentally purge it, by Marek Lindner 3) release "recently added" slave interfaces upon virtual/batman interface shutdown, by Sven Eckelmann 4) properly decrease router object reference counter upon routing table update, by Sven Eckelmann 5) release queue slots when purging OGM packets of deactivating slave interface, by Linus Lüssing Patch 2 and 3 have no "Fixes:" tag because the offending commits date back to when batman-adv was not yet officially in the net tree. ==================== Signed-off-by: David S. Miller commit eb63efb4f263f1f4c2375731d3a9e2040030bc6a Author: Christophe Jaillet Date: Tue Apr 26 04:33:43 2016 +0200 ps3_gelic: fix memcpy parameter The size allocated for target->hwinfo and the number of bytes copied in it should be consistent. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14437e3fa284f465dbbc8611fd4331ca8d60e986 Author: Woojung Huh Date: Mon Apr 25 22:22:36 2016 +0000 lan78xx: workaround of forced 100 Full/Half duplex mode error At forced 100 Full & Half duplex mode, chip may fail to set mode correctly when cable is switched between long(~50+m) and short one. As workaround, set to 10 before setting to 100 at forced 100 F/H mode. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 74d79a2e30c476ccc7d45ecf978f38d815287f81 Author: Woojung Huh Date: Mon Apr 25 22:22:32 2016 +0000 lan78xx: fix statistics counter error Fix rx_bytes, tx_bytes and tx_frames error in netdev.stats. - rx_bytes counted bytes excluding size of struct ethhdr. - tx_packets didn't count multiple packets in a single urb - tx_bytes included 8 bytes of extra commands. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 1d9619d5337df6cf56eb66b6c8213d1317583513 Author: Colin Ian King Date: Mon Apr 25 23:11:22 2016 +0100 net: dsa: mv88e6xxx: fix uninitialized error return The error return err is not initialized and there is a possibility that err is not assigned causing mv88e6xxx_port_bridge_join to return a garbage error return status. Fix this by initializing err to 0. Signed-off-by: Colin Ian King Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b7483409f09c15f30ac43242ead1ab3061e1f59 Author: Marcelo Ricardo Leitner Date: Mon Apr 25 15:13:17 2016 -0300 net: fix net_gso_ok for new GSO types. Fix casting in net_gso_ok. Otherwise the shift on gso_type << NETIF_F_GSO_SHIFT may hit the 32th bit and make it look like a INT_MIN, which is then promoted from signed to uint64 which is 0xffffffff80000000, resulting in wrong behavior when it is and'ed with the feature itself, as in: This test app: #include #include int main(int argc, char **argv) { uint64_t feature1; uint64_t feature2; int gso_type = 1 << 15; feature1 = gso_type << 16; feature2 = (uint64_t)gso_type << 16; printf("%lx %lx\n", feature1, feature2); return 0; } Gives: ffffffff80000000 80000000 So that this: return (features & feature) == feature; Actually works on more bits than expected and invalid ones. Fix is to promote it earlier. Issue noted while rebasing SCTP GSO patch but posting separetely as someone else may experience this meanwhile. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62522ef3c399996f6c8120bfd14b94280bc9f490 Author: Neil Armstrong Date: Mon Apr 25 19:41:38 2016 +0200 net: ethernet: davinci_emac: Fix devioctl while in fixed link When configured in fixed link, the DaVinci emac driver sets the priv->phydev to NULL and further ioctl calls to the phy_mii_ioctl() causes the kernel to crash. Cc: Brian Hutchinson Fixes: 1bb6aa56bb38 ("net: davinci_emac: Add support for fixed-link PHY") Signed-off-by: Neil Armstrong Reviewed-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eee66af857d812304419eb5eed1f04f5f0c72e19 Merge: e00f801 e2841ea Author: David S. Miller Date: Thu Apr 28 14:23:27 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.6 ath9k * fix a couple release old throughput regression on ar9281 iwlwifi * add new device IDs for 8265 * fix a NULL pointer dereference when paging firmware asserts * remove a WARNING on gscan capabilities * fix MODULE_FIRMWARE for 8260 ==================== Signed-off-by: David S. Miller commit e00f80173bacba88a80ec531f78f04c5ae92d7d1 Author: Bert Kenward Date: Mon Apr 25 17:42:12 2016 +0100 MAINTAINERS: net: update sfc maintainers Add myself and Edward Cree as maintainers. Remove Shradha Shah, who is on extended leave. Cc: David S. Miller Cc: Edward Cree Cc: Shradha Shah Signed-off-by: Bert Kenward Acked-by: Edward Cree Signed-off-by: David S. Miller MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dcb4123cbec0294eee1815cfaa1e9b4a8fddb06a Author: Jon Cooper Date: Mon Apr 25 16:51:00 2016 +0100 sfc: disable RSS when unsupported When certain firmware variants are selected (via the sfboot utility) the SFC7000 and SFC8000 series NICs don't support RSS. The driver still tries (and fails) to insert filters with the RSS flag, and the NIC fails to pass traffic. When the firmware reports RSS_LIMITED suppress allocating a default RSS context. The absence of an RSS context is picked up in filter insertion and RSS flags are discarded. Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 4be2b49e2820eeaf6436bf7c6d0099c86b6cd237 Author: Stanislaw Gruszka Date: Mon Apr 25 10:59:19 2016 +0200 myri10ge: fix sleeping with bh disabled napi_disable() can not be called with bh disabled, move locking just around myri10ge_ss_lock_napi() . Patches fixes following bug: [ 114.278378] BUG: sleeping function called from invalid context at net/core/dev.c:4383 [ 114.313712] Call Trace: [ 114.314943] [] dump_stack+0x19/0x1b [ 114.317673] [] __might_sleep+0x173/0x230 [ 114.320566] [] napi_disable+0x27/0x90 [ 114.323254] [] myri10ge_close+0xbf/0x3f0 [myri10ge] Signed-off-by: Stanislaw Gruszka Acked-by: Hyong-Youb Kim Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edb9a1b8942b32762b1179039debf2172ad9cc32 Author: Eric Engestrom Date: Mon Apr 25 07:36:56 2016 +0100 Documentation: networking: fix spelling mistakes Signed-off-by: Eric Engestrom Signed-off-by: David S. Miller Documentation/networking/altera_tse.txt | 6 +++--- Documentation/networking/ipvlan.txt | 6 +++--- Documentation/networking/pktgen.txt | 6 +++--- Documentation/networking/vrf.txt | 2 +- Documentation/networking/xfrm_sync.txt | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) commit 7851496a32319237456919575e5f4ba62f74cc7d Author: Sinclair Yeh Date: Thu Apr 21 11:29:31 2016 -0700 drm/vmwgfx: Fix order of operation mode->hdisplay * (var->bits_per_pixel + 7) gets evaluated before the division, potentially making the pitch larger than it should be. Since the original intention is to do a div-round-up, just use the macro instead. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e02e58843153ce80a9fe7588def89b2638d40e64 Author: Charmaine Lee Date: Tue Apr 12 08:19:08 2016 -0700 drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. Instead of calling vmw_cmd_ok, call vmw_cmd_dx_cid_check to validate the context id for query commands. Signed-off-by: Charmaine Lee Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1883598d4201361a6d2ce785095695f58071ee11 Author: Charmaine Lee Date: Tue Apr 12 08:14:23 2016 -0700 drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION Fixes piglit tests nv_conditional_render-* crashes. Signed-off-by: Charmaine Lee Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 Author: Jason Gunthorpe Date: Sun Apr 10 19:13:13 2016 -0600 IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory instead. For the immediate repair, detect and deny suspicious accesses to the write API. For long term, update the user space libraries and the kernel API to something that doesn't present the same security vulnerabilities (likely a structured ioctl() interface). The impacted uAPI interfaces are generally only available if hardware from drivers/infiniband is installed in the system. Reported-by: Jann Horn Signed-off-by: Linus Torvalds Signed-off-by: Jason Gunthorpe [ Expanded check to all known write() entry points ] Cc: stable@vger.kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/ucm.c | 4 ++++ drivers/infiniband/core/ucma.c | 3 +++ drivers/infiniband/core/uverbs_main.c | 5 +++++ drivers/infiniband/hw/qib/qib_file_ops.c | 5 +++++ drivers/staging/rdma/hfi1/TODO | 2 +- drivers/staging/rdma/hfi1/file_ops.c | 6 ++++++ include/rdma/ib.h | 16 ++++++++++++++++ 7 files changed, 40 insertions(+), 1 deletion(-) commit 7723d8c2445c4dfa91f8df42703b56f8ade59af7 Author: Dean Luick Date: Fri Apr 22 11:17:03 2016 -0700 IB/hfi1: Use kernel default llseek for ui device The ui device llseek had a mistake with SEEK_END and did not fully follow seek semantics. Correct all this by using a kernel supplied function for fixed size devices. Cc: Al Viro Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/file_ops.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit 94158442eb0c66bbb0b733999e108fa26a7673ef Author: Mitko Haralanov Date: Wed Apr 20 06:05:36 2016 -0700 IB/hfi1: Don't attempt to free resources if initialization failed Attempting to free resources which have not been allocated and initialized properly led to the following kernel backtrace: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] unlock_exp_tids.isra.8+0x2e/0x120 [hfi1] PGD 852a43067 PUD 85d4a6067 PMD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 2831 Comm: osu_bw Tainted: G IO 3.12.18-wfr+ #1 task: ffff88085b15b540 ti: ffff8808588fe000 task.ti: ffff8808588fe000 RIP: 0010:[] [] unlock_exp_tids.isra.8+0x2e/0x120 [hfi1] RSP: 0018:ffff8808588ffde0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff880858a31800 RCX: 0000000000000000 RDX: ffff88085d971bc0 RSI: ffff880858a318f8 RDI: ffff880858a318c0 RBP: ffff8808588ffe20 R08: 0000000000000000 R09: 0000000000000000 R10: ffff88087ffd6f40 R11: 0000000001100348 R12: ffff880852900000 R13: ffff880858a318c0 R14: 0000000000000000 R15: ffff88085d971be8 FS: 00007f4674e83740(0000) GS:ffff88087f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000085c377000 CR4: 00000000001407f0 Stack: ffffffffa0941a71 ffff880858a318f8 ffff88085d971bc0 ffff880858a31800 ffff880852900000 ffff880858a31800 00000000003ffff7 ffff88085d971bc0 ffff8808588ffe60 ffffffffa09663fc ffff8808588ffe60 ffff880858a31800 Call Trace: [] ? find_mmu_handler+0x51/0x70 [hfi1] [] hfi1_user_exp_rcv_free+0x6c/0x120 [hfi1] [] hfi1_file_close+0x1a9/0x340 [hfi1] [] __fput+0xe9/0x270 [] ____fput+0xe/0x10 [] task_work_run+0xa7/0xe0 [] do_notify_resume+0x59/0x80 [] int_signal+0x12/0x17 This commit re-arranges the context initialization code in a way that would allow for context event flags to be used to determine whether the context has been successfully initialized. In turn, this can be used to skip the resource de-allocation if they were never allocated in the first place. Fixes: 3abb33ac6521 ("staging/hfi1: Add TID cache receive init and free funcs") Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Reviewed-by: Leon Romanovsky drivers/staging/rdma/hfi1/file_ops.c | 60 ++++++++++++++------------------ drivers/staging/rdma/hfi1/user_exp_rcv.c | 2 ++ 2 files changed, 29 insertions(+), 33 deletions(-) commit b9b06cb6fedab10665a2d527464b45f332d17465 Author: Mike Marciniszyn Date: Wed Apr 20 06:05:30 2016 -0700 IB/hfi1: Fix missing lock/unlock in verbs drain callback The iowait_sdma_drained() callback lacked locking to protect the qp s_flags field. This causes the s_flags to be out of sync on multiple CPUs, potentially corrupting the s_flags. Fixes: a545f5308b6c ("staging/rdma/hfi: fix CQ completion order issue") Reviewed-by: Sebastian Sanchez Signed-off-by: Mike Marciniszyn Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 2 ++ 1 file changed, 2 insertions(+) commit e6d2e0176e1f3c1e1534851b66c0b972f03ff069 Author: Jubin John Date: Tue Apr 12 10:47:00 2016 -0700 IB/rdmavt: Fix send scheduling call_send is used to determine whether to send immediately or schedule a send for later. The current logic in rdmavt is inverted and has a negative impact on the latency of the hfi1 and qib drivers. Fix this regression by correctly calling send immediately when call_send is set. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 849e3e9398608c26a7c54bf9fbf3288f7ced6bfb Author: Mitko Haralanov Date: Tue Apr 12 10:46:16 2016 -0700 IB/hfi1: Prevent unpinning of wrong pages The routine used by the SDMA cache to handle already cached nodes can extend an already existing node. In its error handling code, the routine will unpin pages when not all pages of the buffer extension were pinned. There was a bug in that part of the routine, which would mistakenly unpin pages from the original set rather than the newly pinned pages. This commit fixes that bug by offsetting the page array to the proper place pointing at the beginning of the newly pinned pages. Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit de82bdff62a9078a6e4f1452e2f2604686e51e49 Author: Mitko Haralanov Date: Tue Apr 12 10:46:03 2016 -0700 IB/hfi1: Fix deadlock caused by locking with wrong scope The locking around the interval RB tree is designed to prevent access to the tree while it's being modified. The locking in its current form is too overzealous, which is causing a deadlock in certain cases with the following backtrace: Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 0 CPU: 0 PID: 5836 Comm: IMB-MPI1 Tainted: G O 3.12.18-wfr+ #1 0000000000000000 ffff88087f206c50 ffffffff814f1caa ffffffff817b53f0 ffff88087f206cc8 ffffffff814ecd56 0000000000000010 ffff88087f206cd8 ffff88087f206c78 0000000000000000 0000000000000000 0000000000001662 Call Trace: [] dump_stack+0x45/0x56 [] panic+0xc2/0x1cb [] ? restart_watchdog_hrtimer+0x50/0x50 [] watchdog_overflow_callback+0xc2/0xd0 [] __perf_event_overflow+0x8e/0x2b0 [] perf_event_overflow+0x14/0x20 [] intel_pmu_handle_irq+0x1b6/0x390 [] perf_event_nmi_handler+0x2b/0x50 [] nmi_handle.isra.3+0x88/0x180 [] do_nmi+0x169/0x310 [] end_repeat_nmi+0x1e/0x2e [] ? unmap_single+0x30/0x30 [] ? _raw_spin_lock_irqsave+0x2d/0x40 [] ? _raw_spin_lock_irqsave+0x2d/0x40 [] ? _raw_spin_lock_irqsave+0x2d/0x40 <> [] hfi1_mmu_rb_search+0x38/0x70 [hfi1] [] user_sdma_free_request+0xcb/0x120 [hfi1] [] user_sdma_txreq_cb+0x263/0x350 [hfi1] [] ? sdma_txclean+0x27/0x1c0 [hfi1] [] ? user_sdma_send_pkts+0x1710/0x1710 [hfi1] [] sdma_make_progress+0x166/0x480 [hfi1] [] ? ttwu_do_wakeup+0x19/0xd0 [] sdma_engine_interrupt+0x8e/0x100 [hfi1] [] sdma_interrupt+0x5d/0xa0 [hfi1] [] handle_irq_event_percpu+0x47/0x1d0 [] handle_irq_event+0x37/0x60 [] handle_edge_irq+0x6f/0x120 [] handle_irq+0xbf/0x150 [] ? irq_enter+0x17/0x80 [] do_IRQ+0x4d/0xc0 [] common_interrupt+0x6a/0x6a [] ? finish_task_switch+0x54/0xe0 [] __schedule+0x3b6/0x7e0 [] __cond_resched+0x26/0x30 [] _cond_resched+0x3a/0x50 [] down_write+0x12/0x30 [] hfi1_release_user_pages+0x69/0x90 [hfi1] [] sdma_rb_remove+0x9a/0xc0 [hfi1] [] __mmu_rb_remove.isra.5+0x5d/0x70 [hfi1] [] hfi1_mmu_rb_remove+0x56/0x70 [hfi1] [] hfi1_user_sdma_process_request+0x74b/0x1160 [hfi1] [] hfi1_aio_write+0xc3/0x100 [hfi1] [] do_sync_readv_writev+0x4c/0x80 [] do_readv_writev+0xbb/0x230 [] ? fsnotify+0x241/0x320 [] ? finish_task_switch+0x54/0xe0 [] vfs_writev+0x35/0x60 [] SyS_writev+0x49/0xc0 [] ? __audit_syscall_exit+0x1f6/0x2a0 [] system_call_fastpath+0x16/0x1b As evident from the backtrace above, the process was being put to sleep while holding the lock. Limiting the scope of the lock only to the RB tree operation fixes the above error allowing for proper locking and the process being put to sleep when needed. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit f19bd643dbded8672bfeffe9e51322464e4a9239 Author: Mitko Haralanov Date: Tue Apr 12 10:45:57 2016 -0700 IB/hfi1: Prevent NULL pointer deferences in caching code There is a potential kernel crash when the MMU notifier calls the invalidation routines in the hfi1 pinned page caching code for sdma. The invalidation routine could call the remove callback for the node, which in turn ends up dereferencing the current task_struct to get a pointer to the mm_struct. However, the mm_struct pointer could be NULL resulting in the following backtrace: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8 IP: [] sdma_rb_remove+0xaa/0x100 [hfi1] 15 task: ffff88085e66e080 ti: ffff88085c244000 task.ti: ffff88085c244000 RIP: 0010:[] [] sdma_rb_remove+0xaa/0x100 [hfi1] RSP: 0000:ffff88085c245878 EFLAGS: 00010002 RAX: 0000000000000000 RBX: ffff88105b9bbd40 RCX: ffffea003931a830 RDX: 0000000000000004 RSI: ffff88105754a9c0 RDI: ffff88105754a9c0 RBP: ffff88085c245890 R08: ffff88105b9bbd70 R09: 00000000fffffffb R10: ffff88105b9bbd58 R11: 0000000000000013 R12: ffff88105754a9c0 R13: 0000000000000001 R14: 0000000000000001 R15: ffff88105b9bbd40 FS: 0000000000000000(0000) GS:ffff88107ef40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a8 CR3: 0000000001a0b000 CR4: 00000000001407e0 Stack: ffff88105b9bbd40 ffff88080ec481a8 ffff88080ec481b8 ffff88085c2458c0 ffffffffa03fa00e ffff88080ec48190 ffff88080ed9cd00 0000000001024000 0000000000000000 ffff88085c245920 ffffffffa03fa0e7 0000000000000282 Call Trace: [] __mmu_rb_remove.isra.5+0x5e/0x70 [hfi1] [] mmu_notifier_mem_invalidate+0xc7/0xf0 [hfi1] [] mmu_notifier_page+0x13/0x20 [hfi1] [] __mmu_notifier_invalidate_page+0x50/0x70 [] try_to_unmap_one+0x20b/0x470 [] try_to_unmap_anon+0xa7/0x120 [] try_to_unmap+0x4d/0x60 [] shrink_page_list+0x2eb/0x9d0 [] shrink_inactive_list+0x243/0x490 [] shrink_lruvec+0x4c1/0x640 [] shrink_zone+0x31/0x100 [] kswapd_shrink_zone.constprop.62+0xef/0x1c0 [] kswapd+0x403/0x7e0 [] ? shrink_all_memory+0xf0/0xf0 [] kthread+0xc0/0xd0 [] ? insert_kthread_work+0x40/0x40 [] ret_from_fork+0x7c/0xb0 [] ? insert_kthread_work+0x40/0x40 To correct this, the mm_struct passed to us by the MMU notifier is used (which is what should have been done to begin with). This avoids the broken derefences and ensures that the correct mm_struct is used. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 24 ++++++++++++++---------- drivers/staging/rdma/hfi1/mmu_rb.h | 3 ++- drivers/staging/rdma/hfi1/user_exp_rcv.c | 9 +++++---- drivers/staging/rdma/hfi1/user_sdma.c | 24 ++++++++++++++++-------- 4 files changed, 37 insertions(+), 23 deletions(-) commit 6383190203b93ff5915edb378acc76bb6a21a604 Merge: 94379ac f5515f9 Author: Arnd Bergmann Date: Thu Apr 28 17:46:27 2016 +0200 Merge tag 'renesas-fixes2-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Merge "Second Round of Renesas ARM Based SoC Fixes for v4.6" from Simon Horman: * Don't disable referenced optional scif clock * tag 'renesas-fixes2-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: 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 94379acca0394e8b030d805e7ae20d81b22fa77e Merge: 5616f36 7472931 Author: Arnd Bergmann Date: Thu Apr 28 17:43:33 2016 +0200 Merge tag 'omap-for-v4.6/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.6-rc cycle. All dts fixes, mostly affecting voltages and pinctrl for various device drivers: - Regulator minimum voltage fixes for omap5 - ISP syscon register offset fix for omap3 - Fix regulator initial modes for n900 - Fix omap5 pinctrl wkup instance size * tag 'omap-for-v4.6/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5: fix range of permitted wakeup pinmux registers ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode ARM: dts: omap3: Fix ISP syscon register offset ARM: dts: omap5-cm-t54: fix ldo1_reg and ldo4_reg ranges ARM: dts: omap5-board-common: fix ldo1_reg and ldo4_reg ranges commit e7d2c25d94bf4bb6f73d185e5514414a15a56f46 Author: Sagi Grimberg Date: Sun Apr 3 15:03:12 2016 +0300 MAINTAINERS: Update iser/isert maintainer contact info Signed-off-by: Sagi Grimberg Acked-by: Nicholas Bellinger Signed-off-by: Doug Ledford MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 986ef95ecdd3eb6fa29433e68faa94c7624083be Author: Sagi Grimberg Date: Thu Mar 31 19:03:25 2016 +0300 IB/mlx5: Expose correct max_sge_rd limit mlx5 devices (Connect-IB, ConnectX-4, ConnectX-4-LX) has a limitation where rdma read work queue entries cannot exceed 512 bytes. A rdma_read wqe needs to fit in 512 bytes: - wqe control segment (16 bytes) - rdma segment (16 bytes) - scatter elements (16 bytes each) So max_sge_rd should be: (512 - 16 - 16) / 16 = 30. Cc: linux-stable@vger.kernel.org Reported-by: Christoph Hellwig Tested-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- include/linux/mlx5/device.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 2482bc31ca8096241b8fa97610ef23154ce55f45 Author: Sudeep Holla Date: Wed Apr 27 17:18:59 2016 +0100 cpufreq: st: enable selective initialization based on the platform The sti-cpufreq does unconditional registration of the cpufreq-dt driver which causes issue on an multi-platform build. For example, on Vexpress TC2 platform, we get the following error on boot: cpu cpu0: OPP-v2 not supported cpu cpu0: Not doing voltage scaling cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19 cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6) ... arm_big_little: bL_cpufreq_register: Failed registering platform driver: vexpress-spc, err: -17 The actual driver fails to initialise as cpufreq-dt is probed successfully, which is incorrect. This issue can happen to any platform not using cpufreq-dt in a multi-platform build. This patch adds a check to do selective initialization of the driver. Fixes: ab0ea257fc58 (cpufreq: st: Provide runtime initialised driver for ST's platforms) Signed-off-by: Sudeep Holla Acked-by: Viresh Kumar Acked-by: Lee Jones Cc: 4.5+ # 4.5+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/sti-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit 625fe4f8ffc1b915248558481bb94249f6bd411c Author: James Morse Date: Tue Apr 26 12:15:01 2016 +0100 ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value arm_cpuidle_suspend() may return -EOPNOTSUPP, or any value returned by the cpu_ops/cpuidle_ops suspend call. arm_enter_idle_state() doesn't update 'ret' with this value, meaning we always signal success to cpuidle_enter_state(), causing it to update the usage counters as if we succeeded. Fixes: 191de17aa3c1 ("ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function") Signed-off-by: James Morse Acked-by: Lorenzo Pieralisi Acked-by: Daniel Lezcano Cc: 4.1+ # 4.1+ Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2963070a0f8184fe40be11927344e3fcc7e18e7c Author: Chen-Yu Tsai Date: Tue Apr 26 23:37:26 2016 +0800 mmc: sunxi: Disable eMMC HS-DDR (MMC_CAP_1_8V_DDR) for Allwinner A80 eMMC HS-DDR no longer works on the A80, despite it working when support for this developed. Disable it for now. Signed-off-by: Chen-Yu Tsai Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 5 +++++ 1 file changed, 5 insertions(+) commit cf3beb7c90a8efa16a06b26634cddddc92bb819c Author: Kan Liang Date: Thu Apr 21 02:30:10 2016 -0700 perf/x86/intel: Fix incorrect lbr_sel_mask value This patch fixes a bug which was introduced by: b16a5b52eb90 ("perf/x86: Add option to disable reading branch flags/cycles") In this patch, lbr_sel_mask is used to mask the lbr_select. But LBR_SEL_MASK doesn't include the bit for LBR_CALL_STACK. So LBR call stack will never be set in lbr_select. This patch corrects the LBR_SEL_MASK by including all valid bits in LBR_SELECT. Also, the LBR_CALL_STACK bit is different as other bit in LBR_SELECT. It does not operate in suppress mode, so it needs to be specially handled in intel_pmu_setup_hw_lbr_filter. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1461231010-4399-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/lbr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1c5ac21a0e9bab7fc45d0ba9e11623e9ad99d02e Author: Alexander Shishkin Date: Tue Mar 29 17:43:10 2016 +0300 perf/x86/intel/pt: Don't die on VMXON Some versions of Intel PT do not support tracing across VMXON, more specifically, VMXON will clear TraceEn control bit and any attempt to set it before VMXOFF will throw a #GP, which in the current state of things will crash the kernel. Namely: $ perf record -e intel_pt// kvm -nographic on such a machine will kill it. To avoid this, notify the intel_pt driver before VMXON and after VMXOFF so that it knows when not to enable itself. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Gleb Natapov Cc: Jiri Olsa Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/87oa9dwrfk.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 75 +++++++++++++++++++++++++++++++++------ arch/x86/events/intel/pt.h | 3 ++ arch/x86/include/asm/perf_event.h | 4 +++ arch/x86/kvm/vmx.c | 4 +++ 4 files changed, 75 insertions(+), 11 deletions(-) commit 79c9ce57eb2d5f1497546a3946b4ae21b6fdc438 Author: Peter Zijlstra Date: Tue Apr 26 11:36:53 2016 +0200 perf/core: Fix perf_event_open() vs. execve() race Jann reported that the ptrace_may_access() check in find_lively_task_by_vpid() is racy against exec(). Specifically: perf_event_open() execve() ptrace_may_access() commit_creds() ... if (get_dumpable() != SUID_DUMP_USER) perf_event_exit_task(); perf_install_in_context() would result in installing a counter across the creds boundary. Fix this by wrapping lots of perf_event_open() in cred_guard_mutex. This should be fine as perf_event_exit_task() is already called with cred_guard_mutex held, so all perf locks already nest inside it. Reported-by: Jann Horn Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) commit 2548d546d40c0014efdde88a53bf7896e917dcce Author: Peter Zijlstra Date: Thu Apr 21 18:03:15 2016 +0200 nohz/full, sched/rt: Fix missed tick-reenabling bug in sched_can_stop_tick() Chris Metcalf reported a that sched_can_stop_tick() sometimes fails to re-enable the tick. His observed problem is that rq->cfs.nr_running can be 1 even though there are multiple runnable CFS tasks. This happens in the cgroup case, in which case cfs.nr_running is the number of runnable entities for that level. If there is a single runnable cgroup (which can have an arbitrary number of runnable child entries itself) rq->cfs.nr_running will be 1. However, looking at that function I think there's more problems with it. It seems to assume that if there's FIFO tasks, those will run. This is incorrect. The FIFO task can have a lower prio than an RR task, in which case the RR task will run. So the whole fifo_nr_running test seems misplaced, it should go after the rr_nr_running tests. That is, only if !rr_nr_running, can we use fifo_nr_running like this. Reported-by: Chris Metcalf Tested-by: Chris Metcalf Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Christoph Lameter Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Viresh Kumar Cc: Wanpeng Li Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model") Link: http://lkml.kernel.org/r/20160421160315.GK24771@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 0a25556f84d5f79e68e9502bb1f32a43377ab2bf Author: Adam Borowski Date: Wed Apr 27 11:35:31 2016 +0200 perf/x86/amd: Set the size of event map array to PERF_COUNT_HW_MAX The entry for PERF_COUNT_HW_REF_CPU_CYCLES is not used on AMD, but is referenced by filter_events() which expects undefined events to have a value of 0. Found via KASAN: UBSAN: Undefined behaviour in arch/x86/events/amd/core.c:132:30 index 9 is out of range for type 'u64 [9]' UBSAN: Undefined behaviour in arch/x86/events/amd/core.c:132:9 load of address ffffffff81c021c8 with insufficient space for an object of type 'const u64' Signed-off-by: Adam Borowski Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1461749731-30979-1-git-send-email-kilobyte@angband.pl Signed-off-by: Ingo Molnar arch/x86/events/amd/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3767f0faeda5abdf205f947ae912d48dc70fa06 Author: Ilya Dryomov Date: Wed Apr 13 14:15:50 2016 +0200 rbd: report unsupported features to syslog ... instead of just returning an error. Signed-off-by: Ilya Dryomov Reviewed-by: Josh Durgin drivers/block/rbd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 811c6688774613a78bfa020f64b570b73f6974c8 Author: Ilya Dryomov Date: Fri Apr 15 16:22:16 2016 +0200 rbd: fix rbd map vs notify races A while ago, commit 9875201e1049 ("rbd: fix use-after free of rbd_dev->disk") fixed rbd unmap vs notify race by introducing an exported wrapper for flushing notifies and sticking it into do_rbd_remove(). A similar problem exists on the rbd map path, though: the watch is registered in rbd_dev_image_probe(), while the disk is set up quite a few steps later, in rbd_dev_device_setup(). Nothing prevents a notify from coming in and crashing on a NULL rbd_dev->disk: BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 Call Trace: [] rbd_watch_cb+0x34/0x180 [rbd] [] do_event_work+0x40/0xb0 [libceph] [] process_one_work+0x17b/0x470 [] worker_thread+0x11b/0x400 [] ? rescuer_thread+0x400/0x400 [] kthread+0xcf/0xe0 [] ? finish_task_switch+0x53/0x170 [] ? kthread_create_on_node+0x140/0x140 [] ret_from_fork+0x58/0x90 [] ? kthread_create_on_node+0x140/0x140 RIP [] rbd_dev_refresh+0xfa/0x180 [rbd] If an error occurs during rbd map, we have to error out, potentially tearing down a watch. Just like on rbd unmap, notifies have to be flushed, otherwise rbd_watch_cb() may end up trying to read in the image header after rbd_dev_image_release() has run: Assertion failure in rbd_dev_header_info() at line 4722: rbd_assert(rbd_image_format_valid(rbd_dev->image_format)); Call Trace: [] ? rbd_parent_request_create+0x150/0x150 [] rbd_dev_refresh+0x59/0x390 [] rbd_watch_cb+0x69/0x290 [] do_event_work+0x10f/0x1c0 [] process_one_work+0x689/0x1a80 [] ? process_one_work+0x5e7/0x1a80 [] ? finish_task_switch+0x225/0x640 [] ? pwq_dec_nr_in_flight+0x2b0/0x2b0 [] worker_thread+0xd9/0x1320 [] ? process_one_work+0x1a80/0x1a80 [] kthread+0x21d/0x2e0 [] ? kthread_stop+0x550/0x550 [] ret_from_fork+0x22/0x40 [] ? kthread_stop+0x550/0x550 RIP [] rbd_dev_header_info+0xa19/0x1e30 To fix this, a) check if RBD_DEV_FLAG_EXISTS is set before calling revalidate_disk(), b) move ceph_osdc_flush_notifies() call into rbd_dev_header_unwatch_sync() to cover rbd map error paths and c) turn header read-in into a critical section. The latter also happens to take care of rbd map foo@bar vs rbd snap rm foo@bar race. Fixes: http://tracker.ceph.com/issues/15490 Signed-off-by: Ilya Dryomov Reviewed-by: Josh Durgin drivers/block/rbd.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 1bdb8970392a68489b469c3a330a1adb5ef61beb Author: Keith Busch Date: Wed Apr 27 14:22:32 2016 -0600 x86/apic: Handle zero vector gracefully in clear_vector_irq() If x86_vector_alloc_irq() fails x86_vector_free_irqs() is invoked to cleanup the already allocated vectors. This subsequently calls clear_vector_irq(). The failed irq has no vector assigned, which triggers the BUG_ON(!vector) in clear_vector_irq(). We cannot suppress the call to x86_vector_free_irqs() for the failed interrupt, because the other data related to this irq must be cleaned up as well. So calling clear_vector_irq() with vector == 0 is legitimate. Remove the BUG_ON and return if vector is zero, [ tglx: Massaged changelog ] Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors" Signed-off-by: Keith Busch Cc: stable@vger.kernel.org Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e209fcfb804da262e38e5cd2e680c47a41f0f95 Author: Tadeusz Struk Date: Mon Apr 25 07:32:19 2016 -0700 crypto: qat - fix invalid pf2vf_resp_wq logic The pf2vf_resp_wq is a global so it has to be created at init and destroyed at exit, instead of per device. Cc: Tested-by: Suresh Marikkannu Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_common_drv.h | 2 ++ drivers/crypto/qat/qat_common/adf_ctl_drv.c | 6 ++++++ drivers/crypto/qat/qat_common/adf_sriov.c | 26 ++++++++++++++++---------- 3 files changed, 24 insertions(+), 10 deletions(-) commit 15333e3af1de37b1b214b28c85fe9a7b257fb92c Author: Leo Yan Date: Tue Mar 29 19:24:15 2016 +0800 thermal: use %d to print S32 parameters Power allocator's parameters are S32 type, so use %d to print them. Acked-by: Javi Merino Signed-off-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fdfc48bb0da2aa8a912024a6ecca06486eb9141 Author: Leo Yan Date: Tue Mar 29 19:23:32 2016 +0800 thermal: hisilicon: increase temperature resolution When calculate temperature, old code firstly do division and then convert to "millicelsius" unit. This will lose resolution and only can read back temperature with "Celsius" unit. So firstly scale step value to "millicelsius" and then do division, so finally we can increase resolution for temperature value. Also refine the calculation from temperature value to step value. Signed-off-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82dc4afd7e65455464f0fc2fe6976efde54fe451 Author: Ashutosh Dixit Date: Wed Apr 27 14:36:05 2016 -0700 misc: mic: Fix for double fetch security bug in VOP driver The MIC VOP driver does two successive reads from user space to read a variable length data structure. Kernel memory corruption can result if the data structure changes between the two reads. This patch disallows the chance of this happening. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116651 Reported by: Pengfei Wang Reviewed-by: Sudeep Dutt Signed-off-by: Ashutosh Dixit Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/vop/vop_vringh.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5616f36713ea77f57ae908bf2fef641364403c9f Author: Sascha Hauer Date: Wed Apr 20 13:34:31 2016 +0000 ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel The secondary CPU starts up in ARM mode. When the kernel is compiled in thumb2 mode we have to explicitly compile the secondary startup trampoline in ARM mode, otherwise the CPU will go to Nirvana. Signed-off-by: Sascha Hauer Reported-by: Steffen Trumtrar Suggested-by: Ard Biesheuvel Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Signed-off-by: Kevin Hilman arch/arm/mach-socfpga/headsmp.S | 1 + 1 file changed, 1 insertion(+) commit 0224a4a30b57385a60065aa598181868881d8fc6 Author: Heikki Krogerus Date: Wed Apr 27 14:04:20 2016 +0300 device property: Avoid potential dereferences of invalid pointers Since fwnode may hold ERR_PTR(-ENODEV) or it may be NULL, the fwnode type checks is_of_node(), is_acpi_node() and is is_pset_node() need to consider it. Using IS_ERR_OR_NULL() to check it. Fixes: 0d67e0fa1664 (device property: fix for a case of use-after-free) Reported-by: Dan Carpenter Signed-off-by: Heikki Krogerus [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 2 +- include/acpi/acpi_bus.h | 4 ++-- include/linux/of.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 49fa5230462f9f2c4e97c81356473a6bdf06c422 Author: David S. Miller Date: Wed Apr 27 17:27:37 2016 -0400 sparc64: Fix bootup regressions on some Kconfig combinations. The system call tracing bug fix mentioned in the Fixes tag below increased the amount of assembler code in the sequence of assembler files included by head_64.S This caused to total set of code to exceed 0x4000 bytes in size, which overflows the expression in head_64.S that works to place swapper_tsb at address 0x408000. When this is violated, the TSB is not properly aligned, and also the trap table is not aligned properly either. All of this together results in failed boots. So, do two things: 1) Simplify some code by using ba,a instead of ba/nop to get those bytes back. 2) Add a linker script assertion to make sure that if this happens again the build will fail. Fixes: 1a40b95374f6 ("sparc: Fix system call tracing register handling.") Reported-by: Meelis Roos Reported-by: Joerg Abraham Signed-off-by: David S. Miller arch/sparc/kernel/cherrs.S | 14 +++++--------- arch/sparc/kernel/fpu_traps.S | 11 +++++------ arch/sparc/kernel/head_64.S | 24 ++++++++---------------- arch/sparc/kernel/misctrap.S | 12 ++++-------- arch/sparc/kernel/spiterrs.S | 18 ++++++------------ arch/sparc/kernel/utrap.S | 3 +-- arch/sparc/kernel/vmlinux.lds.S | 4 ++++ arch/sparc/kernel/winfixup.S | 3 +-- 8 files changed, 34 insertions(+), 55 deletions(-) commit 97d601d5de6eff9d9acebefa39150940a55e9f19 Merge: f28f20d 89d0a06 Author: David S. Miller Date: Wed Apr 27 16:18:46 2016 -0400 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes for net. Only use MSIX on VF, and fix rx page buffers on architectures with PAGE_SIZE >= 64K. ==================== Signed-off-by: David S. Miller commit 89d0a06c516339c0a2b3d02677f5d6310b3319fb Author: Michael Chan Date: Mon Apr 25 02:30:51 2016 -0400 bnxt_en: Divide a page into 32K buffers for the aggregation ring if necessary. If PAGE_SIZE is bigger than BNXT_RX_PAGE_SIZE, that means the native CPU page is bigger than the maximum length of the RX BD. Divide the page into multiple 32K buffers for the aggregation ring. Add an offset field in the bnxt_sw_rx_agg_bd struct to keep track of the page offset of each buffer. Since each page can be referenced by multiple buffer entries, call get_page() as needed to get the proper reference count. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 35 ++++++++++++++++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++++ 2 files changed, 34 insertions(+), 5 deletions(-) commit 2839f28bd5bf8fd2ab4a1ea3a5589c8f94364cbb Author: Michael Chan Date: Mon Apr 25 02:30:50 2016 -0400 bnxt_en: Limit RX BD pages to be no bigger than 32K. The RX BD length field of this device is 16-bit, so the largest buffer size is 65535. For LRO and GRO, we allocate native CPU pages for the aggregation ring buffers. It won't work if the native CPU page size is 64K or bigger. We fix this by defining BNXT_RX_PAGE_SIZE to be native CPU page size up to 32K. Replace PAGE_SIZE with BNXT_RX_PAGE_SIZE in all appropriate places related to the rx aggregation ring logic. The next patch will add additional logic to divide the page into 32K chunks for aggrgation ring buffers if PAGE_SIZE is bigger than BNXT_RX_PAGE_SIZE. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 +++++++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 +++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) commit 1fa72e29e14d97fbda15437c648d7cc4eb00bff8 Author: Michael Chan Date: Mon Apr 25 02:30:49 2016 -0400 bnxt_en: Don't fallback to INTA on VF. Only MSI-X can be used on a VF. The driver should fail initialization if it cannot successfully enable MSI-X. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b75a2bf899b668b1d52de8846aafdbcf81349c73 Merge: 763cfc8 346c09f Author: Linus Torvalds Date: Wed Apr 27 12:03:59 2016 -0700 Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "So, it turns out we had a silly bug in the most fundamental part of workqueue for a very long time. AFAICS, this dates back to pre-git era and has quite likely been there from the time workqueue was first introduced. A work item uses its PENDING bit to synchronize multiple queuers. Anyone who wins the PENDING bit owns the pending state of the work item. Whether a queuer wins or loses the race, one thing should be guaranteed - there will soon be at least one execution of the work item - where "after" means that the execution instance would be able to see all the changes that the queuer has made prior to the queueing attempt. Unfortunately, we were missing a smp_mb() after clearing PENDING for execution, so nothing guaranteed visibility of the changes that a queueing loser has made, which manifested as a reproducible blk-mq stall. Lots of kudos to Roman for debugging the problem. The patch for -stable is the minimal one. For v3.7, Peter is working on a patch to make the code path slightly more efficient and less fragile" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix ghost PENDING flag while doing MQ IO commit 763cfc86ee8fd728a7cf2334b8d3a897af7a7ade Merge: 3118e5f 264a0ae Author: Linus Torvalds Date: Wed Apr 27 11:41:14 2016 -0700 Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Two patches to fix a deadlock which can be easily triggered if memcg charge moving is used. This bug was introduced while converting threadgroup locking to a global percpu_rwsem and is caused by cgroup controller task migration path depending on the ability to create new kthreads. cpuset had a similar issue which was fixed by performing heavy-lifting operations asynchronous to task migration. The two patches fix the same issue in memcg in a similar way. The first patch makes the mechanism generic and the second relocates memcg charge moving outside the migration path. Given that we don't want to perform heavy operations while writelocking threadgroup lock anyway, moving them out of the way is a desirable solution. One thing to note is that the problem was difficult to debug because lockdep couldn't figure out the deadlock condition. Looking into how to improve that" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: memcg: relocate charge moving from ->attach to ->post_attach cgroup, cpuset: replace cpuset_post_attach_flush() with cgroup_subsys->post_attach callback commit 3118e5f966298c94efb0aade318e8ae463fab714 Merge: 24131a6 10ff4c5 Author: Linus Torvalds Date: Wed Apr 27 11:34:45 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: "I2C has one buildfix, one ABBA deadlock fix, and three simple 'add ID' patches" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared i2c: cpm: Fix build break due to incompatible pointer types i2c: ismt: Add Intel DNV PCI ID i2c: xlp9xx: add support for Broadcom Vulcan i2c: rk3x: add support for rk3228 commit 24131a61ec8c2d83431cb818281d3c9db986ab08 Merge: 508fea7 1b10cb2 Author: Linus Torvalds Date: Wed Apr 27 09:46:21 2016 -0700 Merge tag 'arc-4.6-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - lockdep now works for ARCv2 builds - enable DT reserved-memory binding (for forthcoming HDMI driver) * tag 'arc-4.6-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: add support for reserved memory defined by device tree ARC: support generic per-device coherent dma mem Documentation: dt: arc: fix spelling mistakes ARCv2: Enable LOCKDEP commit 508fea71c6b2108ce81814a58fbc8c8aaf5e430f Merge: 9453203 a8950e4 Author: Linus Torvalds Date: Wed Apr 27 09:33:24 2016 -0700 Merge tag 'nios2-v4.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull arch/nios2 fix from Ley Foon Tan: "memset: use the right constraint modifier for the %4 output operand" * tag 'nios2-v4.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: memset: use the right constraint modifier for the %4 output operand commit afc4542105f2b5a3bc6f0f3530d7ccbc94ca90fb Author: Flora Cui Date: Mon Apr 25 16:06:17 2016 +0800 drm/amdgpu: disable vm interrupts with vm_fault_stop=2 V2: disable all vm interrupts in late_init() Signed-off-by: Flora Cui Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit c8791a13d28161a1fa1138112dfe1f986a1358cf Author: Alex Deucher Date: Mon Apr 25 13:14:47 2016 -0400 drm/amdgpu: print a message if ATPX dGPU power control is missing It will help identify problematic boards. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e9bef455af8eb0e837e179aab8988ae2649fd8d3 Author: Alex Deucher Date: Mon Apr 25 13:12:18 2016 -0400 Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control" This reverts commit bedf2a65c1aa8fb29ba8527fd00c0f68ec1f55f1. See the radeon revert for an extended description. Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) commit 5d5b7803c49bbb01bdf4c6e95e8314d0515b9484 Author: Vitaly Prosyak Date: Thu Apr 14 13:34:03 2016 -0400 drm/radeon: fix vertical bars appear on monitor (v2) When crtc/timing is disabled on boot the dig block should be stopped in order ignore timing from crtc, reset the steering fifo otherwise we get display corruption or hung in dp sst mode. v2: agd: fix coding style Signed-off-by: Vitaly Prosyak Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/evergreen.c | 154 ++++++++++++++++++++++++++++++++- drivers/gpu/drm/radeon/evergreen_reg.h | 46 ++++++++++ 2 files changed, 199 insertions(+), 1 deletion(-) commit 56fc350224f16901db709cd8cba86bac751aa2a2 Author: Flora Cui Date: Wed Apr 20 10:23:47 2016 +0800 drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail Fixes the following scenario: 1. Page table bo allocated in vram and linked to man->lru. tbo->list_kref.refcount=2 2. Page table bo is swapped out and removed from man->lru. tbo->list_kref.refcount=1 3. Command submission from userspace. Page table bo is moved to vram. ttm_bo_move_to_lru_tail() link it to man->lru and don't increase the kref count. Reviewed-by: Thomas Hellstrom Signed-off-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/ttm/ttm_bo.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 9453203bf868a9b36227c961c68c8892c7262355 Merge: f28f20d a30b8f8 Author: Linus Torvalds Date: Wed Apr 27 08:57:11 2016 -0700 Merge tag 'platform-drivers-x86-v4.6-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fix from Darren Hart: "Fix regression caused by hotkey enabling value in toshiba_acpi" * tag 'platform-drivers-x86-v4.6-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: toshiba_acpi: Fix regression caused by hotkey enabling value commit af9cc93c0dee5fc1f9fa32cd9d79a456738a21be Merge: bb03ed2 8c0f551 Author: Takashi Iwai Date: Wed Apr 27 17:30:49 2016 +0200 Merge tag 'asoc-fix-v4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.6 This is a fairly large collection of fixes but almost all driver specific ones, especially to the new Intel drivers which have had a lot of recent development. The one core fix is a change to the debugfs code to avoid crashes in some relatively unusual configurations. commit a2262e5a12e05389ab4c7fc5cf60016b041dd8dc Author: Hans de Goede Date: Wed Apr 27 15:59:27 2016 +0200 regulator: axp20x: Fix axp22x ldo_io voltage ranges The minium voltage of 1800mV is a copy and paste error from the axp20x regulator info. The correct minimum voltage for the ldo_io regulators on the axp22x is 700mV. Fixes: 1b82b4e4f954 ("regulator: axp20x: Add support for AXP22X regulators") Signed-off-by: Hans de Goede Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b10cb21d888c021bedbe678f7c26aee1bf04ffa Author: Alexey Brodkin Date: Tue Apr 26 19:29:34 2016 +0300 ARC: add support for reserved memory defined by device tree Enable reserved memory initialization from device tree. Signed-off-by: Alexey Brodkin Cc: Grant Likely Cc: Marek Szyprowski Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 + arch/arc/mm/init.c | 4 ++++ 2 files changed, 5 insertions(+) commit 32ed9a0e0ddcf58ef343bcb6ae44ee60d1ee31ce Author: Alexey Brodkin Date: Tue Apr 26 19:29:33 2016 +0300 ARC: support generic per-device coherent dma mem Signed-off-by: Alexey Brodkin Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 258fc497fa8e8d4cf54c5ffcd196e26325d5202d Merge: 02da2d7 a0a966b Author: Arnd Bergmann Date: Wed Apr 27 11:00:00 2016 +0200 Merge tag 'samsung-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes Fix for more theoretical than practical OOPS on first turn on of a exynos power domain, if there was no turn off before. Usually all power domains are on, so the first action is to turn off but some older bootloaders might behave differently. * tag 'samsung-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Properly skip unitialized parent clock in power domain on commit a8950e49bd241dc9ad90c24e92e23e95dbe9f018 Author: Romain Perier Date: Tue Apr 19 18:17:32 2016 +0800 nios2: memset: use the right constraint modifier for the %4 output operand Depending on the size of the area to be memset'ed, the nios2 memset implementation either uses a naive loop (for buffers smaller or equal than 8 bytes) or a more optimized implementation (for buffers larger than 8 bytes). This implementation does 4-byte stores rather than 1-byte stores to speed up memset. However, we discovered that on our nios2 platform, memset() was not properly setting the buffer to the expected value. A memset of 0xff would not set the entire buffer to 0xff, but to: 0xff 0x00 0xff 0x00 0xff 0x00 0xff 0x00 ... Which is obviously incorrect. Our investigation has revealed that the problem lies in the incorrect constraints used in the inline assembly. The following piece of assembly, from the nios2 memset implementation, is supposed to create a 4-byte value that repeats 4 times the 1-byte pattern passed as memset argument: /* fill8 %3, %5 (c & 0xff) */ " slli %4, %5, 8\n" " or %4, %4, %5\n" " slli %3, %4, 16\n" " or %3, %3, %4\n" However, depending on the compiler and optimization level, this code might be compiled as: 34: 280a923a slli r5,r5,8 38: 294ab03a or r5,r5,r5 3c: 2808943a slli r4,r5,16 40: 2148b03a or r4,r4,r5 This is wrong because r5 gets used both for %5 and %4, which leads to the final pattern stored in r4 to be 0xff00ff00 rather than the expected 0xffffffff. %4 is defined with the "=r" constraint, i.e as an output operand. However, as explained in http://www.ethernut.de/en/documents/arm-inline-asm.html, this does not prevent gcc from using the same register for an output operand (%4) and input operand (%5). By using the constraint modifier '&', we indicate that the register should be used for output only. With this change, we get the following assembly output: 34: 2810923a slli r8,r5,8 38: 4150b03a or r8,r8,r5 3c: 400e943a slli r7,r8,16 40: 3a0eb03a or r7,r7,r8 Which correctly produces the 0xffffffff pattern when 0xff is passed as the memset() pattern. It is worth mentioning the observed consequence of this bug: we were hitting the kernel BUG() in mm/bootmem.c:__free() that verifies when marking a page as free that it was previously marked as occupied (i.e that the bit was set to 1). The entire bootmem bitmap is set to 0xff bit via a memset() during the bootmem initialization. The bootmem_free() call right after the initialization was finding some bits to be set to 0, which didn't make sense since the bitmap has just been memset'ed to 0xff. Except that due to the bug explained above, the bitmap was in fact initialized to 0xff00ff00. Thanks to Marek Vasut for his help and feedback. Signed-off-by: Romain Perier Acked-by: Marek Vasut Acked-by: Ley Foon Tan arch/nios2/lib/memset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6436be21e77e3659b4ff7e357ab5a8342d132d2 Author: Johannes Berg Date: Tue Apr 26 13:47:08 2016 +0200 mac80211: fix statistics leak if dev_alloc_name() fails In the case that dev_alloc_name() fails, e.g. because the name was given by the user and already exists, we need to clean up properly and free the per-CPU statistics. Fix that. Cc: stable@vger.kernel.org Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics") Signed-off-by: Johannes Berg net/mac80211/iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ea3959018d09edfa36a9e7b5ccdbd4ec4b99e49 Author: Ville Syrjälä Date: Wed Apr 20 16:43:56 2016 +0300 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around GPU hangs if the RPS EI/thresholds aren't suitably aligned. It seems like scheduling/timer interupts stop working somehow and things get stuck eg. in usleep_range(). I bisected the problem down to commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function") I observed that before all the values were at least multiples of 25, but afterwards they are not. And rounding things up to the next multiple of 25 does seem to help, so lets' do that. I also tried roundup(..., 5) but that wasn't sufficient. Also I have no idea if we might need this sort of thing on gen9+ as well. These are the original EI/thresholds: LOW_POWER GEN6_RP_UP_EI 12500 GEN6_RP_UP_THRESHOLD 11800 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 21250 BETWEEN GEN6_RP_UP_EI 10250 GEN6_RP_UP_THRESHOLD 9225 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 18750 HIGH_POWER GEN6_RP_UP_EI 8000 GEN6_RP_UP_THRESHOLD 6800 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 15000 These are after 8a5864377b12: LOW_POWER GEN6_RP_UP_EI 12500 GEN6_RP_UP_THRESHOLD 11875 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 21250 BETWEEN GEN6_RP_UP_EI 10156 GEN6_RP_UP_THRESHOLD 9140 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 18750 HIGH_POWER GEN6_RP_UP_EI 7812 GEN6_RP_UP_THRESHOLD 6640 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 15000 And these are what we have after this patch: LOW_POWER GEN6_RP_UP_EI 12500 GEN6_RP_UP_THRESHOLD 11875 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 21250 BETWEEN GEN6_RP_UP_EI 10175 GEN6_RP_UP_THRESHOLD 9150 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 18750 HIGH_POWER GEN6_RP_UP_EI 7825 GEN6_RP_UP_THRESHOLD 6650 GEN6_RP_DOWN_EI 25000 GEN6_RP_DOWN_THRESHOLD 15000 Cc: stable@vger.kernel.org Cc: Akash Goel Cc: Chris Wilson Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1461159836-9108-1-git-send-email-ville.syrjala@linux.intel.com Acked-by: Chris Wilson Reviewed-by: Patrik Jakobsson (cherry picked from commit 8a292d016d1cc4938ff14b4df25328230b08a408) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 60b3143c7cac7e8d2ca65c0b347466c5776395d1 Author: Shashank Sharma Date: Thu Apr 21 16:48:32 2016 +0530 drm/i915: Fake HDMI live status This patch does the following: - Fakes live status of HDMI as connected (even if that's not). While testing certain (monitor + cable) combinations with various intel platforms, it seems that live status register doesn't work reliably on some older devices. So limit the live_status check for HDMI detection, only for platforms from gen7 onwards. V2: restrict faking live_status to certain platforms V3: (Ville) - keep the debug message for !live_status case - fix indentation of comment - remove "warning" from the debug message (Jani) - Change format of fix details in the commit message Fixes: 237ed86c693d ("drm/i915: Check live status before reading edid") Cc: stable@vger.kernel.org # v4.4 Suggested-by: Ville Syrjala Signed-off-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1461237606-16491-1-git-send-email-shashank.sharma@intel.com Signed-off-by: Ville Syrjälä (cherry picked from commit 4f4a8185011773f7520d9916c6857db946e7f9d1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 992e7a41f9fcc7bcd10e7d346aee5ed7a2c241cb Author: Mika Kahola Date: Wed Apr 20 15:39:02 2016 +0300 drm/i915: Fix eDP low vswing for Broadwell It was noticed on bug #94087 that module parameter i915.edp_vswing=2 that should override the VBT setting to use default voltage swing (400 mV) was not applied for Broadwell. This patch provides a fix for this by checking if default i.e. higher voltage swing is requested to be used and applies the DDI translations table for DP instead of eDP (low vswing) table. v2: Combine two if statements into one (Jani) v3: Change dev_priv->edp_low_vswing to use dev_priv->vbt.edp.low_vswing Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087 Signed-off-by: Mika Kahola Link: http://patchwork.freedesktop.org/patch/msgid/1461155942-7749-1-git-send-email-mika.kahola@intel.com Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä (cherry picked from commit 00983519214b61c1b9371ec2ed55a4dde773e384) [Jani: s/dev_priv->vbt.edp.low_vswing/dev_priv->edp_low_vswing/ to backport] Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 5eaa60c7109b40f17ac81090bc8b90482da76cd1 Author: Imre Deak Date: Mon Apr 18 10:04:21 2016 +0300 drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume The driver's VDD on/off logic assumes that whenever the VDD is on we also hold an AUX power domain reference. Since BIOS can leave the VDD on during booting and resuming and on DDI platforms we won't take a corresponding power reference, the above assumption won't hold on those platforms and an eventual delayed VDD off work will do an extraneous AUX power domain put resulting in a refcount underflow. Fix this the same way we did this for non-DDI DP encoders: commit 6d93c0c41760c0 ("drm/i915: fix VDD state tracking after system resume") At the same time call the DP encoder suspend handler the same way as the non-DDI DP encoders do to flush any pending VDD off work. Leaving the work running may cause a HW access where we don't expect this (at a point where power domains are suspended already). While at it remove an unnecessary function call indirection. This fixed for me AUX refcount underflow problems on BXT during suspend/resume. CC: Ville Syrjälä CC: stable@vger.kernel.org Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1460963062-13211-4-git-send-email-imre.deak@intel.com (cherry picked from commit bf93ba67e9c05882f05b7ca2d773cfc8bf462c2a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 10 +++------- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 7 insertions(+), 9 deletions(-) commit dab9a2663f4e688106c041f7cd2797a721382f0a Author: Imre Deak Date: Mon Apr 18 14:45:54 2016 +0300 drm/i915: Fix system resume if PCI device remained enabled During system resume we depended on pci_enable_device() also putting the device into PCI D0 state. This won't work if the PCI device was already enabled but still in D3 state. This is because pci_enable_device() is refcounted and will not change the HW state if called with a non-zero refcount. Leaving the device in D3 will make all subsequent device accesses fail. This didn't cause a problem most of the time, since we resumed with an enable refcount of 0. But it fails at least after module reload because after that we also happen to leak a PCI device enable reference: During probing we call drm_get_pci_dev() which will enable the PCI device, but during device removal drm_put_dev() won't disable it. This is a bug of its own in DRM core, but without much harm as it only leaves the PCI device enabled. Fixing it is also a bit more involved, due to DRM mid-layering and because it affects non-i915 drivers too. The fix in this patch is valid regardless of the problem in DRM core. v2: - Add a code comment about the relation of this fix to the freeze/thaw vs. the suspend/resume phases. (Ville) - Add a code comment about the inconsistent ordering of set power state and device enable calls. (Chris) CC: Ville Syrjälä CC: Chris Wilson CC: stable@vger.kernel.org Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1460979954-14503-1-git-send-email-imre.deak@intel.com (cherry picked from commit 44410cd0bfb26bde9288da34c190cc9267d42a20) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 7ac7d19f808697abe6658c64c96868f728273f9c Author: Chris Wilson Date: Sun Apr 17 20:42:46 2016 +0100 drm/i915: Avoid stalling on pending flips for legacy cursor updates The legacy cursor ioctl expects to be asynchronous with respect to other screen updates, in particular page flips. As X updates the cursor from a signal context, if the cursor blocks then it will stall both the input and output chains causing bad stuttering and horrible UX. Reported-and-tested-by: Rafael Ristovski Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94980 Fixes: 5008e874edd34 ("drm/i915: Make wait_for_flips interruptible.") Suggested-by: Maarten Lankhorst Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Jani Nikula Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/1460922166-20292-1-git-send-email-chris@chris-wilson.co.uk Acked-by: Daniel Vetter Reviewed-by: Maarten Lankhorst (cherry picked from commit acf4e84d6167317ff21be5c03e1ea76ea5783701) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) commit 532c34b5fbf1687df63b3fcd5b2846312ac943c6 Author: Martin Schwidefsky Date: Mon Apr 25 17:54:28 2016 +0200 s390/sclp_ctl: fix potential information leak with /dev/sclp The sclp_ctl_ioctl_sccb function uses two copy_from_user calls to retrieve the sclp request from user space. The first copy_from_user fetches the length of the request which is stored in the first two bytes of the request. The second copy_from_user gets the complete sclp request, but this copies the length field a second time. A malicious user may have changed the length in the meantime. Reported-by: Pengfei Wang Reviewed-by: Michael Holzheu Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp_ctl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit d701cca6744fe0d67c86346dcfc9b128b17b5045 Author: Rui Salvaterra Date: Tue Apr 19 13:23:36 2016 +0100 powerpc: wire up preadv2 and pwritev2 syscalls Wire up preadv2/pwritev2 in the same way as preadv/pwritev. Fixes two build warnings on ppc64. mpe: Lightly tested with fio (slightly hacked to add the syscall wrappers): fio-4217 [009] .... 1304.635300: sys_preadv2(fd: 3, vec: 10025821de0, vlen: 1, pos_l: 6253000, pos_h: 0, flags: 1) fio-4217 [009] .... 1304.635474: sys_preadv2 -> 0x1000 Signed-off-by: Rui Salvaterra Signed-off-by: Michael Ellerman arch/powerpc/include/asm/systbl.h | 2 ++ arch/powerpc/include/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/unistd.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 2bc79ffcbb817873cc43d63118008ab75181b73d Author: Michael Neuling Date: Fri Apr 22 14:57:49 2016 +1000 cxl: Poll for outstanding IRQs when detaching a context When detaching contexts, we may still have interrupts in the system which are yet to be delivered to any CPU and be acked in the PSL. This can result in a subsequent unrelated process getting an spurious IRQ or an interrupt for a non-existent context. This polls the PSL to ensure that the PSL is clear of IRQs for the detached context, before removing the context from the idr. Signed-off-by: Michael Neuling Tested-by: Andrew Donnellan Acked-by: Ian Munsie Tested-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 7 +++++++ drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/native.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit d6776bba44d9752f6cdf640046070e71ee4bba7b Author: Michael Neuling Date: Fri Apr 22 14:57:48 2016 +1000 cxl: Keep IRQ mappings on context teardown Keep IRQ mappings on context teardown. This won't leak IRQs as if we allocate the mapping again, the generic code will give the same mapping used last time. Doing this works around a race in the generic code. Masking the interrupt introduces a race which can crash the kernel or result in IRQ that is never EOIed. The lost of EOI results in all subsequent mappings to the same HW IRQ never receiving an interrupt. We've seen this race with cxl test cases which are doing heavy context startup and teardown at the same time as heavy interrupt load. A fix to the generic code is being investigated also. Signed-off-by: Michael Neuling Cc: stable@vger.kernel.org # 3.8 Tested-by: Andrew Donnellan Acked-by: Ian Munsie Tested-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/misc/cxl/irq.c | 1 - 1 file changed, 1 deletion(-) commit 9a11d2e7e66b6b8764a2430686b8716637bf812e Author: Gustavo Padovan Date: Thu Apr 14 10:58:54 2016 -0700 drm/virtio: send vblank event after crtc updates virtio_gpu was failing to send vblank events when using the atomic IOCTL with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and enables atomic pageflips updates. Signed-off-by: Gustavo Padovan Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9dc0487d96a0396367a1451b31873482080b527f Author: Lyude Date: Wed Apr 13 16:50:18 2016 -0400 drm/dp/mst: Restore primary hub guid on resume Some hubs are forgetful, and end up forgetting whatever GUID we set previously after we do a suspend/resume cycle. This can lead to hotplugging breaking (along with probably other things) since the hub will start sending connection notifications with the wrong GUID. As such, we need to check on resume whether or not the GUID the hub is giving us is valid. Signed-off-by: Lyude Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1460580618-7421-1-git-send-email-cpaul@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 263efde31f97c498e1ebad30e4d2906609d7ad6b Author: cpaul@redhat.com Date: Fri Apr 22 16:08:46 2016 -0400 drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1() We can thank KASAN for finding this, otherwise I probably would have spent hours on it. This fixes a somewhat harder to trigger kernel panic, occuring while enabling MST where the port we were currently updating the payload on would have all of it's refs dropped before we finished what we were doing: ================================================================== BUG: KASAN: use-after-free in drm_dp_update_payload_part1+0xb3f/0xdb0 [drm_kms_helper] at addr ffff8800d29de018 Read of size 4 by task Xorg/973 ============================================================================= BUG kmalloc-2048 (Tainted: G B W ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in drm_dp_add_port+0x1aa/0x1ed0 [drm_kms_helper] age=16477 cpu=0 pid=2175 ___slab_alloc+0x472/0x490 __slab_alloc+0x20/0x40 kmem_cache_alloc_trace+0x151/0x190 drm_dp_add_port+0x1aa/0x1ed0 [drm_kms_helper] drm_dp_send_link_address+0x526/0x960 [drm_kms_helper] drm_dp_check_and_send_link_address+0x1ac/0x210 [drm_kms_helper] drm_dp_mst_link_probe_work+0x77/0xd0 [drm_kms_helper] process_one_work+0x562/0x1350 worker_thread+0xd9/0x1390 kthread+0x1c5/0x260 ret_from_fork+0x22/0x40 INFO: Freed in drm_dp_free_mst_port+0x50/0x60 [drm_kms_helper] age=7521 cpu=0 pid=2175 __slab_free+0x17f/0x2d0 kfree+0x169/0x180 drm_dp_free_mst_port+0x50/0x60 [drm_kms_helper] drm_dp_destroy_connector_work+0x2b8/0x490 [drm_kms_helper] process_one_work+0x562/0x1350 worker_thread+0xd9/0x1390 kthread+0x1c5/0x260 ret_from_fork+0x22/0x40 which on this T460s, would eventually lead to kernel panics in somewhat random places later in intel_mst_enable_dp() if we got lucky enough. Signed-off-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f28f20da704d399fb1e4d8838ffd697a357d9cc8 Merge: 91ea692 8358b02 Author: Linus Torvalds Date: Tue Apr 26 16:25:51 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Handle v4/v6 mixed sockets properly in soreuseport, from Craig Gallak. 2) Bug fixes for the new macsec facility (missing kmalloc NULL checks, missing locking around netdev list traversal, etc.) from Sabrina Dubroca. 3) Fix handling of host routes on ifdown in ipv6, from David Ahern. 4) Fix double-fdput in bpf verifier. From Jann Horn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (31 commits) bpf: fix double-fdput in replace_map_fd_with_map_ptr() net: ipv6: Delete host routes on an ifdown Revert "ipv6: Revert optional address flusing on ifdown." net/mlx4_en: fix spurious timestamping callbacks net: dummy: remove note about being Y by default cxgbi: fix uninitialized flowi6 ipv6: Revert optional address flusing on ifdown. ipv4/fib: don't warn when primary address is missing if in_dev is dead net/mlx5: Add pci shutdown callback net/mlx5_core: Remove static from local variable net/mlx5e: Use vport MTU rather than physical port MTU net/mlx5e: Fix minimum MTU net/mlx5e: Device's mtu field is u16 and not int net/mlx5_core: Add ConnectX-5 to list of supported devices net/mlx5e: Fix MLX5E_100BASE_T define net/mlx5_core: Fix soft lockup in steering error flow qlcnic: Update version to 5.3.64 net: stmmac: socfpga: Remove re-registration of reset controller macsec: fix netlink attribute validation macsec: add missing macsec prefix in uapi ... commit bd0b560a75bcebdcb48d82ed81f6b77c12771107 Merge: 02da2d7 2144fff Author: Dave Airlie Date: Wed Apr 27 09:19:06 2016 +1000 Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de:/git/lst/linux into drm-fixes just a single fix to not move the GPU linear window on cores where it might lead to inconsistent views of the memory by different engines in the core, thus breaking relocs and possibly causing other fun. * 'drm-etnaviv-fixes' of git://git.pengutronix.de:/git/lst/linux: drm/etnaviv: don't move linear memory window on 3D cores without MC2.0 commit 91ea692f8798a40a3f9ed771fade1bdff08acd58 Merge: 8ead9dd 978fa43 Author: Linus Torvalds Date: Tue Apr 26 16:17:01 2016 -0700 Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Here are the latest bug fixes for ARM SoCs, mostly addressing recent regressions. Changes are across several platforms, so I'm listing every change separately here. Regressions since 4.5: - A correction of the psci firmware DT binding, to prevent users from relying on unintended semantics - Actually getting the newly merged clock driver for some OMAP platforms to work - A revert of patches for the Qualcomm BAM, these need to be reworked for 4.7 to avoid breaking boards other than the one they were intended for - A correction for the I2C device nodes on the Socionext Uniphier platform - i.MX SDHCI was broken for non-DT platforms due to a change with the setting of the DMA mask - A revert of a patch that accidentally added a nonexisting clock on the Rensas "Porter" board - A couple of OMAP fixes that are all related to suspend after the power domain changes for dra7 - On Mediatek, revert part of the power domain initialization changes that broke mt8173-evb Fixes for older bugs: - Workaround for an "external abort" in the omap34xx suspend/resume code. - The USB1/eSATA should not be listed as an excon device on am57xx-beagle-x15 (broken since v4.0) - A v4.5 regression in the TI AM33xx and AM43XX DT specifying incorrect DMA request lines for the GPMC - The jiffies calibration on Renesas platforms was incorrect for some modern CPU cores. - A hardware errata woraround for clockdomains on TI DRA7" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems arm64: dts: uniphier: fix I2C nodes of PH1-LD20 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 Revert "ARM: OMAP: Catch callers of revision information prior to it being populated" ARM: OMAP3: Fix external abort on 36xx waking from off mode idle ARM: dts: am57xx-beagle-x15: remove extcon_usb1 ARM: dts: am437x: Fix GPMC dma properties ARM: dts: am33xx: Fix GPMC dma properties Revert "soc: mediatek: SCPSYS: Fix double enabling of regulators" ARM: mach-imx: sdhci-esdhc-imx: initialize DMA mask ARM: DRA7: clockdomain: Implement timer workaround for errata i874 ARM: OMAP: Catch callers of revision information prior to it being populated ARM: dts: dra7: Correct clock tree for sys_32k_ck ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen Revert "dts: msm8974: Add dma channels for blsp2_i2c1 node" Revert "dts: msm8974: Add blsp2_bam dma node" ARM: dts: Add clocks for dm814x ADPLL commit 8ead9dd54716d1e05e129959f702fcc1786f82b4 Author: Linus Torvalds Date: Mon Apr 25 20:04:08 2016 -0700 devpts: more pty driver interface cleanups This is more prep-work for the upcoming pty changes. Still just code cleanup with no actual semantic changes. This removes a bunch pointless complexity by just having the slave pty side remember the dentry associated with the devpts slave rather than the inode. That allows us to remove all the "look up the dentry" code for when we want to remove it again. Together with moving the tty pointer from "inode->i_private" to "dentry->d_fsdata" and getting rid of pointless inode locking, this removes about 30 lines of code. Not only is the end result smaller, it's simpler and easier to understand. The old code, for example, depended on the d_find_alias() to not just find the dentry, but also to check that it is still hashed, which in turn validated the tty pointer in the inode. That is a _very_ roundabout way to say "invalidate the cached tty pointer when the dentry is removed". The new code just does dentry->d_fsdata = NULL; in devpts_pty_kill() instead, invalidating the tty pointer rather more directly and obviously. Don't do something complex and subtle when the obvious straightforward approach will do. The rest of the patch (ie apart from code deletion and the above tty pointer clearing) is just switching the calling convention to pass the dentry or file pointer around instead of the inode. Cc: Eric Biederman Cc: Peter Anvin Cc: Andy Lutomirski Cc: Al Viro Cc: Peter Hurley Cc: Serge Hallyn Cc: Willy Tarreau Cc: Aurelien Jarno Cc: Alan Cox Cc: Jann Horn Cc: Greg KH Cc: Jiri Slaby Cc: Florian Weimer Signed-off-by: Linus Torvalds drivers/tty/pty.c | 18 +++++++--------- drivers/tty/tty_io.c | 6 +++--- fs/devpts/inode.c | 53 +++++++++++----------------------------------- include/linux/devpts_fs.h | 6 +++--- include/linux/tty_driver.h | 4 ++-- 5 files changed, 28 insertions(+), 59 deletions(-) commit 431adc0aeca68d257bd705db50f73e4c19e5690d Merge: bf16200 8e6cb47 Author: Greg Kroah-Hartman Date: Tue Apr 26 14:58:46 2016 -0700 Merge tag 'iio-fixes-for-4.6c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: 3rd set of IIO fixes for the 4.6 cycle. * ak8975 - fix a null pointer exception if an interrupt occurs during probe. - fix a maybe-unitialized warning. * at91-sama5d2 - fix a crash on removal of the module. commit 97b9b7dc7722dc78d46046fc7a0dd0264832327f Author: Vladimir Zapolskiy Date: Mon Apr 25 15:53:31 2016 -0500 usb: musb: jz4740: fix error check of usb_get_phy() The usb_get_phy() function returns either a valid pointer to phy or ERR_PTR() error, check for NULL always fails and may lead to oops on error path, fix this issue. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/jz4740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f551e13529833e052f75ec628a8af7b034af20f9 Author: Bin Liu Date: Mon Apr 25 15:53:30 2016 -0500 Revert "usb: musb: musb_host: Enable HCD_BH flag to handle urb return in bottom half" This reverts commit 2035772010db634ec8566b658fb1cd87ec47ac77. Commit 20357720 claims throughput improvement for MSC/UVC, but I don't see much improvement. Following are the MSC measurement using dd on AM335x GP EVM. with BCD_BH: read: 14.9MB/s, write: 20.9MB/s without BCD_BH: read: 15.2MB/s, write: 21.2MB/s However with this commit the following regressions have been observed. 1. ASIX usb-ethernet dongle is completely broken on UDP RX. 2. Unpluging a 3G modem, which uses option driver, behind a hub causes console log flooding with the following message. option_instat_callback: error -71 Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 607fb0f4d90cc9a4463bcb17c1417d8a709dfda1 Author: Tal Shorer Date: Mon Apr 25 15:53:29 2016 -0500 usb: musb: gadget: nuke endpoint before setting its descriptor to NULL Some functions, such as f_sourcesink, rely on an endpoint's desc field during their requests' complete() callback, so clear it only _after_ nuking all requests to avoid NULL pointer dereference. Signed-off-by: Tal Shorer Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7 Author: Jann Horn Date: Tue Apr 26 22:26:26 2016 +0200 bpf: fix double-fdput in replace_map_fd_with_map_ptr() When bpf(BPF_PROG_LOAD, ...) was invoked with a BPF program whose bytecode references a non-map file descriptor as a map file descriptor, the error handling code called fdput() twice instead of once (in __bpf_map_get() and in replace_map_fd_with_map_ptr()). If the file descriptor table of the current task is shared, this causes f_count to be decremented too much, allowing the struct file to be freed while it is still in use (use-after-free). This can be exploited to gain root privileges by an unprivileged user. This bug was introduced in commit 0246e64d9a5f ("bpf: handle pseudo BPF_LD_IMM64 insn"), but is only exploitable since commit 1be7f75d1668 ("bpf: enable non-root eBPF programs") because previously, CAP_SYS_ADMIN was required to reach the vulnerable code. (posted publicly according to request by maintainer) Signed-off-by: Jann Horn Signed-off-by: Linus Torvalds Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 - 1 file changed, 1 deletion(-) commit 8c0f55100478649e3c0133684aa4aebab77ce10f Merge: 78cfca3 653aa46 33362c6 Author: Mark Brown Date: Tue Apr 26 19:25:18 2016 +0100 Merge remote-tracking branches 'asoc/fix/rt5640' and 'asoc/fix/wm8962' into asoc-linus commit 78cfca32cac26201d362fe9d2bf6f3c11a9f4a3b Merge: e408057 ab9f87c dd5dc00 1b377cc e6cee90 af139d5 Author: Mark Brown Date: Tue Apr 26 19:25:15 2016 +0100 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/cs35l32', 'asoc/fix/hdac', 'asoc/fix/nau8825' and 'asoc/fix/rt5616' into asoc-linus commit e408057767973e13d72bf52604957925720b7142 Merge: f179f3f8 f0c8e1d Author: Mark Brown Date: Tue Apr 26 19:25:14 2016 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit f179f3f8a9bc86c43a1016c6d0ef87b7bb5ced86 Merge: 02da2d7 4732507 Author: Mark Brown Date: Tue Apr 26 19:25:13 2016 +0100 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus commit e16d8a6cbb499c5c8bfe9330d3351b649bded4af Author: Andy Lutomirski Date: Tue Apr 26 08:52:44 2016 -0700 Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging" This reverts commit 320d25b6a05f8b73c23fc21025d2906ecdd2d4fc. This change was problematic for a couple of reasons: 1. It missed a some entry points (Xen things and 64-bit native). 2. The entry it changed can be executed more than once. This isn't really a problem, but it conflated per-cpu state setup and global state setup. 3. It broke 64-bit non-NX. 64-bit non-NX worked the other way around from 32-bit -- __supported_pte_mask had NX set initially and was *cleared* in x86_configure_nx. With the patch applied, it never got cleared. Reported-and-tested-by: Meelis Roos 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: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/59bd15f7f4b56b633a611b7f70876c6d2ad01a98.1461685884.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/head_32.S | 6 ------ arch/x86/mm/setup_nx.c | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) commit 7472931f7f1e9d91f761dce30107ae345b61a5c3 Author: H. Nikolaus Schaller Date: Mon Apr 18 20:20:59 2016 +0200 ARM: dts: omap5: fix range of permitted wakeup pinmux registers otherwise we can't define gpio1_wk14 Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0698178c608e5f48ac78cde8c08260c2d7041a39 Author: Ivaylo Dimitrov Date: Sun Apr 17 17:29:23 2016 +0300 ARM: dts: omap3-n900: Specify peripherals LDO regulators initial mode Without that, regulators are left in the mode last set by the bootloader or by the kernel the device was rebooted from. This leads to various problems, like non-working peripherals. Signed-off-by: Ivaylo Dimitrov Reviewed-By: Sebastian Reichel Reviewed-by: Javier Martinez Canillas Reviewed-by: Pavel Machek Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-n900.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit e180feaf79b54d999329b194a3650f390acedf2c Author: Ivaylo Dimitrov Date: Sat Apr 16 09:20:28 2016 +0300 ARM: dts: omap3: Fix ISP syscon register offset According to the TRM, SCM CONTROL_CSIRXFE register is on offset 0x6c Signed-off-by: Ivaylo Dimitrov Reviewed-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap34xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5607959a4d5b54dcc9a3572bdbf967dfda88ae66 Author: Tomi Valkeinen Date: Mon Apr 18 13:06:07 2016 +0300 ARM: dts: omap5-cm-t54: fix ldo1_reg and ldo4_reg ranges ldo4_reg is connected to DSS, and should always be 1.8V. However the The dts defines a range of 1.5V-1.8V, which requires somethings to set the actual voltage at runtime. Currently we set the voltage in omapdss driver. As the voltage must always be 1.8V, let's just define the range to 1.8V so that the driver doesn't need to deal with the voltage. In fact, the driver should not touch the voltage, except in the cases where the voltage needs to be changed at runtime. I presume the situation is the same for ldo1_reg, used for CSI, although I think it is not currently used in the mainline. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-cm-t54.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5086e5c79602a4620fbc3ec208f38e445982e301 Author: Tomi Valkeinen Date: Mon Apr 18 13:06:06 2016 +0300 ARM: dts: omap5-board-common: fix ldo1_reg and ldo4_reg ranges ldo4_reg is connected to DSS, and should always be 1.8V. However the The dts defines a range of 1.5V-1.8V, which requires somethings to set the actual voltage at runtime. Currently we set the voltage in omapdss driver. As the voltage must always be 1.8V, let's just define the range to 1.8V so that the driver doesn't need to deal with the voltage. In fact, the driver should not touch the voltage, except in the cases where the voltage needs to be changed at runtime. I presume the situation is the same for ldo1_reg, used for CSI, although I think it is not currently used in the mainline. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32cc92c7b5e52357a0a24010bae9eb257fa75d3e Author: Hariprasad S Date: Tue Apr 5 10:23:48 2016 +0530 RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips For T4, kernel mode qps don't use the user doorbell. User mode qps during flow control db ringing are forced into kernel, where user doorbell is treated as kernel doorbell and proper bar2 offset in bar2 virtual space is calculated, which incase of T4 is a bogus address, causing a kernel panic due to illegal write during doorbell ringing. In case of T4, kernel mode qp bar2 virtual address should be 0. Added T4 check during bar2 virtual address calculation to return 0. Fixed Bar2 range checks based on bar2 physical address. The below oops will be fixed <1>BUG: unable to handle kernel paging request at 000000000002aa08 <1>IP: [] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4] <4>PGD 1416a8067 PUD 15bf35067 PMD 0 <4>Oops: 0002 [#1] SMP <4>last sysfs file: /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.4/infiniband/cxgb4_0/node_guid <4>CPU 5 <4>Modules linked in: rdma_ucm rdma_cm ib_cm ib_sa ib_mad ib_uverbs ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge autofs4 target_core_iblock target_core_file target_core_pscsi target_core_mod configfs bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt 8021q garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf vhost_net macvtap macvlan tun kvm uinput microcode iTCO_wdt iTCO_vendor_support sg joydev serio_raw i2c_i801 i2c_core lpc_ich mfd_core e1000e ptp pps_core ioatdma dca i7core_edac edac_core shpchp ext3 jbd mbcache sd_mod crc_t10dif pata_acpi ata_generic ata_piix iw_cxgb4 iw_cm ib_core ib_addr cxgb4 ipv6 dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan] <4> Supermicro X8ST3/X8ST3 <4>RIP: 0010:[] [] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4] <4>RSP: 0000:ffff880155a03db0 EFLAGS: 00010006 <4>RAX: 000000000000001d RBX: ffff88013ae5fc00 RCX: ffff880155adb180 <4>RDX: 000000000002aa00 RSI: 0000000000000001 RDI: ffff88013ae5fdf8 <4>RBP: ffff880155a03e10 R08: 0000000000000000 R09: 0000000000000001 <4>R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 <4>R13: 000000000000001d R14: ffff880156414ab0 R15: ffffe8ffffc05b88 <4>FS: 0000000000000000(0000) GS:ffff8800282a0000(0000) knlGS:0000000000000000 <4>CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b <4>CR2: 000000000002aa08 CR3: 000000015bd0e000 CR4: 00000000000007e0 <4>DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 <4>DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 <4>Process cxgb4 (pid: 394, threadinfo ffff880155a00000, task ffff880156414ab0) <4>Stack: <4> ffff880156415068 ffff880155adb180 ffff880155a03df0 ffffffffa00a344b <4> 00000000000003e8 ffff880155920000 0000000000000004 ffff880155920000 <4> ffff88015592d438 ffffffffa00a3860 ffff880155a03fd8 ffffe8ffffc05b88 <4>Call Trace: <4> [] ? enable_txq_db+0x2b/0x80 [cxgb4] <4> [] ? process_db_full+0x0/0xa0 [cxgb4] <4> [] process_db_full+0x46/0xa0 [cxgb4] <4> [] worker_thread+0x170/0x2a0 <4> [] ? autoremove_wake_function+0x0/0x40 <4> [] ? worker_thread+0x0/0x2a0 <4> [] kthread+0x9e/0xc0 <4> [] child_rip+0xa/0x20 <4> [] ? kthread+0x0/0xc0 <4> [] ? child_rip+0x0/0x20 <4>Code: e9 ba 00 00 00 66 0f 1f 44 00 00 44 8b 05 29 07 02 00 45 85 c0 0f 85 71 02 00 00 8b 83 70 01 00 00 45 0f b7 ed c1 e0 0f 44 09 e8 <89> 42 08 0f ae f8 66 c7 83 82 01 00 00 00 00 44 0f b7 ab dc 01 <1>RIP [] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4] <4> RSP <4>CR2: 000000000002aa08` Based on original work by Bharat Potnuri Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size") Signed-off-by: Steve Wise Signed-off-by: Hariprasad Shenai Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 40edd7fdfc8a2c838c313b982f318cd69e638750 Author: Steve Wise Date: Tue Apr 12 06:55:03 2016 -0700 iw_cxgb4: handle draining an idle qp In c4iw_drain_sq/rq(), if the particular queue is already empty then don't block. Fixes: ce4af14d94aa ('iw_cxgb4: add queue drain functions') Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/qp.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit ad202348fe3fa8187c43af5ab5b86fe6de057bd3 Author: Steve Wise Date: Tue Apr 12 06:55:01 2016 -0700 iw_cxgb3: initialize ibdev.iwcm->ifname for port mapping The IWCM uses ibdev.iwcm->ifname for registration with the iwarp port map daemon. But iw_cxgb3 did not initialize this field which causes intermittent registration failures based on the contents of the uninitialized memory. Fixes: c1340e8aa628 ("iw_cxgb3: support for iWARP port mapping") Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 ++ 1 file changed, 2 insertions(+) commit 851d7b6b8a954b28f85e62a53cbba472907e21e4 Author: Steve Wise Date: Tue Apr 12 06:54:54 2016 -0700 iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping The IWCM uses ibdev.iwcm->ifname for registration with the iwarp port map daemon. But iw_cxgb4 did not initialize this field which causes intermittent registration failures based on the contents of the uninitialized memory. Fixes: 170003c894d9 ("iw_cxgb4: remove port mapper related code") Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/provider.c | 2 ++ 1 file changed, 2 insertions(+) commit 42235f80ab205bf5020cf33cb3e94455410abe36 Author: Sagi Grimberg Date: Tue Apr 26 17:55:38 2016 +0300 IB/core: Don't drain non-existent rq queue-pair The drain_rq function expects a normal receive qp to drain. A qp can only have either a normal rq or an srq. If there is an srq, there is no rq to drain. Until the API supports draining SRQs, simply skip draining the rq when the qp has an srq attached. Fixes: 765d67748bcf ("IB: new common API for draining queues") Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 38bd10c447f8e8980753149a8a65108159871df5 Author: David Ahern Date: Thu Apr 21 20:56:12 2016 -0700 net: ipv6: Delete host routes on an ifdown It was a simple idea -- save IPv6 configured addresses on a link down so that IPv6 behaves similar to IPv4. As always the devil is in the details and the IPv6 stack as too many behavioral differences from IPv4 making the simple idea more complicated than it needs to be. The current implementation for keeping IPv6 addresses can panic or spit out a warning in one of many paths: 1. IPv6 route gets an IPv4 route as its 'next' which causes a panic in rt6_fill_node while handling a route dump request. 2. rt->dst.obsolete is set to DST_OBSOLETE_DEAD hitting the WARN_ON in fib6_del 3. Panic in fib6_purge_rt because rt6i_ref count is not 1. The root cause of all these is references related to the host route for an address that is retained. So, this patch deletes the host route every time the ifdown loop runs. Since the host route is deleted and will be re-generated an up there is no longer a need for the l3mdev fix up. On the 'admin up' side move addrconf_permanent_addr into the NETDEV_UP event handling so that it runs only once versus on UP and CHANGE events. All of the current panics and warnings appear to be related to addresses on the loopback device, but given the catastrophic nature when a bug is triggered this patch takes the conservative approach and evicts all host routes rather than trying to determine when it can be re-used and when it can not. That can be a later optimizaton if desired. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 48 +++++++++++++++--------------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) commit 6a923934c33c750a595868af6bef5f1a1fa90054 Author: David S. Miller Date: Tue Apr 26 11:47:41 2016 -0400 Revert "ipv6: Revert optional address flusing on ifdown." This reverts commit 841645b5f2dfceac69b78fcd0c9050868d41ea61. Ok, this puts the feature back. I've decided to apply David A.'s bug fix and run with that rather than make everyone wait another whole release for this feature. Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 9 ++ include/linux/ipv6.h | 1 + include/uapi/linux/ipv6.h | 1 + net/ipv6/addrconf.c | 162 ++++++++++++++++++++++++++++++--- 4 files changed, 161 insertions(+), 12 deletions(-) commit 346c09f80459a3ad97df1816d6d606169a51001a Author: Roman Pen Date: Tue Apr 26 13:15:35 2016 +0200 workqueue: fix ghost PENDING flag while doing MQ IO The bug in a workqueue leads to a stalled IO request in MQ ctx->rq_list with the following backtrace: [ 601.347452] INFO: task kworker/u129:5:1636 blocked for more than 120 seconds. [ 601.347574] Tainted: G O 4.4.5-1-storage+ #6 [ 601.347651] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 601.348142] kworker/u129:5 D ffff880803077988 0 1636 2 0x00000000 [ 601.348519] Workqueue: ibnbd_server_fileio_wq ibnbd_dev_file_submit_io_worker [ibnbd_server] [ 601.348999] ffff880803077988 ffff88080466b900 ffff8808033f9c80 ffff880803078000 [ 601.349662] ffff880807c95000 7fffffffffffffff ffffffff815b0920 ffff880803077ad0 [ 601.350333] ffff8808030779a0 ffffffff815b01d5 0000000000000000 ffff880803077a38 [ 601.350965] Call Trace: [ 601.351203] [] ? bit_wait+0x60/0x60 [ 601.351444] [] schedule+0x35/0x80 [ 601.351709] [] schedule_timeout+0x192/0x230 [ 601.351958] [] ? blk_flush_plug_list+0xc7/0x220 [ 601.352208] [] ? ktime_get+0x37/0xa0 [ 601.352446] [] ? bit_wait+0x60/0x60 [ 601.352688] [] io_schedule_timeout+0xa4/0x110 [ 601.352951] [] ? _raw_spin_unlock_irqrestore+0xe/0x10 [ 601.353196] [] bit_wait_io+0x1b/0x70 [ 601.353440] [] __wait_on_bit+0x5d/0x90 [ 601.353689] [] wait_on_page_bit+0xc0/0xd0 [ 601.353958] [] ? autoremove_wake_function+0x40/0x40 [ 601.354200] [] __filemap_fdatawait_range+0xe4/0x140 [ 601.354441] [] filemap_fdatawait_range+0x14/0x30 [ 601.354688] [] filemap_write_and_wait_range+0x3f/0x70 [ 601.354932] [] blkdev_fsync+0x1b/0x50 [ 601.355193] [] vfs_fsync_range+0x49/0xa0 [ 601.355432] [] blkdev_write_iter+0xca/0x100 [ 601.355679] [] __vfs_write+0xaa/0xe0 [ 601.355925] [] vfs_write+0xa9/0x1a0 [ 601.356164] [] kernel_write+0x38/0x50 The underlying device is a null_blk, with default parameters: queue_mode = MQ submit_queues = 1 Verification that nullb0 has something inflight: root@pserver8:~# cat /sys/block/nullb0/inflight 0 1 root@pserver8:~# find /sys/block/nullb0/mq/0/cpu* -name rq_list -print -exec cat {} \; ... /sys/block/nullb0/mq/0/cpu2/rq_list CTX pending: ffff8838038e2400 ... During debug it became clear that stalled request is always inserted in the rq_list from the following path: save_stack_trace_tsk + 34 blk_mq_insert_requests + 231 blk_mq_flush_plug_list + 281 blk_flush_plug_list + 199 wait_on_page_bit + 192 __filemap_fdatawait_range + 228 filemap_fdatawait_range + 20 filemap_write_and_wait_range + 63 blkdev_fsync + 27 vfs_fsync_range + 73 blkdev_write_iter + 202 __vfs_write + 170 vfs_write + 169 kernel_write + 56 So blk_flush_plug_list() was called with from_schedule == true. If from_schedule is true, that means that finally blk_mq_insert_requests() offloads execution of __blk_mq_run_hw_queue() and uses kblockd workqueue, i.e. it calls kblockd_schedule_delayed_work_on(). That means, that we race with another CPU, which is about to execute __blk_mq_run_hw_queue() work. Further debugging shows the following traces from different CPUs: CPU#0 CPU#1 ---------------------------------- ------------------------------- reqeust A inserted STORE hctx->ctx_map[0] bit marked kblockd_schedule...() returns 1 request B inserted STORE hctx->ctx_map[1] bit marked kblockd_schedule...() returns 0 *** WORK PENDING bit is cleared *** flush_busy_ctxs() is executed, but bit 1, set by CPU#1, is not observed As a result request B pended forever. This behaviour can be explained by speculative LOAD of hctx->ctx_map on CPU#0, which is reordered with clear of PENDING bit and executed _before_ actual STORE of bit 1 on CPU#1. The proper fix is an explicit full barrier , which guarantees that clear of PENDING bit is to be executed before all possible speculative LOADS or STORES inside actual work function. Signed-off-by: Roman Pen Cc: Gioh Kim Cc: Michael Wang Cc: Tejun Heo Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo kernel/workqueue.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 8d4d5c3a7c25e69075e60e5e70c1e05c205aef89 Author: Maxime Ripard Date: Tue Apr 26 16:00:51 2016 +0200 regulator: axp20x: Fix LDO4 linear voltage range The current linear voltage range for the LDO4 regulator found in the APX20X PMICs assumes that the voltage is linear between 2.5 and 3.1V. However, the PMIC can output up to 3.3V on that regulator by skipping the 2.6V and 2.9V steps. Fix the ranges to read and set the proper voltages. Fixes: 13d57e64352a ("regulator: axp20x: Use linear voltage ranges for AXP20X LDO4") Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 978fa436231a834dc686292efc7d944d9013e035 Author: Sudeep Holla Date: Fri Apr 22 16:18:02 2016 +0100 drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems Currently ARM CPUs DT bindings allows different enable-method value for PSCI based systems. On ARM 64-bit this property is required and must be "psci" while on ARM 32-bit systems this property is optional and must be "arm,psci" if present. However, "arm,psci" has always been the compatible string for the PSCI node, and was never intended to be the enable-method. So this is a bug in the binding and not a deliberate attempt at specifying 32-bit differently. This is problematic if 32-bit OS is run on 64-bit system which has "psci" as enable-method rather than the expected "arm,psci". So let's unify the value into "psci" and remove support for "arm,psci" before it finds any users. Reported-by: Soby Mathew Cc: Rob Herring Acked-by: Mark Rutland Acked-by: Lorenzo Pieralisi Signed-off-by: Sudeep Holla Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/cpus.txt | 1 - drivers/firmware/psci.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 66ec246eb9982e7eb8e15e1fc55f543230310dd0 Author: Jarkko Nikula Date: Tue Apr 26 10:08:26 2016 +0300 spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT Certain Intel Sunrisepoint PCH variants report zero chip selects in SPI capabilities register even they have one per port. Detection in pxa2xx_spi_probe() sets master->num_chipselect to 0 leading to -EINVAL from spi_register_master() where chip select count is validated. Fix this by not using SPI capabilities register on Sunrisepoint. They don't have more than one chip select so use the default value 1 instead of detection. Fixes: 8b136baa5892 ("spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals") Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb03ed216370cb021f377f923471e56d1de3ff5d Author: Takashi Iwai Date: Thu Apr 21 16:39:17 2016 +0200 ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW The recent bug report suggests that BCLK setup for i915 HSW/BDW needs to be updated at each HDMI hotplug, not only at initialization and resume. That is, we need to update HSW_EM4 and HSW_EM5 registers at ELD notification, too. Otherwise the HDMI audio may be out of sync and played in a wrong pitch. However, the HDA codec driver has no access to the controller registers, and currently the code managing these registers is in hda_intel.c, i.e. local to the controller driver. For allowing the explicit BCLK update from the codec driver, as in this patch, the former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and exposed as snd_hdac_i915_set_bclk(). This is called from both the HDA controller driver and intel_pin_eld_notify() in HDMI codec driver. Along with this change, snd_hdac_get_display_clk() gets dropped as it's no longer used. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410 Cc: # v4.5+ Signed-off-by: Takashi Iwai include/sound/hda_i915.h | 5 ++-- sound/hda/hdac_i915.c | 62 ++++++++++++++++++++++++++++++++++++++-------- sound/pci/hda/hda_intel.c | 56 +++-------------------------------------- sound/pci/hda/patch_hdmi.c | 1 + 4 files changed, 58 insertions(+), 66 deletions(-) commit 037e119738120c1cdc460c6ae33871c3000531f3 Author: Conrad Kostecki Date: Tue Apr 26 10:08:10 2016 +0200 ALSA: hda - Add dock support for ThinkPad X260 Fixes audio output on a ThinkPad X260, when using Lenovo CES 2013 docking station series (basic, pro, ultra). Signed-off-by: Conrad Kostecki Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit fc96256c906362e845d848d0f6a6354450059e81 Author: Eric Dumazet Date: Sat Apr 23 11:35:46 2016 -0700 net/mlx4_en: fix spurious timestamping callbacks When multiple skb are TX-completed in a row, we might incorrectly keep a timestamp of a prior skb and cause extra work. Fixes: ec693d47010e8 ("net/mlx4_en: Add HW timestamping (TS) support") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Eran Ben Elisha Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9f5db53507b6607dc1b5d59547097966c0e71047 Author: Ivan Babrou Date: Sat Apr 23 12:58:03 2016 +0000 net: dummy: remove note about being Y by default Signed-off-by: Ivan Babrou Signed-off-by: David S. Miller drivers/net/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9c573de3283af007ea11c17bde1e4568d9417328 Author: Shaohua Li Date: Mon Apr 25 16:52:38 2016 -0700 MD: make bio mergeable blk_queue_split marks bio unmergeable, which makes sense for normal bio. But if dispatching the bio to underlayer disk, the blk_queue_split checks are invalid, hence it's possible the bio becomes mergeable. In the reported bug, this bug causes trim against raid0 performance slash https://bugzilla.kernel.org/show_bug.cgi?id=117051 Reported-and-tested-by: Park Ju Hyung Fixes: 6ac45aeb6bca(block: avoid to merge splitted bio) Cc: stable@vger.kernel.org (v4.3+) Cc: Ming Lei Cc: Neil Brown Reviewed-by: Jens Axboe Signed-off-by: Shaohua Li drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+) commit f5515f9cdff136dc32517d4b81fe2b9091237b4a Author: Geert Uytterhoeven Date: Mon Apr 25 16:08:30 2016 +0200 arm64: dts: r8a7795: Don't disable referenced optional scif clock clk_get() on a disabled clock node will return -EPROBE_DEFER, which can cause drivers to be deferred forever if such clocks are referenced in their devices' clocks properties. Update the disabled external scif clock node so that it is not disabled to prevent this. Reported-by: Jürg Billeter Signed-off-by: Geert Uytterhoeven [simon: fix for v4.6 extracted from a larger patch targeted at v4.7] Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 1 - 1 file changed, 1 deletion(-) commit 1becf03545a0859ceaaf9e8c2d9861882a71cb01 Author: Srinivas Pandruvada Date: Fri Apr 22 19:53:59 2016 -0700 cpufreq: intel_pstate: Fix processing for turbo activation ratio When the config TDP level is not nominal (level = 0), the MSR values for reading level 1 and level 2 ratios contain power in low 14 bits and actual ratio bits are at bits [23:16]. The current processing for level 1 and level 2 is wrong as there is no shift done to get actual ratio. Fixes: 6a35fc2d6c22 (cpufreq: intel_pstate: get P1 from TAR when available) Signed-off-by: Srinivas Pandruvada Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 5 +++++ 1 file changed, 5 insertions(+) commit eb43335c409543506dd84b59f5c6bdd35cecf2c7 Author: Nick Dyer Date: Mon Apr 25 14:18:52 2016 -0700 Input: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset If using IRQF_TRIGGER_FALLING, then there is a race here: if the reset completes before we enable the IRQ, then CHG is already low and touch will be broken. This has been seen on Chromebook Pixel 2. A workaround is to reconfig T18 COMMSCONFIG to enable the RETRIGEN bit using mxt-app: mxt-app -W -T18 44 mxt-app --backup Tested-by: Tom Rini Signed-off-by: Nick Dyer Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 6984ab1ab35f422292b7781c65284038bcc0f6a6 Author: Knut Wohlrab Date: Mon Apr 25 14:08:25 2016 -0700 Input: zforce_ts - fix dual touch recognition A wrong decoding of the touch coordinate message causes a wrong touch ID. Touch ID for dual touch must be 0 or 1. According to the actual Neonode nine byte touch coordinate coding, the state is transported in the lower nibble and the touch ID in the higher nibble of payload byte five. Signed-off-by: Knut Wohlrab Signed-off-by: Oleksij Rempel Signed-off-by: Dirk Behme Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/zforce_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28a994fad95dd8475f04bd036e08a14aa8d125ea Author: H. Nikolaus Schaller Date: Mon Apr 25 14:02:36 2016 -0700 Input: twl6040-vibra - fix atomic schedule panic commit c6f39257c952 ("mfd: twl6040: Use regmap for register cache") did remove the private cache for the vibra control registers and replaced access within twl6040_get_vibralr_status() by calls to regmap. This is OK, as long as twl6040_get_vibralr_status() uses already cached values or is not called from interrupt context. But we call this in vibra_play() for checking that the vibrator is not configured for audio mode. The result is a "BUG: scheduling while atomic" if the first use of the twl6040 is a vibra effect, because the first fetch is by reading the twl6040 registers through (blocking) i2c and not from the cache. As soon as the regmap has cached the status, further calls are fine. The solution is to move the condition to the work() function which runs in context that can block. The original code returns -EBUSY, but the return value of ->play() functions is ignored anyways. Hence, we do not loose functionality by not returning an error but just reporting the issue to INFO loglevel. Tested-on: Pyra (omap5) prototype Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3d6d30d60abb19ba9a20e53ce65b18a9c148fcd1 Author: Jiri Benc Date: Fri Apr 22 13:09:13 2016 +0200 cxgbi: fix uninitialized flowi6 ip6_route_output looks into different fields in the passed flowi6 structure, yet cxgbi passes garbage in nearly all those fields. Zero the structure out first. Fixes: fc8d0590d9142 ("libcxgbi: Add ipv6 api to driver") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/scsi/cxgbi/libcxgbi.c | 1 + 1 file changed, 1 insertion(+) commit 264a0ae164bc0e9144bebcd25ff030d067b1a878 Author: Tejun Heo Date: Thu Apr 21 19:09:02 2016 -0400 memcg: relocate charge moving from ->attach to ->post_attach Hello, So, this ended up a lot simpler than I originally expected. I tested it lightly and it seems to work fine. Petr, can you please test these two patches w/o the lru drain drop patch and see whether the problem is gone? Thanks. ------ 8< ------ If charge moving is used, memcg performs relabeling of the affected pages from its ->attach callback which is called under both cgroup_threadgroup_rwsem and thus can't create new kthreads. This is fragile as various operations may depend on workqueues making forward progress which relies on the ability to create new kthreads. There's no reason to perform charge moving from ->attach which is deep in the task migration path. Move it to ->post_attach which is called after the actual migration is finished and cgroup_threadgroup_rwsem is dropped. * move_charge_struct->mm is added and ->can_attach is now responsible for pinning and recording the target mm. mem_cgroup_clear_mc() is updated accordingly. This also simplifies mem_cgroup_move_task(). * mem_cgroup_move_task() is now called from ->post_attach instead of ->attach. Signed-off-by: Tejun Heo Cc: Johannes Weiner Acked-by: Michal Hocko Debugged-and-tested-by: Petr Mladek Reported-by: Cyril Hrubis Reported-by: Johannes Weiner Fixes: 1ed1328792ff ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem") Cc: # 4.4+ mm/memcontrol.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 5cf1cacb49aee39c3e02ae87068fc3c6430659b0 Author: Tejun Heo Date: Thu Apr 21 19:06:48 2016 -0400 cgroup, cpuset: replace cpuset_post_attach_flush() with cgroup_subsys->post_attach callback Since e93ad19d0564 ("cpuset: make mm migration asynchronous"), cpuset kicks off asynchronous NUMA node migration if necessary during task migration and flushes it from cpuset_post_attach_flush() which is called at the end of __cgroup_procs_write(). This is to avoid performing migration with cgroup_threadgroup_rwsem write-locked which can lead to deadlock through dependency on kworker creation. memcg has a similar issue with charge moving, so let's convert it to an official callback rather than the current one-off cpuset specific function. This patch adds cgroup_subsys->post_attach callback and makes cpuset register cpuset_post_attach_flush() as its ->post_attach. The conversion is mostly one-to-one except that the new callback is called under cgroup_mutex. This is to guarantee that no other migration operations are started before ->post_attach callbacks are finished. cgroup_mutex is one of the outermost mutex in the system and has never been and shouldn't be a problem. We can add specialized synchronization around __cgroup_procs_write() but I don't think there's any noticeable benefit. Signed-off-by: Tejun Heo Cc: Li Zefan Cc: Johannes Weiner Cc: Michal Hocko Cc: # 4.4+ prerequisite for the next patch include/linux/cgroup-defs.h | 1 + include/linux/cpuset.h | 6 ------ kernel/cgroup.c | 7 +++++-- kernel/cpuset.c | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) commit 841645b5f2dfceac69b78fcd0c9050868d41ea61 Author: David S. Miller Date: Mon Apr 25 15:33:55 2016 -0400 ipv6: Revert optional address flusing on ifdown. This reverts the following three commits: 70af921db6f8835f4b11c65731116560adb00c14 799977d9aafbf0ca0b9c39b04cbfb16db71302c9 f1705ec197e705b79ea40fe7a2cc5acfa1d3bfac The feature was ill conceived, has terrible semantics, and has added nothing but regressions to the already fragile ipv6 stack. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 9 -- include/linux/ipv6.h | 1 - include/uapi/linux/ipv6.h | 1 - net/ipv6/addrconf.c | 162 +++------------------------------ 4 files changed, 12 insertions(+), 161 deletions(-) commit 6c1ea260f89709e0021d2c59f8fd2a104b5b1123 Author: Ilya Dryomov Date: Mon Apr 11 19:34:49 2016 +0200 libceph: make authorizer destruction independent of ceph_auth_client Starting the kernel client with cephx disabled and then enabling cephx and restarting userspace daemons can result in a crash: [262671.478162] BUG: unable to handle kernel paging request at ffffebe000000000 [262671.531460] IP: [] kfree+0x5a/0x130 [262671.584334] PGD 0 [262671.635847] Oops: 0000 [#1] SMP [262672.055841] CPU: 22 PID: 2961272 Comm: kworker/22:2 Not tainted 4.2.0-34-generic #39~14.04.1-Ubuntu [262672.162338] Hardware name: Dell Inc. PowerEdge R720/068CDY, BIOS 2.4.3 07/09/2014 [262672.268937] Workqueue: ceph-msgr con_work [libceph] [262672.322290] task: ffff88081c2d0dc0 ti: ffff880149ae8000 task.ti: ffff880149ae8000 [262672.428330] RIP: 0010:[] [] kfree+0x5a/0x130 [262672.535880] RSP: 0018:ffff880149aeba58 EFLAGS: 00010286 [262672.589486] RAX: 000001e000000000 RBX: 0000000000000012 RCX: ffff8807e7461018 [262672.695980] RDX: 000077ff80000000 RSI: ffff88081af2be04 RDI: 0000000000000012 [262672.803668] RBP: ffff880149aeba78 R08: 0000000000000000 R09: 0000000000000000 [262672.912299] R10: ffffebe000000000 R11: ffff880819a60e78 R12: ffff8800aec8df40 [262673.021769] R13: ffffffffc035f70f R14: ffff8807e5b138e0 R15: ffff880da9785840 [262673.131722] FS: 0000000000000000(0000) GS:ffff88081fac0000(0000) knlGS:0000000000000000 [262673.245377] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [262673.303281] CR2: ffffebe000000000 CR3: 0000000001c0d000 CR4: 00000000001406e0 [262673.417556] Stack: [262673.472943] ffff880149aeba88 ffff88081af2be04 ffff8800aec8df40 ffff88081af2be04 [262673.583767] ffff880149aeba98 ffffffffc035f70f ffff880149aebac8 ffff8800aec8df00 [262673.694546] ffff880149aebac8 ffffffffc035c89e ffff8807e5b138e0 ffff8805b047f800 [262673.805230] Call Trace: [262673.859116] [] ceph_x_destroy_authorizer+0x1f/0x50 [libceph] [262673.968705] [] ceph_auth_destroy_authorizer+0x3e/0x60 [libceph] [262674.078852] [] put_osd+0x45/0x80 [libceph] [262674.134249] [] remove_osd+0xae/0x140 [libceph] [262674.189124] [] __reset_osd+0x103/0x150 [libceph] [262674.243749] [] kick_requests+0x223/0x460 [libceph] [262674.297485] [] ceph_osdc_handle_map+0x282/0x5e0 [libceph] [262674.350813] [] dispatch+0x4e/0x720 [libceph] [262674.403312] [] try_read+0x3d1/0x1090 [libceph] [262674.454712] [] ? dequeue_entity+0x152/0x690 [262674.505096] [] con_work+0xcb/0x1300 [libceph] [262674.555104] [] process_one_work+0x14e/0x3d0 [262674.604072] [] worker_thread+0x11a/0x470 [262674.652187] [] ? rescuer_thread+0x310/0x310 [262674.699022] [] kthread+0xd2/0xf0 [262674.744494] [] ? kthread_create_on_node+0x1c0/0x1c0 [262674.789543] [] ret_from_fork+0x3f/0x70 [262674.834094] [] ? kthread_create_on_node+0x1c0/0x1c0 What happens is the following: (1) new MON session is established (2) old "none" ac is destroyed (3) new "cephx" ac is constructed ... (4) old OSD session (w/ "none" authorizer) is put ceph_auth_destroy_authorizer(ac, osd->o_auth.authorizer) osd->o_auth.authorizer in the "none" case is just a bare pointer into ac, which contains a single static copy for all services. By the time we get to (4), "none" ac, freed in (2), is long gone. On top of that, a new vtable installed in (3) points us at ceph_x_destroy_authorizer(), so we end up trying to destroy a "none" authorizer with a "cephx" destructor operating on invalid memory! To fix this, decouple authorizer destruction from ac and do away with a single static "none" authorizer by making a copy for each OSD or MDS session. Authorizers themselves are independent of ac and so there is no reason for destroy_authorizer() to be an ac op. Make it an op on the authorizer itself by turning ceph_authorizer into a real struct. Fixes: http://tracker.ceph.com/issues/15447 Reported-by: Alan Zhang Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil fs/ceph/mds_client.c | 6 ++-- include/linux/ceph/auth.h | 10 +++--- include/linux/ceph/osd_client.h | 1 - net/ceph/auth.c | 8 ++--- net/ceph/auth_none.c | 71 ++++++++++++++++++++++------------------- net/ceph/auth_none.h | 3 +- net/ceph/auth_x.c | 21 ++++++------ net/ceph/auth_x.h | 1 + net/ceph/osd_client.c | 6 ++-- 9 files changed, 62 insertions(+), 65 deletions(-) commit a30b8f81d9d6fe24eab8a023794548b048f08e3c Author: Azael Avalos Date: Fri Apr 22 09:29:36 2016 -0600 toshiba_acpi: Fix regression caused by hotkey enabling value Commit 52cbae0127ad ("toshiba_acpi: Change default Hotkey enabling value") changed the hotkeys enabling value, as it was the same value Windows uses, however, it turns out that the value tells the EC that the driver will now take care of the hardware events like the physical RFKill switch or the pointing device toggle button. This patch reverts such commit by changing the default hotkey enabling value to 0x09, which enables hotkey events only, making the hardware buttons working again. Fixes bugs 113331 and 114941. Signed-off-by: Azael Avalos Cc: stable@vger.kernel.org Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcc981e9ed84c678533299d7eff17d2c81e4d5de Merge: 02da2d7 340ff60 Author: Linus Torvalds Date: Mon Apr 25 09:32:45 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 a couple of regressions in the talitos driver that were introduced back in 4.3. The first bug causes a crash when the driver's AEAD functionality is used while the second bug prevents its AEAD feature from working once you get past the first bug" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: talitos - fix AEAD tcrypt tests crypto: talitos - fix crash in talitos_cra_init() commit 004cb62efd5e9e4772efb46b49c16fa2618ecf3e Merge: 92f27f9 5d7e23a Author: Kevin Hilman Date: Mon Apr 25 08:55:17 2016 -0700 Merge tag 'omap-for-v4.6/dt-ti81xx-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Enable dm814x and dra62x clock driver. This branch has a dependency to the clk-ti branch from the Linux clk tree for the ADPLL clock driver. Otherwise things won't keep booting properly when we flip over to use the clock driver instead of fixed clocks set up by the bootloader. * tag 'omap-for-v4.6/dt-ti81xx-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Add clocks for dm814x ADPLL commit b297874a2d5c5fcaeb5242a8b4708e54c5477d90 Author: Michał Pecio Date: Sun Apr 24 18:11:45 2016 +0200 md/raid0: remove empty line printk from dump_zones Remove the final printk. All preceding output is already properly newline-terminated and the printk isn't even KERN_CONT to begin with, so it only adds one empty line to the log. Signed-off-by: Michal Pecio Signed-off-by: Shaohua Li drivers/md/raid0.c | 1 - 1 file changed, 1 deletion(-) commit ede85e90be26e5de2a72f76feec01cfc5281d4bd Merge: 02da2d7 630ba0c Author: Ingo Molnar Date: Mon Apr 25 17:28:11 2016 +0200 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/urgent Pull EFI fix from Matt Fleming: * Avoid out-of-bounds access in the efivars code when performing string matching on converted EFI variable names (Laszlo Ersek) Signed-off-by: Ingo Molnar commit 567a44ecb44eb2584ddb93e962cfb133ce77e0bb Author: Nazar Mokrynskyi Date: Mon Apr 25 17:01:56 2016 +0300 HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk Needed for v2 of the device firmware, otherwise kernel will stuck for few seconds and throw "usb_submit_urb(ctrl) failed: -1" early on system boot. Signed-off-by: Nazar Mokrynskyi Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 89a095668304e8a02502ffd35edacffdbf49aa8c Author: Ricardo Ribalda Date: Thu Mar 3 16:12:48 2016 -0300 [media] vb2-memops: Fix over allocation of frame vectors On page unaligned frames, create_framevec forces get_vaddr_frames to allocate an extra page at the end of the buffer. Under some circumstances, this leads to -EINVAL on VIDIOC_QBUF. E.g: We have vm_a that vm_area that goes from 0x1000 to 0x3000. And a frame that goes from 0x1800 to 0x2800, i.e. 2 pages. frame_vector_create will be called with the following params: get_vaddr_frames(0x1800, 2, write, 1, vec); get_vaddr will allocate the first page after checking that the memory 0x1800-0x27ff is valid, but it will not allocate the second page because the range 0x2800-0x37ff is out of the vm_a range. This results in create_framevec returning -EFAULT Error Trace: [ 9083.793015] video0: VIDIOC_QBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002002, field=any, sequence=0, memory=userptr, bytesused=0, offset/userptr=0x7ff2b023ca80, length=5765760 [ 9083.793028] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 [ 9083.793117] video0: VIDIOC_QBUF: error -22: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00000000, field=any, sequence=0, memory=userptr, bytesused=0, offset/userptr=0x7ff2b07bc500, length=5765760 Also use true instead of 1 since that argument is a bool in the get_vaddr_frames() prototype. Fixes: 21fb0cb7ec65 ("[media] vb2: Provide helpers for mapping virtual addresses") Reported-by: Albert Antony Signed-off-by: Ricardo Ribalda Delgado [hans.verkuil@cisco.com: merged the 'bool' change into this patch] Acked-by: Marek Szyprowski Reviewed-by: Jan Kara Cc: # for v4.3 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-memops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b93876845c5e30a92964eeb088d9d2e024118022 Author: Ricardo Ribalda Date: Mon Apr 25 06:04:45 2016 -0300 [media] media: vb2: Fix regression on poll() for RW mode When using a device is read/write mode, vb2 does not handle properly the first select/poll operation. The reason for this, is that when this code has been refactored, some of the operations have changed their order, and now fileio emulator is not started. The reintroduced check to the core is enabled by a quirk flag, that avoids this check by other subsystems like DVB. Fixes: 49d8ab9feaf2 ("media] media: videobuf2: Separate vb2_poll()") Reported-by: Dimitrios Katsaros Cc: Junghak Sung Cc: # for v4.5 and up Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 10 ++++++++++ drivers/media/v4l2-core/videobuf2-v4l2.c | 14 ++++++-------- include/media/videobuf2-core.h | 4 ++++ 3 files changed, 20 insertions(+), 8 deletions(-) commit 3020ca711871fdaf0c15c8bab677a6bc302e28fe Author: Hans Verkuil Date: Fri Apr 22 04:00:50 2016 -0300 [media] v4l2-dv-timings.h: fix polarity for 4k formats The VSync polarity was negative instead of positive for the 4k CEA formats. I probably copy-and-pasted these from the DMT 4k format, which does have a negative VSync polarity. Signed-off-by: Hans Verkuil Reported-by: Martin Bugge Cc: # for v4.1 and up Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/v4l2-dv-timings.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit c26f6c61578852f679787d555e6d07804e1f5f14 Author: Andrew Gabbasov Date: Mon Apr 25 06:19:38 2016 -0500 udf: Fix conversion of 'dstring' fields to UTF8 Commit 9293fcfbc1812a22ad5ce1b542eb90c1bbe01be1 ("udf: Remove struct ustr as non-needed intermediate storage"), while getting rid of 'struct ustr', does not take any special care of 'dstring' fields and effectively use fixed field length instead of actual string length, encoded in the last byte of the field. Also, commit 484a10f49387e4386bf2708532e75bf78ffea2cb ("udf: Merge linux specific translation into CS0 conversion function") introduced checking of the length of the string being converted, requiring proper alignment to number of bytes constituing each character. The UDF volume identifier is represented as a 32-bytes 'dstring', and needs to be converted from CS0 to UTF8, while mounting UDF filesystem. The changes in mentioned commits can in some cases lead to incorrect handling of volume identifier: - if the actual string in 'dstring' is of maximal length and does not have zero bytes separating it from dstring encoded length in last byte, that last byte may be included in conversion, thus making incorrect resulting string; - if the identifier is encoded with 2-bytes characters (compression code is 16), the length of 31 bytes (32 bytes of field length minus 1 byte of compression code), taken as the string length, is reported as an incorrect (unaligned) length, and the conversion fails, which in its turn leads to volume mounting failure. This patch introduces handling of 'dstring' encoded length field in udf_CS0toUTF8 function, that is used in all and only cases when 'dstring' fields are converted. Currently these cases are processing of Volume Identifier and Volume Set Identifier fields. The function is also renamed to udf_dstrCS0toUTF8 to distinctly indicate that it handles 'dstring' input. Signed-off-by: Andrew Gabbasov Signed-off-by: Jan Kara fs/udf/super.c | 4 ++-- fs/udf/udfdecl.h | 2 +- fs/udf/unicode.c | 16 ++++++++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) commit 2c932d4c9165ddbe417af612dbe2113df7f2057e Author: Ashish Samant Date: Fri Mar 25 10:53:41 2016 -0700 fuse: Fix return value from fuse_get_user_pages() fuse_get_user_pages() should return error or 0. Otherwise fuse_direct_io read will not return 0 to indicate that read has completed. Fixes: 742f992708df ("fuse: return patrial success from fuse_direct_io()") Signed-off-by: Ashish Samant Signed-off-by: Seth Forshee Signed-off-by: Miklos Szeredi fs/fuse/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0a966b83873f33778710a4fc59240244b0734a5 Author: Krzysztof Kozlowski Date: Fri Apr 22 09:26:52 2016 +0200 ARM: EXYNOS: Properly skip unitialized parent clock in power domain on We want to skip reparenting a clock on turning on power domain, if we do not have the parent yet. The parent is obtained when turning the domain off. However due to a typo, the loop is continued on IS_ERR() of clock being reparented, not on the IS_ERR() of the parent. Theoretically this could lead to OOPS on first turn on of a power domain, if there was no turn off before. Practically that should never happen because all power domains are turned on by default (reset value, bootloader does not turn off them usually) so the first action will be always turn off. Fixes: 29e5eea06bc1 ("ARM: EXYNOS: Get current parent clock for power domain on/off") Reported-by: Vladimir Zapolskiy Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/pm_domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da67e68c0e4601e87612918496fd8c7d72795e50 Author: Eric Engestrom Date: Mon Apr 25 01:24:04 2016 +0100 Documentation: dt: arc: fix spelling mistakes Signed-off-by: Eric Engestrom Signed-off-by: Vineet Gupta Documentation/devicetree/bindings/arc/archs-pct.txt | 2 +- Documentation/devicetree/bindings/arc/pct.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 391a20333b8393ef2e13014e6e59d192c5594471 Author: Paolo Abeni Date: Thu Apr 21 22:23:31 2016 +0200 ipv4/fib: don't warn when primary address is missing if in_dev is dead After commit fbd40ea0180a ("ipv4: Don't do expensive useless work during inetdev destroy.") when deleting an interface, fib_del_ifaddr() can be executed without any primary address present on the dead interface. The above is safe, but triggers some "bug: prim == NULL" warnings. This commit avoids warning if the in_dev is dead Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 94862a62dfe3ba1c7601115a2dc80721c5b256f0 Author: Rafael J. Wysocki Date: Thu Apr 21 20:57:47 2016 +0200 Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC" Revert commit 0df35026c6a5 (cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC) that introduced a regression by causing the ondemand cpufreq governor to misbehave for CONFIG_TICK_CPU_ACCOUNTING unset (the frequency goes up to the max at one point and stays there indefinitely). The revert takes subsequent modifications of the code in question into account. Fixes: 0df35026c6a5 (cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC) Link: https://bugzilla.kernel.org/show_bug.cgi?id=115261 Reported-and-tested-by: Timo Valtoaho Cc: 4.5+ # 4.5+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 02da2d72174c61988eb4456b53f405e3ebdebce4 Author: Linus Torvalds Date: Sun Apr 24 16:17:05 2016 -0700 Linux 4.6-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91e019de2ff85fdcadacacb7623dac7a7c522258 Merge: 45c78e0 5fc7197 Author: David S. Miller Date: Sun Apr 24 14:51:50 2016 -0400 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== mlx5 driver updates and fixes Changes from V0: - Dropped: ("net/mlx5e: Reset link modes upon setting speed to zero") - Fixed compilation issue introduced to mlx5_ib driver. - Rebased to df637193906a ('Revert "Prevent NUll pointer dereference with two PHYs on cpsw"') This series has few bug fixes for mlx5 core and ethernet driver. Eli fixed a wrong static local variable declaration in flow steering API. Majd added the support of ConnectX-5 PF and VF and added the support for kernel shutdown pci callback for more robust reboot procedures. Maor fixed a soft lockup in flow steering. Rana fixed a wrog speed define in mlx5 EN driver. I also had the chance to introduce some bug fixes in mlx5 EN mtu reporting and handling. For -stable: net/mlx5_core: Fix soft lockup in steering error flow net/mlx5e: Device's mtu field is u16 and not int net/mlx5e: Fix minimum MTU net/mlx5e: Use vport MTU rather than physical port MTU ==================== Signed-off-by: David S. Miller commit 5fc7197d3a256d9c5de3134870304b24892a4908 Author: Majd Dibbiny Date: Fri Apr 22 00:33:07 2016 +0300 net/mlx5: Add pci shutdown callback This patch introduces kexec support for mlx5. When switching kernels, kexec() calls shutdown, which unloads the driver and cleans its resources. In addition, remove unregister netdev from shutdown flow. This will allow a clean shutdown, even if some netdev clients did not release their reference from this netdev. Releasing The HW resources only is enough as the kernel is shutting down Signed-off-by: Majd Dibbiny Signed-off-by: Tariq Toukan Signed-off-by: Haggai Abramovsky Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 23 +++++++++++++++++++---- include/linux/mlx5/driver.h | 7 ++++--- 3 files changed, 36 insertions(+), 9 deletions(-) commit 78228cbdeb0aa5c96e2a721e7e0d6953b416b5a3 Author: Eli Cohen Date: Fri Apr 22 00:33:06 2016 +0300 net/mlx5_core: Remove static from local variable The static is not required and breaks re-entrancy if it will be required. Fixes: 2530236303d9 ("net/mlx5_core: Flow steering tree initialization") Signed-off-by: Eli Cohen 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 cd255efff9baadd654d6160e52d17ae7c568c9d3 Author: Saeed Mahameed Date: Fri Apr 22 00:33:05 2016 +0300 net/mlx5e: Use vport MTU rather than physical port MTU Set and report vport MTU rather than physical MTU, Driver will set both vport and physical port mtu and will rely on the query of vport mtu. SRIOV VFs have to report their MTU to their vport manager (PF), and this will allow them to work with any MTU they need without failing the request. Also for some cases where the PF is not a port owner, PF can work with MTU less than the physical port mtu if set physical port mtu didn't take effect. Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 44 ++++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 40 +++++++++++++++++++++ include/linux/mlx5/vport.h | 2 ++ 3 files changed, 77 insertions(+), 9 deletions(-) commit d8edd2469ace550db707798180d1c84d81f93bca Author: Saeed Mahameed Date: Fri Apr 22 00:33:04 2016 +0300 net/mlx5e: Fix minimum MTU Minimum MTU that can be set in Connectx4 device is 68. This fixes the case where a user wants to set invalid MTU, the driver will fail to satisfy this request and the interface will stay down. It is better to report an error and continue working with old mtu. Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 046339eaab26804f52f6604877f5674f70815b26 Author: Saeed Mahameed Date: Fri Apr 22 00:33:03 2016 +0300 net/mlx5e: Device's mtu field is u16 and not int For set/query MTU port firmware commands the MTU field is 16 bits, here I changed all the "int mtu" parameters of the functions wrapping those firmware commands to be u16. Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/port.c | 10 +++++----- include/linux/mlx5/port.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) commit 64dbbdfef245f67504ec403a5aebfcc7b92bd8c1 Author: Majd Dibbiny Date: Fri Apr 22 00:33:02 2016 +0300 net/mlx5_core: Add ConnectX-5 to list of supported devices Add the upcoming ConnectX-5 devices (PF and VF) 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 | 2 ++ 1 file changed, 2 insertions(+) commit 6e4c21894673baabdbef03c3ac2458a28246128b Author: Rana Shahout Date: Fri Apr 22 00:33:01 2016 +0300 net/mlx5e: Fix MLX5E_100BASE_T define Bit 25 of eth_proto_capability in PTYS register is 1000Base-TT and not 100Base-T. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Rana Shahout 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_ethtool.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit c3f9bf628bc7edda298897d952f5e761137229c9 Author: Maor Gottlieb Date: Fri Apr 22 00:33:00 2016 +0300 net/mlx5_core: Fix soft lockup in steering error flow In the error flow of adding flow rule to auto-grouped flow table, we call to tree_remove_node. tree_remove_node locks the node's parent, however the node's parent is already locked by mlx5_add_flow_rule and this causes a deadlock. After this patch, if we failed to add the flow rule, we unlock the flow table before calling to tree_remove_node. fixes: f0d22d187473 ('net/mlx5_core: Introduce flow steering autogrouped flow table') Signed-off-by: Maor Gottlieb Reported-by: Amir Vadai Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 46 +++++++++-------------- 1 file changed, 17 insertions(+), 29 deletions(-) commit 45c78e0219405af1b0f31b06952dfd9bcf7ad1f6 Author: Manish Chopra Date: Thu Apr 21 13:25:20 2016 -0400 qlcnic: Update version to 5.3.64 Just updating the version as many fixes got accumulated over 5.3.63 Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c201b5a84edd6ee2f9a8548efaa813980839b46 Author: Marek Vasut Date: Thu Apr 21 14:11:50 2016 +0200 net: stmmac: socfpga: Remove re-registration of reset controller Both socfpga_dwmac_parse_data() in dwmac-socfpga.c and stmmac_dvr_probe() in stmmac_main.c functions call devm_reset_control_get() to register an reset controller for the stmmac. This results in an attempt to register two reset controllers for the same non-shared reset line. The first attempt to register the reset controller works fine. The second attempt fails with warning from the reset controller core, see below. The warning is produced because the reset line is non-shared and thus it is allowed to have only up-to one reset controller associated with that reset line, not two or more. The solution has multiple parts. First, the original socfpga_dwmac_init() is tweaked to use reset controller pointer from the stmmac_priv (private data of the stmmac core) instead of the local instance, which was used before. The local re-registration of the reset controller is removed. Next, the socfpga_dwmac_init() is moved after stmmac_dvr_probe() in the probe function. This order is legal according to Altera and it makes the code much easier, since there is no need to temporarily register and unregister the reset controller ; the reset controller is already registered by the stmmac_dvr_probe(). Finally, plat_dat->exit and socfpga_dwmac_exit() is no longer necessary, since the functionality is already performed by the stmmac core. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x218/0x270 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4-next-20160419-00015-gabb2477-dirty #4 Hardware name: Altera SOCFPGA [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x94/0xa8) [] (dump_stack) from [] (__warn+0xec/0x104) [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [] (warn_slowpath_null) from [] (__of_reset_control_get+0x218/0x270) [] (__of_reset_control_get) from [] (__devm_reset_control_get+0x54/0x90) [] (__devm_reset_control_get) from [] (stmmac_dvr_probe+0x1b4/0x8e8) [] (stmmac_dvr_probe) from [] (socfpga_dwmac_probe+0x1b8/0x28c) [] (socfpga_dwmac_probe) from [] (platform_drv_probe+0x4c/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x224/0x2bc) [] (driver_probe_device) from [] (__driver_attach+0xac/0xb0) [] (__driver_attach) from [] (bus_for_each_dev+0x6c/0xa0) [] (bus_for_each_dev) from [] (bus_add_driver+0x1a4/0x21c) [] (bus_add_driver) from [] (driver_register+0x78/0xf8) [] (driver_register) from [] (do_one_initcall+0x40/0x170) [] (do_one_initcall) from [] (kernel_init_freeable+0x1dc/0x27c) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 059d2fbe87608fa9 ]--- Signed-off-by: Marek Vasut Cc: Matthew Gerlach Cc: Dinh Nguyen Cc: David S. Miller Tested-by: Dinh Nguyen Signed-off-by: David S. Miller .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 50 +++++++--------------- 1 file changed, 16 insertions(+), 34 deletions(-) commit b6742cab0d79708d54774ce615c8c96ad71ce40b Merge: 3d05a06 4b1fb93 Author: David S. Miller Date: Sun Apr 24 14:32:05 2016 -0400 Merge branch 'macsec-fixes' Sabrina Dubroca says: ==================== macsec: a few fixes Some small fixes for the macsec driver: - possible NULL pointer dereferences - netlink dumps fixes: RTNL locking, consistent dumps - a reference counting bug - wrong name for uapi constant - a few memory leaks Patches 1 to 5 are the same as in v1, patches 6 to 9 are new. Patch 6 fixes the memleak that Lance spotted in v1. ==================== Signed-off-by: David S. Miller commit 4b1fb9352f351faa067a914907d58a6fe38ac048 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:09 2016 +0200 macsec: fix netlink attribute validation macsec_validate_attr should check IFLA_MACSEC_REPLAY_PROTECT (not IFLA_MACSEC_PROTECT) to verify that the replay protection and replay window arguments are correct. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 748164802c1bd2c52937d20782b07d8c68dd9a4f Author: Sabrina Dubroca Date: Fri Apr 22 11:28:08 2016 +0200 macsec: add missing macsec prefix in uapi I accidentally forgot some MACSEC_ prefixes in if_macsec.h. Fixes: dece8d2b78d1 ("uapi: add MACsec bits") Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 12 +++++++----- include/uapi/linux/if_macsec.h | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) commit 38787fc209580f9b5918e93e71da7c960dbb5d8d Author: Sabrina Dubroca Date: Fri Apr 22 11:28:07 2016 +0200 macsec: fix SA leak if initialization fails Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Reported-by: Lance Richardson Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 2 ++ 1 file changed, 2 insertions(+) commit 960d5848dbf1245cc3a310109897937207411c0c Author: Sabrina Dubroca Date: Fri Apr 22 11:28:06 2016 +0200 macsec: fix memory leaks around rx_handler (un)registration We leak a struct macsec_rxh_data when we unregister the rx_handler in macsec_dellink. We also leak a struct macsec_rxh_data in register_macsec_dev if we fail to register the rx_handler. 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 96cfc5052c5d434563873caa7707b32b9e389b16 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:05 2016 +0200 macsec: add consistency check to netlink dumps Use genl_dump_check_consistent in dump_secy. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Suggested-by: Johannes Berg Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c3b7d0bd7ac2c501d4806db71ddd383c184968e8 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:04 2016 +0200 macsec: fix rx_sa refcounting with decrypt callback The decrypt callback macsec_decrypt_done needs a reference on the rx_sa and releases it before returning, but macsec_handle_frame already put that reference after macsec_decrypt returned NULL. Set rx_sa to NULL when the decrypt callback runs so that macsec_handle_frame knows it must not release the reference. 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 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 497f358aa4c0d99b75ec204407389920d5e33ec5 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:03 2016 +0200 macsec: don't put a NULL rxsa The "deliver:" path of macsec_handle_frame can be called with rx_sa == NULL. Check rx_sa != NULL before calling macsec_rxsa_put(). 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c10c63ea739bce3b8a6ab85c7bb472d900c9b070 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:02 2016 +0200 macsec: take rtnl lock before for_each_netdev Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Reported-by: Johannes Berg Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 72f2a05b8f367ee0d75584a6fbec7dbe7c144f27 Author: Sabrina Dubroca Date: Fri Apr 22 11:28:01 2016 +0200 macsec: add missing NULL check after kmalloc Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Reported-by: Dan Carpenter Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d05a06d313d602f7cd589d5d8d45bd04902adcb Merge: f75cfba 45ebcce Author: David S. Miller Date: Sun Apr 24 14:23:38 2016 -0400 Merge branch 'bridge-mdb-fixes' Jiri Pirko says: ==================== bridge: mdb: Couple of fixes Elad says: This patchset fixes two problems reported by Nikolay Aleksandrov. The first problem is that the MDB offload flag might be accesed without helding the multicast_lock. The second problem is that the switchdev mdb offload is deferred and the offload bit was marked regardless if the operation succeeded or not. ==================== Signed-off-by: David S. Miller commit 45ebcce56823d14d196dbdecd26783b3d5f464a6 Author: Elad Raz Date: Thu Apr 21 12:52:45 2016 +0200 bridge: mdb: Marking port-group as offloaded There is a race-condition when updating the mdb offload flag without using the mulicast_lock. This reverts commit 9e8430f8d60d98 ("bridge: mdb: Passing the port-group pointer to br_mdb module"). This patch marks offloaded MDB entry as "offload" by changing the port- group flags and marks it as MDB_PG_FLAGS_OFFLOAD. When switchdev PORT_MDB succeeded and adds a multicast group, a completion callback is been invoked "br_mdb_complete". The completion function locks the multicast_lock and finds the right net_bridge_port_group and marks it as offloaded. Fixes: 9e8430f8d60d98 ("bridge: mdb: Passing the port-group pointer to br_mdb module") Reported-by: Nikolay Aleksandrov Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_mdb.c | 91 +++++++++++++++++++++++++++++++++-------------- net/bridge/br_multicast.c | 8 +++-- net/bridge/br_private.h | 4 +-- 3 files changed, 71 insertions(+), 32 deletions(-) commit 6dd684c0feb207f30180570bad24264b922d9476 Author: Elad Raz Date: Thu Apr 21 12:52:44 2016 +0200 bridge: mdb: Common function for mdb entry translation There is duplicate code that translates br_mdb_entry to br_ip let's wrap it in a common function. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_mdb.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 7ceb2afbd6aee4643056b47156baad6841db8e78 Author: Elad Raz Date: Thu Apr 21 12:52:43 2016 +0200 switchdev: Adding complete operation to deferred switchdev ops When using switchdev deferred operation (SWITCHDEV_F_DEFER), the operation is executed in different context and the application doesn't have any way to get the operation real status. Adding a completion callback fixes that. This patch adds fields to switchdev_attr and switchdev_obj "complete_priv" field which is used by the "complete" callback. Application can set a complete function which will be called once the operation executed. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/switchdev.h | 4 ++++ net/switchdev/switchdev.c | 6 ++++++ 2 files changed, 10 insertions(+) commit f75cfbaddeef943aed479b80415c3dcc63ff4247 Author: Grygorii Strashko Date: Thu Apr 21 13:13:56 2016 +0300 MAINTAINERS: net: add entry for TI Ethernet Switch drivers Add record for TI Ethernet Switch Driver CPSW/CPDMA/MDIO HW (am33/am43/am57/dr7/davinci) to ensure that related patches will go through dedicated linux-omap list. Also add Mugunthan as maintainer and myself as the reviewer. Cc: "David S. Miller" Cc: Tony Lindgren Cc: Mugunthan V N Cc: Richard Cochran Signed-off-by: Grygorii Strashko Acked-by: Mugunthan V N Acked-by: Tony Lindgren Signed-off-by: David S. Miller MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 613ac23a46e10d4d4339febdd534fafadd68e059 Author: Jasem Mutlaq Date: Tue Apr 19 10:38:27 2016 +0300 USB: serial: cp210x: add Straizona Focusers device ids Adding VID:PID for Straizona Focusers to cp210x driver. Signed-off-by: Jasem Mutlaq Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) commit 1d377f4d690637a0121eac8701f84a0aa1e69a69 Author: Mike Manning Date: Mon Apr 18 12:13:23 2016 +0000 USB: serial: cp210x: add ID for Link ECU The Link ECU is an aftermarket ECU computer for vehicles that provides full tuning abilities as well as datalogging and displaying capabilities via the USB to Serial adapter built into the device. Signed-off-by: Mike Manning Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f Author: Linus Lüssing Date: Fri Mar 11 14:04:49 2016 +0100 batman-adv: Fix broadcast/ogm queue limit on a removed interface When removing a single interface while a broadcast or ogm packet is still pending then we will free the forward packet without releasing the queue slots again. This patch is supposed to fix this issue. Fixes: 6d5808d4ae1b ("batman-adv: Add missing hardif_free_ref in forw_packet_free") Signed-off-by: Linus Lüssing [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/send.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d1a65f1741bfd9c69f9e4e2ad447a89b6810427d Author: Sven Eckelmann Date: Sun Mar 20 12:27:53 2016 +0100 batman-adv: Reduce refcnt of removed router when updating route _batadv_update_route rcu_derefences orig_ifinfo->router outside of a spinlock protected region to print some information messages to the debug log. But this pointer is not checked again when the new pointer is assigned in the spinlock protected region. Thus is can happen that the value of orig_ifinfo->router changed in the meantime and thus the reference counter of the wrong router gets reduced after the spinlock protected region. Just rcu_dereferencing the value of orig_ifinfo->router inside the spinlock protected region (which also set the new pointer) is enough to get the correct old router object. Fixes: e1a5382f978b ("batman-adv: Make orig_node->router an rcu protected pointer") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/routing.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f2d23861b818d08bcd15cc1612ae94aa33b3931c Author: Sven Eckelmann Date: Sat Mar 19 13:55:21 2016 +0100 batman-adv: Deactivate TO_BE_ACTIVATED hardif on shutdown The shutdown of an batman-adv interface can happen with one of its slave interfaces still being in the BATADV_IF_TO_BE_ACTIVATED state. A possible reason for it is that the routing algorithm BATMAN_V was selected and batadv_schedule_bat_ogm was not yet called for this interface. This slave interface still has to be set to BATADV_IF_INACTIVE or the batman-adv interface will never reduce its usage counter and thus never gets shutdown. This problem can be simulated via: $ modprobe dummy $ modprobe batman-adv routing_algo=BATMAN_V $ ip link add bat0 type batadv $ ip link set dummy0 master bat0 $ ip link set dummy0 up $ ip link del bat0 unregister_netdevice: waiting for bat0 to become free. Usage count = 3 Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/hard-interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e48474ed8a217b7f80f2a42bc05352406a06cb67 Author: Marek Lindner Date: Fri Mar 11 16:01:09 2016 +0100 batman-adv: init neigh node last seen field Signed-off-by: Marek Lindner [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 1 + 1 file changed, 1 insertion(+) commit c78296665c3d81f040117432ab9e1cb125521b0c Author: Sven Eckelmann Date: Fri Feb 26 17:56:13 2016 +0100 batman-adv: Check skb size before using encapsulated ETH+VLAN header The encapsulated ethernet and VLAN header may be outside the received ethernet frame. Thus the skb buffer size has to be checked before it can be parsed to find out if it encapsulates another batman-adv packet. Fixes: 420193573f11 ("batman-adv: softif bridge loop avoidance") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/soft-interface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 913f201083c81cf021f050d041352ac854c4b526 Merge: 4dfa573 a6f4850 Author: Linus Torvalds Date: Sat Apr 23 17:15:39 2016 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal fixes from Eduardo Valentin: "Specifics in this pull request: - Fixes in mediatek and OF thermal drivers - Fixes in power_allocator governor - More fixes of unsigned to int type change in thermal_core.c. These change have been CI tested using KernelCI bot. \o/" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: fix Mediatek thermal controller build thermal: consistently use int for trip temp thermal: fix mtk_thermal build dependency thermal: minor mtk_thermal.c cleanups thermal: power_allocator: req_range multiplication should be a 64 bit type thermal: of: add __init attribute commit 4dfa5739d9e135fa3731f3acfbc618e384c351d2 Merge: 1ad9bf9 987aedb Author: Linus Torvalds Date: Sat Apr 23 14:53:11 2016 -0700 Merge tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic update from Arnd Bergmann: "Here is one patch to wire up the preadv/pwritev system calls in the generic system call table, which is required for all architectures that were merged in the last few years, including arm64. Usually these get merged along with the syscall implementation or one of the architecture trees, but this time that did not happen. Andre and Christoph both sent a version of this patch, I picked the one I got first" * tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: generic syscalls: wire up preadv2 and pwritev2 syscalls commit 987aedb5d6f6e10c5203c6d0aab9a60ec22c7e93 Author: Andre Przywara Date: Mon Apr 11 10:17:46 2016 +0100 generic syscalls: wire up preadv2 and pwritev2 syscalls These new syscalls are implemented as generic code, so enable them for architectures like arm64 which use the generic syscall table. Signed-off-by: Andre Przywara Signed-off-by: Arnd Bergmann include/uapi/asm-generic/unistd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 92f27f98ceb2d457c97cb032349bbf2f776420d0 Merge: 56896ef 10c0f0e Author: Arnd Bergmann Date: Sat Apr 23 22:10:48 2016 +0200 Merge tag 'qcom-fixes-for-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes Merge "Qualcomm Fixes for v4.6-rc2" from Andy Gross: * Revert BAM usage on MSM8974 boards * tag 'qcom-fixes-for-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: Revert "dts: msm8974: Add dma channels for blsp2_i2c1 node" Revert "dts: msm8974: Add blsp2_bam dma node" commit 56896ef5b990a3822da45f92e548c4c8ac301bb4 Author: Masahiro Yamada Date: Fri Apr 15 19:30:46 2016 +0900 arm64: dts: uniphier: fix I2C nodes of PH1-LD20 The I2C hardware blocks on this SoC are connected as follows: I2C0: external connection I2C1: external connection I2C2: internal connection I2C3: external connection I2C4: external connection I2C5: internal connection I2C6: no connection (not accessible) Delete pinctrl from Ch2, add pinctrl to Ch4, and remove the Ch6 node. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann .../boot/dts/socionext/uniphier-ph1-ld20-ref.dts | 1 - arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi | 20 +++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) commit 1ad9bf9fdc29d36baa2db1d0f09ec684ff915f2b Merge: 82b23cb ea5dfb5 Author: Linus Torvalds Date: Sat Apr 23 12:07:29 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: two EDAC driver fixes, a Xen crash fix, a HyperV log spam fix and a documentation fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86 EDAC, sb_edac.c: Take account of channel hashing when needed x86 EDAC, sb_edac.c: Repair damage introduced when "fixing" channel address x86/mm/xen: Suppress hugetlbfs in PV guests x86/doc: Correct limits in Documentation/x86/x86_64/mm.txt x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances commit 82b23cb94b8cee25781c209d9b1df3b144c8bb5f Merge: 0e11d25 a19cad6 3b9d6da 16eeed7 Author: Linus Torvalds Date: Sat Apr 23 11:45:52 2016 -0700 Merge branches 'perf-urgent-for-linus', 'smp-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf, cpu hotplug and timer fixes from Ingo Molnar: "perf: - A single tooling fix for a user-triggerable segfault. CPU hotplug: - Fix a CPU hotplug corner case regression, introduced by the recent hotplug rework timers: - Fix a boot hang in the ARM based Tango SoC clocksource driver" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf intel-pt: Fix segfault tracing transactions * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Fix rollback during error-out in __cpu_disable() * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test commit 0e11d256512c5166e03c9e9f221f9371bd42911e Merge: 16ecb41 fba7cd6 Author: Linus Torvalds Date: Sat Apr 23 11:39:48 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: pvqspinlocks: - an instrumentation fix futexes: - preempt-count vs pagefault_disable decouple corner case fix - futex requeue plist race window fix - futex UNLOCK_PI transaction fix for a corner case" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic() futex: Acknowledge a new waiter in counter before plist futex: Handle unlock_pi race gracefully locking/pvqspinlock: Fix division by zero in qstat_read() commit 16ecb414101353fd93773a47d39eac4b93af02e9 Merge: 6527efb 91951f9 Author: Linus Torvalds Date: Sat Apr 23 11:34:39 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: "A core irq affinity masks related fix and a MIPS irqchip driver fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips-gic: Don't overrun pcpu_masks array genirq: Dont allow affinity mask to be updated on IPIs commit 6527efba38a06410f19670adba8a1951f8fe3d3c Merge: 68dc08b c2bb9e3 Author: Linus Torvalds Date: Sat Apr 23 11:25:01 2016 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "A handful of objtool fixes: two improvements to how warnings are printed plus a false positive warning fix, and build environment fix" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix Makefile to properly see if libelf is supported objtool: Detect falling through to the next function objtool: Add workaround for GCC switch jump table bug commit 68dc08b5802f606b5b50dde558533b643b6d9526 Merge: 8e3ae37 d40d334 Author: Linus Torvalds Date: Sat Apr 23 11:20:03 2016 -0700 Merge tag 'usb-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / PHY driver fixes from Greg KH: "Here are two small sets of patches, both from subsystem trees, USB gadget and PHY drivers. Full details are in the shortlog, and they have all been in linux-next for a while (before I merged them to the USB tree)" * tag 'usb-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: f_fs: Fix use-after-free usb: dwc3: gadget: Fix suspend/resume during device mode usb: dwc3: fix memory leak of dwc->regset usb: dwc3: core: fix PHY handling during suspend usb: dwc3: omap: fix up error path on probe() usb: gadget: composite: Clear reserved fields of SSP Dev Cap phy: rockchip-emmc: adapt binding to specifiy register offset and length phy: rockchip-emmc: should be a child device of the GRF phy: rockchip-dp: should be a child device of the GRF commit 8e3ae37acca382b3050d6e8e413520d386e0d6ee Merge: f9d1e7f f077b73 Author: Linus Torvalds Date: Sat Apr 23 11:13:46 2016 -0700 Merge tag 'tty-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial fixes from Greg KH: "Here are 3 serial driver fixes for issues that have been reported. Two are reverts, fixing problems that were in the big TTY/Serial driver merge in 4.6-rc1, and the last one is a simple bugfix for a regression that showed up in 4.6-rc1 as well. All have been in linux-next with no reported issues" * tag 'tty-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: 8250: Add hardware dependency to RT288X option" tty/serial/8250: fix RS485 half-duplex RX Revert "serial-uartlite: Constify uartlite_be/uartlite_le" commit f9d1e7f389b3724ee7d6dde7427b10806bc66577 Merge: 09502d9 dcc7597 Author: Linus Torvalds Date: Sat Apr 23 11:04:26 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem fixes from Dmitry Torokhov: "Just minor driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: twl4030-vibra - do not reparent to grandparent Input: twl6040-vibra - do not reparent to grandparent Input: twl6040-vibra - ignore return value of schedule_work Input: twl6040-vibra - fix NULL pointer dereference by removing workqueue Input: pmic8xxx-pwrkey - fix algorithm for converting trigger delay Input: arizona-haptic - don't assign input_dev parent Input: clarify we want BTN_TOOL_ on proximity Input: xpad - add Mad Catz FightStick TE 2 VID/PID Input: gtco - fix crash on detecting device without endpoints commit 75dd602a5198a6e5f75534db52b6e6fbaabb33d1 Author: Peter Zijlstra Date: Wed Mar 30 11:36:59 2016 +0200 lockdep: Fix lock_chain::base size lock_chain::base is used to store an index into the chain_hlocks[] array, however that array contains more elements than can be indexed using the u16. Change the lock_chain structure to use a bitfield to encode the data it needs and add BUILD_BUG_ON() assertions to check the fields are wide enough. Also, for DEBUG_LOCKDEP, assert that we don't run out of elements of that array; as that would wreck the collision detectoring. Signed-off-by: Peter Zijlstra (Intel) Cc: Alfredo Alvarez Fernandez Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sedat Dilek Cc: Theodore Ts'o Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160330093659.GS3408@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/linux/lockdep.h | 8 +++++--- kernel/locking/lockdep.c | 24 +++++++++++++++++++++++- kernel/locking/lockdep_proc.c | 2 ++ 3 files changed, 30 insertions(+), 4 deletions(-) commit c24697566298df04cac9913e0601501b5ee2b3f5 Author: Boqun Feng Date: Tue Feb 16 13:57:40 2016 +0800 locking/lockdep: Fix ->irq_context calculation task_irq_context() returns the encoded irq_context of the task, the return value is encoded in the same as ->irq_context of held_lock. Always return 0 if !(CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING) Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Josh Triplett Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: sasha.levin@oracle.com Link: http://lkml.kernel.org/r/1455602265-16490-2-git-send-email-boqun.feng@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b303e7c15d53cd8ef6b349b702e07eee3f102792 Author: Peter Zijlstra Date: Mon Apr 4 09:57:40 2016 +0200 perf/core: Make sysctl_perf_cpu_time_max_percent conform to documentation Markus reported that 0 should also disable the throttling we per Documentation/sysctl/kernel.txt. Reported-by: Markus Trippelsdorf Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 91a612eea9a3 ("perf/core: Fix dynamic interrupt throttle") Signed-off-by: Ingo Molnar kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1089602a3bf3efd13d0ffc575f3e22213f009da Author: Srinivas Pandruvada Date: Sun Apr 17 08:43:29 2016 -0700 perf/x86/intel/rapl: Add missing Haswell model Added one missing Haswell model. Signed-off-by: Srinivas Pandruvada Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: bp@alien8.de Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/1460907809-11897-1-git-send-email-srinivas.pandruvada@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 1 + 1 file changed, 1 insertion(+) commit b89c173788c3a8ed571652c203bf59a0e9d700aa Author: Andi Kleen Date: Fri Apr 15 13:25:33 2016 -0700 perf/x86/intel: Add model number for Skylake Server to perf Everything the same as base Skylake, just a new model number. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1460751933-2264-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 1 + 1 file changed, 1 insertion(+) commit 707e59ba494372a90d245f18b0c78982caa88e48 Author: Ross Lagerwall Date: Fri Apr 22 13:05:31 2016 +0100 xen/qspinlock: Don't kick CPU if IRQ is not initialized The following commit: 1fb3a8b2cfb2 ("xen/spinlock: Fix locking path engaging too soon under PVHVM.") ... moved the initalization of the kicker interrupt until after native_cpu_up() is called. However, when using qspinlocks, a CPU may try to kick another CPU that is spinning (because it has not yet initialized its kicker interrupt), resulting in the following crash during boot: kernel BUG at /build/linux-Ay7j_C/linux-4.4.0/drivers/xen/events/events_base.c:1210! invalid opcode: 0000 [#1] SMP ... RIP: 0010:[] [] xen_send_IPI_one+0x59/0x60 ... Call Trace: [] xen_qlock_kick+0xe/0x10 [] __pv_queued_spin_unlock+0xb2/0xf0 [] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20 [] ? check_tsc_warp+0x76/0x150 [] check_tsc_sync_source+0x96/0x160 [] native_cpu_up+0x3d8/0x9f0 [] xen_hvm_cpu_up+0x35/0x80 [] _cpu_up+0x13c/0x180 [] cpu_up+0x7a/0xa0 [] smp_init+0x7f/0x81 [] kernel_init_freeable+0xef/0x212 [] ? rest_init+0x80/0x80 [] kernel_init+0xe/0xe0 [] ret_from_fork+0x3f/0x70 [] ? rest_init+0x80/0x80 To fix this, only send the kick if the target CPU's interrupt has been initialized. This check isn't racy, because the target is waiting for the spinlock, so it won't have initialized the interrupt in the meantime. Signed-off-by: Ross Lagerwall Reviewed-by: Boris Ostrovsky Cc: David Vrabel Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Ingo Molnar arch/x86/xen/spinlock.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f4e7de63ab273b6a5e35c82eb4fc6363c855ddd4 Author: Doug Ledford Date: Fri Apr 22 20:14:58 2016 -0400 IB/core: Fix oops in ib_cache_gid_set_default_gid When we fail to find the default gid index, we can't continue processing in this routine or else we will pass a negative index to later routines resulting in invalid memory access attempts and a kernel oops. Fixes: 03db3a2d81e6 (IB/core: Add RoCE GID table management) Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6d939bfd43271d7ab0b411d830ab62d835d8536 Merge: 22c49e5 fc26fe9 Author: Kevin Hilman Date: Fri Apr 22 16:55:05 2016 -0700 Merge tag 'imx-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes Merge "ARM: i.MX fixes for 4.6" from Shawn Guo: The i.MX fixes for 4.6: - The sdhci-esdhc-imx DMA support is broken due to commit 7b91369b4655 ("mmc: sdhci: Set DMA mask when adding host"). It requires device's dma_mask be set up properly to get DMA work. The fixing patch initializes the DMA mask to enable the access again. * tag 'imx-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mach-imx: sdhci-esdhc-imx: initialize DMA mask commit 22c49e5a09ec6af0c2355503b880a4083facdcf2 Merge: c95e2e7 1560d15 Author: Kevin Hilman Date: Fri Apr 22 16:52:55 2016 -0700 Merge tag 'omap-for-v4.6/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Merge "omap fixes for v4.6-rc cycle" from Tony Lindgren: Fixes for omaps for v4.6-rc cycle: - Clockdomain fix for dra7 timer interrupts - Two fixes for GPMC EDMA binding, I missed the need for a merge with GPMC changes and EDMA changes - Fix beagle-x15 eSATA by dropping misconfigured extcon_usb1 - Fix occasional external aborts on 36xx with PM that we've been chasing for past few months. It turned out to be duplicate restore of INTC registers that can in some cases cause us to hit erratum 1.106. * tag 'omap-for-v4.6/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP3: Fix external abort on 36xx waking from off mode idle ARM: dts: am57xx-beagle-x15: remove extcon_usb1 ARM: dts: am437x: Fix GPMC dma properties ARM: dts: am33xx: Fix GPMC dma properties ARM: DRA7: clockdomain: Implement timer workaround for errata i874 commit 09502d9fffd84d22dd1fba9fd4cf0d880a5da377 Merge: ddce192 56b367c Author: Linus Torvalds Date: Fri Apr 22 11:52:49 2016 -0700 Merge tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Some pin control driver fixes came in. One headed for stable and the other two are just ordinary merge window fixes. - Make the i.MX driver select REGMAP as a dependency - Fix up the Mediatek debounce time unit - Fix a real hairy ffs vs __ffs issue in the Single pinctrl driver" * tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce pinctrl: imx: Kconfig: PINCTRL_IMX select REGMAP commit 630ba0cc7a6dbafbdee43795617c872b35cde1b4 Author: Laszlo Ersek Date: Thu Apr 21 18:21:11 2016 +0200 efi: Fix out-of-bounds read in variable_matches() The variable_matches() function can currently read "var_name[len]", for example when: - var_name[0] == 'a', - len == 1 - match_name points to the NUL-terminated string "ab". This function is supposed to accept "var_name" inputs that are not NUL-terminated (hence the "len" parameter"). Document the function, and access "var_name[*match]" only if "*match" is smaller than "len". Reported-by: Chris Wilson Signed-off-by: Laszlo Ersek Cc: Peter Jones Cc: Matthew Garrett Cc: Jason Andryuk Cc: Jani Nikula Cc: # v3.10+ Link: http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/86906 Signed-off-by: Matt Fleming drivers/firmware/efi/vars.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit ddce192106e4f984123884f8e878f66ace94b573 Merge: ff06162 882416c Author: Linus Torvalds Date: Fri Apr 22 11:11:15 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Cache invalidation fix for early CPU boot status update (incorrect cacheline) - of_put_node() missing in the spin_table code - EL1/El2 early init inconsistency when Virtualisation Host Extensions are present - RCU warning fix in the arm_pmu.c driver * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix EL1/EL2 early init inconsistencies with VHE drivers/perf: arm-pmu: fix RCU usage on pmu resume from low-power arm64: spin-table: add missing of_node_put() arm64: fix invalidation of wrong __early_cpu_boot_status cacheline commit ff061624e1afad3b556fcc8df23898014b47bc7e Merge: 7c5047a 4705e02 Author: Linus Torvalds Date: Fri Apr 22 10:53:12 2016 -0700 Merge tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Three powerpc cpu feature fixes from Anton Blanchard: - scan_features() updated incorrect bits for REAL_LE - update cpu_user_features2 in scan_features() - update TM user feature bits in scan_features()" * tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Update TM user feature bits in scan_features() powerpc: Update cpu_user_features2 in scan_features() powerpc: scan_features() updates incorrect bits for REAL_LE commit 7c5047a124cbfd7be0648c1cf41f802cf7e6918d Merge: d61fb48 9800699 Author: Linus Torvalds Date: Fri Apr 22 10:41:31 2016 -0700 Merge tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "The fixes include: - Two patches to revert the use of default domains in the ARM SMMU driver. Enabling this caused regressions which need more thorough fixing. So the regressions are fixed for now by disabling the use of default domains. - A fix for a v4.4 regression in the AMD IOMMU driver which broke devices behind invisible PCIe-to-PCI bridges with IOMMU enabled" * tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/arm-smmu: Don't allocate resources for bypass domains iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA iommu/amd: Fix checking of pci dma aliases commit d61fb48b2f81979195ed04bc555a4d859995a554 Merge: d4b0528 18cdfe751 Author: Linus Torvalds Date: Fri Apr 22 10:29:52 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "i915, nouveau and amdgpu/radeon fixes in this: nouveau: Two fixes, one for a regression with dithering and one for a bug hit by the userspace drivers. i915: A few fixes, mostly things heading for stable, two important skylake GT3/4 hangs. radeon/amdgpu: Some audio, suspend/resume and some runtime PM fixes, along with two patches to harden the userptr ABI a bit" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits) drm: Loongson-3 doesn't fully support wc memory drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries amdgpu/uvd: add uvd fw version for amdgpu drm/amdgpu: forbid mapping of userptr bo through radeon device file drm/radeon: forbid mapping of userptr bo through radeon device file drm/amdgpu: bump the afmt limit for CZ, ST, Polaris drm/amdgpu: use defines for CRTCs and AMFT blocks drm/dp/mst: Validate port in drm_dp_payload_send_msg() drm/nouveau/kms: fix setting of default values for dithering properties drm/radeon: print a message if ATPX dGPU power control is missing Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control" drm/amdgpu/acp: fix resume on CZ systems with AZ audio drm/radeon: add a quirk for a XFX R9 270X drm/radeon: print pci revision as well as pci ids on driver load drm/i915: Use fw_domains_put_with_fifo() on HSW drm/i915: Force ringbuffers to not be at offset 0 drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs drm/i915/skl: Fix rc6 based gpu/system hang drm/i915/userptr: Hold mmref whilst calling get-user-pages ... commit d4b05288271040217c46440a1dc246357ac301d2 Merge: 5f44abd 3194ed4 Author: Linus Torvalds Date: Fri Apr 22 10:17:18 2016 -0700 Merge tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Again a relatively calm week without surprise: most of fixes are about HD-audio, including fixes for Cirrus codec regression and a race over regmap access. Although both change are slightly unintuitive, the risk of further breakage is quite low, I hope. Other than that, all the rest are trivial" * tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix possible race on regmap bypass flip ALSA: pcxhr: Fix missing mutex unlock ALSA: hda - add PCI ID for Intel Broxton-T ALSA: hda - Keep powering up ADCs on Cirrus codecs ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap ALSA: hda - Don't trust the reported actual power state commit c95e2e7eddfa571dccc8cfe645c790ff7fb7e2e0 Merge: c0e3091 c531fb2 Author: Kevin Hilman Date: Fri Apr 22 09:58:48 2016 -0700 Merge tag 'renesas-fixes-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Merge "Renesas ARM Based SoC Fixes for v4.6" from Simon Horman: Renesas ARM Based SoC Fixes for v4.6 * Correct preset_lpj calculation which may lead to too short delays * Correct handling of optional clocks on r8a7791 to restore access to the serial port the porter board * tag 'renesas-fixes-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: 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 c0e309138be2e4ba1551dde76f7fa2479cd9198d Merge: 2193a3f 3d51ae1 Author: Kevin Hilman Date: Fri Apr 22 09:45:53 2016 -0700 Merge tag 'omap-for-v4.6/fixes-rc2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Merge "omap fixes against v4.6-rc2" from Tony Lindgren Fixes for omaps against v4.6-rc2, mostly to fix suspend for beagle-x15 that broke when we added runtime based SoC revision detection earlier. It seems suspend worked earlier as things were only partially initialized, while now we initialize things properly for dra7. Note that the "ARM: OMAP: Catch callers of revision information prior to it being populated" had to be reverted as it caused bogus warnings for other SoCs because omap initcalls bail out based on revision being set to 0 for other SoCs. These initcalls will mostly just disappear when we drop support for omap3 legacy booting. Also included is a fix for dra7 sys_32k_ck clock source that is not enabled on boot making system fall back to using emulated clock. * tag 'omap-for-v4.6/fixes-rc2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (198 commits) Revert "ARM: OMAP: Catch callers of revision information prior to it being populated" ARM: OMAP: Catch callers of revision information prior to it being populated ARM: dts: dra7: Correct clock tree for sys_32k_ck ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen Linux 4.6-rc2 v4l2-mc: avoid warning about unused variable Convert straggling drivers to new six-argument get_user_pages() .mailmap: add Christophe Ricard Make CONFIG_FHANDLE default y mm/page_isolation.c: fix the function comments oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head mm/page_isolation: fix tracepoint to mirror check function behavior mm/rmap: batched invalidations should use existing api x86/mm: TLB_REMOTE_SEND_IPI should count pages mm: fix invalid node in alloc_migrate_target() include/linux/huge_mm.h: return NULL instead of false for pmd_trans_huge_lock() mm, kasan: fix compilation for CONFIG_SLAB MAINTAINERS: orangefs mailing list is subscribers-only net: mvneta: fix changing MTU when using per-cpu processing ... commit 10ff4c5239a137abfc896ec73ef3d15a0f86a16a Author: Javier Martinez Canillas Date: Sat Apr 16 21:14:52 2016 -0400 i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared The exynos5 I2C controller driver always prepares and enables a clock before using it and then disables unprepares it when the clock is not used anymore. But this can cause a possible ABBA deadlock in some scenarios since a driver that uses regmap to access its I2C registers, will first grab the regmap lock and then the I2C xfer function will grab the prepare lock when preparing the I2C clock. But since the clock driver also uses regmap for I2C accesses, preparing a clock will first grab the prepare lock and then the regmap lock when using the regmap API. An example of this happens on the Exynos5422 Odroid XU4 board where a s2mps11 PMIC is used and both the s2mps11 regulators and clk drivers share the same I2C regmap. The possible deadlock is reported by the kernel lockdep: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sec_core:428:(regmap)->lock); lock(prepare_lock); lock(sec_core:428:(regmap)->lock); lock(prepare_lock); *** DEADLOCK *** Fix it by leaving the code prepared on probe and use {en,dis}able in the I2C transfer function. This patch is similar to commit 34e81ad5f0b6 ("i2c: s3c2410: fix ABBA deadlock by keeping clock prepared") that fixes the same bug in other driver for an I2C controller found in Samsung SoCs. Reported-by: Anand Moon Signed-off-by: Javier Martinez Canillas Reviewed-by: Anand Moon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-exynos5.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 609d5a1b2b35bb62b4b3750396e55453160c2a17 Author: Michael Ellerman Date: Wed Apr 13 13:59:14 2016 +1000 i2c: cpm: Fix build break due to incompatible pointer types Since commit ea8daa7b9784 ("kbuild: Add option to turn incompatible pointer check into error"), assignments from an incompatible pointer types have become a hard error, eg: drivers/i2c/busses/i2c-cpm.c:545:91: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type Fix the build break by converting txdma & rxdma to dma_addr_t. Signed-off-by: Michael Ellerman Signed-off-by: Wolfram Sang Cc: stable@kernel.org Fixes: ea8daa7b9784 drivers/i2c/busses/i2c-cpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9676fa152c83b82137af950b1d4f629045d90c9 Author: Evgeny Voevodin Date: Wed Mar 23 12:26:52 2016 +0300 ARCv2: Enable LOCKDEP - The asm helpers for calling into irq tracer were missing - Add calls to above helpers in low level assembly entry code for ARCv2 - irq_save() uses CLRI to disable interrupts and returns the prev interrupt state (in STATUS32) in a specific encoding (and not the raw value of STATUS32). This is usable with SETI in irq_restore(). However save_flags() reads the raw value of STATUS32 which doesn't pair with irq_save/restore() and thus needs fixing. Signed-off-by: Evgeny Voevodin [vgupta: updated changelog and also added some comments] Signed-off-by: Vineet Gupta arch/arc/include/asm/irqflags-arcv2.h | 36 ++++++++++++++++++++++++++++++++++- arch/arc/kernel/entry-arcv2.S | 10 +++++++++- arch/arc/kernel/entry-compact.S | 3 +++ 3 files changed, 47 insertions(+), 2 deletions(-) commit d40d334743776937132d3a0c5a203d245407e5a7 Merge: 5813dea 5128de8 Author: Greg Kroah-Hartman Date: Fri Apr 22 17:13:24 2016 +0900 Merge tag 'phy-for-4.6-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.6-rc *) make rockchip-dp and rockchip-emmc PHY child device of GRF Signed-off-by: Kishon Vijay Abraham I commit ea5dfb5fae81939f777ca569d8cfb599252da2e8 Author: Tony Luck Date: Thu Apr 14 10:22:02 2016 -0700 x86 EDAC, sb_edac.c: Take account of channel hashing when needed Haswell and Broadwell can be configured to hash the channel interleave function using bits [27:12] of the physical address. On those processor models we must check to see if hashing is enabled (bit21 of the HASWELL_HASYSDEFEATURE2 register) and act accordingly. Based on a patch by patrickg Tested-by: Patrick Geary Signed-off-by: Tony Luck Acked-by: Mauro Carvalho Chehab Cc: Aristeu Rozanski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar drivers/edac/sb_edac.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit ff15e95c82768d589957dbb17d7eb7dba7904659 Author: Tony Luck Date: Thu Apr 14 10:21:52 2016 -0700 x86 EDAC, sb_edac.c: Repair damage introduced when "fixing" channel address In commit: eb1af3b71f9d ("Fix computation of channel address") I switched the "sck_way" variable from holding the log2 value read from the h/w to instead be the actual number. Unfortunately it is needed in log2 form when used to shift the address. Tested-by: Patrick Geary Signed-off-by: Tony Luck Acked-by: Mauro Carvalho Chehab Cc: Aristeu Rozanski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac@vger.kernel.org Cc: stable@vger.kernel.org Fixes: eb1af3b71f9d ("Fix computation of channel address") Signed-off-by: Ingo Molnar drivers/edac/sb_edac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5813dea9f33fff0420eab6b5892e5698094f838f Merge: c3b46c7 38740a5 Author: Greg Kroah-Hartman Date: Fri Apr 22 17:09:05 2016 +0900 Merge tag 'fixes-for-v4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.6-rc5 No more major fixes left. Out of the 6 fixes we have here, 4 are on dwc3. The most important is the memory leak fix in dwc3/debugfs.c. We also have a fix for PHY handling in suspend/resume and a fix for dwc3-omap's error handling. Suspend/resume also had the potential to trigger a NULL pointer dereference on dwc3; that's also fixed now. Our good ol' ffs function gets a use-after-free fix while the generic composite.c layer has a robustness fix by making sure reserved fields of a possible SSP device capability descriptor is cleared to 0. commit 103f6112f253017d7062cd74d17f4a514ed4485c Author: Jan Beulich Date: Thu Apr 21 00:27:04 2016 -0600 x86/mm/xen: Suppress hugetlbfs in PV guests Huge pages are not normally available to PV guests. Not suppressing hugetlbfs use results in an endless loop of page faults when user mode code tries to access a hugetlbfs mapped area (since the hypervisor denies such PTEs to be created, but error indications can't be propagated out of xen_set_pte_at(), just like for various of its siblings), and - once killed in an oops like this: kernel BUG at .../fs/hugetlbfs/inode.c:428! invalid opcode: 0000 [#1] SMP ... RIP: e030:[] [] remove_inode_hugepages+0x25b/0x320 ... Call Trace: [] hugetlbfs_evict_inode+0x15/0x40 [] evict+0xbd/0x1b0 [] __dentry_kill+0x19a/0x1f0 [] dput+0x1fe/0x220 [] __fput+0x155/0x200 [] task_work_run+0x60/0xa0 [] do_exit+0x160/0x400 [] do_group_exit+0x3b/0xa0 [] get_signal+0x1ed/0x470 [] do_signal+0x14/0x110 [] prepare_exit_to_usermode+0xe9/0xf0 [] retint_user+0x8/0x13 This is CVE-2016-3961 / XSA-174. Reported-by: Vitaly Kuznetsov Signed-off-by: Jan Beulich Cc: Andrew Morton Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Vrabel Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: stable@vger.kernel.org Cc: xen-devel Link: http://lkml.kernel.org/r/57188ED802000078000E431C@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+) commit 78b0634d2851d30ec5d289aefbae23b141de67f0 Author: Juergen Gross Date: Fri Apr 22 09:35:04 2016 +0200 x86/doc: Correct limits in Documentation/x86/x86_64/mm.txt Correct the size of the module mapping space and the maximum available physical memory size of current processors. Signed-off-by: Juergen Gross 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/1461310504-15977-1-git-send-email-jgross@suse.com Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b9d6da67e11ca8f78fde887918983523a36b0fa Author: Sebastian Andrzej Siewior Date: Fri Apr 8 14:40:15 2016 +0200 cpu/hotplug: Fix rollback during error-out in __cpu_disable() The recent introduction of the hotplug thread which invokes the callbacks on the plugged cpu, cased the following regression: If takedown_cpu() fails, then we run into several issues: 1) The rollback of the target cpu states is not invoked. That leaves the smp threads and the hotplug thread in disabled state. 2) notify_online() is executed due to a missing skip_onerr flag. That causes that both CPU_DOWN_FAILED and CPU_ONLINE notifications are invoked which confuses quite some notifiers. 3) The CPU_DOWN_FAILED notification is not invoked on the target CPU. That's not an issue per se, but it is inconsistent and in consequence blocks the patches which rely on these states being invoked on the target CPU and not on the controlling cpu. It also does not preserve the strict call order on rollback which is problematic for the ongoing state machine conversion as well. To fix this we add a rollback flag to the remote callback machinery and invoke the rollback including the CPU_DOWN_FAILED notification on the remote cpu. Further mark the notify online state with 'skip_onerr' so we don't get a double invokation. This workaround will go away once we moved the unplug invocation to the target cpu itself. [ tglx: Massaged changelog and moved the CPU_DOWN_FAILED notifiaction to the target cpu ] Fixes: 4cb28ced23c4 ("cpu/hotplug: Create hotplug threads") Reported-by: Heiko Carstens Signed-off-by: Sebastian Andrzej Siewior Cc: linux-s390@vger.kernel.org Cc: rt@linutronix.de Cc: Martin Schwidefsky Cc: Anna-Maria Gleixner Link: http://lkml.kernel.org/r/20160408124015.GA21960@linutronix.de Signed-off-by: Thomas Gleixner kernel/cpu.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 16eeed7e5558a3dcf30f75526a896b2632f299f9 Author: Daniel Lezcano Date: Tue Apr 19 15:43:02 2016 +0200 clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test Commit 0881841f7e78 introduced a regression by inverting a test check after calling clocksource_mmio_init(). That results on the system to hang at boot time. Fix it by inverting the test again. Fixes: 0881841f7e78 ("Replace code by clocksource_mmio_init") Reported-by: Marc Gonzalez Signed-off-by: Daniel Lezcano drivers/clocksource/tango_xtal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2bb9e32e2315971a8535fee77335c04a739d71d Author: Steven Rostedt Date: Wed Apr 20 11:32:35 2016 -0400 objtool: Fix Makefile to properly see if libelf is supported When doing a make allmodconfig, I hit the following compile error: In file included from builtin-check.c:32:0: elf.h:22:18: fatal error: gelf.h: No such file or directory compilation terminated. ... Digging into it, it appears that the $(shell ..) command in the Makefile does not give the proper result when it fails to find -lelf, and continues to compile objtool. Instead, use the "try-run" makefile macro to perform the test. This gives a proper result for both cases. Signed-off-by: Steven Rostedt Acked-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Fixes: 442f04c34a1a4 ("objtool: Add tool to perform compile-time stack metadata validation") Link: http://lkml.kernel.org/r/20160420153234.GA24032@home.goodmis.org Signed-off-by: Ingo Molnar Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 18cdfe751f26ffa610f2a7b59775c5cc4c1c9619 Merge: 221004c 562e268 Author: Dave Airlie Date: Fri Apr 22 10:39:26 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Misc radeon and amdgpu bug fixes for 4.6. * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: amdgpu/uvd: add uvd fw version for amdgpu drm/amdgpu: forbid mapping of userptr bo through radeon device file drm/radeon: forbid mapping of userptr bo through radeon device file drm/amdgpu: bump the afmt limit for CZ, ST, Polaris drm/amdgpu: use defines for CRTCs and AMFT blocks drm/radeon: print a message if ATPX dGPU power control is missing Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control" drm/amdgpu/acp: fix resume on CZ systems with AZ audio drm/radeon: add a quirk for a XFX R9 270X drm/radeon: print pci revision as well as pci ids on driver load drm/amdgpu: when suspending, if uvd/vce was running. need to cancel delay work. drm/radeon: fix initial connector audio value commit 221004c66a58949a0f25c937a6789c0839feb530 Author: Huacai Chen Date: Tue Apr 19 19:19:11 2016 +0800 drm: Loongson-3 doesn't fully support wc memory Signed-off-by: Huacai Chen Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie include/drm/drm_cache.h | 2 ++ 1 file changed, 2 insertions(+) commit 005e8dad01d2a7b98948927d7e0c4c7c61ec2d69 Merge: deba0a2 28dca90 Author: Dave Airlie Date: Fri Apr 22 10:09:33 2016 +1000 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes transform feedback fix. * 'linux-4.6' of git://github.com/skeggsb/linux: drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries commit 28dca90533750c7e31e8641c3df426bad9c12941 Author: Ben Skeggs Date: Fri Apr 22 10:05:21 2016 +1000 drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 ++ 1 file changed, 2 insertions(+) commit 562e2689baebaa2ac25b7ec934385480ed1cb7d6 Author: Sonny Jiang Date: Mon Apr 18 16:05:04 2016 -0400 amdgpu/uvd: add uvd fw version for amdgpu Was previously always hardcoded to 0. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 054892ed6a1645e265bc35641c2a96433a051453 Author: Jérôme Glisse Date: Tue Apr 19 09:07:51 2016 -0400 drm/amdgpu: forbid mapping of userptr bo through radeon device file Allowing userptr bo which are basicly a list of page from some vma (so either anonymous page or file backed page) would lead to serious corruption of kernel structures and counters (because we overwrite the page->mapping field when mapping buffer). This will already block if the buffer was populated before anyone does try to mmap it because then TTM_PAGE_FLAG_SG would be set in in the ttm_tt flags. But that flag is check before ttm_tt_populate in the ttm vm fault handler. So to be safe just add a check to verify_access() callback. Reviewed-by: Christian König Signed-off-by: Jérôme Glisse Cc: Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+) commit b5dcec693f87cb8475f2291c0075b2422addd3d6 Author: Jérôme Glisse Date: Tue Apr 19 09:07:50 2016 -0400 drm/radeon: forbid mapping of userptr bo through radeon device file Allowing userptr bo which are basicly a list of page from some vma (so either anonymous page or file backed page) would lead to serious corruption of kernel structures and counters (because we overwrite the page->mapping field when mapping buffer). This will already block if the buffer was populated before anyone does try to mmap it because then TTM_PAGE_FLAG_SG would be set in in the ttm_tt flags. But that flag is check before ttm_tt_populate in the ttm vm fault handler. So to be safe just add a check to verify_access() callback. Reviewed-by: Christian König Signed-off-by: Jérôme Glisse Cc: Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_ttm.c | 2 ++ 1 file changed, 2 insertions(+) commit 83c5cda2ccf40a7a7e4bb674321509b346e23d5a Author: Alex Deucher Date: Mon Apr 18 18:25:34 2016 -0400 drm/amdgpu: bump the afmt limit for CZ, ST, Polaris Fixes array overflow on these chips. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ea25f858fd5aeee888059952bbb8e910541eebb Author: Alex Deucher Date: Mon Apr 18 18:09:57 2016 -0400 drm/amdgpu: use defines for CRTCs and AMFT blocks Prerequiste for the next patch which ups the limits. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deba0a2af9592b2022a0bce7b085a318b53ce1db Author: cpaul@redhat.com Date: Mon Apr 4 19:58:47 2016 -0400 drm/dp/mst: Validate port in drm_dp_payload_send_msg() With the joys of things running concurrently, there's always a chance that the port we get passed in drm_dp_payload_send_msg() isn't actually valid anymore. Because of this, we need to make sure we validate the reference to the port before we use it otherwise we risk running into various race conditions. For instance, on the Dell MST monitor I have here for testing, hotplugging it enough times causes us to kernel panic: [drm:intel_mst_enable_dp] 1 [drm:drm_dp_update_payload_part2] payload 0 1 [drm:intel_get_hpd_pins] hotplug event received, stat 0x00200000, dig 0x10101011, pins 0x00000020 [drm:intel_hpd_irq_handler] digital hpd port B - short [drm:intel_dp_hpd_pulse] got hpd irq on port B - short [drm:intel_dp_check_mst_status] got esi 00 10 00 [drm:drm_dp_update_payload_part2] payload 1 1 general protection fault: 0000 [#1] SMP … Call Trace: [] drm_dp_update_payload_part2+0xc2/0x130 [drm_kms_helper] [] intel_mst_enable_dp+0xf8/0x180 [i915] [] haswell_crtc_enable+0x3ed/0x8c0 [i915] [] intel_atomic_commit+0x5ad/0x1590 [i915] [] ? drm_atomic_set_crtc_for_connector+0x57/0xe0 [drm] [] drm_atomic_commit+0x37/0x60 [drm] [] drm_atomic_helper_set_config+0x7a/0xb0 [drm_kms_helper] [] drm_mode_set_config_internal+0x62/0x100 [drm] [] drm_mode_setcrtc+0x3cd/0x4e0 [drm] [] drm_ioctl+0x143/0x510 [drm] [] ? drm_mode_setplane+0x1b0/0x1b0 [drm] [] ? hrtimer_start_range_ns+0x1b7/0x3a0 [] do_vfs_ioctl+0x92/0x570 [] ? __sys_recvmsg+0x42/0x80 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 RIP [] drm_dp_payload_send_msg+0x146/0x1f0 [drm_kms_helper] Which occurs because of the hotplug event shown in the log, which ends up causing DRM's dp helpers to drop the port we're updating the payload on and panic. CC: stable@vger.kernel.org Signed-off-by: Lyude Reviewed-by: David Airlie Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3addc4e3a7142fcb9782c1d8ab70c63ebbd6d803 Merge: 762ce44 38bdcfc Author: Dave Airlie Date: Fri Apr 22 09:53:07 2016 +1000 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes Single nouveau regression fix * 'linux-4.6' of git://github.com/skeggsb/linux: drm/nouveau/kms: fix setting of default values for dithering properties commit 38bdcfc1fc734a91fd982fe32290f3f70612bf33 Author: Ben Skeggs Date: Fri Apr 22 09:09:41 2016 +1000 drm/nouveau/kms: fix setting of default values for dithering properties Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 762ce4458974534a2407cc924db05840c89105df Merge: 5f44abd 31318a9 Author: Dave Airlie Date: Fri Apr 22 09:09:11 2016 +1000 Merge tag 'drm-intel-fixes-2016-04-21' of git://anongit.freedesktop.org/drm-intel into drm-fixes Hi Dave, fixes all around, all but one are cc: stable material, the most important ones are likely the Skylake hang fixes from Mika. * tag 'drm-intel-fixes-2016-04-21' of git://anongit.freedesktop.org/drm-intel: drm/i915: Use fw_domains_put_with_fifo() on HSW drm/i915: Force ringbuffers to not be at offset 0 drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs drm/i915/skl: Fix rc6 based gpu/system hang drm/i915/userptr: Hold mmref whilst calling get-user-pages drm/i915: Fixup the free space logic in ring_prepare drm/i915/skl+: Use plane size for relative data rate calculation commit 5f44abd041c5f3be76d57579ab254d78e601315b Merge: f78fe08 38a7a73 Author: Linus Torvalds Date: Thu Apr 21 15:41:13 2016 -0700 Merge tag 'rtc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "A few fixes for the RTC subsystem. The documentation fix already missed 4.5 so I think it is worth taking it now: A documentation fix for s3c and two fixes for the ds1307" * tag 'rtc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: ds1307: Use irq when available for wakeup-source device rtc: ds1307: ds3231 temperature s16 overflow rtc: s3c: Document in binding that only s3c6410 needs a src clk commit f78fe0817a20b09d7830ec88869ed83c3d205a40 Merge: c5edde3 395da12 Author: Linus Torvalds Date: Thu Apr 21 14:29:34 2016 -0700 Merge tag 'pm+acpi-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Two fixes for issues introduced recently, one for an intel_pstate driver problem uncovered by the recent switch over from using timers and the other one for a potential cpufreq core problem related to system suspend/resume. Specifics: - Fix an intel_pstate driver problem causing CPUs to get stuck in the highest P-state when completely idle uncovered by the recent switch over from using timers (Rafael Wysocki). - Avoid attempts to get the current CPU frequency when all devices (like I2C controllers that may be nedded for that purpose) have been suspended during system suspend/resume (Rafael Wysocki)" * tag 'pm+acpi-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set intel_pstate: Avoid getting stuck in high P-states when idle commit 38a7a73e8ed0fa9e8cd99bb62463afbdcd23429b Author: Nishanth Menon Date: Tue Apr 19 11:23:54 2016 -0500 rtc: ds1307: Use irq when available for wakeup-source device With commit 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'") we lost the ability for rtc irq functionality for devices that are actually hooked on a real IRQ line and have capability to wakeup as well. This is not an expected behavior. So, instead of just not requesting IRQ, skip the IRQ requirement only if interrupts are not defined for the device. Fixes: 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'") Reported-by: Tony Lindgren Cc: Michael Lange Cc: Alexandre Belloni Signed-off-by: Nishanth Menon Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a3dce62cc5640d7ea17733a2bd1b57665c232b0 Author: Zhuang Yuyao Date: Mon Apr 18 09:21:42 2016 +0900 rtc: ds1307: ds3231 temperature s16 overflow while retrieving temperature from ds3231, the result may be overflow since s16 is too small for a multiplication with 250. ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative. Signed-off-by: Akinobu Mita Tested-by: Michael Tatarinov Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5b8b5beee1e2aadef0409dba555b7085d57910d Author: Khalid Aziz Date: Tue Apr 19 11:12:54 2016 -0600 sparc64: recognize and support Sonoma CPU type Add code to recognize SPARC-Sonoma cpu correctly and update cpu hardware caps and cpu distribution map. SPARC-Sonoma is based upon SPARC-M7 core along with additional PCI functions added on and is reported by firmware as "SPARC-SN". Signed-off-by: Khalid Aziz Acked-by: Allen Pais Signed-off-by: David S. Miller arch/sparc/include/asm/spitfire.h | 1 + arch/sparc/kernel/cpu.c | 6 ++++++ arch/sparc/kernel/cpumap.c | 1 + arch/sparc/kernel/head_64.S | 8 ++++++++ arch/sparc/kernel/setup_64.c | 7 ++++++- arch/sparc/mm/init_64.c | 3 +++ 6 files changed, 25 insertions(+), 1 deletion(-) commit 5bde2c9be701c4583f0a9243bd46590ec401bfba Author: Adrian Glaubitz Date: Thu Apr 14 20:14:42 2016 +0200 sparc: Implement and wire up vio_hotplug for vio. Signed-off-by: John Paul Adrian Glaubitz Acked-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/kernel/vio.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 36128d204b81c099b5779771127a5546eac549c9 Author: Adrian Glaubitz Date: Thu Apr 14 20:14:41 2016 +0200 sparc: Implement and wire up modalias_show for vio. Signed-off-by: John Paul Adrian Glaubitz Acked-by: Sam Ravnborg Signed-off-by: David S. Miller arch/sparc/kernel/vio.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9a78d4fc28904785ffe4c2d361e25b251b479704 Author: Sowmini Varadhan Date: Mon Apr 11 17:57:05 2016 -0700 sparc/pci: Refactor dev_archdata initialization into pci_init_dev_archdata The function pcibios_add_device() added by commit d0c31e020057 ("sparc/PCI: Fix for panic while enabling SR-IOV") initializes the dev_archdata by doing a memcpy from the PF. This has the problem that it erroneously copies the OF device without explicitly refcounting it. As David Miller pointed out: "Generally speaking we don't really support hot-plug for OF probed devices, but if we did all of the device tree pointers have to be refcounted properly." To fix this error, and also avoid code duplication, this patch creates a new helper function, pci_init_dev_archdata(), that initializes the fields in dev_archdata, and can be invoked by callers after they have taken the needed refcounts Signed-off-by: Sowmini Varadhan Tested-by: Babu Moger Reviewed-by: Khalid Aziz Signed-off-by: David S. Miller arch/sparc/kernel/pci.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit a95f94bc98754bad32cb7f36c867d71f3f2be729 Author: Borislav Petkov Date: Wed Mar 30 13:42:47 2016 +0200 sparc/defconfigs: Remove CONFIG_IPV6_PRIVACY Option is long gone, see 5d9efa7ee99e ("ipv6: Remove privacy config option.") Signed-off-by: Borislav Petkov Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller arch/sparc/configs/sparc32_defconfig | 1 - arch/sparc/configs/sparc64_defconfig | 1 - 2 files changed, 2 deletions(-) commit c5edde3a81149d29ceae4221f09f4c7bc2f70846 Merge: f862d66 b4f7052 Author: Linus Torvalds Date: Thu Apr 21 12:57:34 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix memory leak in iwlwifi, from Matti Gottlieb. 2) Add missing registration of netfilter arp_tables into initial namespace, from Florian Westphal. 3) Fix potential NULL deref in DecNET routing code. 4) Restrict NETLINK_URELEASE to truly bound sockets only, from Dmitry Ivanov. 5) Fix dst ref counting in VRF, from David Ahern. 6) Fix TSO segmenting limits in i40e driver, from Alexander Duyck. 7) Fix heap leak in PACKET_DIAG_MCLIST, from Mathias Krause. 8) Ravalidate IPV6 datagram socket cached routes properly, particularly with UDP, from Martin KaFai Lau. 9) Fix endian bug in RDS dp_ack_seq handling, from Qing Huang. 10) Fix stats typing in bcmgenet driver, from Eric Dumazet. 11) Openvswitch needs to orphan SKBs before ipv6 fragmentation handing, from Joe Stringer. 12) SPI device reference leak in spi_ks8895 PHY driver, from Mark Brown. 13) atl2 doesn't actually support scatter-gather, so don't advertise the feature. From Ben Hucthings. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (72 commits) openvswitch: use flow protocol when recalculating ipv6 checksums Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets atl2: Disable unimplemented scatter/gather feature net/mlx4_en: Split SW RX dropped counter per RX ring net/mlx4_core: Don't allow to VF change global pause settings net/mlx4_core: Avoid repeated calls to pci enable/disable net/mlx4_core: Implement pci_resume callback net: phy: spi_ks8895: Don't leak references to SPI devices net: ethernet: davinci_emac: Fix platform_data overwrite net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable qede: Fix single MTU sized packet from firmware GRO flow qede: Fix setting Skb network header qede: Fix various memory allocation error flows for fastpath tcp: Merge tx_flags and tskey in tcp_shifted_skb tcp: Merge tx_flags and tskey in tcp_collapse_retrans drivers: net: cpsw: fix wrong regs access in cpsw_ndo_open tcp: Fix SOF_TIMESTAMPING_TX_ACK when handling dup acks openvswitch: Orphan skbs before IPv6 defrag Revert "Prevent NUll pointer dereference with two PHYs on cpsw" VSOCK: Only check error on skb_recv_datagram when skb is NULL ... commit b4f70527f052b0c00be4d7cac562baa75b212df5 Author: Simon Horman Date: Thu Apr 21 11:49:15 2016 +1000 openvswitch: use flow protocol when recalculating ipv6 checksums When using masked actions the ipv6_proto field of an action to set IPv6 fields may be zero rather than the prevailing protocol which will result in skipping checksum recalculation. This patch resolves the problem by relying on the protocol in the flow key rather than that in the set field action. Fixes: 83d2b9ba1abc ("net: openvswitch: Support masked set actions.") Cc: Jarno Rajahalme Signed-off-by: Simon Horman Signed-off-by: David S. Miller net/openvswitch/actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0d437809d23999cb25207cfbe80c61e5703fdc1 Author: Shrikrishna Khare Date: Wed Apr 20 18:12:29 2016 -0700 Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets For IPv6, if the device indicates that the checksum is correct, set CHECKSUM_UNNECESSARY. Reported-by: Subbarao Narahari Signed-off-by: Shrikrishna Khare Signed-off-by: Jin Heo Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 12 ++++++++---- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) commit f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 Author: Ben Hutchings Date: Wed Apr 20 23:23:08 2016 +0100 atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are independent features, if you explicitly enable SG *and* use one of the rare protocols that can use SG without checkusm offload, this potentially leaks sensitive information (before you notice that it just isn't working). Therefore this obscure bug has been designated CVE-2016-2117. Reported-by: Justin Yackoski Signed-off-by: Ben Hutchings Fixes: ec5f06156423 ("net: Kill link between CSUM and SG features.") Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atlx/atl2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91951f980e521d8f7e92283735b99fb9f4b05d93 Author: Paul Burton Date: Thu Apr 21 11:31:54 2016 +0100 irqchip/mips-gic: Don't overrun pcpu_masks array Commit 2a0787051182 ("irqchip/mips-gic: Use gic_vpes instead of NR_CPUS") & commit 78930f09b940 ("irqchip/mips-gic: Clear percpu_masks correctly when mapping") both introduce code which accesses gic_vpes entries in the pcpu_masks array. However, this array has length NR_CPUS. If NR_CPUS is less than gic_vpes (ie. the kernel supports use of less CPUs than are present in the system) then we overrun the array, clobber some other data & generally die pretty promptly. Most notably this affects uniprocessor kernels running on any multicore or multithreaded Malta with a GIC (ie. the vast majority of real Malta boards). Fix this by only accessing up to min(gic_vpes, NR_CPUS) entries in the pcpu_masks array, preventing the array overrun. Fixes: 2a0787051182 ("irqchip/mips-gic: Use gic_vpes instead of NR_CPUS") Fixes: 78930f09b940 ("irqchip/mips-gic: Clear percpu_masks correctly when mapping") Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Marc Zyngier Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1461234714-9975-1-git-send-email-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 669c00c009ba0db81e840fd7e11faff7be8c8123 Merge: a1459c1 d21ed3a Author: David S. Miller Date: Thu Apr 21 15:02:41 2016 -0400 Merge branch 'mlx4-fixes' Or Gerlitz says: ==================== Mellaox 40G driver fixes for 4.6-rc With the fix for ARM bug being under the works, these are few other fixes for mlx4 we have ready to go. Eran addressed the problematic/wrong reporting of dropped packets, Daniel fixed some matters related to PPC EEH's and Jenny's patch makes sure VFs can't change the port's pause settings. ==================== Signed-off-by: David S. Miller commit d21ed3a311a1031dddc78e9270d1aa9adc8f8a93 Author: Eran Ben Elisha Date: Wed Apr 20 16:01:18 2016 +0300 net/mlx4_en: Split SW RX dropped counter per RX ring Count SW packet drops per RX ring instead of a global counter. This will allow monitoring the number of rx drops per ring. In addition, SW rx_dropped counter was overwritten by HW rx_dropped counter, sum both of them instead to show the accurate value. Fixes: a3333b35da16 ('net/mlx4_en: Moderate ethtool callback to [...] ') Signed-off-by: Eran Ben Elisha Reported-by: Brenden Blanco Signed-off-by: Saeed Mahameed Signed-off-by: Or Gerlitz Reported-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 5 ++++- drivers/net/ethernet/mellanox/mlx4/en_port.c | 5 ++++- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) commit 2a500090a4ea2ccd713f3c782a2fb27681bd6e67 Author: Eugenia Emantayev Date: Wed Apr 20 16:01:17 2016 +0300 net/mlx4_core: Don't allow to VF change global pause settings Currently changing global pause settings is done via SET_PORT command with input modifier GENERAL. This command is allowed for each VF since MTU setting is done via the same command. Change the above to the following scheme: before passing the request to the FW, the PF will check whether it was issued by a slave. If yes, don't change global pause and warn, otherwise change to the requested value and store for further reference. Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++ drivers/net/ethernet/mellanox/mlx4/port.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit 4bfd2e6e53435a214888fd35e230157a38ffc6a0 Author: Daniel Jurgens Date: Wed Apr 20 16:01:16 2016 +0300 net/mlx4_core: Avoid repeated calls to pci enable/disable Maintain the PCI status and provide wrappers for enabling and disabling the PCI device. Performing the actions more than once without doing its opposite results in warning logs. This occurred when EEH hotplugged the device causing a warning for disabling an already disabled device. Fixes: 2ba5fbd62b25 ('net/mlx4_core: Handle AER flow properly') Signed-off-by: Daniel Jurgens Signed-off-by: Yishai Hadas Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 39 +++++++++++++++++++++++++++---- include/linux/mlx4/device.h | 7 ++++++ 2 files changed, 41 insertions(+), 5 deletions(-) commit c12833acff62cff83a8b728253e7ebbc1264d75e Author: Daniel Jurgens Date: Wed Apr 20 16:01:15 2016 +0300 net/mlx4_core: Implement pci_resume callback Move resume related activities to a new pci_resume function instead of performing them in mlx4_pci_slot_reset. This change is needed to avoid a hotplug during EEH recovery due to commit f2da4ccf8bd4 ("powerpc/eeh: More relaxed hotplug criterion"). Fixes: 2ba5fbd62b25 ('net/mlx4_core: Handle AER flow properly') Signed-off-by: Daniel Jurgens Signed-off-by: Yishai Hadas Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 39 +++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) commit a1459c1c9ebcd72f3d488fd10673e64b2bfcbd27 Author: Mark Brown Date: Wed Apr 20 12:54:05 2016 +0100 net: phy: spi_ks8895: Don't leak references to SPI devices The ks8895 driver is using spi_dev_get() apparently just to take a copy of the SPI device used to instantiate it but never calls spi_dev_put() to free it. Since the device is guaranteed to exist between probe() and remove() there should be no need for the driver to take an extra reference to it so fix the leak by just using a straight assignment. Signed-off-by: Mark Brown Signed-off-by: David S. Miller drivers/net/phy/spi_ks8995.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 210990b05a1247886539078e857cd038881bb2d6 Author: Neil Armstrong Date: Wed Apr 20 10:56:45 2016 +0200 net: ethernet: davinci_emac: Fix platform_data overwrite When the DaVinci emac driver is removed and re-probed, the actual pdev->dev.platform_data is populated with an unwanted valid pointer saved by the previous davinci_emac_of_get_pdata() call, causing a kernel crash when calling priv->int_disable() in emac_int_disable(). Unable to handle kernel paging request at virtual address c8622a80 ... [] (emac_int_disable) from [] (emac_dev_open+0x290/0x5f8) [] (emac_dev_open) from [] (__dev_open+0xb8/0x120) [] (__dev_open) from [] (__dev_change_flags+0x88/0x14c) [] (__dev_change_flags) from [] (dev_change_flags+0x18/0x48) [] (dev_change_flags) from [] (devinet_ioctl+0x6b4/0x7ac) [] (devinet_ioctl) from [] (sock_ioctl+0x1d8/0x2c0) [] (sock_ioctl) from [] (do_vfs_ioctl+0x41c/0x600) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x6c/0x7c) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) Fixes: 42f59967a091 ("net: ethernet: davinci_emac: add OF support") Cc: Brian Hutchinson Signed-off-by: Neil Armstrong Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 2 -- 1 file changed, 2 deletions(-) commit 99164f9e62a391b5f4b7923b624d182b5d2859e0 Author: Neil Armstrong Date: Wed Apr 20 10:56:13 2016 +0200 net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable In order to avoid an Unbalanced pm_runtime_enable in the DaVinci emac driver when the device is removed and re-probed, and a pm_runtime_disable() call in davinci_emac_remove(). Actually, using unbind/bind on a TI DM8168 SoC gives : $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind net eth1: DaVinci EMAC: davinci_emac_remove() $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable Cc: Brian Hutchinson Fixes: 3ba97381343b ("net: ethernet: davinci_emac: add pm_runtime support") Signed-off-by: Neil Armstrong Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_emac.c | 1 + 1 file changed, 1 insertion(+) commit 395da1259ac3e3fdc70636a854c993ddb76c6169 Merge: c3b46c7 c9d9c92 Author: Rafael J. Wysocki Date: Thu Apr 21 20:57:46 2016 +0200 Merge branch 'pm-cpufreq-fixes' * pm-cpufreq-fixes: cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set intel_pstate: Avoid getting stuck in high P-states when idle commit 3ad977992fccce7acf9af2afbd2a555cf1725404 Merge: 5bec11c ee2fa8e Author: David S. Miller Date: Thu Apr 21 14:51:29 2016 -0400 Merge branch 'qed-fixes' Manish Chopra says: ==================== qede: Bug fixes This series fixes - * various memory allocation failure flows for fastpath * issues with respect to driver GRO packets handling V1->V2 * Send series against net instead of net-next. Please consider applying this series to "net" ==================== Signed-off-by: David S. Miller commit ee2fa8e6b317ef756a3dfc2dae35891c025e32c9 Author: Manish Chopra Date: Wed Apr 20 03:03:29 2016 -0400 qede: Fix single MTU sized packet from firmware GRO flow In firmware assisted GRO flow there could be a single MTU sized segment arriving due to firmware aggregation timeout/last segment in an aggregation flow, which is not expected to be an actual gro packet. So If a skb has zero frags from the GRO flow then simply push it in the stack as non gso skb. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit aad94c0408780c9f2e168f91ded861dd3877f7d9 Author: Manish Chopra Date: Wed Apr 20 03:03:28 2016 -0400 qede: Fix setting Skb network header Skb's network header needs to be set before extracting IPv4/IPv6 headers from it. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f86af2dfded628034d05a2548e50001f34549403 Author: Manish Chopra Date: Wed Apr 20 03:03:27 2016 -0400 qede: Fix various memory allocation error flows for fastpath This patch handles memory allocation failures for fastpath gracefully in the driver. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 140 ++++++++++++++++----------- 1 file changed, 85 insertions(+), 55 deletions(-) commit 5bec11cf446eafa4851649db2d53e4086119a36f Merge: 3fa88c5 cfea5a6 Author: David S. Miller Date: Thu Apr 21 14:40:56 2016 -0400 Merge branch 'tcp-coalesce-merge-timestamps' Martin KaFai Lau says: ==================== tcp: Merge timestamp info when coalescing skbs This series is separated from the RFC series related to tcp_sendmsg(MSG_EOR) and it is targeting for the net branch. This patchset is focusing on fixing cases where TCP timestamp could be lost after coalescing skbs. A BPF prog is used to kprobe to sock_queue_err_skb() and print out the value of serr->ee.ee_data. The BPF prog (run-able from bcc) is attached here: BPF prog used for testing: ~~~~~ from __future__ import print_function from bcc import BPF bpf_text = """ int trace_err_skb(struct pt_regs *ctx) { struct sk_buff *skb = (struct sk_buff *)ctx->si; struct sock *sk = (struct sock *)ctx->di; struct sock_exterr_skb *serr; u32 ee_data = 0; if (!sk || !skb) return 0; serr = SKB_EXT_ERR(skb); bpf_probe_read(&ee_data, sizeof(ee_data), &serr->ee.ee_data); bpf_trace_printk("ee_data:%u\\n", ee_data); return 0; }; """ b = BPF(text=bpf_text) b.attach_kprobe(event="sock_queue_err_skb", fn_name="trace_err_skb") print("Attached to kprobe") b.trace_print() ==================== Signed-off-by: David S. Miller commit cfea5a688eb37bcd1081255df9f9f777f4e61999 Author: Martin KaFai Lau Date: Tue Apr 19 22:39:29 2016 -0700 tcp: Merge tx_flags and tskey in tcp_shifted_skb After receiving sacks, tcp_shifted_skb() will collapse skbs if possible. tx_flags and tskey also have to be merged. This patch reuses the tcp_skb_collapse_tstamp() to handle them. BPF Output Before: ~~~~~ BPF Output After: ~~~~~ <...>-2024 [007] d.s. 88.644374: : ee_data:14599 Packetdrill Script: ~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 0.100 < S 0:0(0) win 32792 0.100 > S. 0:0(0) ack 1 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0 0.200 write(4, ..., 1460) = 1460 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 13140) = 13140 0.200 > P. 1:1461(1460) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:14601(5840) ack 1 0.300 < . 1:1(0) ack 1 win 257 0.300 > P. 1:1461(1460) ack 1 0.400 < . 1:1(0) ack 14601 win 257 0.400 close(4) = 0 0.400 > F. 14601:14601(0) ack 1 0.500 < F. 1:1(0) ack 14602 win 257 0.500 > . 14602:14602(0) ack 2 Signed-off-by: Martin KaFai Lau Cc: Eric Dumazet Cc: Neal Cardwell Cc: Soheil Hassas Yeganeh Cc: Willem de Bruijn Cc: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Tested-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/tcp.h | 2 ++ net/ipv4/tcp_input.c | 1 + net/ipv4/tcp_output.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) commit 082ac2d51d9f19ec1c29bdaaaf7fb49889e4fade Author: Martin KaFai Lau Date: Tue Apr 19 22:39:28 2016 -0700 tcp: Merge tx_flags and tskey in tcp_collapse_retrans If two skbs are merged/collapsed during retransmission, the current logic does not merge the tx_flags and tskey. The end result is the SCM_TSTAMP_ACK timestamp could be missing for a packet. The patch: 1. Merge the tx_flags 2. Overwrite the prev_skb's tskey with the next_skb's tskey BPF Output Before: ~~~~~~ BPF Output After: ~~~~~~ packetdrill-2092 [001] d.s. 453.998486: : ee_data:1459 Packetdrill Script: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 0.100 < S 0:0(0) win 32792 0.100 > S. 0:0(0) ack 1 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0 0.200 write(4, ..., 730) = 730 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 730) = 730 +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0 0.200 write(4, ..., 11680) = 11680 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 > P. 1:731(730) ack 1 0.200 > P. 731:1461(730) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:13141(4380) ack 1 0.300 < . 1:1(0) ack 1 win 257 0.300 < . 1:1(0) ack 1 win 257 0.300 < . 1:1(0) ack 1 win 257 0.300 > P. 1:1461(1460) ack 1 0.400 < . 1:1(0) ack 13141 win 257 0.400 close(4) = 0 0.400 > F. 13141:13141(0) ack 1 0.500 < F. 1:1(0) ack 13142 win 257 0.500 > . 13142:13142(0) ack 2 Signed-off-by: Martin KaFai Lau Cc: Eric Dumazet Cc: Neal Cardwell Cc: Soheil Hassas Yeganeh Cc: Willem de Bruijn Cc: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Tested-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3fa88c51c73a67e7eeda1fcafd809f9185790b31 Author: Grygorii Strashko Date: Tue Apr 19 21:09:49 2016 +0300 drivers: net: cpsw: fix wrong regs access in cpsw_ndo_open The cpsw_ndo_open() could try to access CPSW registers before calling pm_runtime_get_sync(). This will trigger L3 error: WARNING: CPU: 0 PID: 21 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x220/0x34c() 44000000.ocp:L3 Custom Error: MASTER M2 (64-bit) TARGET L4_FAST (Idle): Data Access in Supervisor mode during Functional access and CPSW will stop functioning. Hence, fix it by moving pm_runtime_get_sync() before the first access to CPSW registers in cpsw_ndo_open(). Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 479f85c36688f5c855ad463b71902ef5992628b7 Author: Martin KaFai Lau Date: Mon Apr 18 15:39:53 2016 -0700 tcp: Fix SOF_TIMESTAMPING_TX_ACK when handling dup acks Assuming SOF_TIMESTAMPING_TX_ACK is on. When dup acks are received, it could incorrectly think that a skb has already been acked and queue a SCM_TSTAMP_ACK cmsg to the sk->sk_error_queue. In tcp_ack_tstamp(), it checks 'between(shinfo->tskey, prior_snd_una, tcp_sk(sk)->snd_una - 1)'. If prior_snd_una == tcp_sk(sk)->snd_una like the following packetdrill script, between() returns true but the tskey is actually not acked. e.g. try between(3, 2, 1). The fix is to replace between() with one before() and one !before(). By doing this, the -1 offset on the tcp_sk(sk)->snd_una can also be removed. A packetdrill script is used to reproduce the dup ack scenario. Due to the lacking cmsg support in packetdrill (may be I cannot find it), a BPF prog is used to kprobe to sock_queue_err_skb() and print out the value of serr->ee.ee_data. Both the packetdrill and the bcc BPF script is attached at the end of this commit message. BPF Output Before Fix: ~~~~~~ <...>-2056 [001] d.s. 433.927987: : ee_data:1459 #incorrect packetdrill-2056 [001] d.s. 433.929563: : ee_data:1459 #incorrect packetdrill-2056 [001] d.s. 433.930765: : ee_data:1459 #incorrect packetdrill-2056 [001] d.s. 434.028177: : ee_data:1459 packetdrill-2056 [001] d.s. 434.029686: : ee_data:14599 BPF Output After Fix: ~~~~~~ <...>-2049 [000] d.s. 113.517039: : ee_data:1459 <...>-2049 [000] d.s. 113.517253: : ee_data:14599 BCC BPF Script: ~~~~~~ #!/usr/bin/env python from __future__ import print_function from bcc import BPF bpf_text = """ #include #include #include #include #ifdef memset #undef memset #endif int trace_err_skb(struct pt_regs *ctx) { struct sk_buff *skb = (struct sk_buff *)ctx->si; struct sock *sk = (struct sock *)ctx->di; struct sock_exterr_skb *serr; u32 ee_data = 0; if (!sk || !skb) return 0; serr = SKB_EXT_ERR(skb); bpf_probe_read(&ee_data, sizeof(ee_data), &serr->ee.ee_data); bpf_trace_printk("ee_data:%u\\n", ee_data); return 0; }; """ b = BPF(text=bpf_text) b.attach_kprobe(event="sock_queue_err_skb", fn_name="trace_err_skb") print("Attached to kprobe") b.trace_print() Packetdrill Script: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 0.100 < S 0:0(0) win 32792 0.100 > S. 0:0(0) ack 1 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 1460) = 1460 0.200 write(4, ..., 13140) = 13140 0.200 > P. 1:1461(1460) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:14601(5840) ack 1 0.300 < . 1:1(0) ack 1 win 257 0.300 < . 1:1(0) ack 1 win 257 0.300 < . 1:1(0) ack 1 win 257 0.300 > P. 1:1461(1460) ack 1 0.400 < . 1:1(0) ack 14601 win 257 0.400 close(4) = 0 0.400 > F. 14601:14601(0) ack 1 0.500 < F. 1:1(0) ack 14602 win 257 0.500 > . 14602:14602(0) ack 2 Signed-off-by: Martin KaFai Lau Cc: Eric Dumazet Cc: Neal Cardwell Cc: Soheil Hassas Yeganeh Cc: Willem de Bruijn Cc: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Tested-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 49e261a8a21e0960a3f7ff187a453ba1c1149053 Author: Joe Stringer Date: Mon Apr 18 14:51:47 2016 -0700 openvswitch: Orphan skbs before IPv6 defrag This is the IPv6 counterpart to commit 8282f27449bf ("inet: frag: Always orphan skbs inside ip_defrag()"). Prior to commit 029f7f3b8701 ("netfilter: ipv6: nf_defrag: avoid/free clone operations"), ipv6 fragments sent to nf_ct_frag6_gather() would be cloned (implicitly orphaning) prior to queueing for reassembly. As such, when the IPv6 message is eventually reassembled, the skb->sk for all fragments would be NULL. After that commit was introduced, rather than cloning, the original skbs were queued directly without orphaning. The end result is that all frags except for the first and last may have a socket attached. This commit explicitly orphans such skbs during nf_ct_frag6_gather() to prevent BUG_ON(skb->sk) during a later call to ip6_fragment(). kernel BUG at net/ipv6/ip6_output.c:631! [...] Call Trace: [] ? __lock_acquire+0x927/0x20a0 [] ? do_output.isra.28+0x1b0/0x1b0 [openvswitch] [] ? __lock_is_held+0x52/0x70 [] ovs_fragment+0x1f7/0x280 [openvswitch] [] ? mark_held_locks+0x75/0xa0 [] ? _raw_spin_unlock_irqrestore+0x36/0x50 [] ? dst_discard_out+0x20/0x20 [] ? dst_ifdown+0x80/0x80 [] do_output.isra.28+0xf3/0x1b0 [openvswitch] [] do_execute_actions+0x709/0x12c0 [openvswitch] [] ? ovs_flow_stats_update+0x74/0x1e0 [openvswitch] [] ? ovs_flow_stats_update+0xa1/0x1e0 [openvswitch] [] ? _raw_spin_unlock+0x27/0x40 [] ovs_execute_actions+0x45/0x120 [openvswitch] [] ovs_dp_process_packet+0x85/0x150 [openvswitch] [] ? _raw_spin_unlock+0x27/0x40 [] ovs_execute_actions+0xc4/0x120 [openvswitch] [] ovs_dp_process_packet+0x85/0x150 [openvswitch] [] ? key_extract+0x442/0xc10 [openvswitch] [] ovs_vport_receive+0x5d/0xb0 [openvswitch] [] ? __lock_acquire+0x927/0x20a0 [] ? __lock_acquire+0x927/0x20a0 [] ? __lock_acquire+0x927/0x20a0 [] ? _raw_spin_unlock_irqrestore+0x36/0x50 [] internal_dev_xmit+0x6d/0x150 [openvswitch] [] ? internal_dev_xmit+0x5/0x150 [openvswitch] [] dev_hard_start_xmit+0x2df/0x660 [] ? validate_xmit_skb.isra.105.part.106+0x1a/0x2b0 [] __dev_queue_xmit+0x8f5/0x950 [] ? __dev_queue_xmit+0x50/0x950 [] ? mark_held_locks+0x75/0xa0 [] dev_queue_xmit+0x10/0x20 [] neigh_resolve_output+0x178/0x220 [] ? ip6_finish_output2+0x219/0x7b0 [] ip6_finish_output2+0x219/0x7b0 [] ? ip6_finish_output2+0x65/0x7b0 [] ? ip_idents_reserve+0x6b/0x80 [] ? ip6_fragment+0x93f/0xc50 [] ip6_fragment+0xba1/0xc50 [] ? ip6_flush_pending_frames+0x40/0x40 [] ip6_finish_output+0xcb/0x1d0 [] ip6_output+0x5f/0x1a0 [] ? ip6_fragment+0xc50/0xc50 [] ip6_local_out+0x3d/0x80 [] ip6_send_skb+0x2f/0xc0 [] ip6_push_pending_frames+0x4d/0x50 [] icmpv6_push_pending_frames+0xac/0xe0 [] icmpv6_echo_reply+0x42e/0x500 [] icmpv6_rcv+0x4cf/0x580 [] ip6_input_finish+0x1a7/0x690 [] ? ip6_input_finish+0x5/0x690 [] ip6_input+0x30/0xa0 [] ? ip6_rcv_finish+0x1a0/0x1a0 [] ip6_rcv_finish+0x4e/0x1a0 [] ipv6_rcv+0x45f/0x7c0 [] ? ipv6_rcv+0x36/0x7c0 [] ? ip6_make_skb+0x1c0/0x1c0 [] __netif_receive_skb_core+0x229/0xb80 [] ? mark_held_locks+0x75/0xa0 [] ? process_backlog+0x6f/0x230 [] __netif_receive_skb+0x16/0x70 [] process_backlog+0x78/0x230 [] ? process_backlog+0xdd/0x230 [] net_rx_action+0x203/0x480 [] ? mark_held_locks+0x75/0xa0 [] __do_softirq+0xde/0x49f [] ? ip6_finish_output2+0x228/0x7b0 [] do_softirq_own_stack+0x1c/0x30 [] do_softirq.part.18+0x3b/0x40 [] __local_bh_enable_ip+0xb6/0xc0 [] ip6_finish_output2+0x251/0x7b0 [] ? ip6_fragment+0xba1/0xc50 [] ? ip_idents_reserve+0x6b/0x80 [] ? ip6_fragment+0x93f/0xc50 [] ip6_fragment+0xba1/0xc50 [] ? ip6_flush_pending_frames+0x40/0x40 [] ip6_finish_output+0xcb/0x1d0 [] ip6_output+0x5f/0x1a0 [] ? ip6_fragment+0xc50/0xc50 [] ip6_local_out+0x3d/0x80 [] ip6_send_skb+0x2f/0xc0 [] ip6_push_pending_frames+0x4d/0x50 [] rawv6_sendmsg+0xa28/0xe30 [] ? inet_sendmsg+0xc7/0x1d0 [] inet_sendmsg+0x106/0x1d0 [] ? inet_sendmsg+0x5/0x1d0 [] sock_sendmsg+0x38/0x50 [] SYSC_sendto+0xf6/0x170 [] ? trace_hardirqs_on_thunk+0x1b/0x1d [] SyS_sendto+0xe/0x10 [] entry_SYSCALL_64_fastpath+0x18/0xa8 Code: 06 48 83 3f 00 75 26 48 8b 87 d8 00 00 00 2b 87 d0 00 00 00 48 39 d0 72 14 8b 87 e4 00 00 00 83 f8 01 75 09 48 83 7f 18 00 74 9a <0f> 0b 41 8b 86 cc 00 00 00 49 8# RIP [] ip6_fragment+0x73a/0xc50 RSP Fixes: 029f7f3b8701 ("netfilter: ipv6: nf_defrag: avoid/free clone operations") Reported-by: Daniele Di Proietto Signed-off-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 1 + 1 file changed, 1 insertion(+) commit 882416c1e4d1c9d4c7b50e0f5c3fa9ef043cd710 Author: Dave Martin Date: Mon Apr 18 18:57:26 2016 +0100 arm64: Fix EL1/EL2 early init inconsistencies with VHE When using the Virtualisation Host Extensions, EL1 is not used in the host and requires no separate configuration. In addition, with VHE enabled, non-hyp-specific EL2 configuration that does not need to be done early will be done anyway in __cpu_setup via the _EL1 system register aliases. In particular, the layout and definition of CPTR_EL2 are changed by enabling VHE so that they resemble CPACR_EL1, so existing code to initialise CPTR_EL2 becomes architecturally wrong in this case. This patch simply skips the affected initialisation code in the non-VHE case. Signed-off-by: Dave Martin Reviewed-by: Marc Zyngier Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3194ed497939c6448005542e3ca4fa2386968fa0 Author: Takashi Iwai Date: Thu Apr 21 17:49:11 2016 +0200 ALSA: hda - Fix possible race on regmap bypass flip HD-audio driver uses regmap cache bypass feature for reading a raw value without the cache. But this is racy since both the cached and the uncached reads may occur concurrently. The former is done via the normal control API access while the latter comes from the proc file read. Even though the regmap itself has the protection against the concurrent accesses, the flag set/reset is done without the protection, so it may lead to inconsistent state of bypass flag that doesn't match with the current read and occasionally result in a kernel WARNING like: WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93 One way to work around such a problem is to wrap with a mutex. But in this case, the solution is simpler: for the uncached read, we just skip the regmap and directly calls its accessor. The verb execution there is protected by itself, so basically it's safe to call individually. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171 Signed-off-by: Takashi Iwai include/sound/hda_regmap.h | 2 ++ sound/hda/hdac_device.c | 10 ++++------ sound/hda/hdac_regmap.c | 40 ++++++++++++++++++++++++++++------------ 3 files changed, 34 insertions(+), 18 deletions(-) commit f862d66a1a4609e61cd87c7ff4c7d9a234103d67 Merge: 90e6a68 ac36a88 Author: Linus Torvalds Date: Thu Apr 21 08:45:02 2016 -0700 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Three further fixes for ARM. Alexandre Courbot was having problems with DMA allocations with the GFP flags affecting where the tracking data was being allocated from. Vladimir Murzin noticed that the CPU feature code was not entirely correct, which can cause some features to be misreported" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8564/1: fix cpu feature extracting helper ARM: 8563/1: fix demoting HWCAP_SWP ARM: 8551/2: DMA: Fix kzalloc flags in __dma_alloc commit 67f3754b51f22b18c4820fb84062f658c30e8644 Author: Takashi Iwai Date: Thu Apr 21 17:37:54 2016 +0200 ALSA: pcxhr: Fix missing mutex unlock The commit [9bef72bdb26e: ALSA: pcxhr: Use nonatomic PCM ops] converted to non-atomic PCM ops, but shamelessly with an unbalanced mutex locking, which leads to the hangup easily. Fix it. Fixes: 9bef72bdb26e ('ALSA: pcxhr: Use nonatomic PCM ops') Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116441 Cc: # 3.18+ Signed-off-by: Takashi Iwai sound/pci/pcxhr/pcxhr_core.c | 1 + 1 file changed, 1 insertion(+) commit 90e6a6894b1f197e134f4771dd6df06e45862c39 Merge: b9358b2 4dacad6 Author: Linus Torvalds Date: Thu Apr 21 08:27:48 2016 -0700 Merge tag 'fbdev-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev fixes from Tomi Valkeinen: - ARM CLCD: fix regression on multiplatform kernels - panel-sharp-ls037v7dw01: fix possible NULL deref * tag 'fbdev-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: omapfb: panel-sharp-ls037v7dw01: fix check of gpio_to_desc() return value video: ARM CLCD: runtime check for Versatile commit b9358b247291a11cf1be982c2dc087bb95f26729 Merge: 55f058e 5d07163 Author: Linus Torvalds Date: Thu Apr 21 08:23:59 2016 -0700 Merge tag 'platform-drivers-x86-v4.6-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "An S4 fix for intel-hid, new platform 'quirk' for hp_accel, a fix for broader support of ACPI resources for the Intel P-unit, and a few uninitialized variable fixes. intel p-unit: - decouple telemetry driver from the optional IPC resources thinkpad_acpi: - Silence an uninitialized variable warning intel_telemetry_pltdrv: - Silence an uninitialized variable warning hp_accel: - Silence an uninitialized variable warning - Add support for HP ProBook 440 G3 intel-hid: - add a workaround to ignore an event after waking up from S4" * tag 'platform-drivers-x86-v4.6-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform:x86 decouple telemetry driver from the optional IPC resources thinkpad_acpi: Silence an uninitialized variable warning intel_telemetry_pltdrv: Silence an uninitialized variable warning hp_accel: Silence an uninitialized variable warning hp_accel: Add support for HP ProBook 440 G3 intel-hid: add a workaround to ignore an event after waking up from S4. commit 9800699c645952da6a7399194d3e762b84cde3cd Author: Robin Murphy Date: Wed Apr 20 14:53:33 2016 +0100 iommu/arm-smmu: Don't allocate resources for bypass domains Until we get fully plumbed into of_iommu_configure, our default IOMMU_DOMAIN_DMA domains just bypass translation. Since we achieve that by leaving the stream table entries set to bypass instead of pointing at a translation context, the context bank we allocate for the domain is completely wasted. Context banks are typically a rather limited resource, so don't hog ones we don't need. Reported-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Robin Murphy Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5f634956cc550768ebd75cf26fdba01044bc600e Author: Will Deacon Date: Wed Apr 20 14:53:32 2016 +0100 iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA Commit cbf8277ef456 ("iommu/arm-smmu: Treat IOMMU_DOMAIN_DMA as bypass for now") ignores requests to attach a device to the default domain since, without IOMMU-basked DMA ops available everywhere, the default domain will just lead to unexpected transaction faults being reported. Unfortunately, the way this was implemented on SMMUv2 causes a regression with VFIO PCI device passthrough under KVM on AMD Seattle. On this system, the host controller device is associated with both a pci_dev *and* a platform_device, and can therefore end up with duplicate SMR entries, resulting in a stream-match conflict at runtime. This patch amends the original fix so that attaching to IOMMU_DOMAIN_DMA is rejected even before configuring the SMRs. This restores the old behaviour for now, but we'll need to look at handing host controllers specially when we come to supporting the default domain fully. Reported-by: Eric Auger Tested-by: Eric Auger Tested-by: Yang Shi Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cbcc72e037b8a3eb1fad3c1ae22021df21c97a51 Author: Lorenzo Pieralisi Date: Thu Apr 21 10:24:34 2016 +0100 drivers/perf: arm-pmu: fix RCU usage on pmu resume from low-power Commit da4e4f18afe0 ("drivers/perf: arm_pmu: implement CPU_PM notifier") added code in the arm perf infrastructure that allows the kernel to save/restore perf counters whenever the CPU enters a low-power state. The kernel saves/restores the counters for each active event through the armpmu_{stop/start} ARM pmu API, so that the low-power state enter/exit cycle is emulated through pmu start/stop operations for each event in use. However, calling armpmu_start() for each active event on power up executes code that requires RCU locking (perf_event_update_userpage()) to be functional, so, given that the core may call the CPU_PM notifiers while running the idle thread in an quiescent RCU state this is not allowed as detected through the following splat when kernel is run with CONFIG_PROVE_LOCKING enabled: [ 49.293286] [ 49.294761] =============================== [ 49.298895] [ INFO: suspicious RCU usage. ] [ 49.303031] 4.6.0-rc3+ #421 Not tainted [ 49.306821] ------------------------------- [ 49.310956] include/linux/rcupdate.h:872 rcu_read_lock() used illegally while idle! [ 49.318530] [ 49.318530] other info that might help us debug this: [ 49.318530] [ 49.326451] [ 49.326451] RCU used illegally from idle CPU! [ 49.326451] rcu_scheduler_active = 1, debug_locks = 0 [ 49.337209] RCU used illegally from extended quiescent state! [ 49.342892] 2 locks held by swapper/2/0: [ 49.346768] #0: (cpu_pm_notifier_lock){......}, at: [] cpu_pm_exit+0x18/0x80 [ 49.355492] #1: (rcu_read_lock){......}, at: [] perf_event_update_userpage+0x0/0x260 This patch wraps the armpmu_start() call (that indirectly calls perf_event_update_userpage()) on CPU_PM notifier power state exit (or failed entry) within the RCU_NONIDLE() macro so that the RCU subsystem is made aware the calling cpu is not idle from an RCU perspective for the armpmu_start() call duration, therefore fixing the issue. Fixes: da4e4f18afe0 ("drivers/perf: arm_pmu: implement CPU_PM notifier") Signed-off-by: Lorenzo Pieralisi Reported-by: James Morse Suggested-by: Kevin Hilman Cc: Ashwin Chaugule Cc: Kevin Hilman Cc: Sudeep Holla Cc: Daniel Lezcano Cc: Mathieu Poirier Acked-by: Mark Rutland Acked-by: Paul E. McKenney Acked-by: Will Deacon Signed-off-by: Catalin Marinas drivers/perf/arm_pmu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d4f6e272f2600bc1295d195a52a9e8bb81656bc7 Author: Dan Carpenter Date: Thu Apr 14 12:33:37 2016 +0300 firmware: qemu_fw_cfg.c: potential unintialized variable It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't initialized, which, if you got very unlucky, could cause a bug. Signed-off-by: Dan Carpenter Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2144fff7df8e76654fa72b0a9d2324ce2e0c8a5c Author: Lucas Stach Date: Thu Apr 21 13:52:38 2016 +0200 drm/etnaviv: don't move linear memory window on 3D cores without MC2.0 On cores with MC1.0 the memory window offset is not properly respected by all engines in the core, leading to different views of the memory if the offset in non-zero. This causes relocs for those engines to be wrong and might lead to other subtile problems. Rather than trying to work around this, just disable the linear memory window offset for those cores. Suggested-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit e2841ea91611622370f66b4dfaa62599e8850d48 Merge: de478a6 f742aaf Author: Kalle Valo Date: Thu Apr 21 15:40:13 2016 +0300 Merge tag 'iwlwifi-for-kalle-2016-04-12_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * add new device IDs for 8265 * fix a NULL pointer dereference when paging firmware asserts * remove a WARNING on gscan capabilities * fix MODULE_FIRMWARE for 8260 commit 4589f450fb285ab85f7513b6649e51ec2a820653 Author: Matt Redfearn Date: Thu Apr 21 10:08:32 2016 +0100 genirq: Dont allow affinity mask to be updated on IPIs The IPI domain re-purposes the IRQ affinity to signify the mask of CPUs that this IPI will deliver to. This must not be modified before the IPI is destroyed again, so set the IRQ_NO_BALANCING flag to prevent the affinity being overwritten by setup_affinity(). Without this, if an IPI is reserved for a single target CPU, then allocated using __setup_irq(), the affinity is overwritten with cpu_online_mask. When ipi_destroy() is subsequently called on a multi-cpu system, it will attempt to free cpumask_weight() IRQs that were never allocated, and crash. Fixes: d17bf24e6952 ("genirq: Add a new generic IPI reservation code to irq core") Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: ralf@linux-mips.org Cc: Qais Yousef Cc: lisa.parratt@imgtec.com Link: http://lkml.kernel.org/r/1461229712-13057-1-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner kernel/irq/ipi.c | 1 + 1 file changed, 1 insertion(+) commit fba7cd681b6155e2d93e7862fcd6f970336b83c3 Author: Romain Perier Date: Thu Apr 14 15:36:03 2016 +0200 asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic() The recent decoupling of pagefault disable and preempt disable added an explicit preempt_disable/enable() pair to the futex_atomic_cmpxchg_inatomic() implementation in asm-generic/futex.h. But it forgot to add preempt_enable() calls to the error handling code pathes, which results in a preemption count imbalance. This is observable on boot when the test for atomic_cmpxchg() is calling futex_atomic_cmpxchg_inatomic() on a NULL pointer. Add the missing preempt_enable() calls to the error handling code pathes. [ tglx: Massaged changelog ] Fixes: d9b9ff8c1889 ("sched/preempt, futex: Disable preemption in UP futex_atomic_cmpxchg_inatomic() explicitly") Signed-off-by: Romain Perier Cc: linux-arch@vger.kernel.org Cc: Thomas Petazzoni Cc: Arnd Bergmann Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1460640963-690-1-git-send-email-romain.perier@free-electrons.com Signed-off-by: Thomas Gleixner include/asm-generic/futex.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fe1bce9e2107ba3a8faffe572483b6974201a0e6 Author: Davidlohr Bueso Date: Wed Apr 20 20:09:24 2016 -0700 futex: Acknowledge a new waiter in counter before plist Otherwise an incoming waker on the dest hash bucket can miss the waiter adding itself to the plist during the lockless check optimization (small window but still the correct way of doing this); similarly to the decrement counterpart. Suggested-by: Peter Zijlstra Signed-off-by: Davidlohr Bueso Cc: Davidlohr Bueso Cc: bigeasy@linutronix.de Cc: dvhart@infradead.org Cc: stable@kernel.org Link: http://lkml.kernel.org/r/1461208164-29150-1-git-send-email-dave@stgolabs.net Signed-off-by: Thomas Gleixner kernel/futex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 723cacbd9dc79582e562c123a0bacf8bfc69e72a Author: Gerald Schaefer Date: Fri Apr 15 16:38:40 2016 +0200 s390/mm: fix asce_bits handling with dynamic pagetable levels There is a race with multi-threaded applications between context switch and pagetable upgrade. In switch_mm() a new user_asce is built from mm->pgd and mm->context.asce_bits, w/o holding any locks. A concurrent mmap with a pagetable upgrade on another thread in crst_table_upgrade() could already have set new asce_bits, but not yet the new mm->pgd. This would result in a corrupt user_asce in switch_mm(), and eventually in a kernel panic from a translation exception. Fix this by storing the complete asce instead of just the asce_bits, which can then be read atomically from switch_mm(), so that it either sees the old value or the new value, but no mixture. Both cases are OK. Having the old value would result in a page fault on access to the higher level memory, but the fault handler would see the new mm->pgd, if it was a valid access after the mmap on the other thread has completed. So as worst-case scenario we would have a page fault loop for the racing thread until the next time slice. Also remove dead code and simplify the upgrade/downgrade path, there are no upgrades from 2 levels, and only downgrades from 3 levels for compat tasks. There are also no concurrent upgrades, because the mmap_sem is held with down_write() in do_mmap, so the flush and table checks during upgrade can be removed. Reported-by: Michael Munday Reviewed-by: Martin Schwidefsky Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu.h | 2 +- arch/s390/include/asm/mmu_context.h | 28 +++++++++--- arch/s390/include/asm/pgalloc.h | 4 +- arch/s390/include/asm/processor.h | 2 +- arch/s390/include/asm/tlbflush.h | 9 ++-- arch/s390/mm/init.c | 3 +- arch/s390/mm/mmap.c | 6 +-- arch/s390/mm/pgalloc.c | 85 ++++++++++++------------------------- 8 files changed, 62 insertions(+), 77 deletions(-) commit dba599091c191d209b1499511a524ad9657c0e5a Author: Sebastian Ott Date: Fri Apr 15 09:41:35 2016 +0200 s390/pci: fix use after free in dma_init After a failure during registration of the dma_table (because of the function being in error state) we free its memory but don't reset the associated pointer to zero. When we then receive a notification from firmware (about the function being in error state) we'll try to walk and free the dma_table again. Fix this by resetting the dma_table pointer. In addition to that make sure that we free the iommu_bitmap when appropriate. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit a6f4850dbca66e46a73b8774e85aaf9fc0caf265 Author: Johannes Berg Date: Thu Apr 14 15:15:20 2016 +0200 thermal: fix Mediatek thermal controller build At least with CONFIG_COMPILE_TEST, there's no reason to assume that CONFIG_RESET_CONTROLLER is set, but the code for this controller requires it since it calls device_reset(). Make CONFIG_MTK_THERMAL properly depend on CONFIG_RESET_CONTROLLER. Signed-off-by: Johannes Berg Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1d0fd42fa31d18ba0a3e0dd008c9e93e1cebe451 Author: Wei Ni Date: Thu Mar 3 17:33:46 2016 +0800 thermal: consistently use int for trip temp The commit 17e8351a7739 consistently use int for temperature, however it missed a few in trip temperature and thermal_core. In current codes, the trip->temperature used "unsigned long" and zone->temperature used"int", if the temperature is negative value, it will get wrong result when compare temperature with trip temperature. This patch can fix it. Signed-off-by: Wei Ni Signed-off-by: Eduardo Valentin drivers/thermal/thermal_core.c | 8 ++++---- include/linux/thermal.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 62e14f6fd383f756ff3fe5f6fb7aa5b546bb47e3 Author: Randy Dunlap Date: Tue Apr 19 09:44:23 2016 -0700 thermal: fix mtk_thermal build dependency Fix build errors when MTK_THERMAL=y and NVMEM=m by preventing that Kconfig combination. drivers/built-in.o: In function `mtk_thermal_probe': mtk_thermal.c:(.text+0xffa8f): undefined reference to `nvmem_cell_get' mtk_thermal.c:(.text+0xffabe): undefined reference to `nvmem_cell_read' mtk_thermal.c:(.text+0xffac9): undefined reference to `nvmem_cell_put' Signed-off-by: Randy Dunlap Cc: Zhang Rui Cc: Eduardo Valentin Cc: Cc: Sascha Hauer Cc: Hanyi Wu Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9ebfb4e09959b03b58b65b5a6c04f70dd57d4f6b Author: Randy Dunlap Date: Tue Apr 19 16:45:01 2016 -0700 thermal: minor mtk_thermal.c cleanups Trivial cleanups: - delete one duplicate #include - end email address with closing '>' Signed-off-by: Randy Dunlap Cc: Zhang Rui Cc: Eduardo Valentin Cc: Sascha Hauer Cc: Hanyi Wu Signed-off-by: Eduardo Valentin drivers/thermal/mtk_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f9d038144a171d42e057143b247ff7a12a5b06f5 Author: Javi Merino Date: Wed Apr 6 19:30:18 2016 +0100 thermal: power_allocator: req_range multiplication should be a 64 bit type req_range is declared as a u64 to cope with overflows in the multiplication of two u32. As both req_power and power_range are u32, we need to make sure the multiplication is done with u64 types. Reported-by: Dan Carpenter Cc: Zhang Rui Cc: Eduardo Valentin Signed-off-by: Javi Merino Signed-off-by: Eduardo Valentin drivers/thermal/power_allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0ff8aaae369559fbef0e9f2606a9ae92db14f2f Author: Julia Lawall Date: Tue Apr 19 14:33:32 2016 +0200 thermal: of: add __init attribute Add __init attribute on a function that is only called from other __init functions and that is not inlined, at least with gcc version 4.8.4 on an x86 machine with allyesconfig. Currently, the function is put in the .text.unlikely segment. Declaring it as __init will cause it to be put in the .init.text and to disappear after initialization. The result of objdump -x on the function before the change is as follows: 0000000000000086 l F .text.unlikely 0000000000000739 thermal_of_build_thermal_zone And after the change it is as follows: 0000000000000000 l F .init.text 0000000000000734 thermal_of_build_thermal_zone Done with the help of Coccinelle. The semantic patch checks for local static non-init functions that are called from an __init function and are not called from any other function. Signed-off-by: Julia Lawall Signed-off-by: Eduardo Valentin drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcc7597116c6713353522eb13c765063ff88bb89 Author: Dmitry Torokhov Date: Tue Apr 19 09:54:32 2016 -0700 Input: twl4030-vibra - do not reparent to grandparent For devm-managed input devices we should not modify input device's parent, otherwise automatic release of resources will not work properly. Signed-off-by: Dmitry Torokhov drivers/input/misc/twl4030-vibra.c | 1 - 1 file changed, 1 deletion(-) commit 4bfeefd085acf1ab70ecda6087fad6c32b2b065f Author: Dmitry Torokhov Date: Tue Apr 19 09:50:09 2016 -0700 Input: twl6040-vibra - do not reparent to grandparent For devm-managed input devices we should not modify input device's parent, otherwise automatic release of resources will not work properly. Tested-by: "H. Nikolaus Schaller" Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 1 - 1 file changed, 1 deletion(-) commit 8bbb6568428fa14c5bef120d443c20e0e7d52699 Author: Hans Verkuil Date: Fri Apr 15 08:58:10 2016 -0300 [media] davinci_vpfe: Revert "staging: media: davinci_vpfe: remove,unnecessary ret variable" This reverts commit afa5d19a2b5f ("staging: media: davinci_vpfe: remove unnecessary ret variable"). This patch is completely bogus and messed up the code big time. I'm not sure what was intended, but this isn't it. Cc: Thaissa Falbo Cc: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_video.c | 54 ++++++++++++++++--------- 1 file changed, 34 insertions(+), 20 deletions(-) commit 55f058e7574c3615dea4615573a19bdb258696c6 Merge: 9a0e3ee f709b45 Author: Linus Torvalds Date: Wed Apr 20 12:00:07 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: - Incorrect output buffer size calculation in rsa-pkcs1pad - Uninitialised padding bytes on exported state in ccp driver - Potentially freed pointer used on completion callback in sha1-mb" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccp - Prevent information leakage on export crypto: sha1-mb - use corrcet pointer while completing jobs crypto: rsa-pkcs1pad - fix dst len commit d5468d7afaa9c9e961e150f0455a14a9f4872a98 Author: Vladis Dronov Date: Sun Jan 31 14:14:52 2016 -0200 [media] usbvision: revert commit 588afcc1 Commit 588afcc1c0e4 ("[media] usbvision fix overflow of interfaces array")' should be reverted, because: * "!dev->actconfig->interface[ifnum]" won't catch a case where the value is not NULL but some garbage. This way the system may crash later with GPF. * "(ifnum >= USB_MAXINTERFACES)" does not cover all the error conditions. "ifnum" should be compared to "dev->actconfig-> desc.bNumInterfaces", i.e. compared to the number of "struct usb_interface" kzalloc()-ed, not to USB_MAXINTERFACES. * There is a "struct usb_device" leak in this error path, as there is usb_get_dev(), but no usb_put_dev() on this path. * There is a bug of the same type several lines below with number of endpoints. The code is accessing hard-coded second endpoint ("interface->endpoint[1].desc") which may not exist. It would be great to handle this in the same patch too. * All the concerns above are resolved by already-accepted commit fa52bd50 ("[media] usbvision: fix crash on detecting device with invalid configuration") * Mailing list message: http://www.spinics.net/lists/linux-media/msg94832.html Signed-off-by: Vladis Dronov Signed-off-by: Hans Verkuil Cc: # for v4.5 Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 7 ------- 1 file changed, 7 deletions(-) commit df637193906a6b645d8678c748149a71852e63e9 Author: Andrew Goodbody Date: Wed Apr 20 16:14:51 2016 +0100 Revert "Prevent NUll pointer dereference with two PHYs on cpsw" This reverts commit cfe255600154f0072d4a8695590dbd194dfd1aeb This can result in a "Unable to handle kernel paging request" during boot. This was due to using an uninitialised struct member, data->slaves. Signed-off-by: Andrew Goodbody Tested-by: Tony Lindgren Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 89e9e66ba1b3bde9d8ea90566c2aee20697ad681 Author: Sebastian Andrzej Siewior Date: Fri Apr 15 14:35:39 2016 +0200 futex: Handle unlock_pi race gracefully If userspace calls UNLOCK_PI unconditionally without trying the TID -> 0 transition in user space first then the user space value might not have the waiters bit set. This opens the following race: CPU0 CPU1 uval = get_user(futex) lock(hb) lock(hb) futex |= FUTEX_WAITERS .... unlock(hb) cmpxchg(futex, uval, newval) So the cmpxchg fails and returns -EINVAL to user space, which is wrong because the futex value is valid. To handle this (yes, yet another) corner case gracefully, check for a flag change and retry. [ tglx: Massaged changelog and slightly reworked implementation ] Fixes: ccf9e6a80d9e ("futex: Make unlock_pi more robust") Signed-off-by: Sebastian Andrzej Siewior Cc: stable@vger.kernel.org Cc: Davidlohr Bueso Cc: Darren Hart Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1460723739-5195-1-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner kernel/futex.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 340ff60ae93a5db2b2be6f38868df9a1293b6007 Author: Horia Geant? Date: Tue Apr 19 20:33:48 2016 +0300 crypto: talitos - fix AEAD tcrypt tests After conversion to new AEAD interface, tcrypt tests fail as follows: [...] [ 1.145414] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-aes-talitos [ 1.153564] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 [ 1.160041] 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1.166509] 00000020: 00 00 00 00 [...] Fix them by providing the correct cipher in & cipher out pointers, i.e. must skip over associated data in src and dst S/G. While here, fix a problem with the HW S/G table index usage: tbl_off must be updated after the pointer to the table entries is set. Cc: # 4.3+ Fixes: aeb4c132f33d ("crypto: talitos - Convert to new AEAD interface") Reported-by: Jonas Eymann Signed-off-by: Horia Geant? Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit 89d124cb61b39900959e2839ac06b6339b6a54cb Author: Jonas Eymann Date: Tue Apr 19 20:33:47 2016 +0300 crypto: talitos - fix crash in talitos_cra_init() Conversion of talitos driver to the new AEAD interface hasn't been properly tested. AEAD algorithms crash in talitos_cra_init as follows: [...] [ 1.141095] talitos ffe30000.crypto: hwrng [ 1.145381] Unable to handle kernel paging request for data at address 0x00000058 [ 1.152913] Faulting instruction address: 0xc02accc0 [ 1.157910] Oops: Kernel access of bad area, sig: 11 [#1] [ 1.163315] SMP NR_CPUS=2 P1020 RDB [ 1.166810] Modules linked in: [ 1.169875] CPU: 0 PID: 1007 Comm: cryptomgr_test Not tainted 4.4.6 #1 [ 1.176415] task: db5ec200 ti: db4d6000 task.ti: db4d6000 [ 1.181821] NIP: c02accc0 LR: c02acd18 CTR: c02acd04 [ 1.186793] REGS: db4d7d30 TRAP: 0300 Not tainted (4.4.6) [ 1.192457] MSR: 00029000 CR: 95009359 XER: e0000000 [ 1.198585] DEAR: 00000058 ESR: 00000000 GPR00: c017bdc0 db4d7de0 db5ec200 df424b48 00000000 00000000 df424bfc db75a600 GPR08: df424b48 00000000 db75a628 db4d6000 00000149 00000000 c0044cac db5acda0 GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 df424940 GPR24: df424900 00003083 00000400 c0180000 db75a640 c03e9f84 df424b40 df424b48 [ 1.230978] NIP [c02accc0] talitos_cra_init+0x28/0x6c [ 1.236039] LR [c02acd18] talitos_cra_init_aead+0x14/0x28 [ 1.241443] Call Trace: [ 1.243894] [db4d7de0] [c03e9f84] 0xc03e9f84 (unreliable) [ 1.249322] [db4d7df0] [c017bdc0] crypto_create_tfm+0x5c/0xf0 [ 1.255083] [db4d7e10] [c017beec] crypto_alloc_tfm+0x98/0xf8 [ 1.260769] [db4d7e40] [c0186a20] alg_test_aead+0x28/0xc8 [ 1.266181] [db4d7e60] [c0186718] alg_test+0x260/0x2e0 [ 1.271333] [db4d7ee0] [c0183860] cryptomgr_test+0x30/0x54 [ 1.276843] [db4d7ef0] [c0044d80] kthread+0xd4/0xd8 [ 1.281741] [db4d7f40] [c000e4a4] ret_from_kernel_thread+0x5c/0x64 [ 1.287930] Instruction dump: [ 1.290902] 38600000 4e800020 81230028 7c681b78 81490010 38e9ffc0 3929ffe8 554a073e [ 1.298691] 2b8a000a 7d474f9e 812a0008 91230030 <80e90058> 39270060 7c0004ac 7cc04828 Cc: # 4.3+ Fixes: aeb4c132f33d ("crypto: talitos - Convert to new AEAD interface") Signed-off-by: Jonas Eymann Fix typo - replaced parameter of __crypto_ahash_alg(): s/tfm/alg Remove checkpatch warnings. Add commit message. Signed-off-by: Horia Geant? Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 2fee7d5b08b6419bb59de9e875d895e3a6e7bf5a Author: Masahiro Yamada Date: Wed Apr 20 10:23:31 2016 +0900 arm64: spin-table: add missing of_node_put() Since of_get_cpu_node() increments refcount, the node should be put. Signed-off-by: Masahiro Yamada Acked-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/smp_spin_table.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9859a971ca228725425238756ee89c6133306ec8 Author: Lu, Han Date: Wed Apr 20 10:08:43 2016 +0800 ALSA: hda - add PCI ID for Intel Broxton-T Add HD Audio Device PCI ID for the Intel Broxton-T platform. It is an HDA Intel PCH controller. Signed-off-by: Lu, Han Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 38740a5b87d53ceb89eb2c970150f6e94e00373a Author: Lars-Peter Clausen Date: Thu Apr 14 17:01:17 2016 +0200 usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the structure is no longer accessed beyond that point, otherwise undefined behaviour might occur. Fixes: 2e4c7553cd6f ("usb: gadget: f_fs: add aio support") Cc: # v3.15+ Signed-off-by: Lars-Peter Clausen Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9c995cc9a206a008699da82f6cd01e9b2615649a Author: Jorgen Hansen Date: Mon Apr 18 23:58:52 2016 -0700 VSOCK: Only check error on skb_recv_datagram when skb is NULL If skb_recv_datagram returns an skb, we should ignore the err value returned. Otherwise, datagram receives will return EAGAIN when they have to wait for a datagram. Acked-by: Adit Ranadive Signed-off-by: Jorgen Hansen Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2309236c13feae619572324efd3e910e66ef6bd0 Author: Konstantin Khlebnikov Date: Mon Apr 18 14:37:10 2016 +0300 cls_cgroup: get sk_classid only from full sockets skb->sk could point to timewait or request socket which has no sk_classid. Detected as "BUG: KASAN: slab-out-of-bounds in cls_cgroup_classify". Signed-off-by: Konstantin Khlebnikov Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/cls_cgroup.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 851b10d60879539bec8acecb35ed361393399282 Author: Konstantin Khlebnikov Date: Mon Apr 18 14:34:05 2016 +0300 net/mlx4_en: do batched put_page using atomic_sub This patch fixes couple error paths after allocation failures. Atomic set of page reference counter is safe only if it is zero, otherwise set can race with any speculative get_page_unless_zero. Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 04aeb56a173282210c5dab5c9b3071fa3613806f Author: Konstantin Khlebnikov Date: Mon Apr 18 14:33:54 2016 +0300 net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC High order pages are optional here since commit 51151a16a60f ("mlx4: allow order-0 memory allocations in RX path"), so here is no reason for depleting reserves. Generic __netdev_alloc_frag() implements the same logic. Signed-off-by: Konstantin Khlebnikov Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a0e3eea25d3ab267aff9d4eaed83fbe46d989d0 Merge: 12566cc 67245ff Author: Linus Torvalds Date: Tue Apr 19 16:36:18 2016 -0700 Merge branch 'ptmx-cleanup' Merge the ptmx internal interface cleanup branch. This doesn't change semantics, but it should be a sane basis for eventually getting the multi-instance devpts code into some sane shape where we can get rid of the kernel config option. Which we can hopefully get done next merge window.. * ptmx-cleanup: devpts: clean up interface to pty drivers commit c531fb27e9699eaee478ee5686a3cca5dee73602 Author: Geert Uytterhoeven Date: Mon Jan 11 19:41:12 2016 +0100 ARM: shmobile: timer: Fix preset_lpj leading to too short delays On all shmobile ARM SoCs, loop-based delays may complete early, which can be after only 1/3 (Cortex A9) or 1/2 (Cortex A7 or A15) of the minimum required time. This is caused by calculating preset_lpj based on incorrect assumptions about the number of clock cycles per loop: - All of Cortex A7, A9, and A15 run __loop_delay() at 1 loop per CPU clock cycle, - As of commit 11d4bb1bd067f9d0 ("ARM: 7907/1: lib: delay-loop: Add align directive to fix BogoMIPS calculation"), Cortex A8 runs __loop_delay() at 1 loop per 2 instead of 3 CPU clock cycles. On SoCs with Cortex A7 and/or A15 CPU cores, this went unnoticed, as delays use the ARM arch timer if available. R-Car Gen2 doesn't work if the arch timer is disabled. However, APE6 can be used without the arch timer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/timer.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 01638a7f5ef967e94e8aff455874d62e12fe32ed Author: Sjoerd Simons Date: Wed Apr 6 21:32:06 2016 +0200 Revert "ARM: dts: porter: Enable SCIF_CLK frequency and pins" This reverts commit 19417bd9c511 ("ARM: dts: porter: Enable SCIF_CLK frequency and pins") as according to http://elinux.org/File:R-CarM2-KOELSCH_PORTER-B_PORTER_C_Comparison.pdf the external oscillator for SCIF_CLK is not mounted on the porter boards. Signed-off-by: Sjoerd Simons Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 13 ------------- 1 file changed, 13 deletions(-) commit ac6908b3049397b10bcfd8143d79cbdbbd266f02 Author: Sjoerd Simons Date: Wed Apr 6 14:52:53 2016 +0200 ARM: dts: r8a7791: Don't disable referenced optional clocks clk_get on a disabled clock node will return EPROBE_DEFER, which can cause drivers to be deferred forever if such clocks are referenced in their clocks property. Update the various disabled external clock nodes to default to a frequency of 0, but don't disable them to prevent this. Signed-off-by: Sjoerd Simons Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 1 + arch/arm/boot/dts/r8a7791-porter.dts | 1 + arch/arm/boot/dts/r8a7791.dtsi | 5 +---- 3 files changed, 3 insertions(+), 4 deletions(-) commit 5d07163334ba016c053b033cd0bb3c92d7dc0229 Author: Aubrey Li Date: Thu Mar 31 14:28:09 2016 -0500 platform:x86 decouple telemetry driver from the optional IPC resources Currently the optional IPC resources prevent telemetry driver from probing if these resources are not in ACPI table. This patch decouples telemetry driver from these optional resources, so that telemetry driver has dependency only on the necessary ACPI resources. Signed-off-by: Aubrey Li Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 48 ++++++++++++++++------------------ drivers/platform/x86/intel_punit_ipc.c | 48 ++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 42 deletions(-) commit de3df8a986b635082a1d94bae2c361d043c57106 Author: Takashi Iwai Date: Tue Apr 19 22:07:50 2016 +0200 ALSA: hda - Keep powering up ADCs on Cirrus codecs Although one weird behavior about the input path (inconsistent D0/D3 switch) on Cirrus CS420x codecs was fixed in the previous commit, there is still an issue on some Mac machines: the capture stream stalls when switching the ADCs on the fly. More badly, this keeps stuck until the next reboot. The dynamic ADC switching is already a bit fragile and assuming optimistically that the chip accepts the frequent power changes. On Cirrus codecs, this doesn't seem applicable. As a quick workaround, we pin down the ADCs to keep up in D0 when spec->dyn_adc_switch is set. In this way, the ADCs are kept up only for the system that were confirmed to be broken. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171 Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_cirrus.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ac36a881b72a1e9831f1c59abf935868c90685cf Author: Vladimir Murzin Date: Tue Apr 19 12:35:55 2016 +0100 ARM: 8564/1: fix cpu feature extracting helper Commit b8c9592 "ARM: 8318/1: treat CPU feature register fields as signed quantities" introduced helper to extract signed quantities of 4-bit blocks. However, with a current code feature with value 0b1000 isn't rejected as negative. So fix the "if" condition. Reported-by: Jonathan Brawn Signed-off-by: Vladimir Murzin Acked-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/include/asm/cputype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03f1217e5fafac8eb9e28aa8d04a67b6db1e435b Author: Vladimir Murzin Date: Tue Apr 19 12:35:20 2016 +0100 ARM: 8563/1: fix demoting HWCAP_SWP Commit b8c9592 "ARM: 8318/1: treat CPU feature register fields as signed quantities" accidentally altered cpuid register used to demote HWCAP_SWP. ARM ARM says that SyncPrim_instrs bits in ID_ISAR3 should be used with SynchPrim_instrs_frac from ID_ISAR4. So, follow this rule. Signed-off-by: Vladimir Murzin Acked-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f7fb6f1e514e0ed47aee97752d6ae10491b4841 Author: H. Nikolaus Schaller Date: Mon Apr 18 14:47:14 2016 -0700 Input: twl6040-vibra - ignore return value of schedule_work Returning ret is wrong. And checking for an error as well. User space may call multiple times until the work is really scheduled. twl4030-vibra.c also ignores the return value. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 52dee2c9f0850704327d976ea5c5fa7f4696dab5 Author: H. Nikolaus Schaller Date: Mon Apr 18 14:46:30 2016 -0700 Input: twl6040-vibra - fix NULL pointer dereference by removing workqueue commit 21fb9f0d5e91 ("Input: twl6040-vibra - use system workqueue") says that it switches to use the system workqueue but it did neither - remove the workqueue struct variable - replace code to really use the system workqueue Instead it calls queue_work() on uninitialized info->workqueue. The result is a NULL pointer dereference in vibra_play(). Solution: use schedule_work Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3d51ae172d759198b2e47e104c31a92d20d17927 Author: Tony Lindgren Date: Tue Apr 19 08:01:05 2016 -0700 Revert "ARM: OMAP: Catch callers of revision information prior to it being populated" This reverts commit 571afb4c8a4bbe88541364e7f6827340562f2736. arch/arm/mach-omap1/id.c | 1 - arch/arm/mach-omap2/id.c | 1 - 2 files changed, 2 deletions(-) commit 6687659568e2ec5b3ac24b39c5d26ce8b9d90434 Author: Davidlohr Bueso Date: Sun Apr 17 23:31:41 2016 -0700 locking/pvqspinlock: Fix division by zero in qstat_read() While playing with the qstat statistics (in /qlockstat/) I ran into the following splat on a VM when opening pv_hash_hops: divide error: 0000 [#1] SMP ... RIP: 0010:[] [] qstat_read+0x12e/0x1e0 ... Call Trace: [] ? mem_cgroup_commit_charge+0x6c/0xd0 [] ? page_add_new_anon_rmap+0x8c/0xd0 [] ? handle_mm_fault+0x1439/0x1b40 [] ? do_mmap+0x449/0x550 [] ? __vfs_read+0x23/0xd0 [] ? rw_verify_area+0x52/0xd0 [] ? vfs_read+0x81/0x120 [] ? SyS_read+0x42/0xa0 [] ? entry_SYSCALL_64_fastpath+0x1e/0xa8 Fix this by verifying that qstat_pv_kick_unlock is in fact non-zero, similarly to what the qstat_pv_latency_wake case does, as if nothing else, this can come from resetting the statistics, thus having 0 kicks should be quite valid in this context. Signed-off-by: Davidlohr Bueso Reviewed-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Cc: waiman.long@hpe.com Link: http://lkml.kernel.org/r/1460961103-24953-1-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar kernel/locking/qspinlock_stat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a19cad6d66823ddd54b0e7c88d7bddd307cb1161 Merge: c3b46c7 1342e0b7 Author: Ingo Molnar Date: Tue Apr 19 08:41:59 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160418' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull a perf/urgent fix from Arnaldo Carvalho de Melo: - Fix segfault tracing transactions in Intel PT (Adrian Hunter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f077b73682910bc7dc9439e50e7b1ad97f28f3f1 Author: Greg Kroah-Hartman Date: Tue Apr 19 15:17:37 2016 +0900 Revert "serial: 8250: Add hardware dependency to RT288X option" This reverts commit 8d2acdb9fc3a544ab0442634531834d6007b5467. It's causing problems, and somehow I missed that Peter didn't like it at all :( So revert it for now until it gets sorted out. Reported-by: Mason Cc: Peter Hurley Cc: Jean Delvare Cc: Mans Rullgard Cc: Jiri Slaby Cc: John Crispin Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org drivers/tty/serial/8250/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 0c66940d584d1aac92f6a78460dc0ba2efd3b7ba Author: Yegor Yefremov Date: Thu Mar 24 09:03:45 2016 +0100 tty/serial/8250: fix RS485 half-duplex RX When in half-duplex mode RX will be disabled before TX, but not enabled after deactivating transmitter. This patch enables UART_IER_RLSI and UART_IER_RDI interrupts after TX is over. Cc: Matwey V. Kornilov Signed-off-by: Yegor Yefremov Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Acked-by: Matwey V. Kornilov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 9220ebffda4aa23fe683c9ca6c94fb72d7c131c2 Author: Sudip Mukherjee Date: Mon Apr 11 20:23:31 2016 +0530 Revert "serial-uartlite: Constify uartlite_be/uartlite_le" This reverts commit 2905697a82eaf20606ced164d853b52d1b94aaa8. The commit introduced two build warnings: drivers/tty/serial/uartlite.c: In function ‘ulite_request_port’: drivers/tty/serial/uartlite.c:348:21: warning: assignment discards ‘const’ qualifier from pointer target type port->private_data = &uartlite_be; ^ drivers/tty/serial/uartlite.c:354:22: warning: assignment discards ‘const’ qualifier from pointer target type port->private_data = &uartlite_le; ^ Signed-off-by: Sudip Mukherjee Cc: Maarten Brock Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12566cc35d0e68308bde7aad615743d560cb097b Merge: 95d0c42 67e6587 Author: Linus Torvalds Date: Mon Apr 18 19:52:47 2016 -0700 Merge tag 'pci-v4.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "These are fixes for two issues: - The VPD parsing code we added for v4.6 keeps some devices from crashing, but also keeps cxgb4 from reading non-standard extra VPD data that is relies on. Hariprasad added a way for the driver to specify how much VPD is valid. - The i.MX6 active-low reset GPIO support we added in v4.5 caused regressions on some boards, so we're reverting that. VPD: Add pci_set_vpd_size() (Hariprasad Shenai) cxgb4: Set VPD size so we can read both VPD structures (Hariprasad Shenai) Freescale i.MX6 host bridge driver: Revert "PCI: imx6: Add support for active-low reset GPIO" (Fabio Estevam)" * tag 'pci-v4.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: cxgb4: Set VPD size so we can read both VPD structures PCI: Add pci_set_vpd_size() to set VPD size Revert "PCI: imx6: Add support for active-low reset GPIO" commit c9d9c929e6741118776eb0f385339d3c2b84d5f8 Author: Rafael J. Wysocki Date: Sun Apr 10 05:59:33 2016 +0200 cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set Since governor operations are generally skipped if cpufreq_suspended is set, cpufreq_start_governor() should do nothing in that case. That function is called in the cpufreq_online() path, and may also be called from cpufreq_offline() in some cases, which are invoked by the nonboot CPUs disabing/enabling code during system suspend to RAM and resume. That happens when all devices have been suspended, so if the cpufreq driver relies on things like I2C to get the current frequency, it may not be ready to do that then. To prevent problems from happening for this reason, make cpufreq_update_current_freq(), which is the only function invoked by cpufreq_start_governor() that doesn't check cpufreq_suspended already, return 0 upfront if cpufreq_suspended is set. Fixes: 3bbf8fe3ae08 (cpufreq: Always update current frequency before startig governor) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) commit 67245ff332064c01b760afa7a384ccda024bfd24 Author: Linus Torvalds Date: Sat Apr 16 15:16:07 2016 -0700 devpts: clean up interface to pty drivers This gets rid of the horrible notion of having that struct inode *ptmx_inode be the linchpin of the interface between the pty code and devpts. By de-emphasizing the ptmx inode, a lot of things actually get cleaner, and we will have a much saner way forward. In particular, this will allow us to associate with any particular devpts instance at open-time, and not be artificially tied to one particular ptmx inode. The patch itself is actually fairly straightforward, and apart from some locking and return path cleanups it's pretty mechanical: - the interfaces that devpts exposes all take "struct pts_fs_info *" instead of "struct inode *ptmx_inode" now. NOTE! The "struct pts_fs_info" thing is a completely opaque structure as far as the pty driver is concerned: it's still declared entirely internally to devpts. So the pty code can't actually access it in any way, just pass it as a "cookie" to the devpts code. - the "look up the pts fs info" is now a single clear operation, that also does the reference count increment on the pts superblock. So "devpts_add/del_ref()" is gone, and replaced by a "lookup and get ref" operation (devpts_get_ref(inode)), along with a "put ref" op (devpts_put_ref()). - the pty master "tty->driver_data" field now contains the pts_fs_info, not the ptmx inode. - because we don't care about the ptmx inode any more as some kind of base index, the ref counting can now drop the inode games - it just gets the ref on the superblock. - the pts_fs_info now has a back-pointer to the super_block. That's so that we can easily look up the information we actually need. Although quite often, the pts fs info was actually all we wanted, and not having to look it up based on some magical inode makes things more straightforward. In particular, now that "devpts_get_ref(inode)" operation should really be the *only* place we need to look up what devpts instance we're associated with, and we do it exactly once, at ptmx_open() time. The other side of this is that one ptmx node could now be associated with multiple different devpts instances - you could have a single /dev/ptmx node, and then have multiple mount namespaces with their own instances of devpts mounted on /dev/pts/. And that's all perfectly sane in a model where we just look up the pts instance at open time. This will eventually allow us to get rid of our odd single-vs-multiple pts instance model, but this patch in itself changes no semantics, only an internal binding model. Cc: Eric Biederman Cc: Peter Anvin Cc: Andy Lutomirski Cc: Al Viro Cc: Peter Hurley Cc: Serge Hallyn Cc: Willy Tarreau Cc: Aurelien Jarno Cc: Alan Cox Cc: Jann Horn Cc: Greg KH Cc: Jiri Slaby Cc: Florian Weimer Signed-off-by: Linus Torvalds drivers/tty/pty.c | 63 ++++++++++++++++++++++------------------------- fs/devpts/inode.c | 49 ++++++++++++++++++------------------ include/linux/devpts_fs.h | 34 ++++++++----------------- 3 files changed, 64 insertions(+), 82 deletions(-) commit 8e6cb470bac6b1e7afa4642a40a71f9bcd066242 Author: Marek Vasut Date: Mon Apr 18 18:30:05 2016 +0200 iio:adc:at91-sama5d2: Repair crash on module removal The driver never calls platform_set_drvdata() , so platform_get_drvdata() in .remove returns NULL and thus $indio_dev variable in .remove is NULL. Then it's only a matter of dereferencing the indio_dev variable to make the kernel blow as seen below. This patch adds the platform_set_drvdata() call to fix the problem. root@armhf:~# rmmod at91-sama5d2_adc Unable to handle kernel NULL pointer dereference at virtual address 000001d4 pgd = dd57c000 [000001d4] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: at91_sama5d2_adc(-) CPU: 0 PID: 1334 Comm: rmmod Not tainted 4.6.0-rc3-next-20160418+ #3 Hardware name: Atmel SAMA5 task: dd4fcc40 ti: de910000 task.ti: de910000 PC is at mutex_lock+0x4/0x24 LR is at iio_device_unregister+0x14/0x6c pc : [] lr : [] psr: a00d0013 sp : de911f00 ip : 00000000 fp : be898bd8 r10: 00000000 r9 : de910000 r8 : c0107724 r7 : 00000081 r6 : bf001048 r5 : 000001d4 r4 : 00000000 r3 : bf000000 r2 : 00000000 r1 : 00000004 r0 : 000001d4 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c53c7d Table: 3d57c059 DAC: 00000051 Process rmmod (pid: 1334, stack limit = 0xde910208) Stack: (0xde911f00 to 0xde912000) 1f00: bf000000 00000000 df5c7e10 bf000010 bf000000 df5c7e10 df5c7e10 c0351ca8 1f20: c0351c84 df5c7e10 bf001048 c0350734 bf001048 df5c7e10 df5c7e44 c035087c 1f40: bf001048 7f62dd4c 00000800 c034fb30 bf0010c0 c0158ee8 de910000 31397461 1f60: 6d61735f 32643561 6364615f 00000000 de911f90 de910000 de910000 00000000 1f80: de911fb0 10c53c7d de911f9c c05f33d8 de911fa0 00910000 be898ecb 7f62dd10 1fa0: 00000000 c0107560 be898ecb 7f62dd10 7f62dd4c 00000800 6f844800 6f844800 1fc0: be898ecb 7f62dd10 00000000 00000081 00000000 7f62dd10 be898bd8 be898bd8 1fe0: b6eedab1 be898b6c 7f61056b b6eedab6 000d0030 7f62dd4c 00000000 00000000 [] (mutex_lock) from [] (iio_device_unregister+0x14/0x6c) [] (iio_device_unregister) from [] (at91_adc_remove+0x10/0x3c [at91_sama5d2_adc]) [] (at91_adc_remove [at91_sama5d2_adc]) from [] (platform_drv_remove+0x24/0x3c) [] (platform_drv_remove) from [] (__device_release_driver+0x84/0x110) [] (__device_release_driver) from [] (driver_detach+0x8c/0x90) [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0) [] (bus_remove_driver) from [] (SyS_delete_module+0x110/0x1d0) [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x3c) Code: e3520001 1affffd5 eafffff4 f5d0f000 (e1902f9f) ---[ end trace 86914d7ad3696fca ]--- Signed-off-by: Marek Vasut Cc: Ludovic Desroches Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 2 ++ 1 file changed, 2 insertions(+) commit 95d0c4277c27520cabdc40646f5a2e507fcd315a Merge: c3b46c7 2fd9227 Author: Linus Torvalds Date: Mon Apr 18 10:13:31 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "A couple of bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: add CPU_BIG_ENDIAN config option s390/spinlock: avoid yield to non existent cpu s390/dcssblk: fix possible deadlock in remove vs. per-device attributes s390/seccomp: include generic seccomp header file s390/pci: add extra padding to function measurement block s390/scm_blk: fix deadlock for requests != REQ_TYPE_FS commit dfc4f59d901bf72f93280b7c142c8ad846359c6f Author: Alex Deucher Date: Mon Apr 18 11:26:26 2016 -0400 drm/radeon: print a message if ATPX dGPU power control is missing It will help identify problematic boards. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_atpx_handler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit adb4907007445ab9d392f4ce398cd7fa5d26612b Author: Ard Biesheuvel Date: Fri Apr 15 12:11:21 2016 +0200 arm64: fix invalidation of wrong __early_cpu_boot_status cacheline In head.S, the str_l macro, which takes a source register, a symbol name and a temp register, is used to store a status value to the variable __early_cpu_boot_status. Subsequently, the value of the temp register is reused to invalidate any cachelines covering this variable. However, since str_l resolves to adrp \tmp, \sym str \src, [\tmp, :lo12:\sym] the temp register never actually holds the address of the variable but only of the 4 KB window that covers it, and reusing it leads to the wrong cacheline being invalidated. So instead, take the address explicitly before doing the store, and reuse that value to perform the cache invalidation. Fixes: bb9052744f4b ("arm64: Handle early CPU boot failures") Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Acked-by: Suzuki K Poulose Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bfaddd9fc8ac048b99475f000dbef6f08297417f Author: Alex Deucher Date: Mon Apr 18 11:19:19 2016 -0400 Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control" This reverts commit e64c952efb8e0c15ae82cec8e455ab4910690ef1. ATPX is the ACPI method for controlling AMD PowerXpress laptops. There are flags to indicate which methods are supported. If the dGPU power down flag is not supported, the driver needs to implement the dGPU power down manually. We had previously always forced the driver to assume the ATPX dGPU power down was present, but this causes problems on boards where it is not, leading to GPU hangs when attempting to power down the dGPU. Manual dGPU power down is not currently supported in the Linux driver. Some laptops indicate that the ATPX dGPU power down method is not present, but it actually apparently is. I'm not sure if this is a bios bug and it should be set or if there is a reason it was unset and the method should not be used. This is not an issue on other OSes since both the ATPX and the manual driver power down methods are supported. This is apparently fairly widespread, so just revert for now. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=115321 https://bugzilla.kernel.org/show_bug.cgi?id=116581 https://bugzilla.kernel.org/show_bug.cgi?id=116251 Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_atpx_handler.c | 8 ++++---- drivers/gpu/drm/radeon/radeon_device.c | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) commit 8f99455587855a5f79af08e40327ca40ab5f1999 Author: Alex Deucher Date: Wed Apr 13 23:37:42 2016 -0400 drm/amdgpu/acp: fix resume on CZ systems with AZ audio Nothing to do on resume on systems with AZ audio. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 ++++ 1 file changed, 4 insertions(+) commit bcb31eba4a4ea356fd61cbd5dec5511c3883f57e Author: Alex Deucher Date: Thu Apr 14 14:15:16 2016 -0400 drm/radeon: add a quirk for a XFX R9 270X bug: https://bugs.freedesktop.org/show_bug.cgi?id=76490 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 1 + 1 file changed, 1 insertion(+) commit fe0d36e03a08a6f88e5cb9f81c3b819f797e8024 Author: Alex Deucher Date: Thu Apr 14 13:16:35 2016 -0400 drm/radeon: print pci revision as well as pci ids on driver load The pci revision id is useful in debugging certain things as it's part of how SKUs are defined on newer asics. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1342e0b7a6c1a060c593037fbac9f4b717f1cb3b Author: Adrian Hunter Date: Mon Apr 18 13:57:48 2016 +0300 perf intel-pt: Fix segfault tracing transactions Tracing a workload that uses transactions gave a seg fault as follows: perf record -e intel_pt// workload perf report Program received signal SIGSEGV, Segmentation fault. 0x000000000054b58c in intel_pt_reset_last_branch_rb (ptq=0x1a36110) at util/intel-pt.c:929 929 ptq->last_branch_rb->nr = 0; (gdb) p ptq->last_branch_rb $1 = (struct branch_stack *) 0x0 (gdb) up 1148 intel_pt_reset_last_branch_rb(ptq); (gdb) l 1143 if (ret) 1144 pr_err("Intel Processor Trace: failed to deliver transaction event 1145 ret); 1146 1147 if (pt->synth_opts.callchain) 1148 intel_pt_reset_last_branch_rb(ptq); 1149 1150 return ret; 1151 } 1152 (gdb) p pt->synth_opts.callchain $2 = true (gdb) (gdb) bt #0 0x000000000054b58c in intel_pt_reset_last_branch_rb (ptq=0x1a36110) #1 0x000000000054c1e0 in intel_pt_synth_transaction_sample (ptq=0x1a36110) #2 0x000000000054c5b2 in intel_pt_sample (ptq=0x1a36110) Caused by checking the 'callchain' flag when it should have been the 'last_branch' flag. Fix that. Reported-by: Andi Kleen Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org # v4.4+ Fixes: f14445ee72c5 ("perf intel-pt: Support generating branch stack") Link: http://lkml.kernel.org/r/1460977068-11566-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4705e02498d6d5a7ab98dfee9595cd5e91db2017 Author: Anton Blanchard Date: Fri Apr 15 12:08:19 2016 +1000 powerpc: Update TM user feature bits in scan_features() We need to update the user TM feature bits (PPC_FEATURE2_HTM and PPC_FEATURE2_HTM) to mirror what we do with the kernel TM feature bit. At the moment, if firmware reports TM is not available we turn off the kernel TM feature bit but leave the userspace ones on. Userspace thinks it can execute TM instructions and it dies trying. This (together with a QEMU patch) fixes PR KVM, which doesn't currently support TM. Signed-off-by: Anton Blanchard Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit beff82374b259d726e2625ec6c518a5f2613f0ae Author: Anton Blanchard Date: Fri Apr 15 12:07:24 2016 +1000 powerpc: Update cpu_user_features2 in scan_features() scan_features() updates cpu_user_features but not cpu_user_features2. Amongst other things, cpu_user_features2 contains the user TM feature bits which we must keep in sync with the kernel TM feature bit. Signed-off-by: Anton Blanchard Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 6997e57d693b07289694239e52a10d2f02c3a46f Author: Anton Blanchard Date: Fri Apr 15 12:06:13 2016 +1000 powerpc: scan_features() updates incorrect bits for REAL_LE The REAL_LE feature entry in the ibm_pa_feature struct is missing an MMU feature value, meaning all the remaining elements initialise the wrong values. This means instead of checking for byte 5, bit 0, we check for byte 0, bit 0, and then we incorrectly set the CPU feature bit as well as MMU feature bit 1 and CPU user feature bits 0 and 2 (5). Checking byte 0 bit 0 (IBM numbering), means we're looking at the "Memory Management Unit (MMU)" feature - ie. does the CPU have an MMU. In practice that bit is set on all platforms which have the property. This means we set CPU_FTR_REAL_LE always. In practice that seems not to matter because all the modern cpus which have this property also implement REAL_LE, and we've never needed to disable it. We're also incorrectly setting MMU feature bit 1, which is: #define MMU_FTR_TYPE_8xx 0x00000002 Luckily the only place that looks for MMU_FTR_TYPE_8xx is in Book3E code, which can't run on the same cpus as scan_features(). So this also doesn't matter in practice. Finally in the CPU user feature mask, we're setting bits 0 and 2. Bit 2 is not currently used, and bit 0 is: #define PPC_FEATURE_PPC_LE 0x00000001 Which says the CPU supports the old style "PPC Little Endian" mode. Again this should be harmless in practice as no 64-bit CPUs implement that mode. Fix the code by adding the missing initialisation of the MMU feature. Also add a comment marking CPU user feature bit 2 (0x4) as reserved. It would be unsafe to start using it as old kernels incorrectly set it. Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related features") Signed-off-by: Anton Blanchard Cc: stable@vger.kernel.org [mpe: Flesh out changelog, add comment reserving 0x4] Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/cputable.h | 1 + arch/powerpc/kernel/prom.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit afecb146d8d8a60a1dde9cdf570c278649617fde Author: Bastien Nocera Date: Mon Apr 18 11:10:42 2016 +0200 ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m The Optiplex 9020m with Haswell-DT processor needs a quirk for the headset jack at the front of the machine to be able to use microphones. A quirk for this model was originally added in 3127899, but c77900e removed it in favour of a more generic version. Unfortunately, pin configurations can changed based on firmware/BIOS versions, and the generic version doesn't have any effect on newer versions of the machine/firmware anymore. With help from David Henningsson Signed-off-by: Bastien Nocera Tested-by: Bastien Nocera Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 31318a922395ec9e78d6e2ddf70779355afc7594 Author: Ville Syrjälä Date: Thu Apr 14 14:39:02 2016 +0300 drm/i915: Use fw_domains_put_with_fifo() on HSW HSW still has the wake FIFO, so let's check it. Cc: Mika Kuoppala Cc: Deepak S Fixes: 05a2fb157e44 ("drm/i915: Consolidate forcewake code") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1460633942-24013-1-git-send-email-ville.syrjala@linux.intel.com Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala (cherry picked from commit 3d7d0c85e41afb5a05e98b3a8a72c38357f02594) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_uncore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1b3e885a05d4f0a35dde035724e7c6453d2cbe71 Author: Chris Wilson Date: Wed Apr 13 17:35:11 2016 +0100 drm/i915: Force ringbuffers to not be at offset 0 For reasons unknown Sandybridge GT1 (at least) will eventually hang when it encounters a ring wraparound at offset 0. The test case that reproduces the bug reliably forces a large number of interrupted context switches, thereby causing very frequent ring wraparounds, but there are similar bug reports in the wild with the same symptoms, seqno writes stop just before the wrap and the ringbuffer at address 0. It is also timing crucial, but adding various delays hasn't helped pinpoint where the window lies. Whether the fault is restricted to the ringbuffer itself or the GTT addressing is unclear, but moving the ringbuffer fixes all the hangs I have been able to reproduce. References: (e.g.) https://bugs.freedesktop.org/show_bug.cgi?id=93262 Testcase: igt/gem_exec_whisper/render-contexts-interruptible #snb-gt1 Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-12-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit a687a43a48f0f91ba37dce5a14b467258ed6f035) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ringbuffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 537d3b10086ffae30efbc7c66777c0a08b58d3e6 Author: Michał Winiarski Date: Tue Apr 12 15:51:55 2016 +0200 drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write We started to use PIPE_CONTROL to write render ring seqno in order to combat seqno write vs interrupt generation problems. This was introduced by commit 7c17d377374d ("drm/i915: Use ordered seqno write interrupt generation on gen8+ execlists"). On gen8+ size of PIPE_CONTROL with Post Sync Operation should be 6 dwords. When we're using older 5-dword variant it's possible to observe inconsistent values written by PIPE_CONTROL with Post Sync Operation from user batches, resulting in rendering corruptions. v2: Fix BAT failures v3: Comments on alignment and thrashing high dword of seqno (Chris) v4: Updated commit msg (Mika) Testcase: igt/gem_pipe_control_store_loop/*-qword-write Issue: VIZ-7393 Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Mika Kuoppala Cc: Abdiel Janulgue Signed-off-by: Michał Winiarski Reviewed-by: Mika Kuoppala Reviewed-by: Chris Wilson Tested-by: Abdiel Janulgue Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1460469115-26002-1-git-send-email-michal.winiarski@intel.com (cherry picked from commit ce81a65c79d6012a384563caf76d47e28947a347) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 510650e8b2ab965931b35e9813467439d4df0b9c Author: Mika Kuoppala Date: Tue Apr 5 15:56:17 2016 +0300 drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs Experiments with heaven 4.0 benchmark and skylake gt3e (rev 0xa) suggest that WaForceContextSaveRestoreNonCoherent is needed for all revs. Extending this to all revs cures a gpu hang with rev 0xa when running heaven4.0 gpu benchmark. We have been here before, with problems enabling gt4e and extending up to revision F0 instead of false claims of bspec of E0 only. See commit ("drm/i915/skl: Default to noncoherent access up to F0"). In retrospect we should have covered this with this big blanket back then already, as E0 vs F0 discrepancy was suspicious enough. Previously the WaForceEnableNonCoherent has been tied to context non-coherence, atleast in relevant hsds. So keep this tie and extended this alongside. Cc: Abdiel Janulgue Cc: Ben Widawsky Cc: Timo Aaltonen Cc: stable@vger.kernel.org Reported-by: Mike Lothian References: https://bugs.freedesktop.org/show_bug.cgi?id=93491 Signed-off-by: Mika Kuoppala Reviewed-by: Ben Widawsky Tested-by: Timo Aaltonen Link: http://patchwork.freedesktop.org/patch/msgid/1459860977-27751-2-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 97ea6be161c55dec896b65c95157d953c330ae05) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d528a6a0f3fd346bd7cc2de611a4149b6ebaab41 Author: Mika Kuoppala Date: Tue Apr 5 15:56:16 2016 +0300 drm/i915/skl: Fix rc6 based gpu/system hang For all gt3 and gt4 skylake variants, extend the usage of WaRsDisableCoarsePowerGating for all revisions. Without this gt3 and gt4 skylakes up to atleast rev 0xa can gpu hang or system hang. Cc: Abdiel Janulgue Cc: Ben Widawsky Cc: Timo Aaltonen Cc: Reported-by: Mikael Djurfeldt References: https://bugs.freedesktop.org/show_bug.cgi?id=94161 Signed-off-by: Mika Kuoppala Reviewed-by: Ben Widawsky Tested-by: Timo Aaltonen Link: http://patchwork.freedesktop.org/patch/msgid/1459860977-27751-1-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 185c66e57ce725afeb58a3cfa48547706af3a7af) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit db9f9203e27495b2d151b695504e286eec026e9b Author: Chris Wilson Date: Tue Apr 5 15:00:00 2016 +0100 drm/i915/userptr: Hold mmref whilst calling get-user-pages Holding a reference to the containing task_struct is not sufficient to prevent the mm_struct from being reaped under memory pressure. If this happens whilst we are calling get_user_pages(), explosions erupt - sometimes an immediate GPF, sometimes page flag corruption. To prevent the target mm from being reaped as we are reading from it, acquire a reference before we begin. Testcase: igt/gem_shrink/*userptr Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: stable@vger.kernel.org Reviewed-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/1459864801-28606-2-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit 40313f0cd0b711a7a5905e5182422799e157d8aa) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_userptr.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit d43f3ebf12f59c57782ec652da65ef61c2662b40 Author: Akash Goel Date: Fri Mar 11 14:56:42 2016 +0530 drm/i915: Fixup the free space logic in ring_prepare Currently for the case where there is enough space at the end of Ring buffer for accommodating only the base request, the wrapround is done immediately and as a result the base request gets added at the start of Ring buffer. But there may not be enough free space at the beginning to accommodate the base request, as before the wraparound, the wait was effectively done for the reserved_size free space from the start of Ring buffer. In such a case there is a potential of Ring buffer overflow, the instructions at the head of Ring (ACTHD) can get overwritten. Since the base request can fit in the remaining space, there is no need to wraparound immediately. The wraparound will anyway happen later when the reserved part starts getting used. Cc: Chris Wilson Signed-off-by: Akash Goel Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1457688402-10411-1-git-send-email-akash.goel@intel.com Reviewed-by: Chris Wilson Cc: stable@vger.kernel.org (cherry picked from commit 782f6bc0aba037436d6a04d19b23f8b61020a576) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 9aec6a08f1163fb24c23f9036891e1d5bab3f1be Author: Kumar, Mahesh Date: Wed Apr 6 08:26:39 2016 -0700 drm/i915/skl+: Use plane size for relative data rate calculation Use plane size for relative data rate calculation. don't always use pipe source width & height. adjust height & width according to rotation. use plane size for watermark calculations also. v2: Address Matt's comments. Use intel_plane_state->visible to avoid divide-by-zero error. Where FB was present but not visible so causing total data rate to be zero, hence divide-by-zero. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93917 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94044 Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Kumar, Mahesh Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1459956399-1296-1-git-send-email-matthew.d.roper@intel.com (cherry picked from commit a280f7dd9f1a85eed242d0f62498bfc11520a1a3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 42 +++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit 9772b47a4c2916d645c551228b6085ea24acbe5d Author: Roger Quadros Date: Tue Apr 12 11:33:29 2016 +0300 usb: dwc3: gadget: Fix suspend/resume during device mode Gadget controller might not be always active during system suspend/resume as gadget driver might not have yet been loaded or might have been unloaded prior to system suspend. Check if we're active and only then perform necessary actions during suspend/resume. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e6bdf8195b4a43ebff71f25fc7ca5e436e79161a Author: Du, Changbin Date: Tue Apr 12 16:24:34 2016 +0800 usb: dwc3: fix memory leak of dwc->regset dwc->regset is allocated on dwc3_debugfs_init, and should be released on init failure or dwc3_debugfs_exit. Btw, The line "dwc->root = NULL" is unnecessary, so remove it. Signed-off-by: Du, Changbin [ felipe.balbi@linux.intel.com : add another err label for the new error condition ] Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5c4ad318de3b8e8680d654c82a254c4b65243739 Author: Felipe Balbi Date: Mon Apr 11 17:12:34 2016 +0300 usb: dwc3: core: fix PHY handling during suspend we need to power off the PHY during suspend and power it back on during resume. Signed-off-by: Felipe Balbi [nsekhar@ti.com: fix call to usb_phy_set_suspend() in dwc3_suspend()] Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 45d49cb706e5d8f0ca5e868118b5d453afbb938f Author: Felipe Balbi Date: Mon Apr 11 17:12:33 2016 +0300 usb: dwc3: omap: fix up error path on probe() Even if pm_runtime_get*() fails, we *MUST* call pm_runtime_put_sync() before disabling PM. While at it, remove superfluous dwc3_omap_disable_irqs() in error path. Signed-off-by: Felipe Balbi [nsekhar@ti.com: patch description updates] Signed-off-by: Sekhar Nori Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-omap.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 138b8638bb43d4b85eeaacde9be9c687cc7e5de7 Author: John Youn Date: Fri Apr 8 14:46:31 2016 -0700 usb: gadget: composite: Clear reserved fields of SSP Dev Cap Set the reserved fields of the SuperSpeed Plus Device Capability descriptor to 0. Otherwise there might be stale data there which will cause USB CV to fail. Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 2 ++ 1 file changed, 2 insertions(+) commit 6e1c7d6103fe7031035cec321307c6356809adf4 Author: Adrian Hunter Date: Fri Apr 15 14:06:57 2016 +0300 mmc: sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs Baytrail eMMC/SD/SDIO host controllers have been known to hang. A change to a hardware setting has been found to reduce the occurrence of such hangs. This patch ensures the correct setting. This patch applies cleanly to v4.4+. It could go to earlier kernels also, so I will send backports to the stable list in due course. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-acpi.c | 81 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) commit 4dacad61514494f2eba9e60d5b4aa71971dac6a1 Author: Vladimir Zapolskiy Date: Wed Mar 23 00:51:54 2016 +0200 omapfb: panel-sharp-ls037v7dw01: fix check of gpio_to_desc() return value The change fixes a check of gpio_to_desc() return value, the function returns either a valid pointer to struct gpio_desc or NULL, this makes IS_ERR() check invalid and may lead to a NULL pointer dereference in runtime. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Tomi Valkeinen .../fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit f36fdacc5fcdca7b0c0d89f031fcdc89717e0be3 Author: Linus Walleij Date: Tue Feb 23 11:01:38 2016 +0100 video: ARM CLCD: runtime check for Versatile The current compile-time check for inversed IENB/CNTL does not work in multiplatform boots: as soon as versatile is included in the build, the IENB/CNTL is switched and breaks graphics. Convert this to a runtime switch. Cc: stable@vger.kernel.org Cc: Rob Herring Cc: Russell King Fixes: a29da136de34 ("ARM: versatile: convert to multi-platform") Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen drivers/video/fbdev/amba-clcd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ed0739b577f2ddd53835f1e20d014fccab195c42 Author: Libin Yang Date: Mon Apr 18 09:16:28 2016 +0800 ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap Make sure per_pin is not NULL before using it. Fixes: 9b3dc8aa3fb1 ('ALSA: hda - Register chmap obj as priv data instead of codec') Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit c3b46c73264b03000d1e18b22f5caf63332547c9 Author: Linus Torvalds Date: Sun Apr 17 19:13:32 2016 -0700 Linux 4.6-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab2ed0171a50ddee8390f472bb83f60d393b4b04 Author: Arnd Bergmann Date: Sun Apr 17 11:19:55 2016 +0200 macsec: fix crypto Kconfig dependency The new MACsec driver uses the AES crypto algorithm, but can be configured even if CONFIG_CRYPTO is disabled, leading to a build error: warning: (MAC80211 && MACSEC) selects CRYPTO_GCM which has unmet direct dependencies (CRYPTO) warning: (BT && CEPH_LIB && INET && MAC802154 && MAC80211 && BLK_DEV_RBD && MACSEC && AIRO_CS && LIBIPW && HOSTAP && USB_WUSB && RTLLIB_CRYPTO_CCMP && FS_ENCRYPTION && EXT4_ENCRYPTION && CEPH_FS && BIG_KEYS && ENCRYPTED_KEYS) selects CRYPTO_AES which has unmet direct dependencies (CRYPTO) crypto/built-in.o: In function `gcm_enc_copy_hash': aes_generic.c:(.text+0x2b8): undefined reference to `crypto_xor' aes_generic.c:(.text+0x2dc): undefined reference to `scatterwalk_map_and_copy' This adds an explicit 'select CRYPTO' statement the way that other drivers handle it. Signed-off-by: Arnd Bergmann Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: David S. Miller drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d090d01e3efdcdb8f7f07e86fcac91e01ae30cd Merge: b9f5dba 6545b60 Author: Linus Torvalds Date: Sun Apr 17 12:30:06 2016 -0700 Merge tag 'dm-4.6-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mike Snitzer: "Fix for earlier 4.6-rc4 stable@ commit that introduced improper use of write lock in cmd_read_lock() -- due to cut-n-paste gone awry (and sparse didn't catch it)" * tag 'dm-4.6-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache metadata: fix cmd_read_lock() acquiring write lock commit 6545b60baaf880b0cd29a5e89dbe745a06027e89 Author: Ahmed Samy Date: Sun Apr 17 05:37:09 2016 +0000 dm cache metadata: fix cmd_read_lock() acquiring write lock Commit 9567366fefdd ("dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros") uses down_write() instead of down_read() in cmd_read_lock(), yet up_read() is used to release the lock in READ_UNLOCK(). Fix it. Fixes: 9567366fefdd ("dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros") Cc: stable@vger.kernel.org Signed-off-by: Ahmed Samy Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eda5ecc0a6b865561997e177c393f0b0136fe3b7 Author: Stephen Boyd Date: Sun Apr 17 05:21:42 2016 -0700 Input: pmic8xxx-pwrkey - fix algorithm for converting trigger delay The trigger delay algorithm that converts from microseconds to the register value looks incorrect. According to most of the PMIC documentation, the equation is delay (Seconds) = (1 / 1024) * 2 ^ (x + 4) except for one case where the documentation looks to have a formatting issue and the equation looks like delay (Seconds) = (1 / 1024) * 2 x + 4 Most likely this driver was written with the improper documentation to begin with. According to the downstream sources the valid delays are from 2 seconds to 1/64 second, and the latter equation just doesn't make sense for that. Let's fix the algorithm and the range check to match the documentation and the downstream sources. Reported-by: Bjorn Andersson Fixes: 92d57a73e410 ("input: Add support for Qualcomm PMIC8XXX power key") Signed-off-by: Stephen Boyd Tested-by: John Stultz Acked-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/misc/pmic8xxx-pwrkey.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ca3704c23a3b3dfc9d721cf21953fd6b3cbfc3e0 Author: Charles Keepax Date: Sun Apr 17 05:20:32 2016 -0700 Input: arizona-haptic - don't assign input_dev parent We shouldn't assign the parent device of the input_dev to be the parent MFD device, because this will be used for devres which causes input_unregister_device to run after the haptics device has been removed, since it is itself a child of the MFD device. The default of using the haptics device itself as the parent is correct. Signed-off-by: Charles Keepax Signed-off-by: Dmitry Torokhov drivers/input/misc/arizona-haptics.c | 1 - 1 file changed, 1 deletion(-) commit 05be8d4101d960bad271d32b4f6096af1ccb1534 Author: Richard Leitner Date: Tue Apr 5 15:03:48 2016 +0200 iio: ak8975: fix maybe-uninitialized warning If i2c_device_id *id is NULL and acpi_match_device returns NULL too, then chipset may be unitialized when accessing &ak_def_array[chipset] in ak8975_probe. Therefore initialize chipset to AK_MAX_TYPE, which will return an error when not changed. This patch fixes the following maybe-uninitialized warning: drivers/iio/magnetometer/ak8975.c: In function ‘ak8975_probe’: drivers/iio/magnetometer/ak8975.c:788:14: warning: ‘chipset’ may be used uninitialized in this function [-Wmaybe-uninitialized] data->def = &ak_def_array[chipset]; Signed-off-by: Richard Leitner Cc: Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8975.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d2390e36ee5b3265e9cc8305f2a106c8721e16 Author: Krzysztof Kozlowski Date: Mon Apr 4 14:54:59 2016 +0900 iio: ak8975: Fix NULL pointer exception on early interrupt In certain probe conditions the interrupt came right after registering the handler causing a NULL pointer exception because of uninitialized waitqueue: $ udevadm trigger i2c-gpio i2c-gpio-1: using pins 143 (SDA) and 144 (SCL) i2c-gpio i2c-gpio-3: using pins 53 (SDA) and 52 (SCL) Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = e8b38000 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: snd_soc_i2s(+) i2c_gpio(+) snd_soc_idma snd_soc_s3c_dma snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ac97_bus spi_s3c64xx pwm_samsung dwc2 exynos_adc phy_exynos_usb2 exynosdrm exynos_rng rng_core rtc_s3c CPU: 0 PID: 717 Comm: data-provider-m Not tainted 4.6.0-rc1-next-20160401-00011-g1b8d87473b9e-dirty #101 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) (...) (__wake_up_common) from [] (__wake_up+0x38/0x4c) (__wake_up) from [] (ak8975_irq_handler+0x28/0x30) (ak8975_irq_handler) from [] (handle_irq_event_percpu+0x88/0x140) (handle_irq_event_percpu) from [] (handle_irq_event+0x44/0x68) (handle_irq_event) from [] (handle_edge_irq+0xf0/0x19c) (handle_edge_irq) from [] (generic_handle_irq+0x24/0x34) (generic_handle_irq) from [] (exynos_eint_gpio_irq+0x50/0x68) (exynos_eint_gpio_irq) from [] (handle_irq_event_percpu+0x88/0x140) (handle_irq_event_percpu) from [] (handle_irq_event+0x44/0x68) (handle_irq_event) from [] (handle_fasteoi_irq+0xb4/0x194) (handle_fasteoi_irq) from [] (generic_handle_irq+0x24/0x34) (generic_handle_irq) from [] (__handle_domain_irq+0x5c/0xb4) (__handle_domain_irq) from [] (gic_handle_irq+0x54/0x94) (gic_handle_irq) from [] (__irq_usr+0x50/0x80) The bug was reproduced on exynos4412-trats2 (with a max77693 device also using i2c-gpio) after building max77693 as a module. Cc: Fixes: 94a6d5cf7caa ("iio:ak8975 Implement data ready interrupt handling") Signed-off-by: Krzysztof Kozlowski Tested-by: Gregor Boirie Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/ak8975.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50fd4987c4f3c3ebf0ce94d932732011bbdc7c71 Author: Takashi Iwai Date: Sun Apr 17 09:39:41 2016 +0200 ALSA: hda - Don't trust the reported actual power state We've got a regression report that the recording on Mac with a cirrus codec doesn't work any longer. This turned out to be the missing power up to D0 by power_save_node enablement. After analyzing the traces, we found out that the culprit is that the codec advertises the "actual" power state of a few nodes to be D0 while the "target" power state is D3. This inconsistency is usually OK, as it implies the power transition. But in the case of cirrus codec, this seems to be stuck to D3 while it's not actually D0. This patch addresses the issue by checking the power state difference more strictly. It sends the power-state change verb unless both the target and the actual power states show the given value. We may introduce yet another flag indicating the possible broken hardware power state, but it's anyway safer to set the proper power state even in a transition (at least it's harmless as long as the target state is same). So this simpler change was applied now. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171 Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b9f5dba225aede4518ab0a7374c2dc38c7c049ce Merge: e1e22b2 053f78d Author: Linus Torvalds Date: Sat Apr 16 20:59:06 2016 -0700 Merge tag 'char-misc-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small char/misc driver fixes for 4.6-rc4. Full details are in the shortlog, nothing major here. These have all been in linux-next for a while with no reported issues" * tag 'char-misc-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: lkdtm: do not leak free page on kmalloc failure lkdtm: fix memory leak of base lkdtm: fix memory leak of val extcon: palmas: Drop stray IRQF_EARLY_RESUME flag commit e1e22b27ec6c83d026c2ca14624f207a08c28ec3 Merge: b62dabf dea5c24 Author: Linus Torvalds Date: Sat Apr 16 20:53:50 2016 -0700 Merge tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull misc fixes from Greg KH: "Here are three small fixes for 4.6-rc4. Two fix up some lz4 issues with big endian systems, and the remaining one resolves a minor debugfs issue that was reported. All have been in linux-next with no reported issues" * tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: lib: lz4: cleanup unaligned access efficiency detection lib: lz4: fixed zram with lz4 on big endian machines debugfs: Make automount point inodes permanently empty commit b62dabfb4b28a2d88deb4907ed0249da4d33d279 Merge: 306a63b e86103a Author: Linus Torvalds Date: Sat Apr 16 20:48:14 2016 -0700 Merge tag 'usb-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are some small USB fixes for 4.6-rc4. Mostly xhci fixes for reported issues, a UAS bug that has hit a number of people, including stable tree users, and a few other minor things. All have been in linux-next for a while with no reported issues" * tag 'usb-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: hcd: out of bounds access in for_each_companion USB: uas: Add a new NO_REPORT_LUNS quirk USB: uas: Limit qdepth at the scsi-host level doc: usb: Fix typo in gadget_multi documentation usb: host: xhci-plat: Make enum xhci_plat_type start at a non zero value xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers usb: xhci: fix wild pointers in xhci_mem_cleanup usb: host: xhci-plat: fix cannot work if R-Car Gen2/3 run on above 4GB phys usb: host: xhci: add a new quirk XHCI_NO_64BIT_SUPPORT xhci: resume USB 3 roothub first usb: xhci: applying XHCI_PME_STUCK_QUIRK to Intel BXT B0 host cdc-acm: fix crash if flushed with nothing buffered commit 6517eb59b03965689e6bb16bb2d480096b3ef95d Author: Eric Dumazet Date: Fri Apr 15 10:47:52 2016 -0700 net: bcmgenet: device stats are unsigned long On 64bit kernels, device stats are 64bit wide, not 32bit. Fixes: 1c1008c793fa4 ("net: bcmgenet: add main driver file") Signed-off-by: Eric Dumazet Cc: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cf6b5fb2514de55d5f97d5f55a251de4de17d07e Merge: e47db94 207afda Author: David S. Miller Date: Sat Apr 16 19:07:11 2016 -0400 Merge branch 'dsa-mv88e6xxx-fix-cross-chip-bridging' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: fix hardware cross-chip bridging In order to accelerate cross-chip switching of frames with the hardware, the DSA Tag ports, used to interconnect switch devices, must learn SA and DA addresses, and share the same FDB with the user ports. The two first patches restore address learning on DSA links. This fixes hardware cross-chip bridging in a VLAN filtering enabled system, which implements a bridge group as a 802.1Q VLAN and thus share an isolated address database between DSA and user ports. The third patch changes the distinct default databases used for each port, to the same address database. This fixes the hardware cross-chip bridging in a VLAN filtering disabled system, where a bridge group gets implemented only as a port-based VLAN. ==================== Signed-off-by: David S. Miller commit 207afda1b5036009e611df2106e6d441be397bee Author: Vivien Didelot Date: Thu Apr 14 14:42:09 2016 -0400 net: dsa: mv88e6xxx: share the same default FDB For hardware cross-chip bridging to work, user ports *and* DSA ports need to share a common address database, in order to switch a frame to the correct interconnected device. This is currently working for VLAN filtering aware systems, since Linux will implement a bridge group as a 802.1Q VLAN, which has its own FDB, including DSA and CPU links as members. However when the system doesn't support VLAN filtering, Linux only relies on the port-based VLAN to implement a bridge group. To fix hardware cross-chip bridging for such systems, set the same default address database 0 for user and DSA ports, instead of giving them all a different default database. Note that the bridging code prevents frames to egress between unbridged ports, and flushes FDB entries of a port when changing its STP state. Also note that the FID 0 is special and means "all" for ATU operations, but it's OK since it is used as a default forwarding address database. Fixes: 2db9ce1fd9a3 ("net: dsa: mv88e6xxx: assign default FDB to ports") Fixes: 466dfa077022 ("net: dsa: mv88e6xxx: assign dynamic FDB to bridges") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) commit 996ecb8246676100af2a4dc1cfed747712a3c85f Author: Vivien Didelot Date: Thu Apr 14 14:42:08 2016 -0400 net: dsa: mv88e6xxx: enable SA learning on DSA ports In multi-chip systems, DSA Tag ports must learn SA addresses in order to correctly switch frames between interconnected chips. This fixes cross-chip hardware bridging in a VLAN filtering aware system, because a bridge group gets implemented as an hardware 802.1Q VLAN and thus DSA and user ports share the same FDB. Fixes: 4c7ea3c0791e ("net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65fa40276ac1318e75264e5a204547b57c2cf397 Author: Vivien Didelot Date: Thu Apr 14 14:42:07 2016 -0400 net: dsa: mv88e6xxx: unlock DSA and CPU ports Locking a port generates an hardware interrupt when a new SA address is received. This enables CPU directed learning, which is needed for 802.1X MAC authentication. To disable automatic learning on a port, the only configuration needed is to set its Port Association Vector to all zero. Clear PAV when SA learning should be disabled instead of locking a port. Fixes: 4c7ea3c0791e ("net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e47db94e10447fc467777a40302f2b393e9af2fa Author: santosh.shilimkar@oracle.com Date: Thu Apr 14 10:43:27 2016 -0700 RDS: Fix the atomicity for congestion map update Two different threads with different rds sockets may be in rds_recv_rcvbuf_delta() via receive path. If their ports both map to the same word in the congestion map, then using non-atomic ops to update it could cause the map to be incorrect. Lets use atomics to avoid such an issue. Full credit to Wengang for finding the issue, analysing it and also pointing out to offending code with spin lock based fix. Reviewed-by: Leon Romanovsky Signed-off-by: Wengang Wang Signed-off-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/cong.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7c556546f610a331c22cb7edd9d1afe63f0cd52 Author: Qing Huang Date: Thu Apr 14 10:43:26 2016 -0700 RDS: fix endianness for dp_ack_seq dp->dp_ack_seq is used in big endian format. We need to do the big endianness conversion when we assign a value in host format to it. Signed-off-by: Qing Huang Signed-off-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 306a63bee192859ebd32c7328c7766636d882d8f Merge: ac82a57 956e6c8 Author: Linus Torvalds Date: Sat Apr 16 15:52:38 2016 -0700 Merge tag 'dmaengine-fix-4.6-rc4' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "This time we have some odd fixes in hsu, edma, omap and xilinx. Usual fixes and nothing special" * tag 'dmaengine-fix-4.6-rc4' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: dw: fix master selection dmaengine: edma: special case slot limit workaround dmaengine: edma: Remove dynamic TPTC power management feature dmaengine: vdma: don't crash when bad channel is requested dmaengine: omap-dma: Do not suppress interrupts for memcpy dmaengine: omap-dma: Fix polled channel completion detection and handling dmaengine: hsu: correct use of channel status register dmaengine: hsu: correct residue calculation of active descriptor dmaengine: hsu: set HSU_CH_MTSR to memory width commit ac82a57aff853599db757f666204ac8d2af4b26b Merge: e2f50c5 5c8a010 Author: Linus Torvalds Date: Sat Apr 16 15:43:19 2016 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixlet from Ingo Molnar: "Fixes a build warning on certain Kconfig combinations" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Fix print_collision() unused warning commit e2f50c5c6cd8dcfda30b8d656fe213f7e285c54a Merge: 2e57259 f4d5b8a Author: Linus Torvalds Date: Sat Apr 16 15:37:05 2016 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Ingo Molnar: "An arm64 boot crash fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm64: Don't apply MEMBLOCK_NOMAP to UEFI memory map mapping commit 956e6c8e18fa666ccc118c85fb32f92ebde3baf1 Merge: 1cc3334 a482f4e Author: Vinod Koul Date: Sat Apr 16 22:52:03 2016 +0530 Merge branch 'fix/edma' into fixes commit 1cc3334e2e0263b02163a9edd43d0448ac00770c Merge: 4bd6135 330ed4d Author: Vinod Koul Date: Sat Apr 16 22:45:26 2016 +0530 Merge branch 'fix/xilinx' into fixes commit 4bd613596bc8572dee8a0683a24f6f931841b695 Merge: 09c505c b96c033 Author: Vinod Koul Date: Sat Apr 16 22:45:17 2016 +0530 Merge branch 'fix/omap' into fixes commit 09c505ced310016ff064d827f053a78988a8bb1d Merge: 3fe6409 4f4bc0a Author: Vinod Koul Date: Sat Apr 16 22:44:32 2016 +0530 Merge branch 'fix/hsu' into fixes commit 1e2ae9ec072f3b7887f456426bc2cf23b80f661a Author: Vitaly Kuznetsov Date: Fri Apr 15 15:50:32 2016 +0200 x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances Generation2 instances don't support reporting the NMI status on port 0x61, read from there returns 'ff' and we end up reporting nonsensical PCI error (as there is no PCI bus in these instances) on all NMIs: NMI: PCI system error (SERR) for reason ff on CPU 0. Dazed and confused, but trying to continue Fix the issue by overriding x86_platform.get_nmi_reason. Use 'booted on EFI' flag to detect Gen2 instances. Signed-off-by: Vitaly Kuznetsov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Cathy Avery Cc: Haiyang Zhang Cc: Jiri Olsa Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: devel@linuxdriverproject.org Link: http://lkml.kernel.org/r/1460728232-31433-1-git-send-email-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mshyperv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b1547d3101e74e809b9790174b27f1080747b009 Author: Josh Poimboeuf Date: Fri Apr 15 09:17:10 2016 -0500 objtool: Detect falling through to the next function There are several cases in compiled C code where a function may not return at the end, and may instead fall through to the next function. That may indicate a bug in the code, or a gcc bug, or even an objtool bug. But in each case, objtool reports an unhelpful warning, something like: drivers/scsi/qla2xxx/qla_attr.o: warning: objtool: qla2x00_get_fc_host_stats()+0x0: duplicate frame pointer save drivers/scsi/qla2xxx/qla_attr.o: warning: objtool: qla2x00_get_fc_host_stats()+0x0: frame pointer state mismatch Detect this situation and print a more useful error message: drivers/scsi/qla2xxx/qla_attr.o: warning: objtool: qla2x00_get_host_fabric_name() falls through to next function qla2x00_get_starget_node_name() Also add some information about this warning and its potential causes to the documentation. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf 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: Thomas Gleixner Link: http://lkml.kernel.org/r/caa4ec6c687931db805e692d4e4bf06cd87d33e6.1460729697.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Documentation/stack-validation.txt | 38 +++++++++++++++----- tools/objtool/builtin-check.c | 46 ++++++++++++++++-------- 2 files changed, 61 insertions(+), 23 deletions(-) commit 9241e2df4fbc648a92ea0752918e05c26255649e Author: Daniel Borkmann Date: Sat Apr 16 02:27:58 2016 +0200 vlan: pull on __vlan_insert_tag error path and fix csum correction When __vlan_insert_tag() fails from skb_vlan_push() path due to the skb_cow_head(), we need to undo the __skb_push() in the error path as well that was done earlier to move skb->data pointer to mac header. Moreover, I noticed that when in the non-error path the __skb_pull() is done and the original offset to mac header was non-zero, we fixup from a wrong skb->data offset in the checksum complete processing. So the skb_postpush_rcsum() really needs to be done before __skb_pull() where skb->data still points to the mac header start and thus operates under the same conditions as in __vlan_insert_tag(). Fixes: 93515d53b133 ("net: move vlan pop/push functions into common code") Signed-off-by: Daniel Borkmann Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/core/skbuff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2e572599139d27db3aaf540b0d34f0a4f58dfca1 Merge: f3c9a1a a7297a6 Author: Linus Torvalds Date: Fri Apr 15 15:44:10 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes for the current series. This contains: - Two fixes for NVMe: One fixes a reset race that can be triggered by repeated insert/removal of the module. The other fixes an issue on some platforms, where we get probe timeouts since legacy interrupts isn't working. This used not to be a problem since we had the worker thread poll for completions, but since that was killed off, it means those poor souls can't successfully probe their NVMe device. Use a proper IRQ check and probe (msi-x -> msi ->legacy), like most other drivers to work around this. Both from Keith. - A loop corruption issue with offset in iters, from Ming Lei. - A fix for not having the partition stat per cpu ref count initialized before sending out the KOBJ_ADD, which could cause user space to access the counter prior to initialization. Also from Ming Lei. - A fix for using the wrong congestion state, from Kaixu Xia" * 'for-linus' of git://git.kernel.dk/linux-block: block: loop: fix filesystem corruption in case of aio/dio NVMe: Always use MSI/MSI-x interrupts NVMe: Fix reset/remove race writeback: fix the wrong congested state variable definition block: partition: initialize percpuref before sending out KOBJ_ADD commit 2c49477f2a0fdccfe4765326efa5567c5b259aa1 Merge: 2aac7dd 7196c52 Author: Stephen Boyd Date: Fri Apr 15 15:40:49 2016 -0700 Merge tag 'imx-clk-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-fixes The i.MX clk fixes for 4.6: - Fix the typo in CAN clock definition which is introduced by commit ee36027427c7 ("clk: imx: Add clock support for imx6qp") * tag 'imx-clk-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx6q: fix typo in CAN clock definition commit f3c9a1abbe9d4c9565fdb0755e2c7814f32d4f62 Merge: 29dde7c 0a370d26 Author: Linus Torvalds Date: Fri Apr 15 15:34:27 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Ross Zwisler: "Two fixes: - Fix memcpy_from_pmem() to fallback to memcpy() for architectures where CONFIG_ARCH_HAS_PMEM_API=n. - Add a comment explaining why we write data twice when clearing poison in pmem_do_bvec(). This has passed a boot test on an X86_32 config, which was the architecture where issue #1 above was first noticed" Dan Williams adds: "We're giving this multi-maintainer setup a shot, so expect libnvdimm pull requests from either Ross or I going forward" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pmem: clarify the write+clear_poison+write flow pmem: fix BUG() error in pmem.h:48 on X86_32 commit 29dde7c25adafcdcbde3a14bce3f07e5a201dc30 Merge: 2fffad1 20c07a5 Author: Linus Torvalds Date: Fri Apr 15 15:25:09 2016 -0700 Merge tag 'for-linus-20160415' of git://git.infradead.org/linux-mtd Pull MTD fix from Brian Norris: "One MTD fix for v4.6-rc4: In the v4.4 cycle, we relaxed the requirement for assigning mtd->owner, but we didn't remove this error case. It's hit only by drivers that are both: (a) using nand_scan() directly and (b) built as modules We haven't seen explicit complaints about this (most use cases don't fit one or both of the above), but we should definitely not be BUG()'ing here" * tag 'for-linus-20160415' of git://git.infradead.org/linux-mtd: mtd: nand: Drop mtd.owner requirement in nand_scan commit 2fffad128730526799eb9f37329e8b598f0fc8d8 Merge: ab5f9eb 70ad7f7 Author: Linus Torvalds Date: Fri Apr 15 15:10:32 2016 -0700 Merge tag 'mmc-v4.6-rc3' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.6 rc4. Regarding the fix for the regression about mmcblk device indexes. The approach taken to solve the problem seems to be good enough. There were some discussions around the solution, but it seems like people were happy about it in the end. MMC core: - Restore similar old behaviour when assigning mmcblk device indexes MMC host: - tegra: Disable UHS-I modes for Tegra124 to fix regression" * tag 'mmc-v4.6-rc3' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: tegra: Disable UHS-I modes for Tegra124 mmc: block: Use the mmc host device index as the mmcblk device index commit ab5f9ebac1fcdf7feaf41a55e463e181ea0b4ea2 Merge: 60ea7bb ff3e84e Author: Linus Torvalds Date: Fri Apr 15 14:59:28 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This contains fixes for exynos, amdgpu, radeon, i915 and qxl. It also contains some fixes to the core drm edid parser. qxl: - fix for a cursor hotspot issue radeon: - some MST fixes that I've been running locally and make my monitor a bit happier exynos: - fix some regressions and build fixes amdgpu: - a couple of small fixes i915: - two DP MST fixes and a couple of other regression fixes Nothing too out of the ordinary or surprising at this point" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency drm/exynos: fix a warning message drm/exynos: mic: fix an error code drm/exynos: fimd: fix broken dp_clock control drm/exynos: build fbdev code conditionally drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set drm/exynos: fix error handling in exynos_drm_subdrv_open drm/amd/amdgpu: fix irq domain remove for tonga ih drm/i915: fix deadlock on lid open drm/radeon: use helper for mst connector dpms. drm/radeon/mst: port some MST setup code from DAL. drm/amdgpu: add invisible pin size statistic drm/edid: Fix DMT 1024x768@43Hz (interlaced) timings drm/i915: Exit cherryview_irq_handler() after one pass drm/i915: Call intel_dp_mst_resume() before resuming displays drm/i915: Fix race condition in intel_dp_destroy_mst_connector() drm/edid: Fix parsing of EDID 1.4 Established Timings III descriptor drm/edid: Fix EDID Established Timings I and II drm/qxl: fix cursor position with non-zero hotspot commit 60ea7bb0077b38f80a3a27b9e32ad45879944a57 Merge: 806fdcc 366dd4e Author: Linus Torvalds Date: Fri Apr 15 14:51:45 2016 -0700 Merge branch 'parisc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc ftrace fixes from Helge Deller: "This is (most likely) the last pull request for v4.6 for the parisc architecture. It fixes the FTRACE feature for parisc, which is horribly broken since quite some time and doesn't even compile. This patch just fixes the bare minimum (it actually removes more lines than it adds), so that the function tracer works again on 32- and 64bit kernels. I've queued up additional patches on top of this patch which e.g. add the syscall tracer, but those have to wait for the merge window for v4.7." * 'parisc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix ftrace function tracer commit cfe255600154f0072d4a8695590dbd194dfd1aeb Author: Andrew Goodbody Date: Wed Apr 13 15:36:48 2016 +0100 cpsw: Prevent NUll pointer dereference with two PHYs Adding a 2nd PHY to cpsw results in a NULL pointer dereference as below. Fix by maintaining a reference to each PHY node in slave struct instead of a single reference in the priv struct which was overwritten by the 2nd PHY. [ 17.870933] Unable to handle kernel NULL pointer dereference at virtual address 00000180 [ 17.879557] pgd = dc8bc000 [ 17.882514] [00000180] *pgd=9c882831, *pte=00000000, *ppte=00000000 [ 17.889213] Internal error: Oops: 17 [#1] ARM [ 17.893838] Modules linked in: [ 17.897102] CPU: 0 PID: 1657 Comm: connmand Not tainted 4.5.0-ge463dfb-dirty #11 [ 17.904947] Hardware name: Cambrionix whippet [ 17.909576] task: dc859240 ti: dc968000 task.ti: dc968000 [ 17.915339] PC is at phy_attached_print+0x18/0x8c [ 17.920339] LR is at phy_attached_info+0x14/0x18 [ 17.925247] pc : [] lr : [] psr: 600f0113 [ 17.925247] sp : dc969cf8 ip : dc969d28 fp : dc969d18 [ 17.937425] r10: dda7a400 r9 : 00000000 r8 : 00000000 [ 17.942971] r7 : 00000001 r6 : ddb00480 r5 : ddb8cb34 r4 : 00000000 [ 17.949898] r3 : c0954cc0 r2 : c09562b0 r1 : 00000000 r0 : 00000000 [ 17.956829] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 17.964401] Control: 10c5387d Table: 9c8bc019 DAC: 00000051 [ 17.970500] Process connmand (pid: 1657, stack limit = 0xdc968210) [ 17.977059] Stack: (0xdc969cf8 to 0xdc96a000) [ 17.981692] 9ce0: dc969d28 dc969d08 [ 17.990386] 9d00: c038f9bc c038f6b4 ddb00480 dc969d34 dc969d28 c042bb74 c042bae4 00000000 [ 17.999080] 9d20: c09562b0 c0954cc0 dc969d5c dc969d38 c043ebfc c042bb6c 00000007 00000003 [ 18.007773] 9d40: ddb00000 ddb8cb58 ddb00480 00000001 dc969dec dc969d60 c0441614 c043ea68 [ 18.016465] 9d60: 00000000 00000003 00000000 fffffff4 dc969df4 0000000d 00000000 00000000 [ 18.025159] 9d80: dc969db4 dc969d90 c005dc08 c05839e0 dc969df4 0000000d ddb00000 00001002 [ 18.033851] 9da0: 00000000 00000000 dc969dcc dc969db8 c005ddf4 c005dbc8 00000000 00000118 [ 18.042544] 9dc0: dc969dec dc969dd0 ddb00000 c06db27c ffff9003 00001002 00000000 00000000 [ 18.051237] 9de0: dc969e0c dc969df0 c057c88c c04410dc dc969e0c ddb00000 ddb00000 00000001 [ 18.059930] 9e00: dc969e34 dc969e10 c057cb44 c057c7d8 ddb00000 ddb00138 00001002 beaeda20 [ 18.068622] 9e20: 00000000 00000000 dc969e5c dc969e38 c057cc28 c057cac0 00000000 dc969e80 [ 18.077315] 9e40: dda7a40c beaeda20 00000000 00000000 dc969ecc dc969e60 c05e36d0 c057cc14 [ 18.086007] 9e60: dc969e84 00000051 beaeda20 00000000 dda7a40c 00000014 ddb00000 00008914 [ 18.094699] 9e80: 30687465 00000000 00000000 00000000 00009003 00000000 00000000 00000000 [ 18.103391] 9ea0: 00001002 00008914 dd257ae0 beaeda20 c098a428 beaeda20 00000011 00000000 [ 18.112084] 9ec0: dc969edc dc969ed0 c05e4e54 c05e3030 dc969efc dc969ee0 c055f5ac c05e4cc4 [ 18.120777] 9ee0: beaeda20 dd257ae0 dc8ab4c0 00008914 dc969f7c dc969f00 c010b388 c055f45c [ 18.129471] 9f00: c071ca40 dd257ac0 c00165e8 dc968000 dc969f3c dc969f20 dc969f64 dc969f28 [ 18.138164] 9f20: c0115708 c0683ec8 dd257ac0 dd257ac0 dc969f74 dc969f40 c055f350 c00fc66c [ 18.146857] 9f40: dd82e4d0 00000011 00000000 00080000 dd257ac0 00000000 dc8ab4c0 dc8ab4c0 [ 18.155550] 9f60: 00008914 beaeda20 00000011 00000000 dc969fa4 dc969f80 c010bc34 c010b2fc [ 18.164242] 9f80: 00000000 00000011 00000002 00000036 c00165e8 dc968000 00000000 dc969fa8 [ 18.172935] 9fa0: c00163e0 c010bbcc 00000000 00000011 00000011 00008914 beaeda20 00009003 [ 18.181628] 9fc0: 00000000 00000011 00000002 00000036 00081018 00000001 00000000 beaedc10 [ 18.190320] 9fe0: 00083188 beaeda1c 00043a5d b6d29c0c 600b0010 00000011 00000000 00000000 [ 18.198989] Backtrace: [ 18.201621] [] (phy_attached_print) from [] (phy_attached_info+0x14/0x18) [ 18.210664] r3:c0954cc0 r2:c09562b0 r1:00000000 [ 18.215588] r4:ddb00480 [ 18.218322] [] (phy_attached_info) from [] (cpsw_slave_open+0x1a0/0x280) [ 18.227293] [] (cpsw_slave_open) from [] (cpsw_ndo_open+0x544/0x674) [ 18.235874] r7:00000001 r6:ddb00480 r5:ddb8cb58 r4:ddb00000 [ 18.241944] [] (cpsw_ndo_open) from [] (__dev_open+0xc0/0x128) [ 18.249972] r9:00000000 r8:00000000 r7:00001002 r6:ffff9003 r5:c06db27c r4:ddb00000 [ 18.258255] [] (__dev_open) from [] (__dev_change_flags+0x90/0x154) [ 18.266745] r5:00000001 r4:ddb00000 [ 18.270575] [] (__dev_change_flags) from [] (dev_change_flags+0x20/0x50) [ 18.279523] r9:00000000 r8:00000000 r7:beaeda20 r6:00001002 r5:ddb00138 r4:ddb00000 [ 18.287811] [] (dev_change_flags) from [] (devinet_ioctl+0x6ac/0x76c) [ 18.296483] r9:00000000 r8:00000000 r7:beaeda20 r6:dda7a40c r5:dc969e80 r4:00000000 [ 18.304762] [] (devinet_ioctl) from [] (inet_ioctl+0x19c/0x1c8) [ 18.312882] r10:00000000 r9:00000011 r8:beaeda20 r7:c098a428 r6:beaeda20 r5:dd257ae0 [ 18.321235] r4:00008914 [ 18.323956] [] (inet_ioctl) from [] (sock_ioctl+0x15c/0x2d8) [ 18.331829] [] (sock_ioctl) from [] (do_vfs_ioctl+0x98/0x8d0) [ 18.339765] r7:00008914 r6:dc8ab4c0 r5:dd257ae0 r4:beaeda20 [ 18.345822] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x74/0x84) [ 18.353573] r10:00000000 r9:00000011 r8:beaeda20 r7:00008914 r6:dc8ab4c0 r5:dc8ab4c0 [ 18.361924] r4:00000000 [ 18.364653] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) [ 18.372682] r9:dc968000 r8:c00165e8 r7:00000036 r6:00000002 r5:00000011 r4:00000000 [ 18.380960] Code: e92dd810 e24cb010 e24dd010 e59b4004 (e5902180) [ 18.387580] ---[ end trace c80529466223f3f3 ]--- Signed-off-by: Andrew Goodbody Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 0a370d261c805286cbdfa1f96661322a28cce860 Author: Dan Williams Date: Thu Apr 14 19:40:47 2016 -0700 libnvdimm, pmem: clarify the write+clear_poison+write flow The ACPI specification does not specify the state of data after a clear poison operation. Potential future libnvdimm bus implementations for other architectures also might not specify or disagree on the state of data after clear poison. Clarify why we write twice. Reported-by: Jeff Moyer Reported-by: Vishal Verma Signed-off-by: Dan Williams Signed-off-by: Ross Zwisler Reviewed-by: Johannes Thumshirn Reviewed-by: Jeff Moyer Reviewed-by: Vishal Verma drivers/nvdimm/pmem.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit de478a61389cacafe94dc8b035081b681b878f9d Author: Oleksij Rempel Date: Tue Apr 12 19:37:44 2016 +0200 ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move mask_m & mask_p initialisation. This coused a performance regression on ar9281. Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.") Reported-by: Gustav Frederiksen Tested-by: Gustav Frederiksen Cc: # 4.2+ Signed-off-by: Oleksij Rempel Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar5008_phy.c | 8 +++----- drivers/net/wireless/ath/ath9k/ar9002_phy.c | 5 ----- 2 files changed, 3 insertions(+), 10 deletions(-) commit 67e658794ca191b3221b143f2a1c10d002c40bc8 Author: Hariprasad Shenai Date: Fri Apr 15 13:00:18 2016 -0500 cxgb4: Set VPD size so we can read both VPD structures Chelsio adapters have two VPD structures stored in the VPD: - offset 0x000: an abbreviated VPD, and - offset 0x400: the complete VPD. After 104daa71b396 ("PCI: Determine actual VPD size on first access"), the PCI core computes the valid VPD size by parsing the VPD starting at offset 0x0. That size only includes the abbreviated VPD structure, so reads of the complete VPD at 0x400 fail. Explicitly set the VPD size with pci_set_vpd_size() so the driver can read both VPD structures. [bhelgaas: changelog, split patches, rename to pci_set_vpd_size() and return int (not ssize_t)] Fixes: 104daa71b396 ("PCI: Determine actual VPD size on first access") Tested-by: Steve Wise Signed-off-by: Casey Leedom Signed-off-by: Hariprasad Shenai Signed-off-by: Bjorn Helgaas drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cb92148b58a49455f3a7204eba3aee09a8b7683c Author: Hariprasad Shenai Date: Fri Apr 15 13:00:11 2016 -0500 PCI: Add pci_set_vpd_size() to set VPD size After 104daa71b396 ("PCI: Determine actual VPD size on first access"), the PCI core computes the valid VPD size by parsing the VPD starting at offset 0x0. We don't attempt to read past that valid size because that causes some devices to crash. However, some devices do have data past that valid size. For example, Chelsio adapters contain two VPD structures, and the driver needs both of them. Add pci_set_vpd_size(). If a driver knows it is safe to read past the end of the VPD data structure at offset 0, it can use pci_set_vpd_size() to allow access to as much data as it needs. [bhelgaas: changelog, split patches, rename to pci_set_vpd_size() and return int (not ssize_t)] Fixes: 104daa71b396 ("PCI: Determine actual VPD size on first access") Tested-by: Steve Wise Signed-off-by: Casey Leedom Signed-off-by: Hariprasad Shenai Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 42 ++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pci.h | 1 + include/linux/pci.h | 1 + 3 files changed, 44 insertions(+) commit ab9f87c413c297cb9e7d544e0e634aaadc7fb87d Author: Charles Keepax Date: Fri Apr 15 13:11:57 2016 +0100 ASoC: wm5102: Free compressed IRQ in CODEC remove We request one of the DSP IRQs during CODEC probe, as such we should free it during CODEC remove, this patch does so. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5102.c | 3 +++ 1 file changed, 3 insertions(+) commit 54dca7015a7d6c09d34623c6ec61de30896186dd Author: Charles Keepax Date: Fri Apr 15 13:11:56 2016 +0100 ASoC: arizona: Free speaker thermal IRQs in CODEC remove The thermal warning IRQs for the speaker are requested in CODEC probe but never freed. This patch frees them in CODEC remove. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 12 ++++++++++++ sound/soc/codecs/arizona.h | 2 ++ sound/soc/codecs/cs47l24.c | 3 +++ sound/soc/codecs/wm5102.c | 2 ++ sound/soc/codecs/wm5110.c | 2 ++ sound/soc/codecs/wm8997.c | 2 ++ sound/soc/codecs/wm8998.c | 2 ++ 7 files changed, 25 insertions(+) commit 2fd92273646abad21766ddfbfa00b6f927362308 Author: Heiko Carstens Date: Thu Apr 14 09:00:27 2016 +0200 s390: add CPU_BIG_ENDIAN config option Make sure that s390 appears to be a big endian machine by defining this config option. Without this s390 appears to be little endian as seen by e.g. the recordmount script: "perl ./scripts/recordmcount.pl "s390" "little" "64"" This has no practical impact within the script since the endian variable is only evaluated for mips. However there are already a couple of common code places which evaluate this config option. None of them is relevant for s390 currently though. To avoid any issues in the future (and fix the recordmcount oddity) add the new config option. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 8497695243f70fd19ed6cf28b63584f1b608b5f9 Author: Heiko Carstens Date: Wed Apr 13 11:05:20 2016 +0200 s390/spinlock: avoid yield to non existent cpu arch_spin_lock_wait_flags() checks if a spinlock is not held before trying a compare and swap instruction. If the lock is unlocked it tries the compare and swap instruction, however if a different cpu grabbed the lock in the meantime the instruction will fail as expected. Subsequently the arch_spin_lock_wait_flags() incorrectly tries to figure out if the cpu that holds the lock is running. However it is using the wrong cpu number for this (-1) and then will also yield the current cpu to the wrong cpu. Fix this by adding a missing continue statement. Fixes: 470ada6b1a1d ("s390/spinlock: refactor arch_spin_lock_wait[_flags]") Signed-off-by: Heiko Carstens Acked-by: Martin Schwidefsky arch/s390/lib/spinlock.c | 1 + 1 file changed, 1 insertion(+) commit 1378a683443753923eb22d01ce322e92a383ba8a Author: Gerald Schaefer Date: Fri Apr 8 13:23:52 2016 +0200 s390/dcssblk: fix possible deadlock in remove vs. per-device attributes dcssblk_remove_store() holds the dcssblk_devices_sem semaphore while calling device_unregister(), which in turn tries to acquire the kernfs kn->dev_map rwsem for the device sysfs subtree. The same rwsem is also acquired when using the per-device sysfs attributes in the device sub-tree, and the attribute handlers then also acquire the dcssblk_devices_sem. This can lead to a deadlock when removing a DCSS while concurrently reading from / writing to one of its sysfs attributes. The following lockdep warning hinted towards the issue (CPU0 = dcssblk_remove_store, CPU1 = dcssblk_shared_store): [ 76.496047] Possible unsafe locking scenario: [ 76.496054] CPU0 CPU1 [ 76.496059] ---- ---- [ 76.496087] lock(&dcssblk_devices_sem); [ 76.496090] lock(s_active#175); [ 76.496106] lock(&dcssblk_devices_sem); [ 76.496110] lock(s_active#175); [ 76.496115] *** DEADLOCK *** Fix this by releasing the dcssblk_devices_sem semaphore, which only protects internal DCSS data, before calling device_unregister(). Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky drivers/s390/block/dcssblk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a7718360d91eedbedd58978ec8fff4a67a866f86 Author: Dan Carpenter Date: Fri Apr 15 17:46:34 2016 +0300 thinkpad_acpi: Silence an uninitialized variable warning If fan_get_status() fails then "s" is not initialized. Tweak the error handling a bit to silence this warning. Signed-off-by: Dan Carpenter Signed-off-by: Darren Hart drivers/platform/x86/thinkpad_acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d0192dca2d6b64c043db5babb40076d13a6e955b Author: Dan Carpenter Date: Fri Apr 15 17:45:58 2016 +0300 intel_telemetry_pltdrv: Silence an uninitialized variable warning Presumably "pss_period" and "ioss_period" can't both be zero, but this function is never called so we can't infer that using static analysis alone. Silence the warning by setting "ret" to zero. Signed-off-by: Dan Carpenter Signed-off-by: Darren Hart drivers/platform/x86/intel_telemetry_pltdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff22b4806dd79ba06c78255b67e73c10e34d47cc Author: Dan Carpenter Date: Fri Apr 15 17:47:20 2016 +0300 hp_accel: Silence an uninitialized variable warning If acpi_evaluate_integer() fails then "lret" isn't initialized. I've tweaked the error handling to avoid this issue. Signed-off-by: Dan Carpenter Signed-off-by: Darren Hart drivers/platform/x86/hp_accel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a7297a6a3a3322b054592e8e988981d2f5f29cc4 Author: Ming Lei Date: Fri Apr 15 18:51:28 2016 +0800 block: loop: fix filesystem corruption in case of aio/dio Starting from commit e36f620428(block: split bios to max possible length), block core starts to split bio in the middle of bvec. Unfortunately loop dio/aio doesn't consider this situation, and always treat 'iter.iov_offset' as zero. Then filesystem corruption is observed. This patch figures out the offset of the base bvevc via 'bio->bi_iter.bi_bvec_done' and fixes the issue by passing the offset to iov iterator. Fixes: e36f6204288088f (block: split bios to max possible length) Cc: Keith Busch Cc: Al Viro Cc: stable@vger.kernel.org (4.5) Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/loop.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f709b45ec461b548c41a00044dba1f1b572783bf Author: Tom Lendacky Date: Wed Apr 13 10:52:25 2016 -0500 crypto: ccp - Prevent information leakage on export Prevent information from leaking to userspace by doing a memset to 0 of the export state structure before setting the structure values and copying it. This prevents un-initialized padding areas from being copied into the export area. Cc: # 3.14.x- Reported-by: Ben Hutchings Signed-off-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 3 +++ drivers/crypto/ccp/ccp-crypto-sha.c | 3 +++ 2 files changed, 6 insertions(+) commit 0851561d9c965df086ef8a53f981f5f95a57c2c8 Author: Xiaodong Liu Date: Tue Apr 12 09:45:51 2016 +0000 crypto: sha1-mb - use corrcet pointer while completing jobs In sha_complete_job, incorrect mcryptd_hash_request_ctx pointer is used when check and complete other jobs. If the memory of first completed req is freed, while still completing other jobs in the func, kernel will crash since NULL pointer is assigned to RIP. Cc: Signed-off-by: Xiaodong Liu Acked-by: Tim Chen Signed-off-by: Herbert Xu arch/x86/crypto/sha-mb/sha1_mb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f0904ada402a45b3a0a3b9b6507d91d3a9da67a Author: Tadeusz Struk Date: Wed Apr 6 14:42:32 2016 -0700 crypto: rsa-pkcs1pad - fix dst len The output buffer length has to be at least as big as the key_size. It is then updated to the actual output size by the implementation. Cc: Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu crypto/rsa-pkcs1pad.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7e578441a4a3bba2a79426ca0f709c801210d08e Author: Josh Poimboeuf Date: Thu Apr 14 14:52:24 2016 -0500 objtool: Add workaround for GCC switch jump table bug GCC has a rare quirk, currently only seen in three driver functions in the kernel, and only with certain obscure non-distro configs, which can cause objtool to produce "unreachable instruction" false positive warnings. As part of an optimization, GCC makes a copy of an existing switch jump table, modifies it, and then hard-codes the jump (albeit with an indirect jump) to use a single entry in the table. The rest of the jump table and some of its jump targets remain as dead code. In such a case we can just crudely ignore all unreachable instruction warnings for the entire object file. Ideally we would just ignore them for the function, but that would require redesigning the code quite a bit. And honestly that's just not worth doing: unreachable instruction warnings are of questionable value anyway, and this is a very rare issue. kbuild reports: https://lkml.kernel.org/r/201603231906.LWcVUpxm%25fengguang.wu@intel.com https://lkml.kernel.org/r/201603271114.K9i45biy%25fengguang.wu@intel.com https://lkml.kernel.org/r/201603291058.zuJ6ben1%25fengguang.wu@intel.com GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70604 Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/700fa029bbb0feff34f03ffc69d666a3c3b57a61.1460663532.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 53 +++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 12 deletions(-) commit 56b367c0cd67d4c3006738e7dc9dda9273fd2bfe Author: Keerthy Date: Thu Apr 14 10:29:16 2016 +0530 pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs pcs_parse_bits_in_pinctrl_entry uses ffs which gives bit indices ranging from 1 to MAX. This leads to a corner case where we try to request the pin number = MAX and fails. bit_pos value is being calculted using ffs. pin_num_from_lsb uses bit_pos value. pins array is populated with: pin + pin_num_from_lsb. The above is 1 more than usual bit indices as bit_pos uses ffs to compute first set bit. Hence the last of the pins array is populated with the MAX value and not MAX - 1 which causes error when we call pin_request. mask_pos is rightly calculated as ((pcs->fmask) << (bit_pos - 1)) Consequently val_pos and submask are correct. Hence use __ffs which gives (ffs(x) - 1) as the first bit set. fixes: 4e7e8017a8 ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules") Signed-off-by: Keerthy Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 Author: Jack Pham Date: Thu Apr 14 23:37:26 2016 -0700 regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case Specifically for the case of reads that use the Extended Register Read Long command, a multi-byte read operation is broken up into 8-byte chunks. However the call to spmi_ext_register_readl() is incorrectly passing 'val_size', which if greater than 8 will always fail. The argument should instead be 'len'. Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces") Signed-off-by: Jack Pham Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/base/regmap/regmap-spmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c18fcf7ae0ef87f0723dfd74c27d608c7486e0e Author: Alexandre Courbot Date: Wed Apr 13 05:55:29 2016 +0100 ARM: 8551/2: DMA: Fix kzalloc flags in __dma_alloc Commit 19e6e5e5392b ("ARM: 8547/1: dma-mapping: store buffer information") allocates a structure meant for internal buffer management with the GFP flags of the buffer itself. This can trigger the following safeguard in the slab/slub allocator: if (unlikely(flags & GFP_SLAB_BUG_MASK)) { pr_emerg("gfp: %un", flags & GFP_SLAB_BUG_MASK); BUG(); } Fix this by filtering the flags that make the slab allocator unhappy. Signed-off-by: Alexandre Courbot Acked-by: Rabin Vincent Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5fedbb923936174ab4d1d5cc92bca1cf6b2e0ca2 Author: Yingjoe Chen Date: Sat Apr 2 14:57:49 2016 +0800 pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce The debounce time unit for gpio_chip.set_debounce is us but mtk_gpio_set_debounce regard it as ms. Fix this by correct debounce time array dbnc_arr so it can find correct debounce setting. Debounce time for first debounce setting is 500us, correct this as well. While I'm at it, also change the debounce time array name to "debounce_time" for readability. Cc: stable@vger.kernel.org Signed-off-by: Yingjoe Chen Reviewed-by: Daniel Kurtz Acked-by: Hongzhou Yang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 330a106508128056b3d7b6c940a4e906da2282dc Author: Martin Vajnar Date: Sat Apr 2 20:11:13 2016 +0200 hp_accel: Add support for HP ProBook 440 G3 HP ProBook 440 G3 laptop needs a non-standard mapping (x_inverted_usd). Signed-off-by: Martin Vajnar Acked-by: Éric Piel Signed-off-by: Darren Hart drivers/platform/x86/hp_accel.c | 2 ++ 1 file changed, 2 insertions(+) commit 806fdcce017dc98c4dbf8ed001750a0d7d2bb0af Merge: a1f9831 a312549 Author: Linus Torvalds Date: Thu Apr 14 19:53:46 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: a binutils fix, an lguest fix, an mcelog fix and a missing documentation fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Avoid using object after free in genpool lguest, x86/entry/32: Fix handling of guest syscalls using interrupt gates x86/build: Build compressed x86 kernels as PIE x86/mm/pkeys: Add missing Documentation commit a1f983174dd7e535e50ca850fcfb3b8d38149f39 Merge: 63a1281 c12d2da Author: Linus Torvalds Date: Thu Apr 14 19:31:34 2016 -0700 Merge branch 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull mm gup cleanup from Ingo Molnar: "This removes the ugly get-user-pages API hack, now that all upstream code has been migrated to it" ("ugly" is putting it mildly. But it worked.. - Linus) * 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs commit 63a1281b651b8ebc04c829254c62bd6fbaf83eb0 Merge: 0a3f5af 9567366 Author: Linus Torvalds Date: Thu Apr 14 19:07:45 2016 -0700 Merge tag 'dm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - fix a 4.6-rc1 bio-based DM 'struct dm_target_io' leak in an error path - stable@ fix for DM cache metadata's READ_LOCK macros that were incorrectly returning error if the block manager was in read-only mode; also cleanup multi-statement macros to use do {} while(0) * tag 'dm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros dm: fix dm_target_io leak if clone_bio() returns an error commit 0a3f5af188c4f7df44517e50bee4dbf87c256813 Merge: c8c5285 ad06fde Author: Linus Torvalds Date: Thu Apr 14 19:02:06 2016 -0700 Merge tag 'pwm/for-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fix from Thierry Reding: "A single one-line fix to turn the regmap cache from an RB-tree to a flat cache to avoid lockdep and abort issues" * tag 'pwm/for-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: fsl-ftm: Use flat regmap cache commit c8c52850e642117899d592682ce857df00cdc753 Merge: a7109a2 c44da62 Author: Linus Torvalds Date: Thu Apr 14 18:47:51 2016 -0700 Merge tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "We've had a very calm development cycle, so far. Here are the few fixes for HD-audio and USB-audio, all of which are small and easy" * tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix inconsistent monitor_present state until repoll ALSA: hda - Fix regression of monitor_present flag in eld proc file ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s ALSA: sscape: Use correct format identifier for size_t ALSA: usb-audio: Add a quirk for Plantronics BT300 ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320 ALSA: hda - Bind with i915 only when Intel graphics is present commit a7109a2ca79ce868620db3fff884277084a9d646 Merge: dfe7058 0c44d78 Author: Linus Torvalds Date: Thu Apr 14 18:40:47 2016 -0700 Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox fixes from Jussi Brar: "Misc fixes: mailbox-test driver: - prevent memory leak and another cosmetic change mailbox: - change the returned error code Xgene driver: - return -ENOMEM instead of PTR_ERR for failed devm_kzalloc" * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Stop using ENOSYS for anything other than unimplemented syscalls mailbox: mailbox-test: Prevent memory leak mailbox: mailbox-test: Use more consistent format for calling copy_from_user() mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc commit dfe70581c1b7a7625baa6ba26f8876d337845a23 Merge: 16382ed 03a8bb0 Author: Linus Torvalds Date: Thu Apr 14 18:22:42 2016 -0700 Merge tag 'for-linus-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs/fscrypto fixes from Jaegeuk Kim: "In addition to f2fs/fscrypto fixes, I've added one patch which prevents RCU mode lookup in d_revalidate, as Al mentioned. These patches fix f2fs and fscrypto based on -rc3 bug fixes in ext4 crypto, which have not yet been fully propagated as follows. - use of dget_parent and file_dentry to avoid crashes - disallow RCU-mode lookup in d_invalidate - disallow -ENOMEM in the core data encryption path" * tag 'for-linus-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: ext4/fscrypto: avoid RCU lookup in d_revalidate fscrypto: don't let data integrity writebacks fail with ENOMEM f2fs: use dget_parent and file_dentry in f2fs_file_open fscrypto: use dget_parent() in fscrypt_d_revalidate() commit c02bc350f9dbce7d637c394a6e1c4d29dc5b28b2 Author: Felix Fietkau Date: Tue Apr 12 18:27:29 2016 +0200 bgmac: fix MAC soft-reset bit for corerev > 4 Only core revisions older than 4 use BGMAC_CMDCFG_SR_REV0. This mainly fixes support for BCM4708A0KF SoCs with Ethernet core rev 5 (it means only some devices as most of BCM4708A0KF-s got core rev 4). This was tested for regressions on BCM47094 which doesn't seem to care which bit gets used. Signed-off-by: Felix Fietkau Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16382ed978cb40713684cfa0f25dc255a58d0c59 Merge: 4c0b1c6 47cd3060 Author: Linus Torvalds Date: Thu Apr 14 18:15:40 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 an NFS regression caused by the skcipher/hash conversion in sunrpc. It also fixes a build problem in certain configurations with bcm63xx" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: bcm63xx - fix device tree compilation sunrpc: Fix skcipher/shash conversion commit 01c445a4bde99684effe873848b2ea65f6f8a7d1 Merge: c5b5343 d6a61f8 Author: David S. Miller Date: Thu Apr 14 21:14:04 2016 -0400 Merge branch 'soreuseport-mixed-v4-v6-fixes' Craig Gallek says: ==================== Fixes for SO_REUSEPORT and mixed v4/v6 sockets Recent changes to the datastructures associated with SO_REUSEPORT broke an existing behavior when equivalent SO_REUSEPORT sockets are created using both AF_INET and AF_INET6. This patch series restores the previous behavior and includes a test to validate it. This series should be a trivial merge to stable kernels (if deemed necessary), but will have conflicts in net-next. The following patches recently replaced the use of hlist_nulls with hlists for UDP and TCP socket lists: ca065d0cf80f ("udp: no longer use SLAB_DESTROY_BY_RCU") 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") If this series is accepted, I will send an RFC for the net-next change to assist with the merge. ==================== Signed-off-by: David S. Miller commit d6a61f80b8718abbb82dcfc95d56404e3218e7b0 Author: Craig Gallek Date: Tue Apr 12 13:11:26 2016 -0400 soreuseport: test mixed v4/v6 sockets Test to validate the behavior of SO_REUSEPORT sockets that are created with both AF_INET and AF_INET6. See the commit prior to this for a description of this behavior. Signed-off-by: Craig Gallek Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/reuseport_dualstack.c | 208 ++++++++++++++++++++++ 3 files changed, 210 insertions(+), 1 deletion(-) commit d894ba18d4e449b3a7f6eb491f16c9e02933736e Author: Craig Gallek Date: Tue Apr 12 13:11:25 2016 -0400 soreuseport: fix ordering for mixed v4/v6 sockets With the SO_REUSEPORT socket option, it is possible to create sockets in the AF_INET and AF_INET6 domains which are bound to the same IPv4 address. This is only possible with SO_REUSEPORT and when not using IPV6_V6ONLY on the AF_INET6 sockets. Prior to the commits referenced below, an incoming IPv4 packet would always be routed to a socket of type AF_INET when this mixed-mode was used. After those changes, the same packet would be routed to the most recently bound socket (if this happened to be an AF_INET6 socket, it would have an IPv4 mapped IPv6 address). The change in behavior occurred because the recent SO_REUSEPORT optimizations short-circuit the socket scoring logic as soon as they find a match. They did not take into account the scoring logic that favors AF_INET sockets over AF_INET6 sockets in the event of a tie. To fix this problem, this patch changes the insertion order of AF_INET and AF_INET6 addresses in the TCP and UDP socket lists when the sockets have SO_REUSEPORT set. AF_INET sockets will be inserted at the head of the list and AF_INET6 sockets with SO_REUSEPORT set will always be inserted at the tail of the list. This will force AF_INET sockets to always be considered first. Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") Fixes: 125e80b88687 ("soreuseport: fast reuseport TCP socket selection") Reported-by: Maciej Żenczykowski Signed-off-by: Craig Gallek Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/rculist_nulls.h | 39 +++++++++++++++++++++++++++++++++++++++ include/net/sock.h | 6 +++++- net/ipv4/udp.c | 9 +++++++-- 3 files changed, 51 insertions(+), 3 deletions(-) commit c5b5343cfbc9f46af65033fa4f407d7b7d98371d Author: Bjørn Mork Date: Tue Apr 12 16:11:12 2016 +0200 cdc_mbim: apply "NDP to end" quirk to all Huawei devices We now have a positive report of another Huawei device needing this quirk: The ME906s-158 (12d1:15c1). This is an m.2 form factor modem with no obvious relationship to the E3372 (12d1:157d) we already have a quirk entry for. This is reason enough to believe the quirk might be necessary for any number of current and future Huawei devices. Applying the quirk to all Huawei devices, since it is crucial to any device affected by the firmware bug, while the impact on non-affected devices is negligible. The quirk can if necessary be disabled per-device by writing N to /sys/class/net//cdc_ncm/ndp_to_end Reported-by: Andreas Fett Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_mbim.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4c0b1c67c6250be73cedeac935b860e09de4420f Merge: 51d7b12 58976ee Author: Linus Torvalds Date: Thu Apr 14 18:03:29 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull keys bugfixes from James Morris: "Two bugfixes for Keys related code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ASN.1: fix open failure check on headername assoc_array: don't call compare_object() on a node commit 2193a3fd7bc6ffd607c1a791d05d22a4a2282c57 Merge: 0b24f7a d9c9f3b Author: Kevin Hilman Date: Thu Apr 14 14:51:51 2016 -0700 Merge tag 'v4.6-soc-fixes' of https://github.com/mbgg/linux-mediatek into fixes - fix boot error reverting commit cc8ed76938b5 ("soc: mediatek: SCPSYS: Fix double enabling of regulators") * tag 'v4.6-soc-fixes' of https://github.com/mbgg/linux-mediatek: Revert "soc: mediatek: SCPSYS: Fix double enabling of regulators" commit 9567366fefddeaea4ed1d713270535d93a3b3c76 Author: Mike Snitzer Date: Tue Apr 12 12:14:46 2016 -0400 dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros The READ_LOCK macro was incorrectly returning -EINVAL if dm_bm_is_read_only() was true -- it will always be true once the cache metadata transitions to read-only by dm_cache_metadata_set_read_only(). Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0). Also, all accesses of the 'cmd' argument passed to these related macros are now encapsulated in parenthesis. A follow-up patch can be developed to eliminate the use of macros in favor of pure C code. Avoiding that now given that this needs to apply to stable@. Reported-by: Ben Hutchings Signed-off-by: Mike Snitzer Fixes: d14fcf3dd79 ("dm cache: make sure every metadata function checks fail_io") Cc: stable@vger.kernel.org drivers/md/dm-cache-metadata.c | 64 ++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 24 deletions(-) commit b4dfd8e92956b396d3438212bc9a0be6267b8b34 Author: Rafał Miłecki Date: Tue Apr 12 13:30:45 2016 +0200 bgmac: reset & enable Ethernet core before using it This fixes Ethernet on D-Link DIR-885L with BCM47094 SoC. Felix reported similar fix was needed for his BCM4709 device (Buffalo WXR-1900DHP?). I tested this for regressions on BCM4706, BCM4708A0 and BCM47081A0. Cc: Felix Fietkau Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 5 +++++ 1 file changed, 5 insertions(+) commit 97cc931fc928a5cef50b104c0c225975ff729fce Merge: f1d0540 e646b65 Author: David S. Miller Date: Thu Apr 14 16:29:54 2016 -0400 Merge branch 'ipv6-dgram-dst-cache' Martin KaFai Lau says: ==================== ipv6: datagram: Update dst cache of a connected udp sk during pmtu update v2: ~ Protect __sk_dst_get() operations with rcu_read_lock in release_cb() because another thread may do ip6_dst_store() for a udp sk without taking the sk lock (e.g. in sendmsg). ~ Do a ipv6_addr_v4mapped(&sk->sk_v6_daddr) check before calling ip6_datagram_dst_update() in patch 3 and 4. It is similar to how __ip6_datagram_connect handles it. ~ One fix in ip6_datagram_dst_update() in patch 2. It needs to check (np->flow_label & IPV6_FLOWLABEL_MASK) before doing fl6_sock_lookup. I was confused with the naming of IPV6_FLOWLABEL_MASK and IPV6_FLOWINFO_MASK. ~ Check dst->obsolete just on the safe side, although I think it should at least have DST_OBSOLETE_FORCE_CHK by now. ~ Add Fixes tag to patch 3 and 4 ~ Add some points from the previous discussion about holding sk lock to the commit message in patch 3. v1: There is a case in connected UDP socket such that getsockopt(IPV6_MTU) will return a stale MTU value. The reproducible sequence could be the following: 1. Create a connected UDP socket 2. Send some datagrams out 3. Receive a ICMPV6_PKT_TOOBIG 4. No new outgoing datagrams to trigger the sk_dst_check() logic to update the sk->sk_dst_cache. 5. getsockopt(IPV6_MTU) returns the mtu from the invalid sk->sk_dst_cache instead of the newly created RTF_CACHE clone. Patch 1 and 2 are the prep work. Patch 3 and 4 are the fixes. ==================== Signed-off-by: David S. Miller commit e646b657f6983017783914a951039e323120dc55 Author: Martin KaFai Lau Date: Mon Apr 11 15:29:37 2016 -0700 ipv6: udp: Do a route lookup and update during release_cb This patch adds a release_cb for UDPv6. It does a route lookup and updates sk->sk_dst_cache if it is needed. It picks up the left-over job from ip6_sk_update_pmtu() if the sk was owned by user during the pmtu update. It takes a rcu_read_lock to protect the __sk_dst_get() operations because another thread may do ip6_dst_store() without taking the sk lock (e.g. sendmsg). Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception") Signed-off-by: Martin KaFai Lau Reported-by: Wei Wang Cc: Cong Wang Cc: Eric Dumazet Cc: Wei Wang Signed-off-by: David S. Miller include/net/ipv6.h | 1 + net/ipv6/datagram.c | 20 ++++++++++++++++++++ net/ipv6/udp.c | 1 + 3 files changed, 22 insertions(+) commit 33c162a980fe03498fcecb917f618ad7e7c55e61 Author: Martin KaFai Lau Date: Mon Apr 11 15:29:36 2016 -0700 ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update There is a case in connected UDP socket such that getsockopt(IPV6_MTU) will return a stale MTU value. The reproducible sequence could be the following: 1. Create a connected UDP socket 2. Send some datagrams out 3. Receive a ICMPV6_PKT_TOOBIG 4. No new outgoing datagrams to trigger the sk_dst_check() logic to update the sk->sk_dst_cache. 5. getsockopt(IPV6_MTU) returns the mtu from the invalid sk->sk_dst_cache instead of the newly created RTF_CACHE clone. This patch updates the sk->sk_dst_cache for a connected datagram sk during pmtu-update code path. Note that the sk->sk_v6_daddr is used to do the route lookup instead of skb->data (i.e. iph). It is because a UDP socket can become connected after sending out some datagrams in un-connected state. or It can be connected multiple times to different destinations. Hence, iph may not be related to where sk is currently connected to. It is done under '!sock_owned_by_user(sk)' condition because the user may make another ip6_datagram_connect() (i.e changing the sk->sk_v6_daddr) while dst lookup is happening in the pmtu-update code path. For the sock_owned_by_user(sk) == true case, the next patch will introduce a release_cb() which will update the sk->sk_dst_cache. Test: Server (Connected UDP Socket): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Route Details: [root@arch-fb-vm1 ~]# ip -6 r show | egrep '2fac' 2fac::/64 dev eth0 proto kernel metric 256 pref medium 2fac:face::/64 via 2fac::face dev eth0 metric 1024 pref medium A simple python code to create a connected UDP socket: import socket import errno HOST = '2fac::1' PORT = 8080 s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s.bind((HOST, PORT)) s.connect(('2fac:face::face', 53)) print("connected") while True: try: data = s.recv(1024) except socket.error as se: if se.errno == errno.EMSGSIZE: pmtu = s.getsockopt(41, 24) print("PMTU:%d" % pmtu) break s.close() Python program output after getting a ICMPV6_PKT_TOOBIG: [root@arch-fb-vm1 ~]# python2 ~/devshare/kernel/tasks/fib6/udp-connect-53-8080.py connected PMTU:1300 Cache routes after recieving TOOBIG: [root@arch-fb-vm1 ~]# ip -6 r show table cache 2fac:face::face via 2fac::face dev eth0 metric 0 cache expires 463sec mtu 1300 pref medium Client (Send the ICMPV6_PKT_TOOBIG): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scapy is used to generate the TOOBIG message. Here is the scapy script I have used: >>> p=Ether(src='da:75:4d:36:ac:32', dst='52:54:00:12:34:66', type=0x86dd)/IPv6(src='2fac::face', dst='2fac::1')/ICMPv6PacketTooBig(mtu=1300)/IPv6(src='2fac:: 1',dst='2fac:face::face', nh='UDP')/UDP(sport=8080,dport=53) >>> sendp(p, iface='qemubr0') Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception") Signed-off-by: Martin KaFai Lau Reported-by: Wei Wang Cc: Cong Wang Cc: Eric Dumazet Cc: Wei Wang Signed-off-by: David S. Miller include/net/ipv6.h | 1 + net/ipv6/datagram.c | 20 +++++++++++--------- net/ipv6/route.c | 12 ++++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) commit 7e2040db1539a904924b997a14ebd3de53172100 Author: Martin KaFai Lau Date: Mon Apr 11 15:29:35 2016 -0700 ipv6: datagram: Refactor dst lookup and update codes to a new function This patch moves the route lookup and update codes for connected datagram sk to a newly created function ip6_datagram_dst_update() It will be reused during the pmtu update in the later patch. Signed-off-by: Martin KaFai Lau Cc: Cong Wang Cc: Eric Dumazet Cc: Wei Wang Signed-off-by: David S. Miller net/ipv6/datagram.c | 103 +++++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 46 deletions(-) commit 80fbdb208f37740774652ba095a5b2045205ed59 Author: Martin KaFai Lau Date: Mon Apr 11 15:29:34 2016 -0700 ipv6: datagram: Refactor flowi6 init codes to a new function Move flowi6 init codes for connected datagram sk to a newly created function ip6_datagram_flow_key_init(). Notes: 1. fl6_flowlabel is used instead of fl6.flowlabel in __ip6_datagram_connect 2. ipv6_addr_is_multicast(&fl6->daddr) is used instead of (addr_type & IPV6_ADDR_MULTICAST) in ip6_datagram_flow_key_init() This new function will be reused during pmtu update in the later patch. Signed-off-by: Martin KaFai Lau Cc: Cong Wang Cc: Eric Dumazet Cc: Wei Wang Signed-off-by: David S. Miller net/ipv6/datagram.c | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit f1d0540db6a21395a58268f4392c7420ebae8c1d Author: John Crispin Date: Tue Apr 12 08:35:18 2016 +0200 net: mediatek: update the IRQ part of the binding document The current binding document only describes a single interrupt. Update the document by adding the 2 other interrupts. The driver currently only uses a single interrupt. The HW is however able to using IRQ grouping to split TX and RX onto separate GIC irqs. Signed-off-by: John Crispin Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a5229050b69cfffb690b546c357ca5a60434c0c8 Author: Keith Busch Date: Fri Apr 8 16:09:10 2016 -0600 NVMe: Always use MSI/MSI-x interrupts Multiple users have reported device initialization failure due the driver not receiving legacy PCI interrupts. This is not unique to any particular controller, but has been observed on multiple platforms. There have been no issues reported or observed when with message signaled interrupts, so this patch attempts to use MSI-x during initialization, falling back to MSI. If that fails, legacy would become the default. The setup_io_queues error handling had to change as a result: the admin queue's msix_entry used to be initialized to the legacy IRQ. The case where nr_io_queues is 0 would fail request_irq when setting up the admin queue's interrupt since re-enabling MSI-x fails with 0 vectors, leaving the admin queue's msix_entry invalid. Instead, return success immediately. Reported-by: Tim Muhlemmer Reported-by: Jon Derrick Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 51d7b120418e99d6b3bf8df9eb3cc31e8171dee4 Author: Linus Torvalds Date: Thu Apr 14 12:05:37 2016 -0700 /proc/iomem: only expose physical resource addresses to privileged users In commit c4004b02f8e5b ("x86: remove the kernel code/data/bss resources from /proc/iomem") I was hoping to remove the phyiscal kernel address data from /proc/iomem entirely, but that had to be reverted because some system programs actually use it. This limits all the detailed resource information to properly credentialed users instead. Signed-off-by: Linus Torvalds kernel/resource.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ab0fa82b2df96ddadb327ac39f26b5d80cb3d104 Author: Linus Torvalds Date: Thu Apr 14 12:00:21 2016 -0700 pci-sysfs: use proper file capability helper function The PCI config access checked the file capabilities correctly, but used the itnernal security capability check rather than the helper function that is actually meant for that. The security_capable() has unusual return values and is not meant to be used elsewhere (the only other use is in the capability checking functions that we actually intend people to use, and this odd PCI usage really stood out when looking around the capability code. Signed-off-by: Linus Torvalds drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34dbbcdbf63360661ff7bda6c5f52f99ac515f92 Author: Linus Torvalds Date: Thu Apr 14 11:22:00 2016 -0700 Make file credentials available to the seqfile interfaces A lot of seqfile users seem to be using things like %pK that uses the credentials of the current process, but that is actually completely wrong for filesystem interfaces. The unix semantics for permission checking files is to check permissions at _open_ time, not at read or write time, and that is not just a small detail: passing off stdin/stdout/stderr to a suid application and making the actual IO happen in privileged context is a classic exploit technique. So if we want to be able to look at permissions at read time, we need to use the file open credentials, not the current ones. Normal file accesses can just use "f_cred" (or any of the helper functions that do that, like file_ns_capable()), but the seqfile interfaces do not have any such options. It turns out that seq_file _does_ save away the user_ns information of the file, though. Since user_ns is just part of the full credential information, replace that special case with saving off the cred pointer instead, and suddenly seq_file has all the permission information it needs. Signed-off-by: Linus Torvalds fs/seq_file.c | 7 ++++--- include/linux/seq_file.h | 13 ++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) commit 4046d6e81f33b7ef50d6668b78076d54c5e066b6 Author: Linus Torvalds Date: Thu Apr 14 11:18:57 2016 -0700 Revert "x86: remove the kernel code/data/bss resources from /proc/iomem" This reverts commit c4004b02f8e5b9ce357a0bb1641756cc86962664. Sadly, my hope that nobody would actually use the special kernel entries in /proc/iomem were dashed by kexec. Which reads /proc/iomem explicitly to find the kernel base address. Nasty. Anyway, that means we can't do the sane and simple thing and just remove the entries, and we'll instead have to mask them out based on permissions. Reported-by: Zhengyu Zhang Reported-by: Dave Young Reported-by: Freeman Zhang Reported-by: Emrah Demir Reported-by: Baoquan He Signed-off-by: Linus Torvalds arch/x86/kernel/setup.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 7dedd15dd2527055390b9742c87a02556d3180f4 Author: Dan Carpenter Date: Thu Apr 14 12:31:49 2016 +0300 md/raid0: fix uninitialized variable bug If this function fails the callers expect that *private_conf is set to an ERR_PTR() but that isn't true for the first error path where we can't allocate "conf". It leads to some uninitialized variable bugs. Signed-off-by: Dan Carpenter Signed-off-by: Shaohua Li drivers/md/raid0.c | 1 + 1 file changed, 1 insertion(+) commit 5e265029124fc8ff9e5350972abeddc7c7a0b9cc Merge: d82bccc 8f815cd Author: David S. Miller Date: Thu Apr 14 12:00:59 2016 -0400 Merge tag 'mac80211-for-davem-2016-04-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== This has just the single fix from Dmitry Ivanov, adding the missing netlink notifier family check to avoid the socket close DoS problem. ==================== Signed-off-by: David S. Miller commit 366dd4ea9d5f0eb78fdf4982d76506f99480ec0a Author: Helge Deller Date: Wed Apr 13 22:27:22 2016 +0200 parisc: Fix ftrace function tracer Fix the FTRACE function tracer for 32- and 64-bit kernel. The former code was horribly broken. Reimplement most coding in assembly and utilize optimizations, e.g. put mcount() and ftrace_stub() into one L1 cacheline. Signed-off-by: Helge Deller arch/parisc/Kconfig | 4 +- arch/parisc/Kconfig.debug | 4 ++ arch/parisc/Makefile | 4 +- arch/parisc/include/asm/ftrace.h | 18 +---- arch/parisc/kernel/Makefile | 4 -- arch/parisc/kernel/entry.S | 93 ++++++++++++++++++++----- arch/parisc/kernel/ftrace.c | 146 ++++++--------------------------------- arch/parisc/kernel/head.S | 9 +++ 8 files changed, 114 insertions(+), 168 deletions(-) commit 1560d15861769c23fd981e2d60dc7fd790b21e1e Author: Dave Gerlach Date: Wed Apr 13 20:49:48 2016 -0500 ARM: OMAP3: Fix external abort on 36xx waking from off mode idle Depending on timing during the resume path from off mode on 36xx, we may see external aborts. These seem to be caused by the following: - OMAP3 Advisory 1.62 "MPU Cannot Exit from Standby" says we need to disable intc autoidle before WFI - DM3730 Advisory 1.106 "MPU Leaves MSTANDBY State Before IDLEREQ of Interrupt Controller is Released" says we need to wait before accessing intc omap3_intc_resume_idle restores the intc autoidle for all resume paths, however in the resume path from off mode only it is also being restored by omap_intc_restore_context before this call to omap3_intc_resume_idle happens. The second restore of the intc autoidle in this path is what appears to be causing the external abort so for the off mode resume path let's rely on omap_intc_restore_context to restore intc autoidle, and for all other paths let omap3_intc_resume_idle handle it as it is now. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pm34xx.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit cba2e47abcbd80e3f46f460899290402f98090ec Author: Toshi Kani Date: Tue Apr 12 18:10:52 2016 -0600 pmem: fix BUG() error in pmem.h:48 on X86_32 After 'commit fc0c2028135c ("x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem()")', probing a PMEM device hits the BUG() error below on X86_32 kernel. kernel BUG at include/linux/pmem.h:48! memcpy_from_pmem() calls arch_memcpy_from_pmem(), which is unimplemented since CONFIG_ARCH_HAS_PMEM_API is undefined on X86_32. Fix the BUG() error by adding default_memcpy_from_pmem(). Acked-by: Dan Williams Signed-off-by: Toshi Kani Signed-off-by: Ross Zwisler Cc: Dan Williams Cc: Ross Zwisler include/linux/pmem.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit ad06fdeeef1cbadf86ebbe510e8079abada8b44e Author: Stefan Agner Date: Wed Jan 20 18:56:22 2016 -0800 pwm: fsl-ftm: Use flat regmap cache Use flat regmap cache to avoid lockdep warning at probe: [ 0.697285] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160() [ 0.697449] 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 pwm-fsl-ftm driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. The MMIO space of the pwm-fsl-ftm driver is reasonable condense, hence using the much faster flat regmap cache is anyway the better choice. Signed-off-by: Stefan Agner Cc: Mark Brown Signed-off-by: Thierry Reding drivers/pwm/pwm-fsl-ftm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dd22a116614acf33aeef13861e32510ef9d5392 Author: Alexander Kurz Date: Sun Apr 10 20:41:38 2016 +0200 pinctrl: imx: Kconfig: PINCTRL_IMX select REGMAP Regmap functionality has been integrated into pinctrl-imx.c with commit 8626ada8 which might trigger build failures when regmap is not selected otherwise. Hence, make Kconfig aware about this new dependency. Signed-off-by: Alexander Kurz Acked-by: Philipp Zabel Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 70ad7f7e40af31e7ab4a1719602542856b7ea856 Author: Jon Hunter Date: Wed Apr 13 15:35:56 2016 +0100 mmc: tegra: Disable UHS-I modes for Tegra124 Tegra124 has been randomly hanging during system suspend when entering the Tegra LP1 low power state. The hang is caused by the Tegra SDHCI driver and linked to the UHS-I tuning sequence. Disabling the UHS-I modes for Tegra124 prevents any hangs from occurring when entering system suspend. Unfortunately, the tuning sequence described in the public Tegra documentation is incomplete and on inspection of the current tuning sequence that has been implemented is also incomplete and may cause problems. In the short-term it is safer to disable UHS-I modes for now and fix later because it would be too large of a change to simply patch now. Therefore, disable UHS-I modes for Tegra124. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9aaf3437aa72ed5370bf32c99580a3fa2c330e3d Author: Ulf Hansson Date: Wed Apr 6 16:12:08 2016 +0200 mmc: block: Use the mmc host device index as the mmcblk device index Commit 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards simultaneously") causes regressions for some platforms. These platforms relies on fixed mmcblk device indexes, instead of deploying the defacto standard with UUID/PARTUUID. In other words their rootfs needs to be available at hardcoded paths, like /dev/mmcblk0p2. Such guarantees have never been made by the kernel, but clearly the above commit changes the behaviour. More precisely, because of that the order changes of how cards becomes detected, so do their corresponding mmcblk device indexes. As the above commit significantly improves boot time for some platforms (magnitude of seconds), let's avoid reverting this change but instead restore the behaviour of how mmcblk device indexes becomes picked. By using the same index for the mmcblk device as for the corresponding mmc host device, the probe order of mmc host devices decides the index we get for the mmcblk device. For those platforms that suffers from a regression, one could expect that this updated behaviour should be sufficient to meet their expectations of "fixed" mmcblk device indexes. Another side effect from this change, is that the same index is used for the mmc host device, the mmcblk device and the mmc block queue. That should clarify their relationship. Reported-by: Peter Hurley Reported-by: Laszlo Fiat Cc: Linus Torvalds Fixes: 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards simultaneously") Cc: Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit d82bccc69041a51f7b7b9b4a36db0772f4cdba21 Author: Alexei Starovoitov Date: Tue Apr 12 10:26:19 2016 -0700 bpf/verifier: reject invalid LD_ABS | BPF_DW instruction verifier must check for reserved size bits in instruction opcode and reject BPF_LD | BPF_ABS | BPF_DW and BPF_LD | BPF_IND | BPF_DW instructions, otherwise interpreter will WARN_RATELIMIT on them during execution. Fixes: ddd872bc3098 ("bpf: verifier: add checks for BPF_ABS | BPF_IND instructions") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit 3dcd493fbebfd631913df6e2773cc295d3bf7d22 Author: Lars Persson Date: Tue Apr 12 08:45:52 2016 +0200 net: sched: do not requeue a NULL skb A failure in validate_xmit_skb_list() triggered an unconditional call to dev_requeue_skb with skb=NULL. This slowly grows the queue discipline's qlen count until all traffic through the queue stops. We take the optimistic approach and continue running the queue after a failure since it is unknown if later packets also will fail in the validate path. Fixes: 55a93b3ea780 ("qdisc: validate skb without holding lock") Signed-off-by: Lars Persson Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 309cf37fe2a781279b7675d4bb7173198e532867 Author: Mathias Krause Date: Sun Apr 10 12:52:28 2016 +0200 packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface Because we miss to wipe the remainder of i->addr[] in packet_mc_add(), pdiag_put_mclist() leaks uninitialized heap bytes via the PACKET_DIAG_MCLIST netlink attribute. Fix this by explicitly memset(0)ing the remaining bytes in i->addr[]. Fixes: eea68e2f1a00 ("packet: Report socket mclist info via diag module") Signed-off-by: Mathias Krause Cc: Eric W. Biederman Cc: Pavel Emelyanov Acked-by: Pavel Emelyanov Signed-off-by: David S. Miller net/packet/af_packet.c | 1 + 1 file changed, 1 insertion(+) commit 41015e89d9ea8b3d94af22bcd8582f6f3f23d9c1 Merge: d6d5e99 f808c5d Author: David S. Miller Date: Thu Apr 14 00:31:45 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-04-13 This series contains updates to i40e, i40evf and fm10k. Alex fixes a bug introduced earlier based on his interpretation of the XL710 datasheet. The actual limit for fragments with TSO and a skbuff that has payload data in the header portion of the buffer is actually only 7 fragments and the skb-data portion counts as 2 buffers, one for the TSO header, and the one for a segment payload buffer. Jacob fixes a bug where in a previous refactor of the code broke multi-bit updates for VFs. The problem occurs because a multi-bit request has a non-zero length, and the PF would simply drop any request with the upper 16 bits set. ==================== Signed-off-by: David S. Miller commit 85cc88f02eb0ecf44493c1b2ebb6f206cd5fc321 Author: Rex Zhu Date: Tue Apr 12 19:25:52 2016 +0800 drm/amdgpu: when suspending, if uvd/vce was running. need to cancel delay work. fix the issue that when resume back, uvd/vce dpm was disabled and uvd/vce's performace dropped. Signed-off-by: Rex Zhu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 + 2 files changed, 3 insertions(+) commit 7403c515c49c033fec33df0814fffdc977e6acdc Author: Alex Deucher Date: Wed Apr 13 12:08:27 2016 -0400 drm/radeon: fix initial connector audio value This got lost somewhere along the way. This fixes audio not working until set_property was called. Noticed-by: Hyungwon Hwang Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_connectors.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d6d5e999e5df67f8ec20b6be45e2229455ee3699 Author: Chris Friesen Date: Fri Apr 8 15:21:30 2016 -0600 route: do not cache fib route info on local routes with oif For local routes that require a particular output interface we do not want to cache the result. Caching the result causes incorrect behaviour when there are multiple source addresses on the interface. The end result being that if the intended recipient is waiting on that interface for the packet he won't receive it because it will be delivered on the loopback interface and the IP_PKTINFO ipi_ifindex will be set to the loopback interface as well. This can be tested by running a program such as "dhcp_release" which attempts to inject a packet on a particular interface so that it is received by another program on the same board. The receiving process should see an IP_PKTINFO ipi_ifndex value of the source interface (e.g., eth1) instead of the loopback interface (e.g., lo). The packet will still appear on the loopback interface in tcpdump but the important aspect is that the CMSG info is correct. Sample dhcp_release command line: dhcp_release eth1 192.168.204.222 02:11:33:22:44:66 Signed-off-by: Allain Legacy Signed off-by: Chris Friesen Reviewed-by: Julian Anastasov Signed-off-by: David S. Miller net/ipv4/route.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f808c5dbcdc393be8e9f676c61baac6a3db382c1 Author: Jacob Keller Date: Thu Mar 31 09:52:30 2016 -0700 fm10k: fix multi-bit VLAN update requests from VF The VF uses a multi-bit update request to clear unused VLANs whenever it resets. However, an accident in a previous refector broke multi-bit updates for VFs, due to misreading a comment in fm10k_vf.c and attempting to reduce code duplication. The problem occurs because a multi-bit request has a non-zero length, and the PF would simply drop any request with the upper 16 bits set. We can't simply remove the check of the upper 16 bits and the call to fm10k_iov_select vid, because this would remove the checks for default VID and for ensuring no other VLANs can be enabled except pf_vid when it has been set. To resolve that issue, this revision uses the iov_select_vid when we have a single-bit update, and denies any multi-bit update when the VLAN was administratively set by the PF. This should be ok since the PF properly updates VLAN_TABLE when it assigns the PF vid. This ensures that requests to add or remove the PF vid work as expected, but a rogue VF could not use the multi-bit update as a loophole to attempt receiving traffic on other VLANs. Reported-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 30 +++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 65c66af6609f0e76617184b40efea8eea1aae505 Author: David Daney Date: Fri Apr 8 13:37:27 2016 -0700 net: thunderx: Fix broken of_node_put() code. commit b7d3e3d3d21a ("net: thunderx: Don't leak phy device references on -EPROBE_DEFER condition.") incorrectly moved the call to of_node_put() outside of the loop. Under normal loop exit, the node has already had of_node_put() called, so the extra call results in: [ 8.228020] ERROR: Bad of_node_put() on /soc@0/pci@848000000000/mrml-bridge0@1,0/bgx0/xlaui00 [ 8.239433] CPU: 16 PID: 608 Comm: systemd-udevd Not tainted 4.6.0-rc1-numa+ #157 [ 8.247380] Hardware name: www.cavium.com EBB8800/EBB8800, BIOS 0.3 Mar 2 2016 [ 8.273541] Call trace: [ 8.273550] [] dump_backtrace+0x0/0x210 [ 8.273557] [] show_stack+0x24/0x2c [ 8.273560] [] dump_stack+0x8c/0xb4 [ 8.273566] [] of_node_release+0xa8/0xac [ 8.273570] [] kobject_cleanup+0x8c/0x194 [ 8.273573] [] kobject_put+0x44/0x6c [ 8.273576] [] of_node_put+0x24/0x30 [ 8.273587] [] bgx_probe+0x17c/0xcd8 [thunder_bgx] [ 8.273591] [] pci_device_probe+0xa0/0x114 [ 8.273596] [] driver_probe_device+0x178/0x418 [ 8.273599] [] __driver_attach+0x100/0x118 [ 8.273602] [] bus_for_each_dev+0x6c/0xac [ 8.273605] [] driver_attach+0x30/0x38 [ 8.273608] [] bus_add_driver+0x1f8/0x29c [ 8.273611] [] driver_register+0x70/0x110 [ 8.273617] [] __pci_register_driver+0x60/0x6c [ 8.273623] [] bgx_init_module+0x40/0x48 [thunder_bgx] [ 8.273626] [] do_one_initcall+0xcc/0x1c0 [ 8.273631] [] do_init_module+0x68/0x1c8 [ 8.273635] [] load_module+0xf44/0x11f4 [ 8.273638] [] SyS_finit_module+0xb8/0xe0 [ 8.273641] [] el0_svc_naked+0x24/0x28 Go back to the previous (correct) code that only did the extra of_node_put() call on early exit from the loop. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ff3e84e8e479c3ba7148f8dc35a56cf091ab56d9 Merge: 25451c1 2072fe5 Author: Dave Airlie Date: Thu Apr 14 13:06:19 2016 +1000 Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes fix some exynos regressions. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency drm/exynos: fix a warning message drm/exynos: mic: fix an error code drm/exynos: fimd: fix broken dp_clock control drm/exynos: build fbdev code conditionally drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set drm/exynos: fix error handling in exynos_drm_subdrv_open commit 25451c195a4e5097d4e74f2165e57f35a58197e4 Merge: 9288152 303f551 Author: Dave Airlie Date: Thu Apr 14 13:05:56 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes some misc radeon fixes. * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amd/amdgpu: fix irq domain remove for tonga ih drm/radeon: use helper for mst connector dpms. drm/radeon/mst: port some MST setup code from DAL. drm/amdgpu: add invisible pin size statistic commit b821646826e22f0491708768fccce58eef3f5704 Author: Emrah Demir Date: Fri Apr 8 22:16:11 2016 +0300 mISDN: Fixing missing validation in base_sock_bind() Add validation code into mISDN/socket.c Signed-off-by: Emrah Demir Signed-off-by: David S. Miller drivers/isdn/mISDN/socket.c | 3 +++ 1 file changed, 3 insertions(+) commit 3f3f7cb875c0f621485644d4fd7453b0d37f00e4 Author: Alexander Duyck Date: Wed Mar 30 16:15:37 2016 -0700 i40e/i40evf: Limit TSO to 7 descriptors for payload instead of 8 per packet This patch addresses a bug introduced based on my interpretation of the XL710 datasheet. Specifically section 8.4.1 states that "A single transmit packet may span up to 8 buffers (up to 8 data descriptors per packet including both the header and payload buffers)." It then later goes on to say that each segment for a TSO obeys the previous rule, however it then refers to TSO header and the segment payload buffers. I believe the actual limit for fragments with TSO and a skbuff that has payload data in the header portion of the buffer is actually only 7 fragments as the skb->data portion counts as 2 buffers, one for the TSO header, and one for a segment payload buffer. Fixes: 2d37490b82af ("i40e/i40evf: Rewrite logic for 8 descriptor per packet check") Reported-by: Sowmini Varadhan Signed-off-by: Alexander Duyck Acked-by: Jesse Brandeburg Tested-by: Sowmini Varadhan Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 49 +++++++++++++-------------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 10 ++++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 49 +++++++++++++-------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 10 ++++-- 4 files changed, 62 insertions(+), 56 deletions(-) commit 70af921db6f8835f4b11c65731116560adb00c14 Author: David Ahern Date: Fri Apr 8 12:01:21 2016 -0700 net: ipv6: Do not keep linklocal and loopback addresses f1705ec197e7 added the option to retain user configured addresses on an admin down. A comment to one of the later revisions suggested using the IFA_F_PERMANENT flag rather than adding a user_managed boolean to the ifaddr struct. A side effect of this change is that link local and loopback addresses are also retained which is not part of the objective of f1705ec197e7. Add check to drop those addresses. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a6d37131c02f15463daa00e2f1da6824e8e00de2 Author: Wolfram Sang Date: Fri Apr 8 13:28:42 2016 +0200 net: ethernet: renesas: ravb_main: test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate, so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 60e19518d657018c4e25f0c20ca4f623536714b5 Merge: 4bc0eb3 bcf4934 Author: David S. Miller Date: Wed Apr 13 21:49:03 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree. More specifically, they are: 1) Fix missing filter table per-netns registration in arptables, from Florian Westphal. 2) Resolve out of bound access when parsing TCP options in nf_conntrack_tcp, patch from Jozsef Kadlecsik. 3) Prefer NFPROTO_BRIDGE extensions over NFPROTO_UNSPEC in ebtables, this resolves conflict between xt_limit and ebt_limit, from Phil Sutter. ==================== Signed-off-by: David S. Miller commit 4bc0eb3a1b20facbbf5c4939df863d8928e5c1b7 Merge: 1ecf689 15da5d1 Author: David S. Miller Date: Wed Apr 13 17:55:39 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.6 b43 * fix memory leaks when removing the device bcma * fix building without OF_IRQ rtlwifi * fix gcc-6 indentation warning iwlwifi * lower the debug level of a benign print * fix a memory leak ==================== Signed-off-by: David S. Miller commit 90de6800c240dfe089e254116a7c055e70b709fd Merge: 5b523ff ccc7d5a Author: Linus Torvalds Date: Wed Apr 13 13:02:06 2016 -0700 Merge tag 'sh-fixes-4.6-rc1' of git://git.libc.org/linux-sh Pull arch/sh fixes from Rich Felker: "Fixes for two arch/sh build regressions that appeared in 4.6-rc1, one introduced by me, and one caused by changes elsewhere" * tag 'sh-fixes-4.6-rc1' of git://git.libc.org/linux-sh: sh: fix function signature of cpu_coregroup_mask to match pointer type sh: fix smp-shx3 build regression from removal of arch localtimer commit a1def45365594dd16be0d8cc52b0d5a6a79d6ae6 Author: Roger Quadros Date: Wed Apr 6 17:32:38 2016 +0300 ARM: dts: am57xx-beagle-x15: remove extcon_usb1 USB1 controller is hardwired to be used as Host only port so we don't need to check ID pin state and can get rid of extcon_usb1. This also reduces USB1 controller's and so eSATA power's dependency with EXTCON. This fixes eSATA port with multi_v7_defconfig. Cc: Franklin S Cooper Jr. Cc: Vagrant Cascadian Signed-off-by: Roger Quadros Tested-by: Franklin S Cooper Jr. [tony@atomide.com: updated to describe what it fixes] Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15.dts | 17 ----------------- 1 file changed, 17 deletions(-) commit 883cbc901b570625f54250a37b008d3635f1fbda Author: Franklin S Cooper Jr Date: Thu Mar 10 17:56:39 2016 -0600 ARM: dts: am437x: Fix GPMC dma properties This patch updates the GPMC's DT DMA property to reflect the updated eDMA bindings. Fixes: cce1ee000187 ("ARM: DTS: am437x: Use the new DT bindings for the eDMA3") Signed-off-by: Franklin S Cooper Jr Acked-by: Roger Quadros Acked-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2abf904a6b594b93c0e73a36c98ecbaa7388463 Author: Franklin S Cooper Jr Date: Thu Mar 10 17:56:38 2016 -0600 ARM: dts: am33xx: Fix GPMC dma properties This patch updates the GPMC's DT DMA property to reflect the updated eDMA bindings. Fixes: b5e509066074 ("ARM: DTS: am33xx: Use the new DT bindings for the eDMA3") Signed-off-by: Franklin S Cooper Jr Acked-by: Roger Quadros Acked-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2567075be35e98472411fcea233713df997ef5b Merge: 19e831b 1cbabcb Author: Tony Lindgren Date: Wed Apr 13 12:31:47 2016 -0700 Merge tag 'for-v4.6-rc/omap-fixes-b' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v4.6/fixes ARM: OMAP2+: clockdomain: another fix for v4.6-rc For DRA7xx platforms, add a workaround for missed timer interrupts that appears to be due to an integration bug (erratum i874) Basic build, boot, and PM test logs are available here: http://www.pwsan.com/omap/testlogs/omap-fixes-b-for-v4.6-rc/20160413020850/ (The DRA7xx board here has not yet been added into the testbed.) commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab Author: Sakari Ailus Date: Sun Apr 3 16:31:03 2016 -0300 [media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situation where multi-plane buffers may be requested and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument struct with fewer planes. __fill_v4l2_buffer() however uses the number of planes from the dequeued videobuf2 buffer, overwriting kernel memory (the m.planes array allocated in video_usercopy() in v4l2-ioctl.c) if the user provided fewer planes than the dequeued buffer had. Oops! Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2") Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Cc: stable@vger.kernel.org # for v4.4 and later Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e7e0c3e26587749b62d17b9dd0532874186c77f7 Author: Sakari Ailus Date: Sun Apr 3 16:15:00 2016 -0300 [media] videobuf2-core: Check user space planes array in dqbuf The number of planes in videobuf2 is specific to a buffer. In order to verify that the planes array provided by the user is long enough, a new vb2_buf_op is required. Call __verify_planes_array() when the dequeued buffer is known. Return an error to the caller if there was one, otherwise remove the buffer from the done list. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Cc: stable@vger.kernel.org # for v4.4 and later Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 10 +++++----- include/media/videobuf2-core.h | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) commit 535dac4ab5f42e040e8405b31e309a6b6d4eee57 Author: Brijesh Singh Date: Thu Jan 14 10:31:11 2016 -0600 ata: add AMD Seattle platform driver AMD Seattle SATA controller mostly conforms to AHCI interface with some special register to control SGPIO interface. In the case of an AHCI controller, the SGPIO feature is ideally implemented using the "Enclosure Management" register of the AHCI controller, but those registeres are not implemented in the Seattle SoC. Instead SoC (Rev B0 onwards) provides a 32-bit SGPIO control register which should be programmed to control the activity, locate and fault LEDs. The driver is based on ahci_platform driver. Signed-off-by: Brijesh Singh Acked-by: Hans de Goede CC: tj@kernel.org CC: linux-ide@vger.kernel.org Signed-off-by: Tejun Heo drivers/ata/Kconfig | 8 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_seattle.c | 210 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) commit e86103a75705c7c530768f4ffaba74cf382910f2 Author: Robert Dobrowolski Date: Thu Mar 24 03:30:07 2016 -0700 usb: hcd: out of bounds access in for_each_companion On BXT platform Host Controller and Device Controller figure as same PCI device but with different device function. HCD should not pass data to Device Controller but only to Host Controllers. Checking if companion device is Host Controller, otherwise skip. Cc: Signed-off-by: Robert Dobrowolski Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd-pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1363074667a6b7d0507527742ccd7bbed5e3ceaa Author: Hans de Goede Date: Tue Apr 12 12:27:09 2016 +0200 USB: uas: Add a new NO_REPORT_LUNS quirk Add a new NO_REPORT_LUNS quirk and set it for Seagate drives with an usb-id of: 0bc2:331a, as these will fail to respond to a REPORT_LUNS command. Cc: stable@vger.kernel.org Reported-and-tested-by: David Webb Signed-off-by: Hans de Goede Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Documentation/kernel-parameters.txt | 2 ++ drivers/usb/storage/uas.c | 14 +++++++++++++- drivers/usb/storage/unusual_uas.h | 7 +++++++ drivers/usb/storage/usb.c | 5 ++++- include/linux/usb_usual.h | 2 ++ 5 files changed, 28 insertions(+), 2 deletions(-) commit 198de51dbc3454d95b015ca0a055b673f85f01bb Author: Hans de Goede Date: Tue Apr 12 12:27:08 2016 +0200 USB: uas: Limit qdepth at the scsi-host level Commit 64d513ac31bd ("scsi: use host wide tags by default") causes the SCSI core to queue more commands then we can handle on devices with multiple LUNs, limit the queue depth at the scsi-host level instead of per slave to fix this. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1315013 Cc: stable@vger.kernel.org # 4.4.x and 4.5.x Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2dc0194c1d0df078dc4a7bf539ce9bda7e6f1a41 Author: Diego Herranz Date: Tue Apr 12 18:13:27 2016 +0100 doc: usb: Fix typo in gadget_multi documentation It tries to "match" drivers for each interface (not "much"). Signed-off-by: Diego Herranz Signed-off-by: Greg Kroah-Hartman Documentation/usb/gadget_multi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a85f6e61c695daeb427dfc6c1d5a279654207b Author: Peter Griffin Date: Wed Apr 13 19:58:44 2016 +0300 usb: host: xhci-plat: Make enum xhci_plat_type start at a non zero value Otherwise generic-xhci and xhci-platform which have no data get wrongly detected as XHCI_PLAT_TYPE_MARVELL_ARMADA by xhci_plat_type_is(). This fixes a regression in v4.5 for STiH407 family SoC's which use the synopsis dwc3 IP, whereby the disable_clk error path gets taken due to wrongly being detected as XHCI_PLAT_TYPE_MARVELL_ARMADA and the hcd never gets added. I suspect this will also fix other dwc3 DT platforms such as Exynos, although I've only tested on STih410 SoC. Fixes: 4efb2f694114 ("usb: host: xhci-plat: add struct xhci_plat_priv") Cc: stable@vger.kernel.org Cc: gregory.clement@free-electrons.com Cc: yoshihiro.shimoda.uh@renesas.com Signed-off-by: Peter Griffin Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98d74f9ceaefc2b6c4a6440050163a83be0abede Author: Mathias Nyman Date: Fri Apr 8 16:25:10 2016 +0300 xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers PCI hotpluggable xhci controllers such as some Alpine Ridge solutions will remove the xhci controller from the PCI bus when the last USB device is disconnected. Add a flag to indicate that the host is being removed to avoid queueing configure_endpoint commands for the dropped endpoints. For PCI hotplugged controllers this will prevent 5 second command timeouts For static xhci controllers the configure_endpoint command is not needed in the removal case as everything will be returned, freed, and the controller is reset. For now the flag is only set for PCI connected host controllers. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 1 + drivers/usb/host/xhci-ring.c | 3 ++- drivers/usb/host/xhci.c | 8 +++++--- drivers/usb/host/xhci.h | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) commit 71504062a7c34838c3fccd92c447f399d3cb5797 Author: Lu Baolu Date: Fri Apr 8 16:25:09 2016 +0300 usb: xhci: fix wild pointers in xhci_mem_cleanup This patch fixes some wild pointers produced by xhci_mem_cleanup. These wild pointers will cause system crash if xhci_mem_cleanup() is called twice. Reported-and-tested-by: Pengcheng Li Signed-off-by: Lu Baolu Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5ad3b03e4910f9f62342956ecdc758c7af6b8699 Author: Yoshihiro Shimoda Date: Fri Apr 8 16:25:08 2016 +0300 usb: host: xhci-plat: fix cannot work if R-Car Gen2/3 run on above 4GB phys This patch fixes an issue that cannot work if R-Car Gen2/3 run on above 4GB physical memory environment to use a quirk XHCI_NO_64BIT_SUPPORT. Cc: Signed-off-by: Yoshihiro Shimoda Reviewed-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0a380be8233dbf8dd20795b801c5d5d5ef3992f7 Author: Yoshihiro Shimoda Date: Fri Apr 8 16:25:07 2016 +0300 usb: host: xhci: add a new quirk XHCI_NO_64BIT_SUPPORT On some xHCI controllers (e.g. R-Car SoCs), the AC64 bit (bit 0) of HCCPARAMS1 is set to 1. However, the xHCs don't support 64-bit address memory pointers actually. So, in this case, this driver should call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in xhci_gen_setup(). Otherwise, the xHCI controller will be died after a usb device is connected if it runs on above 4GB physical memory environment. So, this patch adds a new quirk XHCI_NO_64BIT_SUPPORT to resolve such an issue. Cc: Signed-off-by: Yoshihiro Shimoda Reviewed-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 10 ++++++++++ drivers/usb/host/xhci.h | 1 + 2 files changed, 11 insertions(+) commit 671ffdff5b13314b1fc65d62cf7604b873fb5dc4 Author: Mathias Nyman Date: Fri Apr 8 16:25:06 2016 +0300 xhci: resume USB 3 roothub first Give USB3 devices a better chance to enumerate at USB 3 speeds if they are connected to a suspended host. Solves an issue with NEC uPD720200 host hanging when partially enumerating a USB3 device as USB2 after host controller runtime resume. Cc: Tested-by: Mike Murdoch Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d46faca6f887a849efb07c1655b5a9f7c288b45 Author: Rafal Redzimski Date: Fri Apr 8 16:25:05 2016 +0300 usb: xhci: applying XHCI_PME_STUCK_QUIRK to Intel BXT B0 host Broxton B0 also requires XHCI_PME_STUCK_QUIRK. Adding PCI device ID for Broxton B and adding to quirk. Cc: Signed-off-by: Rafal Redzimski Signed-off-by: Robert Dobrowolski Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a14759a03a0a57b2fc99b1e416180788b8ba24c Author: Oliver Neukum Date: Mon Apr 4 14:30:53 2016 +0200 cdc-acm: fix crash if flushed with nothing buffered Under some circumstances acm_tty_flush_chars() is called with no buffer to flush. We simply need to do nothing. Signed-off-by: Oliver Neukum Reported-by: Torsten Hilbrich Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 4 ++++ 1 file changed, 4 insertions(+) commit dea5c24a14047b7d6b6b269434a85ffd05f1d2cb Author: Rui Salvaterra Date: Sat Apr 9 22:05:35 2016 +0100 lib: lz4: cleanup unaligned access efficiency detection These identifiers are bogus. The interested architectures should define HAVE_EFFICIENT_UNALIGNED_ACCESS whenever relevant to do so. If this isn't true for some arch, it should be fixed in the arch definition. Signed-off-by: Rui Salvaterra Reviewed-by: Sergey Senozhatsky Signed-off-by: Greg Kroah-Hartman lib/lz4/lz4defs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3e26a691fe3fe1e02a76e5bab0c143ace4b137b4 Author: Rui Salvaterra Date: Sat Apr 9 22:05:34 2016 +0100 lib: lz4: fixed zram with lz4 on big endian machines Based on Sergey's test patch [1], this fixes zram with lz4 compression on big endian cpus. Note that the 64-bit preprocessor test is not a cleanup, it's part of the fix, since those identifiers are bogus (for example, __ppc64__ isn't defined anywhere else in the kernel, which means we'd fall into the 32-bit definitions on ppc64). Tested on ppc64 with no regression on x86_64. [1] http://marc.info/?l=linux-kernel&m=145994470805853&w=4 Cc: stable@vger.kernel.org Suggested-by: Sergey Senozhatsky Signed-off-by: Rui Salvaterra Reviewed-by: Sergey Senozhatsky Signed-off-by: Greg Kroah-Hartman lib/lz4/lz4defs.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 3fe6409c23e2bee4b2b1b6d671d2da8daa15271c Author: Andy Shevchenko Date: Fri Apr 8 16:22:17 2016 +0300 dmaengine: dw: fix master selection The commit 895005202987 ("dmaengine: dw: apply both HS interfaces and remove slave_id usage") cleaned up the code to avoid usage of depricated slave_id member of generic slave configuration. Meanwhile it broke the master selection by removing important call to dwc_set_masters() in ->device_alloc_chan_resources() which copied masters from custom slave configuration to the internal channel structure. Everything works until now since there is no customized connection of DesignWare DMA IP to the bus, i.e. one bus and one or more masters are in use. The configurations where 2 masters are connected to the different masters are not working anymore. We are expecting one user of such configuration and need to select masters properly. Besides that it is obviously a performance regression since only one master is in use in multi-master configuration. Select masters in accordance with what user asked for. Keep this patch in a form more suitable for back porting. We are safe to take necessary data in ->device_alloc_chan_resources() because we don't support generic slave configuration embedded into custom one, and thus the only way to provide such is to use the parameter to a filter function which is called exactly before channel resource allocation. While here, replase BUG_ON to less noisy dev_warn() and prevent channel allocation in case of error. Fixes: 895005202987 ("dmaengine: dw: apply both HS interfaces and remove slave_id usage") Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 5b523ff281b9f97ec75d526e2750381c6e8c9326 Merge: e012766 2763ee6 Author: Linus Torvalds Date: Wed Apr 13 08:58:32 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu/coldfire fix from Greg Ungerer: "Only a single change that removes a local arch specific gpio bus sysfs device that now clashes with the generic gpio bus sysfs device interface" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k/gpio: remove arch specific sysfs bus device commit e012766258ad7a90a3474ac24905b7df336e698f Merge: 5e1b59a 0b24f7a Author: Linus Torvalds Date: Wed Apr 13 08:57:18 2016 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A batch of fixes for -rc4, for various platforms. Nothing really substantial and worth pointing out in particular; small fixes for various bugs, see shortlog for details" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: sa1100: remove references to the defunct handhelds.org bus: uniphier-system-bus: fix condition of overlap check ARM: uniphier: drop weird sizeof() ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type ARM: OMAP: Correct interrupt type for ARM TWD ARM: DRA722: Add ID detect for Silicon Rev 2.0 ARM: dts: am43xx: fix edma memcpy channel allocation ARM: dts: AM43x-epos: Fix clk parent for synctimer ARM: OMAP2: Fix up interconnect barrier initialization for DRA7 documentation: Fix pinctrl documentation for Meson8 / Meson8b ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b ARM: mvebu: Correct unit address for linksys bus: mvebu-mbus: use %pa to print phys_addr_t arm64: dts: vulcan: Update PCI ranges ARM: u8500_defconfig: turn on the Synaptics RMI4 driver ARM: pxa: fix the number of DMA requestor lines ARM: OMAP2+: hwmod: Fix updating of sysconfig register ARM: OMAP2+: Use srst_udelay for USB on dm814x commit 5e1b59abef69e405eabfbe0ad09ad6b6e5303c7d Merge: 1c74a7f 316314c Author: Linus Torvalds Date: Wed Apr 13 08:53:26 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM fixes: - Wrong indentation in the PMU code from the merge window - A long-time bug occuring with running ntpd on the host, candidate for stable - Properly handle (and warn about) the unsupported configuration of running on systems with less than 40 bits of PA space - More fixes to the PM and hotplug notifier stuff from the merge window x86: - leak of guest xcr0 (typically shows up as SIGILL) - new maintainer (who is sending the pull request too) - fix for merge window regression - fix for guest CPUID" Paolo Bonzini points out: "For the record, this tag is signed by me because I prepared the pull request. Further pull requests for 4.6 will be signed and sent out by Radim directly" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: mask CPUID(0xD,0x1).EAX against host value kvm: x86: do not leak guest xcr0 into host interrupt handlers KVM: MMU: fix permission_fault() KVM: new maintainer on the block arm64: KVM: unregister notifiers in hyp mode teardown path arm64: KVM: Warn when PARange is less than 40 bits KVM: arm/arm64: Handle forward time correction gracefully arm64: KVM: Add braces to multi-line if statement in virtual PMU code commit 5128de85124c728cdbb6b35bd9dc7410f02c0ca1 Author: Heiko Stuebner Date: Thu Mar 24 22:29:03 2016 +0100 phy: rockchip-emmc: adapt binding to specifiy register offset and length The emmc-phy occupies a contiguous set of 8 registers inside the general register files, so the reg property should specify this. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 332184adff50de9596f03735496c545e8bccc73e Author: Heiko Stuebner Date: Thu Mar 24 22:29:02 2016 +0100 phy: rockchip-emmc: should be a child device of the GRF The emmc-phy is fully enclosed in the general register files (GRF). Therefore as seen from the device-tree it shouldn't be a separate platform- device but instead a sub-device of the GRF - using the simply-mfd mechanism. The driver entered the kernel in the current merge-window, so we can still adapt the binding without needing a fallback, as the binding hasn't been released with a full kernel yet. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Reviewed-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rockchip-emmc-phy.txt | 18 +++++++++++------- drivers/phy/phy-rockchip-emmc.c | 5 ++++- 2 files changed, 15 insertions(+), 8 deletions(-) commit 0311c76e4722b8d6e5fa47eaee63c6552bcc74f5 Author: Heiko Stuebner Date: Thu Mar 24 22:29:01 2016 +0100 phy: rockchip-dp: should be a child device of the GRF The displayport-phy is fully enclosed in the general register files (GRF). Therefore as seen from the device-tree it shouldn't be a separate platform- device but instead a sub-device of the GRF - using the simply-mfd mechanism. The driver entered the kernel in the current merge-window, so we can still adapt the binding without needing a fallback, as the binding hasn't been released with a full kernel yet. While the edp phy is fully part of the GRF, it doesn't have any separate register set there, so doesn't get any register-area assigned. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Reviewed-by: Yakir Yang Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rockchip-dp-phy.txt | 18 +++++++++++------- drivers/phy/phy-rockchip-dp.c | 7 +++++-- 2 files changed, 16 insertions(+), 9 deletions(-) commit d9c9f3b809d2bb0356f013e88d10730eafab5346 Author: James Liao Date: Tue Apr 12 16:34:30 2016 +0800 Revert "soc: mediatek: SCPSYS: Fix double enabling of regulators" This reverts commit cc8ed76938b5cf6a54ab3d60edabaf808dc960d1 ("soc: mediatek: SCPSYS: Fix double enabling of regulators") [1]. This patch fixes mt8173-evb failing boot issue. With commit [1], genpd state will not sync to real power domain state. So some resources such as clocks and regulators may stay in a wrong state. There is no regulator double enabling issue on mainline kernel, so we can refert commit [1] safely. Signed-off-by: James Liao Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-scpsys.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a3125494cff084b098c80bb36fbe2061ffed9d52 Author: Tony Luck Date: Wed Apr 6 10:05:16 2016 +0200 x86/mce: Avoid using object after free in genpool When we loop over all queued machine check error records to pass them to the registered notifiers we use llist_for_each_entry(). But the loop calls gen_pool_free() for the entry in the body of the loop - and then the iterator looks at node->next after the free. Use llist_for_each_entry_safe() instead. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: Cc: Gong Chen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/0205920@agluck-desk.sc.intel.com Link: http://lkml.kernel.org/r/1459929916-12852-4-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-genpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc26fe9c3869f02dd9dc54ff3a45c6d9d4bbbdfa Author: Alexander Kurz Date: Mon Apr 11 10:20:46 2016 +0200 ARM: mach-imx: sdhci-esdhc-imx: initialize DMA mask With commit 7b91369b4655 ("mmc: sdhci: Set DMA mask when adding host") DMA access got disabled for device drivers with zero DMA mask property. sdhci-esdhc-imx got blocked from DMA access by this. Hence: initialize the DMA mask to enable access again. Signed-off-by: Alexander Kurz Signed-off-by: Shawn Guo arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c44da62b55bb453052869ab095bcda7aa0bd6bba Author: Takashi Iwai Date: Wed Apr 13 09:45:53 2016 +0200 ALSA: hda - Fix inconsistent monitor_present state until repoll While the previous commit fixed the missing monitor_present flag update, it may be still in an inconsistent state while the driver repolls: the flag itself is updated, but the eld_valid flag and the contents don't follow until the repoll finishes (and may be repeated for a few times). The basic problem is that pin_eld->monitor_present is updated in the caller side. This should have been updated only in update_eld(). So, the proper fix is to avoid accessing pin_eld but only spec->temp_eld. Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 023d8218ec0dfc30e11d4ec54f640e8f127d1fbe Author: Hyungwon Hwang Date: Wed Apr 13 09:27:39 2016 +0900 ALSA: hda - Fix regression of monitor_present flag in eld proc file The commit [bd48128539ab: ALSA: hda - Fix forgotten HDMI monitor_present update] covered the missing update of monitor_present flag, but this caused a regression for devices without the i915 eld notifier. Since the old code supposed that pin_eld->monitor_present was updated by the caller side, the hdmi_present_sense_via_verbs() doesn't update the temporary eld->monitor_present but only pin_eld->monitor_present, which is now overridden in update_eld(). The fix is to update pin_eld->monitor_present as well before calling update_eld(). Note that this may still leave monitor_present flag in an inconsistent state when the driver repolls, but this is at least the old behavior. More proper fix will follow in the later patch. Fixes: bd48128539ab ('ALSA: hda - Fix forgotten HDMI monitor_present update') Signed-off-by: Hyungwon Hwang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit 7196c52c9377df0175b510ff5896bda524f7345e Author: Lothar Waßmann Date: Wed Mar 30 14:23:03 2016 +0200 clk: imx6q: fix typo in CAN clock definition commit ee36027427c7 ("clk: imx: Add clock support for imx6qp") introduced a regression due to a subtle typo in the 'can_root' clock definition. The effect is that trying to configure the bitrate of the can interfaces fails with -EDOM or produces a division by zero error due to the clock_freq of the can serial clock being reported as '0'. Signed-off-by: Lothar Waßmann Fixes: ee36027427c7 ("clk: imx: Add clock support for imx6qp") Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ff7760ff66b98ef244bf0e5e2bd5310651205ad Author: Ben Hutchings Date: Tue Apr 12 12:58:14 2016 +0100 spi: spi-ti-qspi: Handle truncated frames properly We clamp frame_len_words to a maximum of 4096, but do not actually limit the number of words written or read through the DATA registers or the length added to spi_message::actual_length. This results in silent data corruption for commands longer than this maximum. Recalculate the length of each transfer, taking frame_len_words into account. Use this length in qspi_{read,write}_msg(), and to increment spi_message::actual_length. Signed-off-by: Ben Hutchings Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-ti-qspi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit ea1b60fb085839a9544cb3a0069992991beabb7f Author: Ben Hutchings Date: Tue Apr 12 12:56:25 2016 +0100 spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden Each transfer can specify 8, 16 or 32 bits per word independently of the default for the device being addressed. However, currently we calculate the number of words in the frame assuming that the word size is the device default. If multiple transfers in the same message have differing bits_per_word, we bitwise-or the different values in the WLEN register field. Fix both of these. Also rename 'frame_length' to 'frame_len_words' to make clear that it's not a byte count like spi_message::frame_length. Signed-off-by: Ben Hutchings Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-ti-qspi.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 03a8bb0e53d9562276045bdfcf2b5de2e4cff5a1 Author: Jaegeuk Kim Date: Tue Apr 12 16:05:36 2016 -0700 ext4/fscrypto: avoid RCU lookup in d_revalidate As Al pointed, d_revalidate should return RCU lookup before using d_inode. This was originally introduced by: commit 34286d666230 ("fs: rcu-walk aware d_revalidate method"). Reported-by: Al Viro Signed-off-by: Jaegeuk Kim Cc: Theodore Ts'o Cc: stable fs/crypto/crypto.c | 4 ++++ fs/ext4/crypto.c | 4 ++++ 2 files changed, 8 insertions(+) commit 58976eef9dc0318ef87bb81a6303b69d941d04bc Merge: 1c74a7f 952cca6 Author: James Morris Date: Wed Apr 13 11:06:52 2016 +1000 Merge tag 'keys-fixes-20160412' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus commit bcf4934288402be3464110109a4dae3bd6fb3e93 Author: Phil Sutter Date: Tue Apr 12 01:31:14 2016 +0200 netfilter: ebtables: Fix extension lookup with identical name If a requested extension exists as module and is not loaded, ebt_check_match() might accidentally use an NFPROTO_UNSPEC one with same name and fail. Reproduced with limit match: Given xt_limit and ebt_limit both built as module, the following would fail: modprobe xt_limit ebtables -I INPUT --limit 1/s -j ACCEPT The fix is to make ebt_check_match() distrust a found NFPROTO_UNSPEC extension and retry after requesting an appropriate module. Cc: Florian Westphal Signed-off-by: Phil Sutter Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 87243deb88671f70def4c52dfa7ca7830707bd31 Author: Seth Forshee Date: Wed Mar 9 09:18:07 2016 -0600 debugfs: Make automount point inodes permanently empty Starting with 4.1 the tracing subsystem has its own filesystem which is automounted in the tracing subdirectory of debugfs. Prior to this debugfs could be bind mounted in a cloned mount namespace, but if tracefs has been mounted under debugfs this now fails because there is a locked child mount. This creates a regression for container software which bind mounts debugfs to satisfy the assumption of some userspace software. In other pseudo filesystems such as proc and sysfs we're already creating mountpoints like this in such a way that no dirents can be created in the directories, allowing them to be exceptions to some MNT_LOCKED tests. In fact we're already do this for the tracefs mountpoint in sysfs. Do the same in debugfs_create_automount(), since the intention here is clearly to create a mountpoint. This fixes the regression, as locked child mounts on permanently empty directories do not cause a bind mount to fail. Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Seth Forshee Acked-by: Serge Hallyn Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abaa7b0c1286ca1610a6dfa079e1d2e27dca1f25 Author: Mika Westerberg Date: Fri Apr 8 15:41:08 2016 +0300 i2c: ismt: Add Intel DNV PCI ID Intel DNV has the same iSMT SMBus host controller than Intel Avoton. Add DNV PCI ID to the list of supported devices. Signed-off-by: Mika Westerberg Acked-by: Andy Shevchenko Acked-by: Neil Horman Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ismt.c | 2 ++ 1 file changed, 2 insertions(+) commit 8574ad7800ad298dc7f184f12b454a67fa3dd839 Author: Tanmay Jagdale Date: Mon Apr 11 18:01:26 2016 +0530 i2c: xlp9xx: add support for Broadcom Vulcan The Broadcom Vulcan ARM64 processor uses the same I2C controller present on the Broadcom XLP9xx/5xx MIPS processor family. Updated the Kconfig by adding ARCH_VULCAN option. Signed-off-by: Tanmay Jagdale Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0b6d123f5df189d7d3a62d450e5f5c33ad614d8 Author: Yakir Yang Date: Mon Mar 14 11:09:15 2016 +0800 i2c: rk3x: add support for rk3228 Enable the I2C core for this SoC. Signed-off-by: Yakir Yang Reviewed-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rk3x.txt | 4 ++-- drivers/i2c/busses/i2c-rk3x.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit e1123fe975852cc0970b4e53ea65ca917e54c923 Author: Ping Cheng Date: Tue Apr 12 13:37:45 2016 -0700 HID: wacom: Add support for DTK-1651 DTK-1651 is a display pen-only tablet Signed-off-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0b24f7a8d6e0d17bcf24433ce5827841a05b5b46 Merge: 452a31f 199831c Author: Olof Johansson Date: Tue Apr 12 12:35:07 2016 -0700 Merge tag 'mvebu-fixes-4.6-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.6 (part 1) - fix USB adress register for Linksys Armada 388 based boards - fix build warning in mvebu-mbus * tag 'mvebu-fixes-4.6-1' of git://git.infradead.org/linux-mvebu: ARM: mvebu: Correct unit address for linksys bus: mvebu-mbus: use %pa to print phys_addr_t Signed-off-by: Olof Johansson commit 452a31fd36255fc7d9dd9dce9d820fe0e5bb97b8 Author: Linus Walleij Date: Mon Apr 4 14:43:38 2016 +0200 ARM: sa1100: remove references to the defunct handhelds.org The website handhelds.org has been down for a long time and is likely never coming back online. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/mach-sa1100/Kconfig | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 13ab2c80e2aae436fa7f0b8a1b0133e9c143f42b Merge: 2e1d18c 4c35430 Author: Olof Johansson Date: Tue Apr 12 12:33:41 2016 -0700 Merge tag 'pxa-fixes-v4.6' of https://github.com/rjarzmik/linux into fixes ARM: pxa: fixes for v4.6 There is only a single fix for dma requestor lines initial setup, triggered by dmaengine previous fix. * tag 'pxa-fixes-v4.6' of https://github.com/rjarzmik/linux: ARM: pxa: fix the number of DMA requestor lines Signed-off-by: Olof Johansson commit 2e1d18c6997da888217f66b0bdc210de9742b936 Merge: 3de7bee 6f40fed Author: Olof Johansson Date: Tue Apr 12 12:32:35 2016 -0700 Merge tag 'omap-for-v4.6/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps against v4.6-rc1. Mostly minor fixes for the newer SoCs with few board fixes and a fix for a long time hwmod bug: - Fix cpsw_emac0 link type for baltos-ir5221 - Fix interrupt type for TWD - Fix edma memcpy channel allocation for am43x - Fix am43x-epos sycntimer32k by using the correct assigned clock - Fix interconnect barrier for dra7 - Fix a long time hwmod bug for updating sysconfig register properly - Fix flakey booting on dm814x where USB reset needs a delay And there is one minor change that is not strictly a fix, but is good to have for proper hardware detection: - Detect dra7 silicon revision 2.0 properly * tag 'omap-for-v4.6/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type ARM: OMAP: Correct interrupt type for ARM TWD ARM: DRA722: Add ID detect for Silicon Rev 2.0 ARM: dts: am43xx: fix edma memcpy channel allocation ARM: dts: AM43x-epos: Fix clk parent for synctimer ARM: OMAP2: Fix up interconnect barrier initialization for DRA7 ARM: OMAP2+: hwmod: Fix updating of sysconfig register ARM: OMAP2+: Use srst_udelay for USB on dm814x Signed-off-by: Olof Johansson commit 3de7beebddf8d56dcaa17b41c723d602dd0c513c Author: Kunihiko Hayashi Date: Fri Apr 1 19:32:43 2016 +0900 bus: uniphier-system-bus: fix condition of overlap check This patch fixes condition whether the specified address ranges overlap each other. Fixes: 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver") Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Olof Johansson drivers/bus/uniphier-system-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3137b716568f3ca8ca575fd13b91ddb42abd6844 Author: Masahiro Yamada Date: Fri Mar 25 11:14:02 2016 +0900 ARM: uniphier: drop weird sizeof() My intention was to ioremap a 4-byte register. Coincidentally enough, sizeof(SZ_4) equals to SZ_4, but this code is weird anyway. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/mach-uniphier/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b32e4482aadfd1322357f46d4ed8a990603664d9 Author: Jaegeuk Kim Date: Mon Apr 11 15:51:57 2016 -0700 fscrypto: don't let data integrity writebacks fail with ENOMEM This patch fixes the issue introduced by the ext4 crypto fix in a same manner. For F2FS, however, we flush the pending IOs and wait for a while to acquire free memory. Fixes: c9af28fdd4492 ("ext4 crypto: don't let data integrity writebacks fail with ENOMEM") Cc: Theodore Ts'o Signed-off-by: Jaegeuk Kim fs/crypto/crypto.c | 36 ++++++++++++++++++++---------------- fs/f2fs/data.c | 16 +++++++++++++--- include/linux/fscrypto.h | 9 +++++---- 3 files changed, 38 insertions(+), 23 deletions(-) commit 33b1395124c63ed4a42e33c1dd14859f9b3f29c2 Author: Jaegeuk Kim Date: Mon Apr 11 15:15:38 2016 -0700 f2fs: use dget_parent and file_dentry in f2fs_file_open This patch synced with the below two ext4 crypto fixes together. In 4.6-rc1, f2fs newly introduced accessing f_path.dentry which crashes overlayfs. To fix, now we need to use file_dentry() to access that field. Fixes: c0a37d487884 ("ext4: use file_dentry()") Fixes: 9dd78d8c9a7b ("ext4: use dget_parent() in ext4_file_open()") Cc: Miklos Szeredi Cc: Theodore Ts'o Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit d7d75352890447b55c13a81df316a6894ff32ecf Author: Jaegeuk Kim Date: Mon Apr 11 15:10:11 2016 -0700 fscrypto: use dget_parent() in fscrypt_d_revalidate() This patch updates fscrypto along with the below ext4 crypto change. Fixes: 3d43bcfef5f0 ("ext4 crypto: use dget_parent() in ext4_d_revalidate()") Cc: Theodore Ts'o Signed-off-by: Jaegeuk Kim fs/crypto/crypto.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 2072fe51466f86e1f0eedf12bff7106913807efc Author: Javier Martinez Canillas Date: Tue Mar 29 10:28:55 2016 +0900 drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency Commit 254d4d111ee1 ("drm/exynos: Add dependency for G2D in Kconfig") made the DRM_EXYNOS_G2D symbol to only be selectable if the s5p-g2d V4L2 driver is not enabled, since both use the same HW IP block. But added the dependency as depends on !VIDEO_SAMSUNG_S5P_G2D which isn't correct since Kconfig expressions are not boolean but tristate. So it will only evaluate to 'n' if VIDEO_SAMSUNG_S5P_G2D=y but it will evaluate to m if VIDEO_SAMSUNG_S5P_G2D=m. This means that both the V4L2 and DRM drivers can be enabled if the former is enabled as a module, which is not what we want. Signed-off-by: Javier Martinez Canillas Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36ffc2bde5fc743aa64c2e1f53de163a92824a27 Author: Dan Carpenter Date: Fri Mar 25 23:05:59 2016 +0300 drm/exynos: fix a warning message The "ret = regmap_write()" assignment was missing so this error message is never printed. Signed-off-by: Dan Carpenter Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c9c15813b21ce75bc82db86db1163a34b772437 Author: Dan Carpenter Date: Thu Mar 17 13:32:15 2016 +0300 drm/exynos: mic: fix an error code We accidentally return success instead of a negative error code here. Signed-off-by: Dan Carpenter Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 1 + 1 file changed, 1 insertion(+) commit d42a114d88dcead9c3a41574aa0647d56d0a28f7 Author: Marek Szyprowski Date: Thu Mar 17 07:53:12 2016 +0100 drm/exynos: fimd: fix broken dp_clock control Commit 1feafd3afd294b03dbbedb8e8f94e0c4db526f10 ("drm/exynos: add exynos5420 support for fimd") add support for Exynos 5420 SoC, but it broke enabling display clock feature because of incorrect condition check. This patch fixes it, so display is working again on platforms requiring display clock control (i.e. Exynos5250-based SNOW platform). Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b988a0dc93689c93214b518bcb5fd52c44691ba Author: Andrzej Hajda Date: Tue Mar 15 12:43:21 2016 +0100 drm/exynos: build fbdev code conditionally Fbdev code should be compiled only if CONFIG_DRM_FBDEV_EMULATION option is enabled. The patch fixes exynos-drm code trying to manipulate fbdev data which is not initialized in case CONFIG_DRM_FBDEV_EMULATION is disabled. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Makefile | 6 +++--- drivers/gpu/drm/exynos/exynos_drm_fb.c | 11 ----------- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 11 +++++++++++ drivers/gpu/drm/exynos/exynos_drm_fbdev.h | 23 ++++++++++++++++++++++- 4 files changed, 36 insertions(+), 15 deletions(-) commit 311521e25630b9c61ce22f3adc3ad0b35d5f2667 Author: Andrzej Hajda Date: Tue Mar 15 12:38:02 2016 +0100 drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set exynos_plane_mode_set should use adjusted_mode from the same atomic state as plane state. Otherwise it will result in incorrect behavior in case crtc mode changes. The patch fixes bug with black console framebuffer in case of command mode panels. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_plane.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 55c4b906aa2aec3fa66310ec03c6842e34a04b2a Author: Arnd Bergmann Date: Mon Mar 14 15:22:25 2016 +0100 drm/exynos: fix error handling in exynos_drm_subdrv_open gcc-6 warns about a pointless loop in exynos_drm_subdrv_open: drivers/gpu/drm/exynos/exynos_drm_core.c: In function 'exynos_drm_subdrv_open': drivers/gpu/drm/exynos/exynos_drm_core.c:104:199: error: self-comparison always evaluates to false [-Werror=tautological-compare] list_for_each_entry_reverse(subdrv, &subdrv->list, list) { Here, the list_for_each_entry_reverse immediately terminates because the subdrv pointer is compared to itself as the loop end condition. If we were to take the current subdrv pointer as the start of the list (as we would do if list_for_each_entry_reverse() was not a macro), we would iterate backwards over the &exynos_drm_subdrv_list anchor, which would be even worse. Instead, we need to use list_for_each_entry_continue_reverse() to go back over each subdrv that was successfully opened until the first entry. Signed-off-by: Arnd Bergmann Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f815cdde3e550e10c2736990d791f60c2ce43eb Author: Dmitry Ivanov Date: Wed Apr 6 17:23:18 2016 +0300 nl80211: check netlink protocol in socket release notification A non-privileged user can create a netlink socket with the same port_id as used by an existing open nl80211 netlink socket (e.g. as used by a hostapd process) with a different protocol number. Closing this socket will then lead to the notification going to nl80211's socket release notification handler, and possibly cause an action such as removing a virtual interface. Fix this issue by checking that the netlink protocol is NETLINK_GENERIC. Since generic netlink has no notifier chain of its own, we can't fix the problem more generically. Fixes: 026331c4d9b5 ("cfg80211/mac80211: allow registering for and sending action frames") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Ivanov [rewrite commit message] Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adcdd0d5a1cb779f6d455ae70882c19c527627a8 Author: Kailang Yang Date: Tue Apr 12 10:55:03 2016 +0800 ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock This is Dell usb dock audio workaround. It was fixed the master volume keep lower. [Some background: the patch essentially skips the controls of a couple of FU volumes. Although the firmware exposes the dB and the value information via the usb descriptor, changing the values (we set the min volume as default) screws up the device. Although this has been fixed in the newer firmware, the devices are shipped with the old firmware, thus we need the workaround in the driver side. -- tiwai] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/usb/mixer_maps.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f742aaf36edf0390c54d0614bc4d20fd4cd3762a Author: Matti Gottlieb Date: Sun Apr 10 10:53:57 2016 +0300 iwlwifi: mvm: fix accessing Null pointer during fw dump collection The firwmare file can come with data that is relevant for paging. This data is availablet to the firmware upon request, but it stored in the host's memory. During the firmware init flow, the driver configures the firmware so that the firwmare knows where is the data. When paging is used, the variable paging_mem_size is the number of bytes that are available through paging. This variable is not zeror-ed if the driver fails to configure the paging in the firmware, but the memory is freed which is inconsistent. This inconsistency led to a NULL pointer dereference in the code that collects the debug data. Fix this by zero-ing the paging_mem_size variable and NULLify the relevant pointers, so that the code that collects the debug data will know that the paging data is not available. Signed-off-by: Matti Gottlieb Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 6 ++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit e1ba684f762b9a8064de2c916bb60b1694dd8a17 Author: Sara Sharon Date: Mon Apr 11 15:01:46 2016 +0300 iwlwifi: 8000: fix MODULE_FIRMWARE input The firwmare name for 8000 is iwlwifi-8000C. The C is appended based on a value read from a register. This allows to load different firwmare versions based on the hardware step during development. Now that the hardware development is completed, we can hard code the 'C' and along the way, fix the input to MODULE_FIRMWARE. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116041 Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) commit ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7 Author: Linus Walleij Date: Tue Apr 12 10:05:22 2016 +0200 Revert "gpio: rcar: Fine-grained Runtime PM support" This reverts commit 65194cb174b873448b208eb6e04ecb72237af76e. drivers/gpio/gpio-rcar.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 42c25013ca95ce79b4ed192188ca843ae48f8c71 Author: Linus Walleij Date: Tue Apr 12 10:00:34 2016 +0200 Revert "gpio: rcar: Add Runtime PM handling for interrupts" This reverts commit b26a719bdba9aa926ceaadecc66e07623d2b8a53. drivers/gpio/gpio-rcar.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) commit 0c44d7896cbf9156b8bb10da4f665005622235ae Author: Lee Jones Date: Wed Mar 23 14:43:43 2016 +0000 mailbox: Stop using ENOSYS for anything other than unimplemented syscalls In accordance with e15f431fe2d5 ("errno.h: Improve ENOSYS's comment") and 91c9afaf97ee ("checkpatch.pl: new instances of ENOSYS are errors") we're converting from the old meaning of: ENOSYS "Function not implemented" to a more standard EINVAL. Reported-by: Seraphin Bonnaffe Signed-off-by: Lee Jones Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1c2f87c9a8f79fa8816bbe7de98da38eae2be5e Author: Lee Jones Date: Wed Mar 23 14:43:42 2016 +0000 mailbox: mailbox-test: Prevent memory leak If we set the Signal twice or more, without using it as part of a message, memory will be re-allocated and the pointer over-written. Prevent this potential leak by only allocating memory when there isn't any already. Reported-by: Dan Carpenter Signed-off-by: Lee Jones Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 17f5f28ffa6e81461a569290ae802a9b05a89072 Author: Lee Jones Date: Wed Mar 23 14:43:41 2016 +0000 mailbox: mailbox-test: Use more consistent format for calling copy_from_user() While we're at it, ensure copy-to location is NULL'ed in the error path. Suggested-by: Dan Carpenter Signed-off-by: Lee Jones Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cd49727e1a2bccc4ff008dde24c2f8430dd9e368 Author: Ayala Beker Date: Wed Feb 3 15:36:52 2016 +0200 iwlwifi: mvm: avoid to WARN about gscan capabilities Gscan capabilities were updated with new capabilities supported by the device. Update GSCAN capabilities TLV and avoid to WARN if the firmware does not have the new capabilities. Signed-off-by: Ayala Beker Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d34475b964b01067ed25187c4f52d8bdf2c0e113 Author: Oren Givon Date: Thu Mar 24 10:20:28 2016 +0200 iwlwifi: add device IDs for the 8265 device Add new 8265 series PCI IDs. Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f0c8e1d9c4f473dfc771a613b602f1841afe8f8b Author: Subhransu S. Prusty Date: Tue Apr 12 10:31:23 2016 +0530 ASoC: Intel: Skylake: Fix ibs/obs calc for non-integral sampling rates FW expects sampling rate rounded up to next higher integer value when calculating ibs/obs. For example for 44.1k, it should be rounded up to 45 to calculate ibs/obs. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 1ecf689013b598918cd9a261a078e64571b60f90 Author: stephen hemminger Date: Mon Apr 11 13:39:08 2016 -0700 devlink: add missing install of header The new devlink.h in uapi was not being installed by make headers_install Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 8070954d7c9fffa527e785292e901867338f79a9 Author: Akinobu Mita Date: Sat Apr 9 03:43:15 2016 +0900 spi: omap2-mcspi: Undo broken fix for dma transfer of vmalloced buffer This reverts commit 3525e0aac91c4de5d20b1f22a6c6e2b39db3cc96. The DMA transfer for RX buffer was not handled correctly in this change. The actual transfer length for DMA RX can be less than xfer->len in the specific condition and the last words will be filled after the DMA completion, but the commit doesn't consider it and the dmaengine is started with rx_sg mapped by spi core. The solution for this at least requires more lines than this commit has inserted. So revert it for now. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 62 +++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 17 deletions(-) commit 4f7f34eaab9f68c9bcd45386b15c414c38b40587 Author: David Ahern Date: Thu Apr 7 11:10:41 2016 -0700 net: vrf: Fix dev refcnt leak due to IPv6 prefix route ifupdown2 found a kernel bug with IPv6 routes and movement from the main table to the VRF table. Sequence of events: Create the interface and add addresses: ip link add dev eth4.105 link eth4 type vlan id 105 ip addr add dev eth4.105 8.105.105.10/24 ip -6 addr add dev eth4.105 2008:105:105::10/64 At this point IPv6 has inserted a prefix route in the main table even though the interface is 'down'. From there the VRF device is created: ip link add dev vrf105 type vrf table 105 ip addr add dev vrf105 9.9.105.10/32 ip -6 addr add dev vrf105 2000:9:105::10/128 ip link set vrf105 up Then the interface is enslaved, while still in the 'down' state: ip link set dev eth4.105 master vrf105 Since the device is down the VRF driver cycling the device does not send the NETDEV_UP and NETDEV_DOWN but rather the NETDEV_CHANGE event which does not flush the routes inserted prior. When the link is brought up ip link set dev eth4.105 up the prefix route is added in the VRF table, but does not remove the route from the main table. Fix by handling the NETDEV_CHANGEUPPER event similar what was implemented for IPv4 in 7f49e7a38b77 ("net: Flush local routes when device changes vrf association") Fixes: 35402e3136634 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9ab179d83b4e31ea277a123492e419067c2f129a Author: David Ahern Date: Thu Apr 7 11:10:06 2016 -0700 net: vrf: Fix dst reference counting Vivek reported a kernel exception deleting a VRF with an active connection through it. The root cause is that the socket has a cached reference to a dst that is destroyed. Converting the dst_destroy to dst_release and letting proper reference counting kick in does not work as the dst has a reference to the device which needs to be released as well. I talked to Hannes about this at netdev and he pointed out the ipv4 and ipv6 dst handling has dst_ifdown for just this scenario. Rather than continuing with the reinvented dst wheel in VRF just remove it and leverage the ipv4 and ipv6 versions. Fixes: 193125dbd8eb2 ("net: Introduce VRF device driver") Fixes: 35402e3136634 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 177 +++++------------------------------------------- include/net/ip6_route.h | 3 + include/net/route.h | 3 + net/ipv4/route.c | 7 +- net/ipv6/route.c | 7 +- 5 files changed, 30 insertions(+), 167 deletions(-) commit 1c74a7f812b135d3df41d7c3671b647aed6467bf Merge: 6c6563a 326ea2a Author: Linus Torvalds Date: Mon Apr 11 12:31:09 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - fix for how scaling linearization is computed in wiimote driver, by Cyan Ogilvie - endless retry loop fix in generic USB HID core reset-resume handling, by Alan Stern - two functional fixes affecting particular devices, and oops fix for wacom driver, by Jason Gerecke - multitouch slot numbering fix from Gabriele Mazzotta - a couple more small fixes on top * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: Support switching from vendor-defined device mode on G9 and G11 HID: wacom: Initialize hid_data.inputmode to -1 HID: microsoft: add support for 3 more devices HID: multitouch: Synchronize MT frame on reset_resume HID: wacom: fix Bamboo ONE oops HID: lenovo: Don't use stack variables for DMA buffers HID: usbhid: fix inconsistent reset/resume/reset-resume behavior HID: wiimote: Fix wiimote mp scale linearization commit 6c6563a4894238a3ed9c40601018816b60c31ec4 Merge: a56711f 7b8ba82 Author: Linus Torvalds Date: Mon Apr 11 12:24:59 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k update from Geert Uytterhoeven. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/defconfig: Update defconfigs for v4.6-rc2 m68k: Wire up preadv2 and pwritev2 commit 10c3c02255124e28c8bb63a274a543ee7e77f223 Merge: ebf4dc2 ddb1d33 Author: David S. Miller Date: Mon Apr 11 15:22:21 2016 -0400 Merge branch 'tipc-fixes' Jon Maloy says: ==================== tipc: name distributor pernet queue Commit #1 fixes a potential issue with deferred binding table updates being pushed to the wrong namespace. Commit #2 solves a problem with deferred binding table updates remaining in the the defer queue after the issuing node has gone down. ==================== Signed-off-by: David S. Miller commit ddb1d33969ef52687ad00f75eecf87029f62e382 Author: Erik Hugne Date: Thu Apr 7 10:40:44 2016 -0400 tipc: purge deferred updates from dead nodes If a peer node becomes unavailable, in addition to removing the nametable entries from this node we also need to purge all deferred updates associated with this node. Signed-off-by: Erik Hugne Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_distr.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 541726abe7daca64390c2ec34e6a203145f1686d Author: Erik Hugne Date: Thu Apr 7 10:40:43 2016 -0400 tipc: make dist queue pernet Nametable updates received from the network that cannot be applied immediately are placed on a defer queue. This queue is global to the TIPC module, which might cause problems when using TIPC in containers. To prevent nametable updates from escaping into the wrong namespace, we make the queue pernet instead. Signed-off-by: Erik Hugne Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/core.c | 1 + net/tipc/core.h | 3 +++ net/tipc/name_distr.c | 16 +++++++--------- 3 files changed, 11 insertions(+), 9 deletions(-) commit a56711fa0b418a2cf5eefa00ee65e16443e47790 Merge: bf16200 0dee6c8 Author: Linus Torvalds Date: Mon Apr 11 12:19:57 2016 -0700 Merge tag 'arc-4.6-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - fix Kconfig splat due to pcie rework - make ethernet work again on axs103 - provide fb_pgprotect() for future video driver integration * tag 'arc-4.6-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-axs103] Enable loop block devices Revert "ARC: [plat-axs10x] add Ethernet PHY description in .dts" arc: Add our own implementation of fb_pgprotect() ARC: Don't source drivers/pci/pcie/Kconfig ourselves commit ebf4dc2b1b2b9c8c7797f01a952bce3cf0247a4f Author: Hariprasad Shenai Date: Mon Apr 11 11:07:58 2016 +0530 cxgb4: Stop Rx Queues before freeing it up Stop all Ethernet RX Queues before freeing up various Ingress/Egress Queues, etc. We were seeing cases of Ingress Queues not getting serviced during the shutdown process leading to Ingress Paths jamming up through the chip and blocking the shutdown effort itself. One such case involved the Firmware sending a "Flush Token" through the ULP-TX -> ULP-RX path for an Ethernet TX Queue being freed in order to make sure there weren't any remaining TX Work Requests in the pipeline. But the return path was stalled by Ingress Data unable to be delivered to the Host because those Ingress Queues were no longer being serviced. Based on original work by Casey Leedom Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 +++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 20 +++++++++++++++--- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 33 ++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) commit 9bf2b972afeaffd173fe2ce211ebc555ea7e8a87 Author: Keith Busch Date: Fri Apr 8 16:11:02 2016 -0600 NVMe: Fix reset/remove race This fixes a scenario where device is present and being reset, but a request to unbind the driver occurs. A previous patch series addressing a device failure removal scenario flushed reset_work after controller disable to unblock reset_work waiting on a completion that wouldn't occur. This isn't safe as-is. The broken scenario can potentially be induced with: modprobe nvme && modprobe -r nvme To fix, the reset work is flushed immediately after setting the controller removing flag, and any subsequent reset will not proceed with controller initialization if the flag is set. The controller status must be polled while active, so the watchdog timer is also left active until the controller is disabled to cleanup requests that may be stuck during namespace removal. [Fixes: ff23a2a15a2117245b4599c1352343c8b8fb4c43] Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 072623de1f964c7ff01c46a9101af1c822fd2873 Author: Mikulas Patocka Date: Sat Apr 9 12:48:18 2016 -0400 dm: fix dm_target_io leak if clone_bio() returns an error Commit c80914e81ec5b08 ("dm: return error if bio_integrity_clone() fails in clone_bio()") changed clone_bio() such that if it does return error then the alloc_tio() created resources (both the bio that was allocated to be a clone and the containing dm_target_io struct) will leak. Fix this by calling free_tio() in __clone_and_map_data_bio()'s clone_bio() error path. Fixes: c80914e81ec5b08 ("dm: return error if bio_integrity_clone() fails in clone_bio()") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c636b95ec5980345674ad7960a3c67135a84b687 Author: Sven Eckelmann Date: Mon Apr 11 16:55:26 2016 +0200 ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s The Lenovo Thinkpad T460s requires the alc_fixup_tpt440_dock as well in order to get working sound output on the docking stations headphone jack. Patch tested on a Thinkpad T460s (20F9CT01WW) using a ThinkPad Ultradock on kernel 4.4.6. Signed-off-by: Sven Eckelmann Tested-by: Simon Wunderlich Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e3156048346c28c695f5cf9db67a8cf88c90f947 Author: Joerg Roedel Date: Fri Apr 8 15:12:24 2016 +0200 iommu/amd: Fix checking of pci dma aliases Commit 61289cb ('iommu/amd: Remove old alias handling code') removed the old alias handling code from the AMD IOMMU driver because this is now handled by the IOMMU core code. But this also removed the handling of PCI aliases, which is not handled by the core code. This caused issues with PCI devices that have hidden PCIe-to-PCI bridges that rewrite the request-id. Fix this bug by re-introducing some of the removed functions from commit 61289cbaf6c8 and add a alias field 'struct iommu_dev_data'. This field carrys the return value of the get_alias() function and uses that instead of the amd_iommu_alias_table[] array in the code. Fixes: 61289cbaf6c8 ('iommu/amd: Remove old alias handling code') Cc: stable@vger.kernel.org # v4.4+ Tested-by: Tomasz Golinski Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 87 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 11 deletions(-) commit dc5027a72369f4979a48d628ddebeeb974b7eb37 Author: William Breathitt Gray Date: Mon Apr 11 09:25:52 2016 -0400 ALSA: sscape: Use correct format identifier for size_t The 'size' member of a struct firmware is passed to snd_printk with a respective format string using the %d identifier. The 'size' member is of type size_t, but format identifier %d indicates a signed int data type. This patch replaces the %d format identifier with the correct %zu format identifier for size_t data types. Signed-off-by: William Breathitt Gray Signed-off-by: Takashi Iwai sound/isa/sscape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 734e00fa02eff5003827abc06a7ebf9449349109 Author: Phil Reid Date: Thu Apr 7 15:55:35 2016 +0800 net: stmmac: socfgpa: Ensure emac bit set in System Manger for PTP When using the PTP fpga to hps clock source for the stmmac module the appropriate bit in the System Manager FPGA Interface Group register needs to be set. This is not set by the bootloader setup when the HPS emac pins are being for this emac module. This allows the PTP clock to be sourced from the FPGA and also connects the PTP pps and ext trig signals to the stmmac PTP hardware. Patch proposed by Phil Collins. Signed-off-by: Phil Reid Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit e27260203912b40751fa353d009eaa5a642c739f Author: Dmitry Ivanov Date: Thu Apr 7 09:31:38 2016 +0200 netlink: don't send NETLINK_URELEASE for unbound sockets All existing users of NETLINK_URELEASE use it to clean up resources that were previously allocated to a socket via some command. As a result, no users require getting this notification for unbound sockets. Sending it for unbound sockets, however, is a problem because any user (including unprivileged users) can create a socket that uses the same ID as an existing socket. Binding this new socket will fail, but if the NETLINK_URELEASE notification is generated for such sockets, the users thereof will be tricked into thinking the socket that they allocated the resources for is closed. In the nl80211 case, this will cause destruction of virtual interfaces that still belong to an existing hostapd process; this is the case that Dmitry noticed. In the NFC case, it will cause a poll abort. In the case of netlink log/queue it will cause them to stop reporting events, as if NFULNL_CFG_CMD_UNBIND/NFQNL_CFG_CMD_UNBIND had been called. Fix this problem by checking that the socket is bound before generating the NETLINK_URELEASE notification. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Ivanov Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 928815245cbdaa611873424759d5e7a7293dd18b Merge: d3de1b8 42bf7b4 Author: Dave Airlie Date: Mon Apr 11 13:30:05 2016 +1000 Merge tag 'drm-intel-fixes-2016-04-07' of git://anongit.freedesktop.org/drm-intel into drm-fixes misc i915 fixes. * tag 'drm-intel-fixes-2016-04-07' of git://anongit.freedesktop.org/drm-intel: drm/i915: fix deadlock on lid open drm/i915: Exit cherryview_irq_handler() after one pass drm/i915: Call intel_dp_mst_resume() before resuming displays drm/i915: Fix race condition in intel_dp_destroy_mst_connector() commit d3de1b81a08a06be2f4a5ac2dd5dc9d87bd85193 Merge: bf16200 735b100 Author: Dave Airlie Date: Mon Apr 11 13:29:42 2016 +1000 Merge tag 'topic/drm-fixes-2016-04-07' of git://anongit.freedesktop.org/drm-intel into drm-fixes The qxl fix I've picked up quite some time ago, and unfortunately neglected. Then there's established timing fixes, of which particularly "drm/edid: Fix parsing of EDID 1.4 Established Timings III descriptor" is quite surprising. It looks like we've never got any of them right. I am not sure what the full implications of this are. That combined with lack of any details of real world bugs fixed made me decide against cc: stable. * tag 'topic/drm-fixes-2016-04-07' of git://anongit.freedesktop.org/drm-intel: drm/edid: Fix DMT 1024x768@43Hz (interlaced) timings drm/edid: Fix parsing of EDID 1.4 Established Timings III descriptor drm/edid: Fix EDID Established Timings I and II drm/qxl: fix cursor position with non-zero hotspot commit a36a0d4008488fa545c74445d69eaf56377d5d4e Author: David S. Miller Date: Sun Apr 10 23:01:30 2016 -0400 decnet: Do not build routes to devices without decnet private data. In particular, make sure we check for decnet private presence for loopback devices. Signed-off-by: David S. Miller net/decnet/dn_route.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ba6f5e33bdbb9ed2014b778fbbaecf20060ca989 Author: Marcelo Ricardo Leitner Date: Wed Apr 6 15:15:19 2016 -0300 sctp: avoid refreshing heartbeat timer too often Currently on high rate SCTP streams the heartbeat timer refresh can consume quite a lot of resources as timer updates are costly and it contains a random factor, which a) is also costly and b) invalidates mod_timer() optimization for not editing a timer to the same value. It may even cause the timer to be slightly advanced, for no good reason. As suggested by David Laight this patch now removes this timer update from hot path by leaving the timer on and re-evaluating upon its expiration if the heartbeat is still needed or not, similarly to what is done for TCP. If it's not needed anymore the timer is re-scheduled to the new timeout, considering the time already elapsed. For this, we now record the last tx timestamp per transport, updated in the same spots as hb timer was restarted on tx. Also split up sctp_transport_reset_timers into sctp_transport_reset_t3_rtx and sctp_transport_reset_hb_timer, so we can re-arm T3 without re-arming the heartbeat one. On loopback with MTU of 65535 and data chunks with 1636, so that we have a considerable amount of chunks without stressing system calls, netperf -t SCTP_STREAM -l 30, perf looked like this before: Samples: 103K of event 'cpu-clock', Event count (approx.): 25833000000 Overhead Command Shared Object Symbol + 6,15% netperf [kernel.vmlinux] [k] copy_user_enhanced_fast_string - 5,43% netperf [kernel.vmlinux] [k] _raw_write_unlock_irqrestore - _raw_write_unlock_irqrestore - 96,54% _raw_spin_unlock_irqrestore - 36,14% mod_timer + 97,24% sctp_transport_reset_timers + 2,76% sctp_do_sm + 33,65% __wake_up_sync_key + 28,77% sctp_ulpq_tail_event + 1,40% del_timer - 1,84% mod_timer + 99,03% sctp_transport_reset_timers + 0,97% sctp_do_sm + 1,50% sctp_ulpq_tail_event And after this patch, now with netperf -l 60: Samples: 230K of event 'cpu-clock', Event count (approx.): 57707250000 Overhead Command Shared Object Symbol + 5,65% netperf [kernel.vmlinux] [k] memcpy_erms + 5,59% netperf [kernel.vmlinux] [k] copy_user_enhanced_fast_string - 5,05% netperf [kernel.vmlinux] [k] _raw_spin_unlock_irqrestore - _raw_spin_unlock_irqrestore + 49,89% __wake_up_sync_key + 45,68% sctp_ulpq_tail_event - 2,85% mod_timer + 76,51% sctp_transport_reset_t3_rtx + 23,49% sctp_do_sm + 1,55% del_timer + 2,50% netperf [sctp] [k] sctp_datamsg_from_user + 2,26% netperf [sctp] [k] sctp_sendmsg Throughput-wise, from 6800mbps without the patch to 7050mbps with it, ~3.7%. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 8 +++++++- net/sctp/outqueue.c | 15 ++++++++++----- net/sctp/sm_make_chunk.c | 3 +-- net/sctp/sm_sideeffect.c | 36 ++++++++++++++++-------------------- net/sctp/transport.c | 19 +++++++++++++------ 5 files changed, 47 insertions(+), 34 deletions(-) commit 2763ee644809820fb1b741f1e7dd779038092324 Author: Greg Ungerer Date: Thu Apr 7 05:26:26 2016 +1000 m68k/gpio: remove arch specific sysfs bus device The ColdFire architecture specific gpio support code registers a sysfs bus device named "gpio". This clashes with the new generic API device added in commit 3c702e99 ("gpio: add a userspace chardev ABI for GPIOs"). The old ColdFire sysfs gpio device was never used for anything specific, and no links or other nodes were created under it. The new API sysfs gpio device has all the same default sysfs links (device, drivers, etc) and they are properly populated. Remove the old ColdFire sysfs gpio registration. Signed-off-by: Greg Ungerer Acked-by: Linus Walleij arch/m68k/coldfire/gpio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit bf16200689118d19de1b8d2a3c314fc21f5dc7bb Author: Linus Torvalds Date: Sun Apr 10 17:58:30 2016 -0700 Linux 4.6-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08b15d13864279aae10443c48cb268d823895b14 Merge: 2f422f9 208fae5 Author: Linus Torvalds Date: Sun Apr 10 17:48:17 2016 -0700 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A couple of small fixes, and wiring up the new syscalls which appeared during the merge window" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8550/1: protect idiv patching against undefined gcc behavior ARM: wire up preadv2 and pwritev2 syscalls ARM: SMP enable of cache maintanence broadcast commit 2f422f94eea83f50755df76be8f5ff86ef89ad80 Merge: 6a7c924 01d6b2a Author: Linus Torvalds Date: Sun Apr 10 17:38:55 2016 -0700 Merge tag 'mmc-v4.6-rc1' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are a couple of mmc fixes intended for v4.6 rc3: MMC host: - sdhci: Fix regression setting power on Trats2 board - sdhci-pci: Add support and PCI IDs for more Broxton host controllers" * tag 'mmc-v4.6-rc1' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: sdhci-pci: Add support and PCI IDs for more Broxton host controllers mmc: sdhci: Fix regression setting power on Trats2 board commit 6a7c924314dd1b4facfccc682011622c15e71ea3 Merge: 9f2394c caf2808 Author: Linus Torvalds Date: Sun Apr 10 17:04:42 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: "Some bugfixes from I2C: - fix a uevent triggered boot problem by removing a useless debug print - fix sysfs-attributes of the new i2c-demux-pinctrl driver to follow standard kernel behaviour - fix a potential division-by-zero error (needed two takes)" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: jz4780: really prevent potential division by zero Revert "i2c: jz4780: prevent potential division by zero" i2c: jz4780: prevent potential division by zero i2c: mux: demux-pinctrl: Update docs to new sysfs-attributes i2c: mux: demux-pinctrl: Clean up sysfs attributes i2c: prevent endless uevent loop with CONFIG_I2C_DEBUG_CORE commit 9f2394c9be47a754bae9e4b6d382bdd4d77d0a11 Author: Linus Torvalds Date: Sun Apr 10 16:52:24 2016 -0700 Revert "ext4: allow readdir()'s of large empty directories to be interrupted" This reverts commit 1028b55bafb7611dda1d8fed2aeca16a436b7dff. It's broken: it makes ext4 return an error at an invalid point, causing the readdir wrappers to write the the position of the last successful directory entry into the position field, which means that the next readdir will now return that last successful entry _again_. You can only return fatal errors (that terminate the readdir directory walk) from within the filesystem readdir functions, the "normal" errors (that happen when the readdir buffer fills up, for example) happen in the iterorator where we know the position of the actual failing entry. I do have a very different patch that does the "signal_pending()" handling inside the iterator function where it is allowable, but while that one passes all the sanity checks, I screwed up something like four times while emailing it out, so I'm not going to commit it today. So my track record is not good enough, and the stars will have to align better before that one gets committed. And it would be good to get some review too, of course, since celestial alignments are always an iffy debugging model. IOW, let's just revert the commit that caused the problem for now. Reported-by: Greg Thelen Cc: Theodore Ts'o Signed-off-by: Linus Torvalds fs/ext4/dir.c | 5 ----- fs/ext4/namei.c | 5 ----- 2 files changed, 10 deletions(-) commit 316314cae15fb0e3869b76b468f59a0c83ac3d4e Author: Paolo Bonzini Date: Mon Mar 21 12:33:00 2016 +0100 KVM: x86: mask CPUID(0xD,0x1).EAX against host value This ensures that the guest doesn't see XSAVE extensions (e.g. xgetbv1 or xsavec) that the host lacks. Cc: stable@vger.kernel.org Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 1 + 1 file changed, 1 insertion(+) commit fc5b7f3bf1e1414bd4e91db6918c85ace0c873a5 Author: David Matlack Date: Wed Mar 30 12:24:47 2016 -0700 kvm: x86: do not leak guest xcr0 into host interrupt handlers An interrupt handler that uses the fpu can kill a KVM VM, if it runs under the following conditions: - the guest's xcr0 register is loaded on the cpu - the guest's fpu context is not loaded - the host is using eagerfpu Note that the guest's xcr0 register and fpu context are not loaded as part of the atomic world switch into "guest mode". They are loaded by KVM while the cpu is still in "host mode". Usage of the fpu in interrupt context is gated by irq_fpu_usable(). The interrupt handler will look something like this: if (irq_fpu_usable()) { kernel_fpu_begin(); [... code that uses the fpu ...] kernel_fpu_end(); } As long as the guest's fpu is not loaded and the host is using eager fpu, irq_fpu_usable() returns true (interrupted_kernel_fpu_idle() returns true). The interrupt handler proceeds to use the fpu with the guest's xcr0 live. kernel_fpu_begin() saves the current fpu context. If this uses XSAVE[OPT], it may leave the xsave area in an undesirable state. According to the SDM, during XSAVE bit i of XSTATE_BV is not modified if bit i is 0 in xcr0. So it's possible that XSTATE_BV[i] == 1 and xcr0[i] == 0 following an XSAVE. kernel_fpu_end() restores the fpu context. Now if any bit i in XSTATE_BV == 1 while xcr0[i] == 0, XRSTOR generates a #GP. The fault is trapped and SIGSEGV is delivered to the current process. Only pre-4.2 kernels appear to be vulnerable to this sequence of events. Commit 653f52c ("kvm,x86: load guest FPU context more eagerly") from 4.2 forces the guest's fpu to always be loaded on eagerfpu hosts. This patch fixes the bug by keeping the host's xcr0 loaded outside of the interrupts-disabled region where KVM switches into guest mode. Cc: stable@vger.kernel.org Suggested-by: Andy Lutomirski Signed-off-by: David Matlack [Move load after goto cancel_injection. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7a98205deebfff9fc96f90d9e7b1a334b0bd3e2b Author: Xiao Guangrong Date: Fri Mar 25 21:19:35 2016 +0800 KVM: MMU: fix permission_fault() kvm-unit-tests complained about the PFEC is not set properly, e.g,: test pte.rw pte.d pte.nx pde.p pde.rw pde.pse user fetch: FAIL: error code 15 expected 5 Dump mapping: address: 0x123400000000 ------L4: 3e95007 ------L3: 3e96007 ------L2: 2000083 It's caused by the reason that PFEC returned to guest is copied from the PFEC triggered by shadow page table This patch fixes it and makes the logic of updating errcode more clean Signed-off-by: Xiao Guangrong [Do not assume pfec.p=1. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 9 ++++----- arch/x86/kvm/paging_tmpl.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 1cbabcb9807e31e87ef3a12af76ea025ceb582d3 Author: Keerthy Date: Tue Apr 5 16:44:12 2016 -0500 ARM: DRA7: clockdomain: Implement timer workaround for errata i874 Errata Title: i874: TIMER5/6/7/8 interrupts not propagated Description: When TIMER5, TIMER6, TIMER7, or TIMER8 clocks are enabled (CM_IPU_TIMER5/6/7/8_CLKCTRL[0:1]MODULEMODE=0x2:ENABLE) and the CD-IPU is in HW_AUTO mode (CM_IPU_CLKSTCTRL[0:1]CLKTRCTRL=0x3:HW_AUTO) the corresponding TIMER will continue counting, but enabled interrupts will not be propagated to the destinations (MPU, DSP, etc) in the SoC until the TIMER registers are accessed from the CPUs (MPU, DSP etc.). This can result in missed timer interrupts. Workaround: In order for TIMER5/6/7/8 interrupts to be propagated and serviced correctly the CD_IPU domain should be set to SW_WKUP mode (CM_IPU_CLKSTCTRL[0:1]CLKTRCTRL=0x2:SW_WKUP). The above workaround is achieved by switching the IPU clockdomain flags from HWSUP_SWSUP to SWSUP only. Signed-off-by: Keerthy Signed-off-by: Suman Anna Signed-off-by: Paul Walmsley arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffb810563c0c049872a504978e06c8892104fb6c Author: Rafael J. Wysocki Date: Sun Apr 10 05:59:10 2016 +0200 intel_pstate: Avoid getting stuck in high P-states when idle Jörg Otte reports that commit a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) caused the CPUs in his Haswell-based system to stay in the very high frequency region even if the system is completely idle. That turns out to be an existing problem in the intel_pstate driver's P-state selection algorithm for Core processors. Namely, all decisions made by that algorithm are based on the average frequency of the CPU between sampling events and on the P-state requested on the last invocation, so it may get stuck at a very hight frequency even if the utilization of the CPU is very low (in fact, it may get stuck in a inadequate P-state regardless of the CPU utilization). The only way to kick it out of that limbo is a sufficiently long idle period (3 times longer than the prescribed sampling interval), but if that doesn't happen often enough (eg. due to a timing change like after the above commit), the P-state of the CPU may be inadequate pretty much all the time. To address the most egregious manifestations of that issue, reset the core_busy value used to determine the next P-state to request if the utilization of the CPU, determined with the help of the MPERF feedback register and the TSC, is below 1%. Link: https://bugzilla.kernel.org/show_bug.cgi?id=115771 Reported-and-tested-by: Jörg Otte Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 4 ++++ 1 file changed, 4 insertions(+) commit 49dd48dafec64fe99bdcc518092c5db4bffaa8a9 Author: Sergei Shtylyov Date: Sun Apr 10 02:28:41 2016 +0300 sh_eth: re-enable-E-MAC interrupts in sh_eth_set_ringparam() The E-MAC interrupts are left disabled when the ring parameters are changed via 'ethtool'. In order to fix this, it's enough to call sh_eth_dev_init() with 'true' instead of 'false' for the second argument (which conveniently allows us to remove the following code re-enabling E-DMAC interrupts and reception). Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5b5b7fd185e997ebc18f76b98b9f4ff148d3f5bb Merge: 239467e cb910c1 Author: Linus Torvalds Date: Sat Apr 9 14:10:20 2016 -0700 Merge branch 'parisc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Since commit 0de798584bde ("parisc: Use generic extable search and sort routines") module loading is boken on parisc, because the parisc module loader wasn't prepared for the new R_PARISC_PCREL32 relocations. In addition, due to that breakage, Mikulas Patocka noticed that handling exceptions from modules probably never worked on parisc. It was just masked by the fact that exceptions from modules don't happen during normal use. This patch series fixes those issues and survives the tests of the lib/test_user_copy kernel module test. Some patches are tagged for stable" * 'parisc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Update comment regarding relative extable support parisc: Unbreak handling exceptions from kernel modules parisc: Fix kernel crash with reversed copy_from_user() parisc: Avoid function pointers for kernel exception routines parisc: Handle R_PARISC_PCREL32 relocations in kernel modules commit 239467e852a4d2dcd255093bfafc92a9adbb76a2 Merge: 289b7bf a390180 Author: Linus Torvalds Date: Sat Apr 9 14:05:45 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "Three fixes, the first two are tagged for -stable: - The ndctl utility/library gained expanded unit tests illuminating a long standing bug in the libnvdimm SMART data retrieval implementation. It has been broken since its initial implementation, now fixed. - Another one line fix for the detection of stale info blocks. Without this change userspace can get into a situation where it is unable to reconfigure a namespace. - Fix the badblock initialization path in the presence of the new (in v4.6-rc1) section alignment workarounds. Without this change badblocks will be reported at the wrong offset. These have received a build success report from the kbuild robot and have appeared in -next with no reported issues" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment libnvdimm, pfn: fix uuid validation libnvdimm: fix smart data retrieval commit 289b7bfd483c8ca3dfde92d7e19a8b70e0b81248 Merge: 183c948 9b8e3ec Author: Linus Torvalds Date: Sat Apr 9 13:28:50 2016 -0700 Merge tag 'gpio-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here is a set of four GPIO fixes. The two fixes to the core are serious as they are regressing minor architectures. Core fixes: - Defer GPIO device setup until after gpiolib is initialized. It turns out that a few very tightly integrated GPIO platform drivers initialize so early (befor core_initcall()) so that the gpiolib isn't even initialized itself. That limits what the library can do, and we cannot reference uninitialized fields until later. Defer some of the initialization until right after the gpiolib is initialized in these (rare) cases. - As a consequence: do not use devm_* resources when allocating the states in the initial set-up of the gpiochip. Driver fixes: - In ACPI retrieveal: ignore GpioInt when looking for output GPIOs. - Fix legacy builds on the PXA without a backing pin controller. - Use correct datatype on pca953x register writes" * tag 'gpio-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pca953x: Use correct u16 value for register word write gpiolib: Defer gpio device setup until after gpiolib initialization gpiolib: Do not use devm functions when registering gpio chip gpio: pxa: fix legacy non pinctrl aware builds gpio / ACPI: ignore GpioInt() GPIOs when requesting GPIO_OUT_* commit 183c948a3cb3efbf45eabed41fa7ee04c19378fc Merge: ffb927d 5e00bbf Author: Linus Torvalds Date: Sat Apr 9 12:32:44 2016 -0700 Merge tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty fixes for issues found. One was due to a merge error in 4.6-rc1, and the other a regression fix for UML consoles that broke in 4.6-rc1. Both have been in linux-next for a while" * tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix merge of "tty: Refactor tty_open()" tty: Fix UML console breakage commit ffb927d1dce051f2c93d4510e446589189c1bf27 Merge: c6e6e58 636c8a8 Author: Linus Torvalds Date: Sat Apr 9 12:23:02 2016 -0700 Merge tag 'usb-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes and new device ids for 4.6-rc3. Nothing major, the normal USB gadget fixes and usb-serial driver ids, along with some other fixes mixed in. All except the USB serial ids have been tested in linux-next, the id additions should be fine as they are 'trivial'" * tag 'usb-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits) USB: option: add "D-Link DWM-221 B1" device id USB: serial: cp210x: Adding GE Healthcare Device ID USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices usb: dwc3: keystone: drop dma_mask configuration usb: gadget: udc-core: remove manual dma configuration usb: dwc3: pci: add ID for one more Intel Broxton platform usb: renesas_usbhs: fix to avoid using a disabled ep in usbhsg_queue_done() usb: dwc2: do not override forced dr_mode in gadget setup usb: gadget: f_midi: unlock on error USB: digi_acceleport: do sanity checking for the number of ports USB: cypress_m8: add endpoint sanity check USB: mct_u232: add sanity checking in probe usb: fix regression in SuperSpeed endpoint descriptor parsing USB: usbip: fix potential out-of-bounds write usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler() usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize usb: phy: qcom-8x16: fix regulator API abuse usb: ch9: Fix SSP Device Cap wFunctionalitySupport type usb: gadget: composite: Access SSP Dev Cap fields properly ... commit c6e6e58cc8a636b9b833a7b4bc00cde1fe20892f Merge: fb41b4b 53c43c5 Author: Linus Torvalds Date: Sat Apr 9 12:09:37 2016 -0700 Merge tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some IIO driver fixes, along with two staging driver fixes for 4.6-rc3. One staging driver patch reverts the deletion of a driver that happened in 4.6-rc1. We thought that laptop.org was dead, but it's still alive and kicking, and has users that were mad we broke their hardware by deleting a driver for their machines. So that driver is added back and everyone is happy again. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Revert "Staging: olpc_dcon: Remove obsolete driver" staging/rdma/hfi1: select CRC32 iio: gyro: bmg160: fix buffer read values iio: gyro: bmg160: fix endianness when reading axes iio: accel: bmc150: fix endianness when reading axes iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE iio: fix config watermark initial value iio: health: max30100: correct FIFO check condition iio: imu: Fix inv_mpu6050 dependencies iio: adc: Fix build error of missing devm_ioremap_resource on UM iio: light: apds9960: correct FIFO check condition iio: adc: max1363: correct reference voltage iio: adc: max1363: add missing adc to max1363_id commit fb41b4be00270f5b28784a31a458a4dcf4519b9e Merge: 63b106a 6ea7e38 Author: Linus Torvalds Date: Sat Apr 9 12:00:42 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 eight fixes. Two are trivial gcc-6 updates (brace additions and unused variable removal). There's a couple of cxlflash regressions, a correction for sd being overly chatty on revalidation (causing excess log increases). A VPD issue which could crash USB devices because they seem very intolerant to VPD inquiries, an ALUA deadlock fix and a mpt3sas buffer overrun fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Do not attach VPD to devices that don't support it sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes scsi_dh_alua: Fix a recently introduced deadlock scsi: Declare local symbols static cxlflash: Move to exponential back-off when cmd_room is not available cxlflash: Fix regression issue with re-ordering patch mpt3sas: Don't overreach ioc->reply_post[] during initialization aacraid: add missing curly braces commit 63b106a87dd84283e21aa2ce476732633eaab11d Merge: 40bca9d f9a67b1 Author: Linus Torvalds Date: Sat Apr 9 11:23:27 2016 -0700 Merge tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "This update mainly fixes bugs: - fix error handling (Guoqing) - fix a crash when a disk is hotremoved (me) - fix a dead loop (Wei Fang)" * tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/bitmap: clear bitmap if bitmap_create failed MD: add rdev reference for super write md: fix a trivial typo in comments md:raid1: fix a dead loop when read from a WriteMostly disk commit 40bca9dbab4dd6d5a78beccdbbb1c7218136b562 Merge: 9ef11ce 73659be Author: Linus Torvalds Date: Sat Apr 9 11:03:48 2016 -0700 Merge tag 'pm+acpi-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "Fixes for some issues discovered after recent changes and for some that have just been found lately regardless of those changes (intel_pstate, intel_idle, PM core, mailbox/pcc, turbostat) plus support for some new CPU models (intel_idle, Intel RAPL driver, turbostat) and documentation updates (intel_pstate, PM core). Specifics: - intel_pstate fixes for two issues exposed by the recent switch over from using timers and for one issue introduced during the 4.4 cycle plus new comments describing data structures used by the driver (Rafael Wysocki, Srinivas Pandruvada). - intel_idle fixes related to CPU offline/online (Richard Cochran). - intel_idle support (new CPU IDs and state definitions mostly) for Skylake-X and Kabylake processors (Len Brown). - PCC mailbox driver fix for an out-of-bounds memory access that may cause the kernel to panic() (Shanker Donthineni). - New (missing) CPU ID for one apparently overlooked Haswell model in the Intel RAPL power capping driver (Srinivas Pandruvada). - Fix for the PM core's wakeup IRQs framework to make it work after wakeup settings reconfiguration from sysfs (Grygorii Strashko). - Runtime PM documentation update to make it describe what needs to be done during device removal more precisely (Krzysztof Kozlowski). - Stale comment removal cleanup in the cpufreq-dt driver (Viresh Kumar). - turbostat utility fixes and support for Broxton, Skylake-X and Kabylake processors (Len Brown)" * tag 'pm+acpi-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (28 commits) PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs tools/power turbostat: work around RC6 counter wrap tools/power turbostat: initial KBL support tools/power turbostat: initial SKX support tools/power turbostat: decode BXT TSC frequency via CPUID tools/power turbostat: initial BXT support tools/power turbostat: print IRTL MSRs tools/power turbostat: SGX state should print only if --debug intel_idle: Add KBL support intel_idle: Add SKX support intel_idle: Clean up all registered devices on exit. intel_idle: Propagate hot plug errors. intel_idle: Don't overreact to a cpuidle registration failure. intel_idle: Setup the timer broadcast only on successful driver load. intel_idle: Avoid a double free of the per-CPU data. intel_idle: Fix dangling registration on error path. intel_idle: Fix deallocation order on the driver exit path. intel_idle: Remove redundant initialization calls. intel_idle: Fix a helper function's return value. intel_idle: remove useless return from void function. ... commit 9ef11ceb0d380d4c9b43083fd920049aa05d3f8d Merge: 839a3f7 30d237a Author: Linus Torvalds Date: Sat Apr 9 10:50:44 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Stale SKB data pointer access across pskb_may_pull() calls in L2TP, from Haishuang Yan. 2) Fix multicast frame handling in mac80211 AP code, from Felix Fietkau. 3) mac80211 station hashtable insert errors not handled properly, fix from Johannes Berg. 4) Fix TX descriptor count limit handling in e1000, from Alexander Duyck. 5) Revert a buggy netdev refcount fix in netpoll, from Bjorn Helgaas. 6) Must assign rtnl_link_ops of the device before registering it, fix in ip6_tunnel from Thadeu Lima de Souza Cascardo. 7) Memory leak fix in tc action net exit, from WANG Cong. 8) Add missing AF_KCM entries to name tables, from Dexuan Cui. 9) Fix regression in GRE handling of csums wrt. FOU, from Alexander Duyck. 10) Fix memory allocation alignment and congestion map corruption in RDS, from Shamir Rabinovitch. 11) Fix default qdisc regression in tuntap driver, from Jason Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits) bridge, netem: mark mailing lists as moderated tuntap: restore default qdisc mpls: find_outdev: check for err ptr in addition to NULL check ipv6: Count in extension headers in skb->network_header RDS: fix congestion map corruption for PAGE_SIZE > 4k RDS: memory allocated must be align to 8 GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU net: add the AF_KCM entries to family name tables MAINTAINERS: intel-wired-lan list is moderated lib/test_bpf: Add additional BPF_ADD tests lib/test_bpf: Add test to check for result of 32-bit add that overflows lib/test_bpf: Add tests for unsigned BPF_JGT lib/test_bpf: Fix JMP_JSET tests VSOCK: Detach QP check should filter out non matching QPs. stmmac: fix adjust link call in case of a switch is attached af_packet: tone down the Tx-ring unsupported spew. net_sched: fix a memory leak in tc action samples/bpf: Enable powerpc support samples/bpf: Use llc in PATH, rather than a hardcoded value samples/bpf: Fix build breakage with map_perf_test_user.c ... commit 839a3f765728cdca0057a12e2dc0bf669ac1c22e Merge: 6759212 56f23fd Author: Linus Torvalds Date: Sat Apr 9 10:41:34 2016 -0700 Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "These are bug fixes, including a really old fsync bug, and a few trace points to help us track down problems in the quota code" * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix file/data loss caused by fsync after rename and new inode btrfs: Reset IO error counters before start of device replacing btrfs: Add qgroup tracing Btrfs: don't use src fd for printk btrfs: fallback to vmalloc in btrfs_compare_tree btrfs: handle non-fatal errors in btrfs_qgroup_inherit() btrfs: Output more info for enospc_debug mount option Btrfs: fix invalid reference in replace_path Btrfs: Improve FL_KEEP_SIZE handling in fallocate commit 6759212640fda202d0da5ce2f75dd261f1b879cc Merge: 1a59c53 e56f498 Author: Linus Torvalds Date: Sat Apr 9 10:33:58 2016 -0700 Merge tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs fixes from Mike Marshall: "Orangefs cleanups and a strncpy vulnerability fix. Cleanups: - remove an unused variable from orangefs_readdir. - clean up printk wrapper used for ofs "gossip" debugging. - clean up truncate ctime and mtime setting in inode.c - remove a useless null check found by coccinelle. - optimize some memcpy/memset boilerplate code. - remove some useless sanity checks from xattr.c Fix: - fix a potential strncpy vulnerability" * tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: remove unused variable orangefs: Add KERN_ to gossip_ macros orangefs: strncpy -> strscpy orangefs: clean up truncate ctime and mtime setting Orangefs: fix ifnullfree.cocci warnings Orangefs: optimize boilerplate code. Orangefs: xattr.c cleanup commit 1a59c53920eed3b2718c07286f1afe8674a7d9e6 Merge: 3c96888 0b74ecd Author: Linus Torvalds Date: Sat Apr 9 10:23:45 2016 -0700 Merge tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - compile-time fixes (warnings and failures) - a bug in iommu core code which could cause the group->domain pointer to be falsly cleared - fix in scatterlist handling of the ARM common DMA-API code - stall detection fix for the Rockchip IOMMU driver * tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Silence an uninitialized variable warning iommu/rockchip: Fix "is stall active" check iommu: Don't overwrite domain pointer when there is no default_domain iommu/dma: Restore scatterlist offsets correctly iommu: provide of_xlate pointer unconditionally commit caf280800aaf73f0796d1bb3fa0f6576c8222258 Author: Wolfram Sang Date: Sun Apr 3 23:32:00 2016 +0200 i2c: jz4780: really prevent potential division by zero Make sure we avoid a division-by-zero OOPS in case clock-frequency is set too low in DT. Add missing '\n' while we are here. Signed-off-by: Wolfram Sang Acked-by: Axel Lin drivers/i2c/busses/i2c-jz4780.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4ececb7d173f17c60c00e704a0e4e51cdf788e04 Author: Wolfram Sang Date: Sat Apr 9 08:32:37 2016 +0200 Revert "i2c: jz4780: prevent potential division by zero" This reverts commit 34cf2acdafaa31a13821e45de5ee896adcd307b1. 'ret' is not set when bailing out. Also, there is a better place to check for 0. Reported-by: Axel Lin Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357f435d8a0d32068c75f3c7176434d992b3adb7 Author: Al Viro Date: Fri Apr 8 19:05:19 2016 -0400 fix the copy vs. map logics in blk_rq_map_user_iov() Signed-off-by: Al Viro block/blk-map.c | 47 ++++++++--------------------------------------- include/linux/uio.h | 1 + lib/iov_iter.c | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 39 deletions(-) commit 309fdeb55723fecf17e43367d0918b2fb3fd18d6 Merge: e6cc3be 11ca873 Author: Kevin Hilman Date: Fri Apr 8 16:03:46 2016 -0700 Merge tag 'meson8-dt-fix' of https://github.com/carlocaione/linux-meson into fixes With http://www.spinics.net/lists/devicetree/msg116771.html we split / refactor the pinctrl driver to have two different pinctrl devices for each bus on the Amlogic Meson8 / Meson8b SoCs. These are the missing patches for documentation and DT that weren't pulled into mainline with the driver changes. * tag 'meson8-dt-fix' of https://github.com/carlocaione/linux-meson: documentation: Fix pinctrl documentation for Meson8 / Meson8b ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b commit 636c8a8d85d0564222071f0caa4a4e6bf527efe5 Merge: 39ec5cb d48d569 Author: Greg Kroah-Hartman Date: Fri Apr 8 15:41:58 2016 -0700 Merge tag 'usb-serial-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.6-rc3 Here are some new device ids. Signed-off-by: Johan Hovold commit 30d237a6c2e9be1bb816fe8e787b88fd7aad833b Merge: 3430284 b4201cc Author: David S. Miller Date: Fri Apr 8 16:41:28 2016 -0400 Merge tag 'mac80211-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== For the current RC series, we have the following fixes: * TDLS fixes from Arik and Ilan * rhashtable fixes from Ben and myself * documentation fixes from Luis * U-APSD fixes from Emmanuel * a TXQ fix from Felix * and a compiler warning suppression from Jeff ==================== Signed-off-by: David S. Miller commit 3430284feab3caacf94984400c6e84d0858de880 Author: stephen hemminger Date: Tue Apr 5 13:43:53 2016 -0700 bridge, netem: mark mailing lists as moderated I moderate these (lightly loaded) lists to block spam. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb910c1714cc198fa868695c276a2bff0f8900e7 Author: Helge Deller Date: Fri Apr 8 21:36:06 2016 +0200 parisc: Update comment regarding relative extable support Update the comment to reflect the changes of commit 0de7985 (parisc: Use generic extable search and sort routines). Signed-off-by: Helge Deller arch/parisc/include/asm/uaccess.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2ef4dfd9d9f288943e249b78365a69e3ea3ec072 Author: Helge Deller Date: Fri Apr 8 18:32:52 2016 +0200 parisc: Unbreak handling exceptions from kernel modules Handling exceptions from modules never worked on parisc. It was just masked by the fact that exceptions from modules don't happen during normal use. When a module triggers an exception in get_user() we need to load the main kernel dp value before accessing the exception_data structure, and afterwards restore the original dp value of the module on exit. Noticed-by: Mikulas Patocka Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/include/asm/uaccess.h | 1 + arch/parisc/kernel/asm-offsets.c | 1 + arch/parisc/lib/fixup.S | 6 ++++++ arch/parisc/mm/fault.c | 1 + 4 files changed, 9 insertions(+) commit ef72f3110d8b19f4c098a0bff7ed7d11945e70c6 Author: Helge Deller Date: Fri Apr 8 18:18:48 2016 +0200 parisc: Fix kernel crash with reversed copy_from_user() The kernel module testcase (lib/test_user_copy.c) exhibited a kernel crash on parisc if the parameters for copy_from_user were reversed ("illegal reversed copy_to_user" testcase). Fix this potential crash by checking the fault handler if the faulting address is in the exception table. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org Cc: Kees Cook arch/parisc/kernel/traps.c | 3 +++ 1 file changed, 3 insertions(+) commit e3893027a300927049efc1572f852201eb785142 Author: Helge Deller Date: Fri Apr 8 18:11:33 2016 +0200 parisc: Avoid function pointers for kernel exception routines We want to avoid the kernel module loader to create function pointers for the kernel fixup routines of get_user() and put_user(). Changing the external reference from function type to int type fixes this. This unbreaks exception handling for get_user() and put_user() when called from a kernel module. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/kernel/parisc_ksyms.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 592570c950fb455226cd255603de7cede2be83e6 Author: Helge Deller Date: Fri Apr 8 22:10:35 2016 +0200 parisc: Handle R_PARISC_PCREL32 relocations in kernel modules Commit 0de7985 (parisc: Use generic extable search and sort routines) changed the exception tables to use 32bit relative offsets. This patch now adds support to the kernel module loader to handle such R_PARISC_PCREL32 relocations for 32- and 64-bit modules. Signed-off-by: Helge Deller arch/parisc/kernel/module.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 016adb7260f481168c03e09f785184d6d5278894 Author: Jason Wang Date: Fri Apr 8 13:26:48 2016 +0800 tuntap: restore default qdisc After commit f84bb1eac027 ("net: fix IFF_NO_QUEUE for drivers using alloc_netdev"), default qdisc was changed to noqueue because tuntap does not set tx_queue_len during .setup(). This patch restores default qdisc by setting tx_queue_len in tun_setup(). Fixes: f84bb1eac027 ("net: fix IFF_NO_QUEUE for drivers using alloc_netdev") Cc: Phil Sutter Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Acked-by: Phil Sutter Signed-off-by: David S. Miller drivers/net/tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e56f49814250f4ca4b66ec7d3a71152846761d1b Author: Martin Brandenburg Date: Mon Apr 4 16:26:38 2016 -0400 orangefs: remove unused variable Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 73659be769a4f0ac26a6b3fc6699754adba36485 Merge: fa81e66 16669be 462d808 9185e98 Author: Rafael J. Wysocki Date: Fri Apr 8 21:46:56 2016 +0200 Merge branches 'pm-core', 'powercap' and 'pm-tools' * pm-core: PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs PM / runtime: Document steps for device removal * powercap: powercap: intel_rapl: Add missing Haswell model * pm-tools: tools/power turbostat: work around RC6 counter wrap tools/power turbostat: initial KBL support tools/power turbostat: initial SKX support tools/power turbostat: decode BXT TSC frequency via CPUID tools/power turbostat: initial BXT support tools/power turbostat: print IRTL MSRs tools/power turbostat: SGX state should print only if --debug commit fa81e66ec8648f62e96e95e53db2ea95a4b57b26 Merge: 9735a22 b318556 3ce093d 169b38373 Author: Rafael J. Wysocki Date: Fri Apr 8 21:46:05 2016 +0200 Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'acpi-cppc' * pm-cpufreq: cpufreq: dt: Drop stale comment cpufreq: intel_pstate: Documenation for structures cpufreq: intel_pstate: fix inconsistency in setting policy limits intel_pstate: Avoid extra invocation of intel_pstate_sample() intel_pstate: Do not set utilization update hook too early * pm-cpuidle: intel_idle: Add KBL support intel_idle: Add SKX support intel_idle: Clean up all registered devices on exit. intel_idle: Propagate hot plug errors. intel_idle: Don't overreact to a cpuidle registration failure. intel_idle: Setup the timer broadcast only on successful driver load. intel_idle: Avoid a double free of the per-CPU data. intel_idle: Fix dangling registration on error path. intel_idle: Fix deallocation order on the driver exit path. intel_idle: Remove redundant initialization calls. intel_idle: Fix a helper function's return value. intel_idle: remove useless return from void function. * acpi-cppc: mailbox: pcc: Don't access an unmapped memory address space commit 1917a6932870062778e3099eb432795d45918fc3 Author: Joe Perches Date: Sun Mar 27 14:34:52 2016 -0700 orangefs: Add KERN_ to gossip_ macros Emit the logging messages at the appropriate levels. Miscellanea: o Change format to fmt o Use the more common ##__VA_ARGS__ Signed-off-by: Joe Perches Signed-off-by: Mike Marshall fs/orangefs/protocol.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 2eacea74cc465edc23ce5a4dd5c2213008ac3a05 Author: Martin Brandenburg Date: Fri Apr 8 13:33:21 2016 -0400 orangefs: strncpy -> strscpy It would have been possible for a rogue client-core to send in a symlink target which is not NUL terminated. This returns EIO if the client-core gives us corrupt data. Leave debugfs and superblock code as is for now. Other dcache.c and namei.c strncpy instances are safe because ORANGEFS_NAME_MAX = NAME_MAX + 1; there is always enough space for a name plus a NUL byte. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f83140c1467e22ba9ee9389bc4e6c3e117f2296e Author: Martin Brandenburg Date: Mon Apr 4 16:26:36 2016 -0400 orangefs: clean up truncate ctime and mtime setting The ctime and mtime are always updated on a successful ftruncate and only updated on a successful truncate where the size changed. We handle the ``if the size changed'' bit. This matches FUSE's behavior. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 2fa37fd71396b8eff72d23cafc8c583dd8eb928c Author: kbuild test robot Date: Sun Mar 27 02:54:23 2016 +0800 Orangefs: fix ifnullfree.cocci warnings fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Fengguang Wu Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a9bb3ba81fba1750139654360cb716ab093103b0 Author: Mike Marshall Date: Wed Apr 6 11:19:37 2016 -0400 Orangefs: optimize boilerplate code. Suggested by David Binderman The former can potentially be a performance win over the latter. memcpy(d, s, len); memset(d+len, c, size-len); memset(d, c, size); memcpy(d, s, len); Signed-off-by: Mike Marshall fs/orangefs/protocol.h | 2 +- fs/orangefs/xattr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2d09a2ca6a6c66d765458df2653f888c4a481c81 Author: Mike Marshall Date: Wed Apr 6 10:52:38 2016 -0400 Orangefs: xattr.c cleanup 1. It is nonsense to test for negative size_t, suggested by David Binderman 2. By the time Orangefs gets called, the vfs has ensured that name != NULL, and that buffer and size are sane. Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 94a57f1f8a9de90ab4b0f8748361ff8be706c80c Author: Roopa Prabhu Date: Thu Apr 7 21:28:38 2016 -0700 mpls: find_outdev: check for err ptr in addition to NULL check find_outdev calls inet{,6}_fib_lookup_dev() or dev_get_by_index() to find the output device. In case of an error, inet{,6}_fib_lookup_dev() returns error pointer and dev_get_by_index() returns NULL. But the function only checks for NULL and thus can end up calling dev_put on an ERR_PTR. This patch adds an additional check for err ptr after the NULL check. Before: Trying to add an mpls route with no oif from user, no available path to 10.1.1.8 and no default route: $ip -f mpls route add 100 as 200 via inet 10.1.1.8 [ 822.337195] BUG: unable to handle kernel NULL pointer dereference at 00000000000003a3 [ 822.340033] IP: [] mpls_nh_assign_dev+0x10b/0x182 [ 822.340033] PGD 1db38067 PUD 1de9e067 PMD 0 [ 822.340033] Oops: 0000 [#1] SMP [ 822.340033] Modules linked in: [ 822.340033] CPU: 0 PID: 11148 Comm: ip Not tainted 4.5.0-rc7+ #54 [ 822.340033] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014 [ 822.340033] task: ffff88001db82580 ti: ffff88001dad4000 task.ti: ffff88001dad4000 [ 822.340033] RIP: 0010:[] [] mpls_nh_assign_dev+0x10b/0x182 [ 822.340033] RSP: 0018:ffff88001dad7a88 EFLAGS: 00010282 [ 822.340033] RAX: ffffffffffffff9b RBX: ffffffffffffff9b RCX: 0000000000000002 [ 822.340033] RDX: 00000000ffffff9b RSI: 0000000000000008 RDI: 0000000000000000 [ 822.340033] RBP: ffff88001ddc9ea0 R08: ffff88001e9f1768 R09: 0000000000000000 [ 822.340033] R10: ffff88001d9c1100 R11: ffff88001e3c89f0 R12: ffffffff8187e0c0 [ 822.340033] R13: ffffffff8187e0c0 R14: ffff88001ddc9e80 R15: 0000000000000004 [ 822.340033] FS: 00007ff9ed798700(0000) GS:ffff88001fc00000(0000) knlGS:0000000000000000 [ 822.340033] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 822.340033] CR2: 00000000000003a3 CR3: 000000001de89000 CR4: 00000000000006f0 [ 822.340033] Stack: [ 822.340033] 0000000000000000 0000000100000000 0000000000000000 0000000000000000 [ 822.340033] 0000000000000000 0801010a00000000 0000000000000000 0000000000000000 [ 822.340033] 0000000000000004 ffffffff8148749b ffffffff8187e0c0 000000000000001c [ 822.340033] Call Trace: [ 822.340033] [] ? mpls_rt_alloc+0x2b/0x3e [ 822.340033] [] ? mpls_rtm_newroute+0x358/0x3e2 [ 822.340033] [] ? get_page+0x5/0xa [ 822.340033] [] ? rtnetlink_rcv_msg+0x17e/0x191 [ 822.340033] [] ? __kmalloc_track_caller+0x8c/0x9e [ 822.340033] [] ? rht_key_hashfn.isra.20.constprop.57+0x14/0x1f [ 822.340033] [] ? __rtnl_unlock+0xc/0xc [ 822.340033] [] ? netlink_rcv_skb+0x36/0x82 [ 822.340033] [] ? rtnetlink_rcv+0x1f/0x28 [ 822.340033] [] ? netlink_unicast+0x106/0x189 [ 822.340033] [] ? netlink_sendmsg+0x27f/0x2c8 [ 822.340033] [] ? sock_sendmsg_nosec+0x10/0x1b [ 822.340033] [] ? ___sys_sendmsg+0x182/0x1e3 [ 822.340033] [] ? __alloc_pages_nodemask+0x11c/0x1e4 [ 822.340033] [] ? PageAnon+0x5/0xd [ 822.340033] [] ? __page_set_anon_rmap+0x45/0x52 [ 822.340033] [] ? get_page+0x5/0xa [ 822.340033] [] ? __lru_cache_add+0x1a/0x3a [ 822.340033] [] ? current_kernel_time64+0x9/0x30 [ 822.340033] [] ? __sys_sendmsg+0x3c/0x5a [ 822.340033] [] ? entry_SYSCALL_64_fastpath+0x12/0x6a [ 822.340033] Code: 83 08 04 00 00 65 ff 00 48 8b 3c 24 e8 40 7c f2 ff eb 13 48 c7 c3 9f ff ff ff eb 0f 89 ce e8 f1 ae f1 ff 48 89 c3 48 85 db 74 15 <48> 8b 83 08 04 00 00 65 ff 08 48 81 fb 00 f0 ff ff 76 0d eb 07 [ 822.340033] RIP [] mpls_nh_assign_dev+0x10b/0x182 [ 822.340033] RSP [ 822.340033] CR2: 00000000000003a3 [ 822.435363] ---[ end trace 98cc65e6f6b8bf11 ]--- After patch: $ip -f mpls route add 100 as 200 via inet 10.1.1.8 RTNETLINK answers: Network is unreachable Signed-off-by: Roopa Prabhu Reported-by: David Miller Signed-off-by: David S. Miller net/mpls/af_mpls.c | 3 +++ 1 file changed, 3 insertions(+) commit 19e831b272e6db5884be085be66e44da975c73a9 Merge: 6f40fed 571afb4 Author: Tony Lindgren Date: Fri Apr 8 09:18:00 2016 -0700 Merge branch 'fixes-rc2' into omap-for-v4.6/fixes commit 571afb4c8a4bbe88541364e7f6827340562f2736 Author: Nishanth Menon Date: Fri Apr 1 17:53:07 2016 -0500 ARM: OMAP: Catch callers of revision information prior to it being populated omap_rev is used to detect various SoC types, however any misuse of the usage by invoking it earlier than it being populated will result in invalid results. Lets flag them as early as possible to prevent unintended side effects taking place. We get 0 if it is uninitialized and -1 when detection is done using device tree (as the case was for DRA7 as the case was prior to commit 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls") Signed-off-by: Nishanth Menon Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap1/id.c | 1 + arch/arm/mach-omap2/id.c | 1 + 2 files changed, 2 insertions(+) commit eea08802f586acd6aef377d1b4a541821013cc0b Author: Keerthy Date: Mon Apr 4 11:07:15 2016 +0530 ARM: dts: dra7: Correct clock tree for sys_32k_ck This is w.r.t J6/J6eco: 32clk is pseudo (erratum i856) - clock source. Errata i856 for the AM572x (DRA7xx) points out that the 32.768KHz external crystal is not enabled at power up. Instead the CPU falls back to using an emulation for the 32KHz clock which is SYSCLK1/610. SYSCLK1 is usually 20MHz on boards so far (which gives an emulated frequency of 32.786KHz) Modelling the same in device tree. Acked-by: Tero Kristo Signed-off-by: Keerthy Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7xx-clocks.dtsi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit ec490f6f600f93236f1ad439b9809de563343b2c Author: Nishanth Menon Date: Fri Apr 1 17:53:06 2016 -0500 ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap When commit 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls") introduced SoC check using omap_revision, it missed providing DRA7 as class for initializing the omap_version variable. Without doing this, soc_is_dra7xx() will fail and as a result, omap4_pm_init_early never initializes the dra7 erratum for CPU power state. This causes the suspend path to fail on DRA7 devices. Fixes: 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls") Signed-off-by: Nishanth Menon Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c783e6fd7fe4d34f0231d0d8da36497404aa6d93 Author: Nishanth Menon Date: Fri Apr 1 17:53:05 2016 -0500 ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen DRA7 has no SAR region for automated save and restore of wakeupgen, which does not make real since the SoC really does not do legacy OFF mode anymore. Further wakeupgen should never loose context in CSWR retention mode for MPU domain on DRA7 since that is the deepest state we will enter. So, just skip, instead of oopsing as follows while attemptint to enter suspend on BeagleBoard-X15. [ 55.589771] Unable to handle kernel paging request at virtual address 00002684 [ 55.589771] pgd = ec69c000 [...] [ 55.589771] [] (irq_notifier) from [] (notifier_call_chain+0x4c/0x8c) [ 55.589771] [] (notifier_call_chain) from [] (cpu_cluster_pm_enter+0x2c/0x78) [ 55.589771] [] (cpu_cluster_pm_enter) from [] (syscore_suspend+0xb8/0x31c) [ 55.589771] [] (syscore_suspend) from [] (suspend_devices_and_enter+0x308/0x9e4) [ 55.589771] [] (suspend_devices_and_enter) from [] (pm_suspend+0x640/0x75c) [ 55.589771] [] (pm_suspend) from [] (state_store+0x64/0xb8) [ 55.589771] [] (state_store) from [] (kernfs_fop_write+0xc0/0x1bc) [ 55.589771] [] (kernfs_fop_write) from [] (__vfs_write+0x1c/0xd8) [ 55.589771] [] (__vfs_write) from [] (vfs_write+0x90/0x16c) [ 55.589771] [] (vfs_write) from [] (SyS_write+0x44/0x9c) [ 55.589771] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) [...] Signed-off-by: Nishanth Menon Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4a6cd3ba6fc4993f1805613098d7b032a7aa937b Merge: 3d8e15d 06a71a2 Author: Radim Krčmář Date: Fri Apr 8 14:17:27 2016 +0200 Merge tag 'kvm-arm-for-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.6-rc4 Addresses: - Wrong indentation in the PMU code from the merge window - A long-time bug occuring with running ntpd on the host, candidate for stable - Properly handle (and warn about) the unsupported configuration of running on systems with less than 40 bits of PA space - More fixes to the PM and hotplug notifier stuff from the merge window commit 9b8e3ec34318663affced3c14d960e78d760dd9a Author: Yong Li Date: Wed Mar 30 14:49:14 2016 +0800 gpio: pca953x: Use correct u16 value for register word write The current implementation only uses the first byte in val, the second byte is always 0. Change it to use cpu_to_le16 to write the two bytes into the register Cc: stable@vger.kernel.org Signed-off-by: Yong Li Reviewed-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 159f3cd92f17c61a4e2a47456de5865b114ef88e Author: Guenter Roeck Date: Thu Mar 31 08:11:30 2016 -0700 gpiolib: Defer gpio device setup until after gpiolib initialization Since commit ff2b13592299 ("gpio: make the gpiochip a real device"), attempts to add a gpio chip prior to gpiolib initialization cause the system to crash. This happens because gpio_bus_type has not been registered yet. Defer creating gpio devices until after gpiolib has been initialized to fix the problem. Cc: Greg Ungerer Cc: Alexandre Courbot Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 98 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 31 deletions(-) commit 476e2fc5cd430bbe17598833e79f8e8b9e4bbbc7 Author: Guenter Roeck Date: Thu Mar 31 08:11:29 2016 -0700 gpiolib: Do not use devm functions when registering gpio chip It is possible that a gpio chip is registered before the gpiolib initialization code has run. This means we can not use devm_ functions to allocate memory at that time. Do it the old fashioned way. Cc: Alexandre Courbot Cc: Greg Ungerer Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit c4e5ffb6f224c1a4a9eaad82b19645ec22d1b24f Author: Robert Jarzmik Date: Tue Mar 29 10:04:00 2016 +0200 gpio: pxa: fix legacy non pinctrl aware builds In legacy pxa builds, ie. non device-tree and platform-data only builds, pinctrl is not yet available. As a consequence, the pinctrl gpio direction change function is a stub, returning always success. In the current state, the gpio driver direction function believes the pinctrl direction change was successful, and exits without actually changing the gpio direction. This patch changes the logic : - if the pinctrl direction function fails, gpio direction will report that failure - if the pinctrl direction function succeeds, gpio direction is changed by the gpio driver anyway. This is sub optimal in the pinctrl aware case, as the gpio direction will be changed twice: once by pinctrl function and another time by the gpio direction function. Yet it should be acceptable in this form, as this is functional for all pxa platforms (device-tree and platform-data), and moreover changing a gpio direction is very very seldom, usually in machine initialization, seldom in drivers probe, and an exception for ac97 reset bug. Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Robert Jarzmik Signed-off-by: Linus Walleij drivers/gpio/gpio-pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25487533ff311014b0cc39ed7fd721c114e1b11f Author: Dmitry Torokhov Date: Thu Mar 24 10:50:25 2016 -0700 gpio / ACPI: ignore GpioInt() GPIOs when requesting GPIO_OUT_* When firmware does not use _DSD properties that allow properly name GPIO resources, the kernel falls back on parsing _CRS resources, and will return entries described as GpioInt() as general purpose GPIOs even though they are meant to be used simply as interrupt sources for the device: Device (ETSA) { Name (_HID, "ELAN0001") ... Method(_CRS, 0x0, NotSerialized) { Name(BUF0,ResourceTemplate () { I2CSerialBus( 0x10, /* SlaveAddress */ ControllerInitiated, /* SlaveMode */ 400000, /* ConnectionSpeed */ AddressingMode7Bit, /* AddressingMode */ "\\_SB.I2C1", /* ResourceSource */ ) GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, "\\_SB.GPSW") { BOARD_TOUCH_GPIO_INDEX } } ) Return (BUF0) } ... } This gives troubles with drivers such as Elan Touchscreen driver (elants_i2c) that uses devm_gpiod_get to look up "reset" GPIO line and decide whether the driver is responsible for powering up and resetting the device, or firmware is. In the above case the lookup succeeds, we map GPIO as output and later fail to request client->irq interrupt that is mapped to the same GPIO. Let's ignore resources described as GpioInt() while parsing _CRS when requesting output GPIOs (but allow them when requesting GPIOD_ASIS or GPIOD_IN as some drivers, such as i2c-hid, do request GPIO as input and then map it to interrupt with gpiod_to_irq). Acked-by: Mika Westerberg Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit a61b37ead51488e321fe559a4edd0325c6d4c937 Author: Axel Lin Date: Mon Mar 21 20:12:20 2016 +0800 mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc devm_kzalloc() returns NULL on failure. Signed-off-by: Axel Lin Signed-off-by: Jassi Brar drivers/mailbox/mailbox-xgene-slimpro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a390180291dd9a2392bbab4242cde712c326efc6 Author: Dan Williams Date: Thu Apr 7 20:02:06 2016 -0700 libnvdimm, pfn: fix nvdimm_namespace_add_poison() vs section alignment When section alignment padding is in effect we need to shift / truncate the range that is queried for poison by the 'start_pad' or 'end_trunc' reservations. It's easiest if we just pass in an adjusted resource range rather than deriving it from the passed in namespace. With the resource range resolution pushed out to the caller we can also push the namespace-to-region lookup to the caller and drop the implicit pmem-type assumption about the passed in namespace object. Cc: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/core.c | 41 ++++++++++++++++++++--------------------- drivers/nvdimm/nd.h | 4 ++-- drivers/nvdimm/pmem.c | 36 +++++++++++++++++++++++++++++------- 3 files changed, 51 insertions(+), 30 deletions(-) commit e5670563f588ed1c0603819350c0f02cec23f5c5 Author: Dan Williams Date: Thu Apr 7 19:59:27 2016 -0700 libnvdimm, pfn: fix uuid validation If we detect a namespace has a stale info block in the init path, we should overwrite with the latest configuration. In fact, we already return -ENODEV when the parent uuid is invalid, the same should be done for the 'self' uuid. Otherwise we can get into a condition where userspace is unable to reconfigure the pfn-device without directly / manually invalidating the info block. Cc: Reported-by: Jeff Moyer Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 211291126698c8f047617565b2e2e7f822f86354 Author: Dan Williams Date: Thu Apr 7 19:58:44 2016 -0700 libnvdimm: fix smart data retrieval It appears that smart data retrieval has been broken the since the initial implementation. Fix the payload size to be 128-bytes per the specification. Cc: Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ba3458fb9c050718b95275a3310b74415e767e2 Author: Jakub Sitnicki Date: Tue Apr 5 18:41:08 2016 +0200 ipv6: Count in extension headers in skb->network_header When sending a UDPv6 message longer than MTU, account for the length of fragmentable IPv6 extension headers in skb->network_header offset. Same as we do in alloc_new_skb path in __ip6_append_data(). This ensures that later on __ip6_make_skb() will make space in headroom for fragmentable extension headers: /* move skb->data to ip header from ext header */ if (skb->data < skb_network_header(skb)) __skb_pull(skb, skb_network_offset(skb)); Prevents a splat due to skb_under_panic: skbuff: skb_under_panic: text:ffffffff8143397b len:2126 put:14 \ head:ffff880005bacf50 data:ffff880005bacf4a tail:0x48 end:0xc0 dev:lo ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:104! invalid opcode: 0000 [#1] KASAN CPU: 0 PID: 160 Comm: reproducer Not tainted 4.6.0-rc2 #65 [...] Call Trace: [] skb_push+0x79/0x80 [] eth_header+0x2b/0x100 [] neigh_resolve_output+0x210/0x310 [] ip6_finish_output2+0x4a7/0x7c0 [] ip6_output+0x16a/0x280 [] ip6_local_out+0xb1/0xf0 [] ip6_send_skb+0x45/0xd0 [] udp_v6_send_skb+0x246/0x5d0 [] udpv6_sendmsg+0xa6e/0x1090 [...] Reported-by: Ji Jianwen Signed-off-by: Jakub Sitnicki Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3c9688876ace9ca4cd8630e5fbba8bb28235990a Author: Bart Van Assche Date: Thu Apr 7 15:55:04 2016 -0700 Revert "ib_srpt: Convert to percpu_ida tag allocation" This reverts commit 0fd10721fe3664f7549e74af9d28a509c9a68719. That patch causes the ib_srpt driver to crash as soon as the first SCSI command is received: kernel BUG at drivers/infiniband/ulp/srpt/ib_srpt.c:1439! invalid opcode: 0000 [#1] SMP Workqueue: target_completion target_complete_ok_work [target_core_mod] RIP: srpt_queue_response+0x437/0x4a0 [ib_srpt] Call Trace: srpt_queue_data_in+0x9/0x10 [ib_srpt] target_complete_ok_work+0x152/0x2b0 [target_core_mod] process_one_work+0x197/0x480 worker_thread+0x49/0x490 kthread+0xea/0x100 ret_from_fork+0x22/0x40 Aside from the crash, the shortcomings of that patch are as follows: - It makes the ib_srpt driver use I/O contexts allocated by transport_alloc_session_tags() but it does not initialize these I/O contexts properly. All the initializations performed by srpt_alloc_ioctx() are skipped. - It swaps the order of the send ioctx allocation and the transition to RTR mode which is wrong. - The amount of memory that is needed for I/O contexts is doubled. - srpt_rdma_ch.free_list is no longer used but is not removed. Signed-off-by: Bart Van Assche Cc: Nicholas Bellinger Signed-off-by: Linus Torvalds drivers/infiniband/ulp/srpt/ib_srpt.c | 55 ++++++++++++++++++++++++----------- drivers/infiniband/ulp/srpt/ib_srpt.h | 2 ++ 2 files changed, 40 insertions(+), 17 deletions(-) commit 93061f390f107c37bad7e3bf9eb07bda58a4a99f Merge: 1c915b3 c325a67 Author: Linus Torvalds Date: Thu Apr 7 17:22:20 2016 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 bugfixes from Ted Ts'o: "These changes contains a fix for overlayfs interacting with some (badly behaved) dentry code in various file systems. These have been reviewed by Al and the respective file system mtinainers and are going through the ext4 tree for convenience. This also has a few ext4 encryption bug fixes that were discovered in Android testing (yes, we will need to get these sync'ed up with the fs/crypto code; I'll take care of that). It also has some bug fixes and a change to ignore the legacy quota options to allow for xfstests regression testing of ext4's internal quota feature and to be more consistent with how xfs handles this case" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: ignore quota mount options if the quota feature is enabled ext4 crypto: fix some error handling ext4: avoid calling dquot_get_next_id() if quota is not enabled ext4: retry block allocation for failed DIO and DAX writes ext4: add lockdep annotations for i_data_sem ext4: allow readdir()'s of large empty directories to be interrupted btrfs: fix crash/invalid memory access on fsync when using overlayfs ext4 crypto: use dget_parent() in ext4_d_revalidate() ext4: use file_dentry() ext4: use dget_parent() in ext4_file_open() nfs: use file_dentry() fs: add file_dentry() ext4 crypto: don't let data integrity writebacks fail with ENOMEM ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea() commit 1c915b3ac4ecf6ff67573eed24458d862e842cb6 Merge: d3436a1 2224d87 Author: Linus Torvalds Date: Thu Apr 7 16:34:26 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fix from Sage Weil: "This just fixes a few remaining memory allocations in RBD to use GFP_NOIO instead of GFP_ATOMIC" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: use GFP_NOIO consistently for request allocations commit d3436a1d03f9a416d8bedd968f16296e0140adcb Merge: 741f37b c00bbcf Author: Linus Torvalds Date: Thu Apr 7 16:20:40 2016 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/qemu fixes from Michael S Tsirkin: "A couple of fixes for virtio and for the new QEMU fw cfg driver" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit MAINTAINERS: add entry for QEMU firmware: qemu_fw_cfg.c: hold ACPI global lock during device access virtio: virtio 1.0 cs04 spec compliance for reset qemu_fw_cfg: don't leak kobj on init error commit 741f37b8ccf10b3f9976f7e55b703af8087f182a Merge: c4004b0 fd8c61e Author: Linus Torvalds Date: Thu Apr 7 15:53:19 2016 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is mostly amdgpu/radeon fixes, and imx related fixes. There is also one one TTM fix, one nouveau fix, and one hdlcd fix. The AMD ones are some fixes for power management after suspend/resume one some GPUs, and some vblank fixes. The IMX ones are for more stricter plane checks and some cleanups. I'm off until Monday, so therre might be some fixes early next week if anyone missed me" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (34 commits) drm/nouveau/tegra: acquire and enable reference clock if needed drm/amdgpu: total vram size also reduces pin size drm/amd/powerplay: add uvd/vce dpm enabling flag default. drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI. drm/amdgpu: save and restore the firwmware cache part when suspend resume drm/amdgpu: save and restore UVD context with suspend and resume drm/ttm: use phys_addr_t for ttm_bus_placement drm: ARM HDLCD - fix an error code drm: ARM HDLCD - get rid of devm_clk_put() drm/radeon: Only call drm_vblank_on/off between drm_vblank_init/cleanup drm/amdgpu: fence wait old rcu slot drm/amdgpu: fix leaking fence in the pageflip code drm/amdgpu: print vram type rather than just DDR drm/amdgpu/gmc: use proper register for vram type on Fiji drm/amdgpu/gmc: move vram type fetching into sw_init drm/amdgpu: Set vblank_disable_allowed = true drm/radeon: Set vblank_disable_allowed = true drm/amd/powerplay: Need to change boot to performance state in resume. drm/amd/powerplay: add new Fiji function for not setting same ps. drm/amdgpu: check dpm state before pm system fs initialized. ... commit 579ba855524c49d30929871b63c1f7637ffab4b6 Author: shamir rabinovitch Date: Thu Apr 7 07:57:36 2016 -0400 RDS: fix congestion map corruption for PAGE_SIZE > 4k When PAGE_SIZE > 4k single page can contain 2 RDS fragments. If 'rds_ib_cong_recv' ignore the RDS fragment offset in to the page it then read the data fragment as far congestion map update and lead to corruption of the RDS connection far congestion map. Signed-off-by: Shamir Rabinovitch Signed-off-by: David S. Miller net/rds/ib_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e98499ac63977c75331b198a18979944a532c9f2 Author: shamir rabinovitch Date: Thu Apr 7 07:57:35 2016 -0400 RDS: memory allocated must be align to 8 Fix issue in 'rds_ib_cong_recv' when accessing unaligned memory allocated by 'rds_page_remainder_alloc' using uint64_t pointer. Signed-off-by: Shamir Rabinovitch Signed-off-by: David S. Miller net/rds/page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 208fae5c3b9431013ad7bcea07cbcee114e7d163 Author: Nicolas Pitre Date: Mon Mar 14 02:55:45 2016 +0100 ARM: 8550/1: protect idiv patching against undefined gcc behavior It was reported that a kernel with CONFIG_ARM_PATCH_IDIV=y stopped booting when compiled with the upcoming gcc 6. Turns out that turning a function address into a writable array is undefined and gcc 6 decided it was OK to omit the store to the first word of the function while still preserving the store to the second word. Even though gcc 6 is now fixed to behave more coherently, it is a mystery that gcc 4 and gcc 5 actually produce wanted code in the kernel. And in fact the reduced test case to illustrate the issue does indeed break with gcc < 6 as well. In any case, let's guard the kernel against undefined compiler behavior by hiding the nature of the array location as suggested by gcc developers. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70128 Signed-off-by: Nicolas Pitre Reported-by: Marcin Juszkiewicz Cc: Arnd Bergmann Cc: stable@vger.kernel.org # v4.5 Signed-off-by: Russell King arch/arm/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) commit f2335a2a0a590c88e6cb68e4fb8cd835e81e827e Author: Russell King Date: Mon Apr 4 14:46:48 2016 +0100 ARM: wire up preadv2 and pwritev2 syscalls Wire up the preadv2 and pwritev2 syscalls for ARM. Signed-off-by: Russell King arch/arm/include/asm/unistd.h | 2 +- arch/arm/include/uapi/asm/unistd.h | 2 ++ arch/arm/kernel/calls.S | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) commit a0ca153f98db8cf25298565a09e11fe9d82846ad Author: Alexander Duyck Date: Tue Apr 5 09:13:39 2016 -0700 GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU This patch fixes an issue I found in which we were dropping frames if we had enabled checksums on GRE headers that were encapsulated by either FOU or GUE. Without this patch I was barely able to get 1 Gb/s of throughput. With this patch applied I am now at least getting around 6 Gb/s. The issue is due to the fact that with FOU or GUE applied we do not provide a transport offset pointing to the GRE header, nor do we offload it in software as the GRE header is completely skipped by GSO and treated like a VXLAN or GENEVE type header. As such we need to prevent the stack from generating it and also prevent GRE from generating it via any interface we create. Fixes: c3483384ee511 ("gro: Allow tunnel stacking in the case of FOU/GUE") Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller include/linux/netdevice.h | 5 ++++- net/core/dev.c | 1 + net/ipv4/fou.c | 6 ++++++ net/ipv4/gre_offload.c | 8 ++++++++ net/ipv4/ip_gre.c | 13 ++++++++++--- 5 files changed, 29 insertions(+), 4 deletions(-) commit 16669befb0772eac6a76057b7010ba5b419c0e78 Author: Strashko, Grygorii Date: Wed Apr 6 14:45:53 2016 +0300 PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs Now wakeirq stops working for device if wakeup option for this device will be reconfigured through sysfs, like: echo disabled > /sys/devices/platform/extcon_usb1/power/wakeup echo enabled > /sys/devices/platform/extcon_usb1/power/wakeup Once above set of commands is executed the device's wakeup_source opject will be recreated and dev->power.wakeup->wakeirq field will contain NULL. As result, device_wakeup_arm_wake_irqs() will not arm wakeirq for the affected device. Hece, lets try to fix it in the following way: check for dev->wakeirq field when device_wakeup_attach() is called and if !NULL re-attach wakeirq to the device Signed-off-by: Grygorii Strashko Acked-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 2 ++ 1 file changed, 2 insertions(+) commit 9185e988e9d5bb70b690362e84bb2e4a9d71f2c5 Author: Len Brown Date: Wed Apr 6 17:16:00 2016 -0400 tools/power turbostat: work around RC6 counter wrap Sometimes the rc6 sysfs counter spontaneously resets, causing turbostat prints a very large number as it tries to calcuate % = 100 * (old - new) / interval When we see (old > new), print ***.**% instead of a bogus huge number. Note that this detection is not fool-proof, as the counter could reset several times and still result in new > old. Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit cdc57272ea0a0e952c4609b56e157e4d0ec8e956 Author: Len Brown Date: Wed Apr 6 17:15:59 2016 -0400 tools/power turbostat: initial KBL support KBL is similar to SKL Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ec53e594c65ab099ca784d62b6f4c191e3a4d7cc Author: Len Brown Date: Wed Apr 6 17:15:58 2016 -0400 tools/power turbostat: initial SKX support SKX has a lot in common with HSX Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e8efbc80db5e824ce2382d5e65429b6b493e71e2 Author: Len Brown Date: Wed Apr 6 17:15:57 2016 -0400 tools/power turbostat: decode BXT TSC frequency via CPUID Hard-code BXT ART to 19200MHz, so turbostat --debug can fully enumerate TSC: CPUID(0x15): eax_crystal: 3 ebx_tsc: 186 ecx_crystal_hz: 0 TSC: 1190 MHz (19200000 Hz * 186 / 3 / 1000000) Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4085d543e256aff6606ba99ed257f7c06685f3b Author: Len Brown Date: Wed Apr 6 17:15:56 2016 -0400 tools/power turbostat: initial BXT support Broxton has a lot in common with SKL Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5a63426e2a18775ed05b20e3bc90c68bacb1f68a Author: Len Brown Date: Wed Apr 6 17:15:55 2016 -0400 tools/power turbostat: print IRTL MSRs Some processors use the Interrupt Response Time Limit (IRTL) MSR value to describe the maximum IRQ response time latency for deep package C-states. (Though others have the register, but do not use it) Lets print it out to give insight into the cases where it is used. IRTL begain in SNB, with PC3/PC6/PC7, and HSW added PC8/PC9/PC10. Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki arch/x86/include/asm/msr-index.h | 8 +++++ tools/power/x86/turbostat/turbostat.c | 59 +++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 3 deletions(-) commit 8ae7225591fd15aac89769cbebb3b5ecc8b12fe5 Author: Len Brown Date: Wed Apr 6 17:15:54 2016 -0400 tools/power turbostat: SGX state should print only if --debug The CPUID.SGX bit was printed, even if --debug was used Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce093d4de753d6c92cc09366e29d0618a62f542 Author: Len Brown Date: Wed Apr 6 17:00:59 2016 -0400 intel_idle: Add KBL support KBL is similar to SKL Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 2 ++ 1 file changed, 2 insertions(+) commit f9e71657c2c0a8f1c50884ab45794be2854e158e Author: Len Brown Date: Wed Apr 6 17:00:58 2016 -0400 intel_idle: Add SKX support SKX is similar to BDX Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 3e66a9ab53641a0f7a440e56f7b35bf5d77494b3 Author: Richard Cochran Date: Wed Apr 6 17:00:57 2016 -0400 intel_idle: Clean up all registered devices on exit. This driver registers cpuidle devices when a CPU comes online, but it leaves the registrations in place when a CPU goes offline. The module exit code only unregisters the currently online CPUs, leaving the devices for offline CPUs dangling. This patch changes the driver to clean up all registrations on exit, even those from CPUs that are offline. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 08820546e4c30c84d0a1f1a49df055e1719c07ea Author: Richard Cochran Date: Wed Apr 6 17:00:56 2016 -0400 intel_idle: Propagate hot plug errors. If a cpuidle registration error occurs during the hot plug notifier callback, we should really inform the hot plug machinery instead of just ignoring the error. This patch changes the callback to properly return on error. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b69ef2c099c3e5f11bd5c33a9530d6522f72c9aa Author: Richard Cochran Date: Wed Apr 6 17:00:55 2016 -0400 intel_idle: Don't overreact to a cpuidle registration failure. The helper function, intel_idle_cpu_init, registers one new device with the cpuidle layer. If the registration should fail, that function immediately calls intel_idle_cpuidle_devices_uninit() to unregister every last CPU's device. However, it makes no sense to do so, when called from the hot plug notifier callback. This patch moves the call to intel_idle_cpuidle_devices_uninit() outside of the helper function to the one call site that actually needs to perform the de-registrations. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2259a819a8d37e472f08c88bc0dd22194754adb4 Author: Richard Cochran Date: Wed Apr 6 17:00:54 2016 -0400 intel_idle: Setup the timer broadcast only on successful driver load. This driver sets the broadcast tick quite early on during probe and does not clean up again in cast of failure. This patch moves the setup call after the registration, placing the on_each_cpu() calls within the global CPU lock region. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ca42489d9ee3262482717c83428e087322fdc39c Author: Richard Cochran Date: Wed Apr 6 17:00:53 2016 -0400 intel_idle: Avoid a double free of the per-CPU data. The helper function, intel_idle_cpuidle_devices_uninit, frees the globally allocated per-CPU data. However, this function is invoked from the hot plug notifier callback at a time when freeing that data is not safe. If the call to cpuidle_register_driver() should fail (say, due to lack of memory), then the driver will free its per-CPU region. On the *next* CPU_ONLINE event, the driver will happily use the region again and even free it again if the failure repeats. This patch fixes the issue by moving the call to free_percpu() outside of the helper function at the two call sites that actually need to free the per-CPU data. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e9df69ccd1322e87eee10f28036fad9e6c71f8dd Author: Richard Cochran Date: Wed Apr 6 17:00:52 2016 -0400 intel_idle: Fix dangling registration on error path. In the module_init() method, if the per-CPU allocation fails, then the active cpuidle registration is not cleaned up. This patch fixes the issue by attempting the allocation before registration, and then cleaning it up again on registration failure. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 51319918bcc31f901646fc66348d41cf74ee0566 Author: Richard Cochran Date: Wed Apr 6 17:00:51 2016 -0400 intel_idle: Fix deallocation order on the driver exit path. In the module_exit() method, this driver first frees its per-CPU pointer, then unregisters a callback making use of the pointer. Furthermore, the function, intel_idle_cpuidle_devices_uninit, is racy against CPU hot plugging as it calls for_each_online_cpu(). This patch corrects the issues by unregistering first on the exit path while holding the hot plug lock. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4a3dfb3fc0fb0fc9acd36c94b7145f9c9dd4d93a Author: Richard Cochran Date: Wed Apr 6 17:00:50 2016 -0400 intel_idle: Remove redundant initialization calls. The function, intel_idle_cpuidle_driver_init, makes calls on each CPU to auto_demotion_disable() and c1e_promotion_disable(). These calls are redundant, as intel_idle_cpu_init() does the same calls just a bit later on. They are also premature, as the driver registration may yet fail. This patch removes the redundant code. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 6 ------ 1 file changed, 6 deletions(-) commit 5469c827d20ab013f43d4f5f94e101d0cf7afd2c Author: Richard Cochran Date: Wed Apr 6 17:00:49 2016 -0400 intel_idle: Fix a helper function's return value. The function, intel_idle_cpuidle_driver_init, delivers no error codes at all. This patch changes the function to return 'void' instead of returning zero. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f70415496d5ddf06fe7e0a22250d60bab2b2d7cc Author: Richard Cochran Date: Wed Apr 6 17:00:48 2016 -0400 intel_idle: remove useless return from void function. Signed-off-by: Richard Cochran Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 2 -- 1 file changed, 2 deletions(-) commit 34cf2acdafaa31a13821e45de5ee896adcd307b1 Author: Wolfram Sang Date: Sun Apr 3 23:32:00 2016 +0200 i2c: jz4780: prevent potential division by zero Make sure we don't OOPS in case clock-frequency is set to 0 in a DT. The variable set here is later used as a divisor. Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39b132b0fadf3a3ba66d3a5185a84cb5bb21b5e7 Author: Wolfram Sang Date: Sun Apr 3 16:42:16 2016 +0200 i2c: mux: demux-pinctrl: Update docs to new sysfs-attributes Update the docs according to the recent code changes, too. Fixes: c0c508a418f9da ("i2c: mux: demux-pinctrl: Clean up sysfs attributes") Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang .../ABI/testing/sysfs-platform-i2c-demux-pinctrl | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 644c7e48cb59cfc6988ddc7bf3d3b1ba5fe7fa9d Author: Jozsef Kadlecsik Date: Wed Mar 30 11:34:35 2016 +0200 netfilter: nf_conntrack_tcp: Fix stack out of bounds when parsing TCP options Baozeng Ding reported a KASAN stack out of bounds issue - it uncovered that the TCP option parsing routines in netfilter TCP connection tracking could read one byte out of the buffer of the TCP options. Therefore in the patch we check that the available data length is large enough to parse both TCP option code and size. Reported-by: Baozeng Ding Tested-by: Baozeng Ding Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_tcp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3d8e15dd6de644736916c8ba012c1cc6b356d4ba Author: Paolo Bonzini Date: Thu Apr 7 17:21:43 2016 +0200 KVM: new maintainer on the block Avi has kept Gleb busy enough, and Radim has been helping me for a while, so let's "reward" him with an entry in MAINTAINERS. Acked-by: Gleb Natapov Cc: Radim Krčmář Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39ec5cbed0bb1878d0b65af0c5e653e37e1945a5 Merge: 5a07975 adf9a3a Author: Greg Kroah-Hartman Date: Thu Apr 7 08:31:43 2016 -0700 Merge tag 'fixes-for-v4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.6-rc3 We have two more fixes to f_midi. It should now behave much better. dwc3-keystone.c has gotten a fix which now allows it to work on keystone device when running in peripheral mode. A similar fix for DMA configuration was made for udc-core, too. We have a new PCI ID for Intel's Broxton platform. DWC3 can run on those platforms as well. And we also have some dwc2 got a fix for dr_mode usage, while renesas controller got 3 important fixes: a NULL pointer deref fix, IRQ <-> DMA race fix, and a fix to prevent a situation where we would queue a request to a disabled endpoint. commit 303f551c8e8dfca4df4e01612f0f393c2e5744e4 Author: Junwei Zhang Date: Wed Apr 6 16:01:19 2016 +0800 drm/amd/amdgpu: fix irq domain remove for tonga ih Signed-off-by: Junwei Zhang Reviewed-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b74ecdfbea893ae585bc694136a3f50f5856cfe Author: Dan Carpenter Date: Wed Apr 6 21:38:56 2016 +0300 iommu/vt-d: Silence an uninitialized variable warning My static checker complains that "dma_alias" is uninitialized unless we are dealing with a pci device. This is true but harmless. Anyway, we can flip the condition around to silence the warning. Signed-off-by: Dan Carpenter Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbedd9b9905c1643b9f7244d88999e39632bbd87 Author: John Keeping Date: Tue Apr 5 15:05:46 2016 +0100 iommu/rockchip: Fix "is stall active" check Since commit cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves") rk_iommu_is_stall_active() always returns false because the bitwise AND operates on the boolean flag promoted to an integer and a value that is either zero or BIT(2). Explicitly convert the right-hand value to a boolean so that both sides are guaranteed to be either zero or one. rk_iommu_is_paging_enabled() does not suffer from the same problem since RK_MMU_STATUS_PAGING_ENABLED is BIT(0), but let's apply the same change for consistency and to make it clear that it's correct without needing to lookup the value. Fixes: cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves") Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Tomeu Vizoso Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eebb8034a5be8c2177cbf07ca2ecd2ff8a058958 Author: Joerg Roedel Date: Mon Apr 4 15:47:48 2016 +0200 iommu: Don't overwrite domain pointer when there is no default_domain IOMMU drivers that do not support default domains, but make use of the the group->domain pointer can get that pointer overwritten with NULL on device add/remove. Make sure this can't happen by only overwriting the domain pointer when it is NULL. Cc: stable@vger.kernel.org # v4.4+ Fixes: 1228236de5f9 ('iommu: Move default domain allocation to iommu_group_get_for_dev()') Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c00bbcf8628969e103d4a7b351a53746f1025576 Author: Stefan Hajnoczi Date: Tue Mar 29 16:43:45 2016 +0100 virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit The VIRTIO 1.0 specification added the DEVICE_NEEDS_RESET device status bit in "VIRTIO-98: Add DEVICE_NEEDS_RESET". This patch defines the device status bit in the uapi header file so that both the kernel and userspace applications can use it. The bit is currently unused by the virtio guest drivers and vhost. According to the spec "a good implementation will try to recover by issuing a reset". This is not attempted here because it requires auditing the virtio drivers to ensure there are no resource leaks or crashes if the device needs to be reset mid-operation. See "2.1 Device Status Field" in the VIRTIO 1.0 specification for details. Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin include/uapi/linux/virtio_config.h | 2 ++ 1 file changed, 2 insertions(+) commit eeca9a671aaa6a77eaed725e842d53c5ce51940b Author: Michael S. Tsirkin Date: Tue Apr 5 11:26:44 2016 +0300 MAINTAINERS: add entry for QEMU Gabriel merged support for QEMU FW CFG interface, but there's apparently no official maintainer. It's also possible that this will grow more interfaces in future. I'll happily co-maintain it and handle pull requests together with the rest of the PV stuff I maintain. Cc: Greg Kroah-Hartman Cc: Gabriel Somlo Signed-off-by: Michael S. Tsirkin Acked-by: Gabriel Somlo MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit def7ac806a9ac035abf0e7573ccc8bbfd38e163c Author: Gabriel Somlo Date: Tue Mar 8 13:30:50 2016 -0500 firmware: qemu_fw_cfg.c: hold ACPI global lock during device access Allowing for the future possibility of implementing AML-based (i.e., firmware-triggered) access to the QEMU fw_cfg device, acquire the global ACPI lock when accessing the device on behalf of the guest-side sysfs driver, to prevent any potential race conditions. Suggested-by: Michael S. Tsirkin Signed-off-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 05dbcb430795b2e1fb1d5c757f8619d3dbed0a1c Author: Michael S. Tsirkin Date: Sun Apr 3 15:23:37 2016 +0300 virtio: virtio 1.0 cs04 spec compliance for reset The spec says: after writing 0 to device_status, the driver MUST wait for a read of device_status to return 0 before reinitializing the device. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/virtio/virtio_pci_modern.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e8aabc64d7f5c8702e420c6fa478368f60718ae4 Author: Michael S. Tsirkin Date: Sun Apr 3 15:22:08 2016 +0300 qemu_fw_cfg: don't leak kobj on init error If platform_driver_register fails, we should cleanup fw_cfg_top_ko before exiting. Signed-off-by: Michael S. Tsirkin Acked-by: Gabriel Somlo drivers/firmware/qemu_fw_cfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d48d5691ebf88a15d95ba96486917ffc79256536 Author: Bjørn Mork Date: Thu Apr 7 12:09:17 2016 +0200 USB: option: add "D-Link DWM-221 B1" device id Thomas reports: "Windows: 00 diagnostics 01 modem 02 at-port 03 nmea 04 nic Linux: T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7e19 Rev=02.32 S: Manufacturer=Mobile Connect S: Product=Mobile Connect S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage" Reported-by: Thomas Schäfer Cc: Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit ff76def3bd7e816fe0ca7f0840065c566a42ba2f Author: Florian Westphal Date: Tue Mar 29 11:05:16 2016 +0200 netfilter: arp_tables: register table in initns arptables is broken since we didn't register the table anymore -- even 'arptables -L' fails. Fixes: b9e69e127397187b ("netfilter: xtables: don't hook tables by default") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arptable_filter.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7b8ba82ad4ada669c564ec8ccba9cadc6e8abfb1 Author: Geert Uytterhoeven Date: Sun Mar 27 11:11:09 2016 +0200 m68k/defconfig: Update defconfigs for v4.6-rc2 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 13 ++++++------- arch/m68k/configs/apollo_defconfig | 13 ++++++------- arch/m68k/configs/atari_defconfig | 13 ++++++------- arch/m68k/configs/bvme6000_defconfig | 13 ++++++------- arch/m68k/configs/hp300_defconfig | 13 ++++++------- arch/m68k/configs/mac_defconfig | 13 ++++++------- arch/m68k/configs/multi_defconfig | 13 ++++++------- arch/m68k/configs/mvme147_defconfig | 13 ++++++------- arch/m68k/configs/mvme16x_defconfig | 13 ++++++------- arch/m68k/configs/q40_defconfig | 13 ++++++------- arch/m68k/configs/sun3_defconfig | 13 ++++++------- arch/m68k/configs/sun3x_defconfig | 13 ++++++------- 12 files changed, 72 insertions(+), 84 deletions(-) commit 0eb2c80c393d3b179244e6d485891ca8bd45aeba Author: Geert Uytterhoeven Date: Mon Mar 21 11:29:12 2016 +0100 m68k: Wire up preadv2 and pwritev2 Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 2 ++ arch/m68k/kernel/syscalltable.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit cddc9434e3dcc37a85c4412fb8e277d3a582e456 Author: Martyn Welch Date: Tue Mar 29 17:47:29 2016 +0100 USB: serial: cp210x: Adding GE Healthcare Device ID The CP2105 is used in the GE Healthcare Remote Alarm Box, with the Manufacturer ID of 0x1901 and Product ID of 0x0194. Signed-off-by: Martyn Welch Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 0dee6c82c2aa5342357dabd0e536a97f72039f0b Author: Alexey Brodkin Date: Thu Mar 3 20:01:48 2016 +0300 ARC: [plat-axs103] Enable loop block devices As mentioned in LTP's README.ARC: ------------->8------------ Requirements for the environment * Linux must be built with support of loop block devices. Thus it's necessary to enable these Linux kernel options: CONFIG_BLK_DEV CONFIG_BLK_DEV_LOOP ------------->8------------ enabling loop block devices. That among other things lead to additional 10 fatal signals appearing during LTP run. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/configs/axs103_defconfig | 1 + arch/arc/configs/axs103_smp_defconfig | 1 + 2 files changed, 2 insertions(+) commit 6dc97ee6d983cb4730a8d036344fa7b0a08760b0 Author: Vineet Gupta Date: Wed Apr 6 17:28:11 2016 +0530 Revert "ARC: [plat-axs10x] add Ethernet PHY description in .dts" This reverts commit 667a490bdb6e27db0887d2ca515b907d6aa87118. This is needed to get ethernet(stmmac) working in 4.6-rc2 on axs103. 4.5 needed this fix, but apprently stmmac has gained some fixes which warrant reversal of this. Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 8 -------- 1 file changed, 8 deletions(-) commit e5e0a65cd20a7a892a87e6bd73bdc3d83726d725 Author: Alexey Brodkin Date: Mon Mar 28 14:36:38 2016 +0300 arc: Add our own implementation of fb_pgprotect() During mmaping of frame-buffer pages to user-space fb_protect() is called to set proper page settings. In case of ARC we need to mark pages that are mmaped to user as uncached because of 2 reasons: * Huge amount of data if passing through data cache will thrash cache a lot making cache almost useless for other less traffic hungry processes. * Data written by user in FB will be immediately available for hardware (such as PGU etc) without requirements to flush data cache regularly. Signed-off-by: Alexey Brodkin Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta arch/arc/include/asm/fb.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 732dc97baec006c118bf49d52dd1c0b91b388497 Author: Andreas Ziegler Date: Tue Mar 15 12:16:55 2016 +0100 ARC: Don't source drivers/pci/pcie/Kconfig ourselves Commit 5f8fc43217a0 ("PCI: Include pci/pcie/Kconfig directly from pci/Kconfig") in linux-next changed drivers/pci/Kconfig to include drivers/pci/pcie/Kconfig itself, so that architectures do not need to source both files themselves. ARC just recently gained PCI support through commit 6b3fb77998dd ("ARC: Add PCI support"), but this change was based on the old behaviour of the Kconfig files. This makes Kconfig now spit out the following warnings: drivers/pci/pcie/Kconfig:61:warning: choice value used outside its choice group drivers/pci/pcie/Kconfig:67:warning: choice value used outside its choice group drivers/pci/pcie/Kconfig:74:warning: choice value used outside its choice group This change updates the Kconfig file for ARC, dropping the now unnecessary 'source' statement, which makes the warning disappear. Signed-off-by: Andreas Ziegler Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ea6db90e750328068837bed34cb1302b7a177339 Author: Josh Boyer Date: Thu Mar 10 09:48:52 2016 -0500 USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices A Fedora user reports that the ftdi_sio driver works properly for the ICP DAS I-7561U device. Further, the user manual for these devices instructs users to load the driver and add the ids using the sysfs interface. Add support for these in the driver directly so that the devices work out of the box instead of needing manual configuration. Reported-by: CC: stable Signed-off-by: Josh Boyer Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 4 ++++ drivers/usb/serial/ftdi_sio_ids.h | 8 ++++++++ 2 files changed, 12 insertions(+) commit c12d2da56d0e07d230968ee2305aaa86b93a6832 Author: Ingo Molnar Date: Mon Apr 4 10:24:58 2016 +0200 mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs The pkeys changes brought about a truly hideous set of macros in: cde70140fed8 ("mm/gup: Overload get_user_pages() functions") ... which macros are (ab-)using the fact that __VA_ARGS__ can be used to shift parameter positions in macro arguments without breaking the build and so can be used to call separate C functions depending on the number of arguments of the macro. This allowed easy migration of these 3 GUP APIs, as both these variants worked at the C level: old: ret = get_user_pages(current, current->mm, address, 1, 1, 0, &page, NULL); new: ret = get_user_pages(address, 1, 1, 0, &page, NULL); ... while we also generated a (functionally harmless but noticeable) build time warning if the old API was used. As there are over 300 uses of these APIs, this trick eased the migration of the API and avoided excessive migration pain in linux-next. Now, with its work done, get rid of all of that complication and ugliness: 3 files changed, 16 insertions(+), 140 deletions(-) ... where the linecount of the migration hack was further inflated by the fact that there are NOMMU variants of these GUP APIs as well. Much of the conversion was done in linux-next over the past couple of months, and Linus recently removed all remaining old API uses from the upstream tree in the following upstrea commit: cb107161df3c ("Convert straggling drivers to new six-argument get_user_pages()") There was one more old-API usage in mm/gup.c, in the CONFIG_HAVE_GENERIC_RCU_GUP code path that ARM, ARM64 and PowerPC uses. After this commit any old API usage will break the build. [ Also fixed a PowerPC/HAVE_GENERIC_RCU_GUP warning reported by Stephen Rothwell. ] Cc: Andrew Morton Cc: Dave Hansen Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar include/linux/mm.h | 64 +++--------------------------------------------------- mm/gup.c | 52 ++++++-------------------------------------- mm/nommu.c | 44 ++++++------------------------------- 3 files changed, 17 insertions(+), 143 deletions(-) commit 42bf7b46a5de03c8e2dd28a1f105bc28b6485243 Author: Bjørn Mork Date: Wed Mar 30 11:08:33 2016 +0200 drm/i915: fix deadlock on lid open commit e2c8b8701e2d moved modeset locking inside resume/suspend functions, but missed a code path only executed on lid close/open on older hardware. The result was a deadlock when closing and opening the lid without suspending on such hardware: ============================================= [ INFO: possible recursive locking detected ] 4.6.0-rc1 #385 Not tainted --------------------------------------------- kworker/0:3/88 is trying to acquire lock: (&dev->mode_config.mutex){+.+.+.}, at: [] intel_display_resume+0x4a/0x12f [i915] but task is already holding lock: (&dev->mode_config.mutex){+.+.+.}, at: [] drm_modeset_lock_all+0x3e/0xa6 [drm] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->mode_config.mutex); lock(&dev->mode_config.mutex); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by kworker/0:3/88: #0: ("kacpi_notify"){++++.+}, at: [] process_one_work+0x14a/0x50b #1: ((&dpc->work)#2){+.+.+.}, at: [] process_one_work+0x14a/0x50b #2: ((acpi_lid_notifier).rwsem){++++.+}, at: [] __blocking_notifier_call_chain+0x34/0x65 #3: (&dev_priv->modeset_restore_lock){+.+.+.}, at: [] intel_lid_notify+0x3c/0xd9 [i915] #4: (&dev->mode_config.mutex){+.+.+.}, at: [] drm_modeset_lock_all+0x3e/0xa6 [drm] #5: (crtc_ww_class_acquire){+.+.+.}, at: [] drm_modeset_lock_all+0x48/0xa6 [drm] #6: (crtc_ww_class_mutex){+.+.+.}, at: [] modeset_lock+0x13c/0x1cd [drm] stack backtrace: CPU: 0 PID: 88 Comm: kworker/0:3 Not tainted 4.6.0-rc1 #385 Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011 Workqueue: kacpi_notify acpi_os_execute_deferred 0000000000000000 ffff88022fd5f990 ffffffff8124af06 ffffffff825b39c0 ffffffff825b39c0 ffff88022fd5fa60 ffffffff8108f547 ffff88022fd5fa70 000000008108e817 ffff880230236cc0 0000000000000000 ffffffff825b39c0 Call Trace: [] dump_stack+0x67/0x90 [] __lock_acquire+0xdb5/0xf71 [] ? look_up_lock_class+0xbe/0x10a [] lock_acquire+0x137/0x1cb [] ? lock_acquire+0x137/0x1cb [] ? intel_display_resume+0x4a/0x12f [i915] [] mutex_lock_nested+0x7e/0x3a4 [] ? intel_display_resume+0x4a/0x12f [i915] [] ? intel_display_resume+0x4a/0x12f [i915] [] ? modeset_lock+0x13c/0x1cd [drm] [] intel_display_resume+0x4a/0x12f [i915] [] ? intel_display_resume+0x4a/0x12f [i915] [] ? modeset_lock+0x13c/0x1cd [drm] [] ? modeset_lock+0x13c/0x1cd [drm] [] ? drm_modeset_lock+0x17/0x24 [drm] [] ? drm_modeset_lock_all_ctx+0x87/0xa1 [drm] [] intel_lid_notify+0xb0/0xd9 [i915] [] notifier_call_chain+0x4a/0x6c [] __blocking_notifier_call_chain+0x4d/0x65 [] blocking_notifier_call_chain+0x14/0x16 [] acpi_lid_send_state+0x83/0xad [button] [] acpi_button_notify+0x41/0x132 [button] [] acpi_device_notify+0x19/0x1b [] acpi_ev_notify_dispatch+0x49/0x64 [] acpi_os_execute_deferred+0x14/0x20 [] process_one_work+0x265/0x50b [] worker_thread+0x1fc/0x2dd [] ? rescuer_thread+0x309/0x309 [] ? rescuer_thread+0x309/0x309 [] kthread+0xe0/0xe8 [] ? local_clock+0x19/0x22 [] ret_from_fork+0x22/0x40 [] ? kthread_create_on_node+0x1b5/0x1b5 Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Cc: Maarten Lankhorst Signed-off-by: Bjørn Mork Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1459328913-13719-1-git-send-email-bjorn@mork.no (cherry picked from commit 9f54d4bd5808b5c892a44c539c126b71d299f341) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lvds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 053f78d359953be40043972c98e16b3f1cd9fc27 Merge: 1bb025f 3d085c7 Author: Greg Kroah-Hartman Date: Wed Apr 6 19:01:47 2016 -0700 Merge tag 'lkdtm-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into char-misc-linus Kees briefly writes: fixes some possible memory allocation leaks on error paths commit 56f23fdbb600e6087db7b009775b95ce07cc3195 Author: Filipe Manana Date: Wed Mar 30 23:37:21 2016 +0100 Btrfs: fix file/data loss caused by fsync after rename and new inode If we rename an inode A (be it a file or a directory), create a new inode B with the old name of inode A and under the same parent directory, fsync inode B and then power fail, at log tree replay time we end up removing inode A completely. If inode A is a directory then all its files are gone too. Example scenarios where this happens: This is reproducible with the following steps, taken from a couple of test cases written for fstests which are going to be submitted upstream soon: # Scenario 1 mkfs.btrfs -f /dev/sdc mount /dev/sdc /mnt mkdir -p /mnt/a/x echo "hello" > /mnt/a/x/foo echo "world" > /mnt/a/x/bar sync mv /mnt/a/x /mnt/a/y mkdir /mnt/a/x xfs_io -c fsync /mnt/a/x The next time the fs is mounted, log tree replay happens and the directory "y" does not exist nor do the files "foo" and "bar" exist anywhere (neither in "y" nor in "x", nor the root nor anywhere). # Scenario 2 mkfs.btrfs -f /dev/sdc mount /dev/sdc /mnt mkdir /mnt/a echo "hello" > /mnt/a/foo sync mv /mnt/a/foo /mnt/a/bar echo "world" > /mnt/a/foo xfs_io -c fsync /mnt/a/foo The next time the fs is mounted, log tree replay happens and the file "bar" does not exists anymore. A file with the name "foo" exists and it matches the second file we created. Another related problem that does not involve file/data loss is when a new inode is created with the name of a deleted snapshot and we fsync it: mkfs.btrfs -f /dev/sdc mount /dev/sdc /mnt mkdir /mnt/testdir btrfs subvolume snapshot /mnt /mnt/testdir/snap btrfs subvolume delete /mnt/testdir/snap rmdir /mnt/testdir mkdir /mnt/testdir xfs_io -c fsync /mnt/testdir # or fsync some file inside /mnt/testdir The next time the fs is mounted the log replay procedure fails because it attempts to delete the snapshot entry (which has dir item key type of BTRFS_ROOT_ITEM_KEY) as if it were a regular (non-root) entry, resulting in the following error that causes mount to fail: [52174.510532] BTRFS info (device dm-0): failed to delete reference to snap, inode 257 parent 257 [52174.512570] ------------[ cut here ]------------ [52174.513278] WARNING: CPU: 12 PID: 28024 at fs/btrfs/inode.c:3986 __btrfs_unlink_inode+0x178/0x351 [btrfs]() [52174.514681] BTRFS: Transaction aborted (error -2) [52174.515630] Modules linked in: btrfs dm_flakey dm_mod overlay crc32c_generic ppdev xor raid6_pq acpi_cpufreq parport_pc tpm_tis sg parport tpm evdev i2c_piix4 proc [52174.521568] CPU: 12 PID: 28024 Comm: mount Tainted: G W 4.5.0-rc6-btrfs-next-27+ #1 [52174.522805] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [52174.524053] 0000000000000000 ffff8801df2a7710 ffffffff81264e93 ffff8801df2a7758 [52174.524053] 0000000000000009 ffff8801df2a7748 ffffffff81051618 ffffffffa03591cd [52174.524053] 00000000fffffffe ffff88015e6e5000 ffff88016dbc3c88 ffff88016dbc3c88 [52174.524053] Call Trace: [52174.524053] [] dump_stack+0x67/0x90 [52174.524053] [] warn_slowpath_common+0x99/0xb2 [52174.524053] [] ? __btrfs_unlink_inode+0x178/0x351 [btrfs] [52174.524053] [] warn_slowpath_fmt+0x48/0x50 [52174.524053] [] __btrfs_unlink_inode+0x178/0x351 [btrfs] [52174.524053] [] ? iput+0xb0/0x284 [52174.524053] [] btrfs_unlink_inode+0x1c/0x3d [btrfs] [52174.524053] [] check_item_in_log+0x1fe/0x29b [btrfs] [52174.524053] [] replay_dir_deletes+0x167/0x1cf [btrfs] [52174.524053] [] fixup_inode_link_count+0x289/0x2aa [btrfs] [52174.524053] [] fixup_inode_link_counts+0xcb/0x105 [btrfs] [52174.524053] [] btrfs_recover_log_trees+0x258/0x32c [btrfs] [52174.524053] [] ? replay_one_extent+0x511/0x511 [btrfs] [52174.524053] [] open_ctree+0x1dd4/0x21b9 [btrfs] [52174.524053] [] btrfs_mount+0x97e/0xaed [btrfs] [52174.524053] [] ? trace_hardirqs_on+0xd/0xf [52174.524053] [] mount_fs+0x67/0x131 [52174.524053] [] vfs_kern_mount+0x6c/0xde [52174.524053] [] btrfs_mount+0x1ac/0xaed [btrfs] [52174.524053] [] ? trace_hardirqs_on+0xd/0xf [52174.524053] [] ? lockdep_init_map+0xb9/0x1b3 [52174.524053] [] mount_fs+0x67/0x131 [52174.524053] [] vfs_kern_mount+0x6c/0xde [52174.524053] [] do_mount+0x8a6/0x9e8 [52174.524053] [] ? strndup_user+0x3f/0x59 [52174.524053] [] SyS_mount+0x77/0x9f [52174.524053] [] entry_SYSCALL_64_fastpath+0x12/0x6b [52174.561288] ---[ end trace 6b53049efb1a3ea6 ]--- Fix this by forcing a transaction commit when such cases happen. This means we check in the commit root of the subvolume tree if there was any other inode with the same reference when the inode we are fsync'ing is a new inode (created in the current transaction). Test cases for fstests, covering all the scenarios given above, were submitted upstream for fstests: * fstests: generic test for fsync after renaming directory https://patchwork.kernel.org/patch/8694281/ * fstests: generic test for fsync after renaming file https://patchwork.kernel.org/patch/8694301/ * fstests: add btrfs test for fsync after snapshot deletion https://patchwork.kernel.org/patch/8670671/ Cc: stable@vger.kernel.org Signed-off-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/tree-log.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 7f671526d809f40c0f6e6522b9306f250b16c555 Merge: 232cad8 7ccefb9 Author: Chris Mason Date: Wed Apr 6 16:57:19 2016 -0700 Merge branch 'misc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 commit 169b38373fd4a7d47cac0e5fdeeae90b8c076f32 Author: Shanker Donthineni Date: Wed Apr 6 12:49:24 2016 -0500 mailbox: pcc: Don't access an unmapped memory address space The acpi_pcc_probe() may end up accessing memory outside of the PCCT table space causing the kernel panic(). Increment the pcct_entry pointer after parsing 'HW-reduced Communications Subspace' to fix the problem. This change also enables the parsing of subtable at index 0. Signed-off-by: Shanker Donthineni Acked-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d085c7413d32bb6895e5b9b5ee6a7d2180159c5 Author: Kees Cook Date: Wed Apr 6 15:53:27 2016 -0700 lkdtm: do not leak free page on kmalloc failure This frees the allocated page if there is a kmalloc failure. Signed-off-by: Kees Cook drivers/misc/lkdtm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d2e10088ce01191748857296999b8c24a9a51959 Author: Sudip Mukherjee Date: Tue Apr 5 22:41:06 2016 +0530 lkdtm: fix memory leak of base This case is supposed to read from a memory after it has been freed, but we missed freeing base if the memory 'val' could not be allocated. Signed-off-by: Sudip Mukherjee Signed-off-by: Kees Cook drivers/misc/lkdtm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 50fbd977733d1cbafe75baf4b50424434dcfea8c Author: Sudip Mukherjee Date: Tue Apr 5 22:41:05 2016 +0530 lkdtm: fix memory leak of val This case is supposed to read from a page after after it is freed, but it missed freeing val if we are not able to get a free page. Signed-off-by: Sudip Mukherjee Signed-off-by: Kees Cook drivers/misc/lkdtm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd8c61ebd4265ff1c5fa80ba351e8e1dd710fac0 Merge: 30aab18 7c0ecda Author: Dave Airlie Date: Thu Apr 7 07:08:46 2016 +1000 Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Lots of misc bug fixes for radeon and amdgpu and one for ttm. - fix vram info fetching on Fiji and unposted boards - additional vblank fixes from the conversion to drm_vblank_on/off - UVD dGPU suspend and resume fixes - lots of powerplay fixes - fix a fence leak in the pageflip code - ttm fix for platforms where CPU is 32 bit, but physical addresses are >32bits * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: (21 commits) drm/amdgpu: total vram size also reduces pin size drm/amd/powerplay: add uvd/vce dpm enabling flag default. drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI. drm/amdgpu: save and restore the firwmware cache part when suspend resume drm/amdgpu: save and restore UVD context with suspend and resume drm/ttm: use phys_addr_t for ttm_bus_placement drm/radeon: Only call drm_vblank_on/off between drm_vblank_init/cleanup drm/amdgpu: fence wait old rcu slot drm/amdgpu: fix leaking fence in the pageflip code drm/amdgpu: print vram type rather than just DDR drm/amdgpu/gmc: use proper register for vram type on Fiji drm/amdgpu/gmc: move vram type fetching into sw_init drm/amdgpu: Set vblank_disable_allowed = true drm/radeon: Set vblank_disable_allowed = true drm/amd/powerplay: Need to change boot to performance state in resume. drm/amd/powerplay: add new Fiji function for not setting same ps. drm/amdgpu: check dpm state before pm system fs initialized. drm/amd/powerplay: notify amdgpu whether dpm is enabled or not. drm/amdgpu: Not support disable dpm in powerplay. drm/amdgpu: add an cgs interface to notify amdgpu the dpm state. ... commit 0a1a37b6d62e6864a77a82e925217c720f91f963 Author: Dexuan Cui Date: Tue Apr 5 07:41:11 2016 -0700 net: add the AF_KCM entries to family name tables This is for the recent kcm driver, which introduces AF_KCM(41) in b7ac4eb(kcm: Kernel Connection Multiplexor module). Signed-off-by: Dexuan Cui Cc: Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/core/sock.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit eff471b1b9475cfda38078308e71a9e2d811ff44 Author: Jiri Benc Date: Tue Apr 5 16:39:37 2016 +0200 MAINTAINERS: intel-wired-lan list is moderated I got the following message: > Your mail to 'Intel-wired-lan' with the subject > > [PATCH net-next] net: intel: remove dead links > > Is being held until the list moderator can review it for approval. > > The reason it is being held: > > Post by non-member to a members-only list Mark the list as moderated. Signed-off-by: Jiri Benc Acked-by: Jeff Kirsher Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c94f6c8e0d3d4b1e44eb7ad90849a1c964aabe7 Author: Naveen N. Rao Date: Tue Apr 5 15:32:56 2016 +0530 lib/test_bpf: Add additional BPF_ADD tests Some of these tests proved useful with the powerpc eBPF JIT port due to sign-extended 16-bit immediate loads. Though some of these aspects get covered in other tests, it is better to have explicit tests so as to quickly tag the precise problem. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) commit b64b50eac47046f1ecd23adac650317ccadf400f Author: Naveen N. Rao Date: Tue Apr 5 15:32:55 2016 +0530 lib/test_bpf: Add test to check for result of 32-bit add that overflows BPF_ALU32 and BPF_ALU64 tests for adding two 32-bit values that results in 32-bit overflow. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit c7395d6bd7cc1ca6a47b733439c364f7a423a489 Author: Naveen N. Rao Date: Tue Apr 5 15:32:54 2016 +0530 lib/test_bpf: Add tests for unsigned BPF_JGT Unsigned Jump-if-Greater-Than. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 9f134c34fbce58d863f60995cc13728af28b741a Author: Naveen N. Rao Date: Tue Apr 5 15:32:53 2016 +0530 lib/test_bpf: Fix JMP_JSET tests JMP_JSET tests incorrectly used BPF_JNE. Fix the same. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c4004b02f8e5b9ce357a0bb1641756cc86962664 Author: Linus Torvalds Date: Wed Apr 6 13:45:07 2016 -0700 x86: remove the kernel code/data/bss resources from /proc/iomem Let's see if anybody even notices. I doubt anybody uses this, and it does expose addresses that should be randomized, so let's just remove the code. It's old and traditional, and it used to be cute, but we should have removed this long ago. If it turns out anybody notices and this breaks something, we'll have to revert this, and maybe we'll end up using other approaches instead (using %pK or similar). But removing unnecessary code is always the preferred option. Noted-by: Emrah Demir Signed-off-by: Linus Torvalds arch/x86/kernel/setup.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) commit 8ab18d71de8b07d2c4d6f984b718418c09ea45c5 Author: Jorgen Hansen Date: Tue Apr 5 01:59:32 2016 -0700 VSOCK: Detach QP check should filter out non matching QPs. The check in vmci_transport_peer_detach_cb should only allow a detach when the qp handle of the transport matches the one in the detach message. Testing: Before this change, a detach from a peer on a different socket would cause an active stream socket to register a detach. Reviewed-by: George Zhang Signed-off-by: Jorgen Hansen Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52f95bbfcf72126a9f90a386a974fcbe6c6cae46 Author: Giuseppe CAVALLARO Date: Tue Apr 5 08:46:57 2016 +0200 stmmac: fix adjust link call in case of a switch is attached While initializing the phy, the stmmac driver sets the PHY_IGNORE_INTERRUPT so the PAL won't call the adjust hook that is needed, on some platforms, e.g. STi, to invoke the glue. The patch allows the PAL to poll the stmmac_adjust_link just one time in case of a switch is attached, setting later the PHY_IGNORE_INTERRUPT flag. Moving this kind of logic inside the adjust_link it makes sense to anticipate the check for EEE that will never initialized in this scenario. Reported-by: Gabriel Fernandez Signed-off-by: Giuseppe Cavallaro Tested-by: Gabriel Fernandez Cc: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 6ae81ced378820c4c6434b1dedba14a7122df310 Author: Dave Jones Date: Mon Apr 4 15:11:50 2016 -0400 af_packet: tone down the Tx-ring unsupported spew. Trinity and other fuzzers can hit this WARN on far too easily, resulting in a tainted kernel that hinders automated fuzzing. Replace it with a rate-limited printk. Signed-off-by: Dave Jones Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18fcf49f87f4b280d3cd695fc77766004b223af5 Author: WANG Cong Date: Mon Apr 4 10:32:48 2016 -0700 net_sched: fix a memory leak in tc action Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 1 + 1 file changed, 1 insertion(+) commit 138d6153a139c318739f20e61309e5778427a73c Author: Naveen N. Rao Date: Mon Apr 4 22:31:34 2016 +0530 samples/bpf: Enable powerpc support Add the necessary definitions for building bpf samples on ppc. Since ppc doesn't store function return address on the stack, modify how PT_REGS_RET() and PT_REGS_FP() work. Also, introduce PT_REGS_IP() to access the instruction pointer. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 26 ++++++++++++++++++++++++++ samples/bpf/spintest_kern.c | 2 +- samples/bpf/tracex2_kern.c | 4 ++-- samples/bpf/tracex4_kern.c | 2 +- 4 files changed, 30 insertions(+), 4 deletions(-) commit 128d1514be3583c3cfd56d66d7cdfba413b867ae Author: Naveen N. Rao Date: Mon Apr 4 22:31:33 2016 +0530 samples/bpf: Use llc in PATH, rather than a hardcoded value While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Daniel Borkmann Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 77e63534d679e281bf200dd9ee2a422bd4865a2b Author: Naveen N. Rao Date: Mon Apr 4 22:31:32 2016 +0530 samples/bpf: Fix build breakage with map_perf_test_user.c Building BPF samples is failing with the below error: samples/bpf/map_perf_test_user.c: In function ‘main’: samples/bpf/map_perf_test_user.c:134:9: error: variable ‘r’ has initializer but incomplete type struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ samples/bpf/map_perf_test_user.c:134:21: error: ‘RLIM_INFINITY’ undeclared (first use in this function) struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ samples/bpf/map_perf_test_user.c:134:21: note: each undeclared identifier is reported only once for each function it appears in samples/bpf/map_perf_test_user.c:134:9: warning: excess elements in struct initializer [enabled by default] struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ samples/bpf/map_perf_test_user.c:134:9: warning: (near initialization for ‘r’) [enabled by default] samples/bpf/map_perf_test_user.c:134:9: warning: excess elements in struct initializer [enabled by default] samples/bpf/map_perf_test_user.c:134:9: warning: (near initialization for ‘r’) [enabled by default] samples/bpf/map_perf_test_user.c:134:16: error: storage size of ‘r’ isn’t known struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ samples/bpf/map_perf_test_user.c:139:2: warning: implicit declaration of function ‘setrlimit’ [-Wimplicit-function-declaration] setrlimit(RLIMIT_MEMLOCK, &r); ^ samples/bpf/map_perf_test_user.c:139:12: error: ‘RLIMIT_MEMLOCK’ undeclared (first use in this function) setrlimit(RLIMIT_MEMLOCK, &r); ^ samples/bpf/map_perf_test_user.c:134:16: warning: unused variable ‘r’ [-Wunused-variable] struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ make[2]: *** [samples/bpf/map_perf_test_user.o] Error 1 Fix this by including the necessary header file. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao Signed-off-by: David S. Miller samples/bpf/map_perf_test_user.c | 1 + 1 file changed, 1 insertion(+) commit 32fa270c8a3939a9c6cbcf8bc18a0db83a3b40d4 Author: David S. Miller Date: Wed Apr 6 15:42:45 2016 -0400 Revert "bridge: Fix incorrect variable assignment on error path in br_sysfs_addbr" This reverts commit c862cc9b70526a71d07e7bd86d9b61d1c792cead. Patch lacks a real-name Signed-off-by. Signed-off-by: David S. Miller net/bridge/br_sysfs_br.c | 1 - 1 file changed, 1 deletion(-) commit f3d58dccdbf9f8c0a229d555d4b295d52e743039 Author: Dave Airlie Date: Wed Apr 6 09:24:49 2016 +1000 drm/radeon: use helper for mst connector dpms. I noticed my monitor didn't power off when it should, this should fix it. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_mst.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 4b814aace1f77e1a690d3ab0d30c0882f9c1f731 Author: Dave Airlie Date: Wed Apr 6 09:24:48 2016 +1000 drm/radeon/mst: port some MST setup code from DAL. This ports the DAL timeouts and MST rate calculations for the hw from the DAL codebase. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/ni_reg.h | 2 ++ drivers/gpu/drm/radeon/radeon_dp_mst.c | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) commit e131b914c15aa70b2d8a5f3dbbaeec151ea17e7e Author: Chunming Zhou Date: Tue Apr 5 10:48:48 2016 +0800 drm/amdgpu: add invisible pin size statistic Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) commit 9cb5b787db7089015a78c81564ea5ffad2791a0e Merge: 541d8f4 2fe7857 Author: Linus Torvalds Date: Wed Apr 6 11:35:32 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "I'm back from PTO. These issues cropped up while I was gone and are simple fixes. I'll have more after I've caught up, but I wanted to get these in quick. Two minor fixes for 4.6-rc2: - Fix mlx5 build error when on demand paging is not enabled - Fix possible uninit variable in new i40iw driver" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: i40iw: avoid potential uninitialized variable use IB/mlx5: fix VFs callback function prototypes commit 529927f952c55f399823fc500e8ea6cac47b7fbf Author: Hariprasad Shenai Date: Mon Apr 4 09:54:53 2016 +0530 cxgb4: Add pci device id for chelsio t520-cr 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 7eb5ca09e48ec671586218ec4f381c43d534f2f4 Author: Peter Hutterer Date: Wed Apr 6 10:14:46 2016 -0700 Input: clarify we want BTN_TOOL_ on proximity This explicitly states behavior we already use for some touchpads and tablet devices. Signed-off-by: Peter Hutterer Signed-off-by: Dmitry Torokhov Documentation/input/event-codes.txt | 4 ++++ 1 file changed, 4 insertions(+) commit b8af8b1d80db13dd4f5e5a3698180bd9c14aee03 Author: Dan Carpenter Date: Wed Apr 6 14:36:06 2016 +0300 ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() In the original code we ended the loop with tries set to -1 instead of zero. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/intel/haswell/sst-haswell-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fe7857176ad6b70e8b2a318506525410e774f34 Author: Arnd Bergmann Date: Wed Mar 23 11:34:36 2016 +0100 i40iw: avoid potential uninitialized variable use gcc finds that the i40iw_make_cm_node() function in the recently added i40iw driver uses an uninitilized variable as an index into an array if CONFIG_IPV6 is disabled and the driver uses IPv6 mode: drivers/infiniband/hw/i40iw/i40iw_cm.c: In function 'i40iw_make_cm_node': drivers/infiniband/hw/i40iw/i40iw_cm.c:2206:52: error: 'arpindex' may be used uninitialized in this function [-Werror=maybe-uninitialized] ether_addr_copy(cm_node->rem_mac, iwdev->arp_table[arpindex].mac_addr); As far as I can tell, this code path can not be used because the ipv4 variable is always set with CONFIG_IPV6 is disabled, but it's better to be sure and prevent the undefined behavior, as well as shut up that warning in a proper way. This adds an 'else' clause for the case we get the warning about, causing the function to return an error in a controlled way. To avoid adding extra mess with combined io()/#ifdef clauses, I'm also converting the existing #ifdef into a more readable if(IS_ENABLED()) check. Signed-off-by: Arnd Bergmann Fixes: f27b4746f378 ("i40iw: add connection management code") Acked-by: Mustafa Ismail Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 9967c70abc929e9b910be8d419fdf6a85411a066 Author: Arnd Bergmann Date: Wed Mar 23 11:37:45 2016 +0100 IB/mlx5: fix VFs callback function prototypes The previous patch that added a couple of callback functions put the declarations inside of an #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING, which causes the build to fail if that option is disabled: drivers/infiniband/hw/mlx5/main.c: In function 'mlx5_ib_add': drivers/infiniband/hw/mlx5/main.c:2358:31: error: 'mlx5_ib_get_vf_config' undeclared (first use in this function) This moves the four declarations below the #ifdef section so they are always available. Signed-off-by: Arnd Bergmann Fixes: eff901d30e6c ("IB/mlx5: Implement callbacks for manipulating VFs") Reviewed-by: Leon Romanovsky Reviewed-by: Eli Cohen Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a482f4e0d848d0914ff119ef32fe1d11434d570c Author: John Ogness Date: Wed Apr 6 13:01:47 2016 +0300 dmaengine: edma: special case slot limit workaround Currently drivers are limited to 19 slots for cyclic transfers. However, if the DMA burst size is the same as the period size, the period size can be changed to the full buffer size and intermediate interrupts activated. Since intermediate interrupts will trigger for each burst and the burst size is the same as the period size, the driver will get interrupts each period as expected. This has the benefit of allowing the functionality of many more slots, but only uses 2 slots. This workaround is only active if more than 19 slots are needed and the burst size matches the period size. Acked-by: Peter Ujfalusi Signed-off-by: John Ogness Signed-off-by: Sekhar Nori Signed-off-by: Vinod Koul drivers/dma/edma.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 23f49fd2ea9bc8e1c8cff0126cd71b071ea9e91f Author: Peter Ujfalusi Date: Wed Apr 6 13:01:46 2016 +0300 dmaengine: edma: Remove dynamic TPTC power management feature The dynamic or on demand pm_runtime does not work correctly on am335x and am437x due to interference with hwmod. Fall back using the pm_runtime usage as it was in the old driver stack, meaning that at probe time call pm_runtime_enable() and pm_runtime_get_sync() for the TPTCs as well. Fixes: 1be5336bc7ba ("dmaengine: edma: New device tree binding") Signed-off-by: Peter Ujfalusi Reported-by: Tero Kristo Signed-off-by: Vinod Koul drivers/dma/edma.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) commit adf9a3ab90eb44e57f9dbf757acd897838b5ec21 Author: Grygorii Strashko Date: Mon Apr 4 14:33:31 2016 +0300 usb: dwc3: keystone: drop dma_mask configuration The Keystone 2 supports DT-boot only, as result dma_mask will be always configured properly from DT - of_platform_device_create_pdata()->of_dma_configure(). More over, dwc3-keystone.c can be built as module and in this case it's unsafe to assign local variable as dma_mask. Hence, remove dma_mask configuration code. Cc: Murali Karicheri Signed-off-by: Grygorii Strashko Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-keystone.c | 5 ----- 1 file changed, 5 deletions(-) commit 79171e9b90b133686a96912cd7b528655cc9a07a Author: Grygorii Strashko Date: Mon Apr 4 14:31:54 2016 +0300 usb: gadget: udc-core: remove manual dma configuration Since commit 7ace8fc8219e ("usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU") it is not necessary to configure DMA for usb_gadget device manually, because all DMA operation are performed using parent/controller device. Cc: Yoshihiro Shimoda Signed-off-by: Grygorii Strashko Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/udc-core.c | 6 ------ 1 file changed, 6 deletions(-) commit 1ffb4d5cc78a3a99109ff0808ce6915de07a0588 Author: Heikki Krogerus Date: Fri Apr 1 17:13:10 2016 +0300 usb: dwc3: pci: add ID for one more Intel Broxton platform BXT-M is a Intel Broxton SoC based platform with unique PCI ID. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-pci.c | 2 ++ 1 file changed, 2 insertions(+) commit b4201cc4fc6e1c57d6d306b1f787865043d60129 Author: Jeff Mahoney Date: Mon Apr 4 14:15:23 2016 -0400 mac80211: fix "warning: ‘target_metric’ may be used uninitialized" This fixes: net/mac80211/mesh_hwmp.c:603:26: warning: ‘target_metric’ may be used uninitialized in this function target_metric is only consumed when reply = true so no bug exists here, but not all versions of gcc realize it. Initialize to 0 to remove the warning. Signed-off-by: Jeff Mahoney Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 952cca6a724c420a1efb6025e41862dfd2c1edc3 Author: Colin Ian King Date: Wed Apr 6 14:06:48 2016 +0100 ASN.1: fix open failure check on headername The check for a failed open on headername is incorrectly checking on the out FILE pointer rather than the hdr. Fix this. Signed-off-by: Colin Ian King Signed-off-by: David Howells scripts/asn1_compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d4a2ec1e0b41b0cf9a0c5cd4511da7f8e4f3de2 Author: Jerome Marchand Date: Wed Apr 6 14:06:48 2016 +0100 assoc_array: don't call compare_object() on a node Changes since V1: fixed the description and added KASan warning. In assoc_array_insert_into_terminal_node(), we call the compare_object() method on all non-empty slots, even when they're not leaves, passing a pointer to an unexpected structure to compare_object(). Currently it causes an out-of-bound read access in keyring_compare_object detected by KASan (see below). The issue is easily reproduced with keyutils testsuite. Only call compare_object() when the slot is a leave. KASan warning: ================================================================== BUG: KASAN: slab-out-of-bounds in keyring_compare_object+0x213/0x240 at addr ffff880060a6f838 Read of size 8 by task keyctl/1655 ============================================================================= BUG kmalloc-192 (Not tainted): kasan: bad access detected ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in assoc_array_insert+0xfd0/0x3a60 age=69 cpu=1 pid=1647 ___slab_alloc+0x563/0x5c0 __slab_alloc+0x51/0x90 kmem_cache_alloc_trace+0x263/0x300 assoc_array_insert+0xfd0/0x3a60 __key_link_begin+0xfc/0x270 key_create_or_update+0x459/0xaf0 SyS_add_key+0x1ba/0x350 entry_SYSCALL_64_fastpath+0x12/0x76 INFO: Slab 0xffffea0001829b80 objects=16 used=8 fp=0xffff880060a6f550 flags=0x3fff8000004080 INFO: Object 0xffff880060a6f740 @offset=5952 fp=0xffff880060a6e5d1 Bytes b4 ffff880060a6f730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f740: d1 e5 a6 60 00 88 ff ff 0e 00 00 00 00 00 00 00 ...`............ Object ffff880060a6f750: 02 cf 8e 60 00 88 ff ff 02 c0 8e 60 00 88 ff ff ...`.......`.... Object ffff880060a6f760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7d0: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff880060a6f7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ CPU: 0 PID: 1655 Comm: keyctl Tainted: G B 4.5.0-rc4-kasan+ #291 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 0000000000000000 000000001b2800b4 ffff880060a179e0 ffffffff81b60491 ffff88006c802900 ffff880060a6f740 ffff880060a17a10 ffffffff815e2969 ffff88006c802900 ffffea0001829b80 ffff880060a6f740 ffff880060a6e650 Call Trace: [] dump_stack+0x85/0xc4 [] print_trailer+0xf9/0x150 [] object_err+0x34/0x40 [] kasan_report_error+0x230/0x550 [] ? keyring_get_key_chunk+0x13e/0x210 [] __asan_report_load_n_noabort+0x5d/0x70 [] ? keyring_compare_object+0x213/0x240 [] keyring_compare_object+0x213/0x240 [] assoc_array_insert+0x86c/0x3a60 [] ? assoc_array_cancel_edit+0x70/0x70 [] ? __key_link_begin+0x20d/0x270 [] __key_link_begin+0xfc/0x270 [] key_create_or_update+0x459/0xaf0 [] ? trace_hardirqs_on+0xd/0x10 [] ? key_type_lookup+0xc0/0xc0 [] ? lookup_user_key+0x13d/0xcd0 [] ? memdup_user+0x53/0x80 [] SyS_add_key+0x1ba/0x350 [] ? key_get_type_from_user.constprop.6+0xa0/0xa0 [] ? retint_user+0x18/0x23 [] ? trace_hardirqs_on_caller+0x3fe/0x580 [] ? trace_hardirqs_on_thunk+0x17/0x19 [] entry_SYSCALL_64_fastpath+0x12/0x76 Memory state around the buggy address: ffff880060a6f700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff880060a6f780: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc >ffff880060a6f800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff880060a6f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880060a6f900: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ================================================================== Signed-off-by: Jerome Marchand Signed-off-by: David Howells cc: stable@vger.kernel.org lib/assoc_array.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 06a71a24bae57a07afee9cda6b00495347d8a448 Author: Sudeep Holla Date: Mon Apr 4 14:46:51 2016 +0100 arm64: KVM: unregister notifiers in hyp mode teardown path Commit 1e947bad0b63 ("arm64: KVM: Skip HYP setup when already running in HYP") re-organized the hyp init code and ended up leaving the CPU hotplug and PM notifier even if hyp mode initialization fails. Since KVM is not yet supported with ACPI, the above mentioned commit breaks CPU hotplug in ACPI boot. This patch fixes teardown_hyp_mode to properly unregister both CPU hotplug and PM notifiers in the teardown path. Fixes: 1e947bad0b63 ("arm64: KVM: Skip HYP setup when already running in HYP") Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Sudeep Holla Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 6141570c36f0c937d5deff20d9cf08cbd8d8ed48 Author: Marc Zyngier Date: Tue Apr 5 16:11:47 2016 +0100 arm64: KVM: Warn when PARange is less than 40 bits We always thought that 40bits of PA range would be the minimum people would actually build. Anything less is terrifyingly small. Turns out that we were both right and wrong. Nobody has ever built such a system, but the ARM Foundation Model has a PARange set to 36bits. Just because we can. Oh well. Now, the KVM API explicitely says that we offer a 40bit PA space to the VM, so we shouldn't run KVM on the Foundation Model at all. That being said, this patch offers a less agressive alternative, and loudly warns about the configuration being unsupported. You'll still be able to run VMs (at your own risks, though). This is just a workaround until we have a proper userspace API where we report the PARange to userspace. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_arm.h | 6 ++---- arch/arm64/include/asm/kvm_asm.h | 2 +- arch/arm64/include/asm/kvm_host.h | 7 ++++--- arch/arm64/kvm/hyp/s2-setup.c | 39 +++++++++++++++++++++++++++++++++++++-- 4 files changed, 44 insertions(+), 10 deletions(-) commit 1c5631c73fc2261a5df64a72c155cb53dcdc0c45 Author: Marc Zyngier Date: Wed Apr 6 09:37:22 2016 +0100 KVM: arm/arm64: Handle forward time correction gracefully On a host that runs NTP, corrections can have a direct impact on the background timer that we program on the behalf of a vcpu. In particular, NTP performing a forward correction will result in a timer expiring sooner than expected from a guest point of view. Not a big deal, we kick the vcpu anyway. But on wake-up, the vcpu thread is going to perform a check to find out whether or not it should block. And at that point, the timer check is going to say "timer has not expired yet, go back to sleep". This results in the timer event being lost forever. There are multiple ways to handle this. One would be record that the timer has expired and let kvm_cpu_has_pending_timer return true in that case, but that would be fairly invasive. Another is to check for the "short sleep" condition in the hrtimer callback, and restart the timer for the remaining time when the condition is detected. This patch implements the latter, with a bit of refactoring in order to avoid too much code duplication. Cc: Reported-by: Alexander Graf Reviewed-by: Alexander Graf Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 49 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) commit dfd74a1edfaba5864276a2859190a8d242d18952 Author: Ross Lagerwall Date: Thu Mar 17 16:52:00 2016 +0000 xen/balloon: Fix crash when ballooning on x86 32 bit PAE Commit 55b3da98a40dbb3776f7454daf0d95dde25c33d2 (xen/balloon: find non-conflicting regions to place hotplugged memory) caused a regression in 4.4. When ballooning on an x86 32 bit PAE system with close to 64 GiB of memory, the address returned by allocate_resource may be above 64 GiB. When using CONFIG_SPARSEMEM, this setup is limited to using physical addresses < 64 GiB. When adding memory at this address, it runs off the end of the mem_section array and causes a crash. Instead, fail the ballooning request. Signed-off-by: Ross Lagerwall Cc: # 4.4+ Signed-off-by: David Vrabel drivers/xen/balloon.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 60901df3aed230d4565dca003f11b6a95fbf30d9 Author: Ross Lagerwall Date: Thu Mar 17 16:51:59 2016 +0000 xen: Fix page <-> pfn conversion on 32 bit systems Commit 1084b1988d22dc165c9dbbc2b0e057f9248ac4db (xen: Add Xen specific page definition) caused a regression in 4.4. The xen functions to convert between pages and pfns fail due to an overflow on systems where a physical address may not fit in an unsigned long (e.g. x86 32 bit PAE systems). Rework the conversion to avoid overflow. This should also result in simpler object code. This bug manifested itself as disk corruption with Linux 4.4 when using blkfront in a Xen HVM x86 32 bit guest with more than 4 GiB of memory. Signed-off-by: Ross Lagerwall Cc: # 4.4+ Signed-off-by: David Vrabel include/xen/page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1bb025f6db789ea0bb674eaed15ee843ef0b2e88 Merge: f55532a f75587b Author: Greg Kroah-Hartman Date: Wed Apr 6 05:57:19 2016 -0400 Merge tag 'extcon-fixes-for-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus Chanwoo writes: Update extcon for v4.6-rc3 This patch fixes the following one issue: - In extcon-palmas.c, the external abort happen when wake-up from suspend state on BeagleBoard-X15 platform. So, drop the IRQF_EARLY_RESUME flag. commit b4203ff5464da00b7812e7b480192745b0d66bbf Author: Dennis Kadioglu Date: Wed Apr 6 08:39:01 2016 +0200 ALSA: usb-audio: Add a quirk for Plantronics BT300 Plantronics BT300 does not support reading the sample rate which leads to many lines of "cannot get freq at ep 0x1". This patch adds the USB ID of the BT300 to quirks.c and avoids those error messages. Signed-off-by: Dennis Kadioglu Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 30aab1897b9592ae40123bc83888d23af06261eb Merge: 4cf43e0 34440ed Author: Dave Airlie Date: Wed Apr 6 16:16:52 2016 +1000 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes Just a single fix to prevent GM20B systems hanging at boot. * 'linux-4.6' of git://github.com/skeggsb/linux: drm/nouveau/tegra: acquire and enable reference clock if needed commit 34440ed697aed2588d3e99bbdc75700a967bd1bd Author: Alexandre Courbot Date: Fri Apr 1 11:37:44 2016 +0900 drm/nouveau/tegra: acquire and enable reference clock if needed GM20B requires an extra clock compared to GK20A. Add that information into the platform data and acquire and enable this clock if necessary. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 5 +++++ drivers/gpu/drm/nouveau/nouveau_platform.c | 7 ++++++- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 4cf43e0ed4764f0e33b0f3ff66f29cd5962d6c17 Merge: 915e846 69c2565 Author: Dave Airlie Date: Wed Apr 6 09:56:13 2016 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes arm hdlcd fix. * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: ARM HDLCD - fix an error code drm: ARM HDLCD - get rid of devm_clk_put() commit 915e846d4b076d1e2da862379c284552fdda0a07 Merge: 541d8f4 e51f17a Author: Dave Airlie Date: Wed Apr 6 09:48:53 2016 +1000 Merge tag 'imx-drm-next-2016-04-01' of git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm: stricter plane parameter checking, dw_hdmi-imx and dmfc fixes - Check whether plane parameters comply with IPU IDMAC limitations and fix planar YUV 4:2:0 U/V offsets and stride - Cleanup encoder in dw_hdmi-imx bind error path and remove a superfluous platform_set_drvdata in dw_hdmi-imx - DMFC setup fixes: lock the ipu_dmfc_init_channel function against concurrent use, rename it to ipu_dmfc_config_wait4eot, and call it after the FIFO size has been determined. * tag 'imx-drm-next-2016-04-01' of git://git.pengutronix.de/git/pza/linux: drm/imx: Don't set a gamma table size drm/imx: ipuv3-plane: Configure DMFC wait4eot bit after slots are determined gpu: ipu-v3: ipu-dmfc: Rename ipu_dmfc_init_channel to ipu_dmfc_config_wait4eot gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void gpu: ipu-v3: ipu-dmfc: Protect function ipu_dmfc_init_channel() with mutex drm/imx: dw_hdmi: Don't call platform_set_drvdata() drm/imx: dw_hdmi: Call drm_encoder_cleanup() in error path drm/imx: ipuv3-plane: fix planar YUV 4:2:0 support drm/imx: ipuv3-plane: Add more thorough checks for plane parameter limitations gpu: ipu-cpmem: modify ipu_cpmem_set_yuv_planar_full for better control commit b6ee376cb0b7fb4e7e07d6cd248bd40436fb9ba6 Author: Thadeu Lima de Souza Cascardo Date: Fri Apr 1 17:17:50 2016 -0300 ip6_tunnel: set rtnl_link_ops before calling register_netdevice When creating an ip6tnl tunnel with ip tunnel, rtnl_link_ops is not set before ip6_tnl_create2 is called. When register_netdevice is called, there is no linkinfo attribute in the NEWLINK message because of that. Setting rtnl_link_ops before calling register_netdevice fixes that. Fixes: 0b112457229d ("ip6tnl: add support of link creation via rtnl") Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 727ceaa49bb86518470c19640ed7f067c5aa9485 Author: Bjorn Helgaas Date: Tue Apr 5 15:58:22 2016 -0500 Revert "netpoll: Fix extra refcount release in netpoll_cleanup()" This reverts commit 543e3a8da5a4c453e992d5351ef405d5e32f27d7. Direct callers of __netpoll_setup() depend on it to set np->dev, so we can't simply move that assignment up to netpoll_stup(). Reported-by: Bart Van Assche Signed-off-by: Bjorn Helgaas Signed-off-by: David S. Miller net/core/netpoll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit aa4f069e167b8302b0ccf920bca389a1fbe2bc4a Merge: eb8e977 a4605fe Author: David S. Miller Date: Tue Apr 5 19:31:19 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-04-05 This series contains updates to i40e and e1000. Jesse fixes an issue where code was added by a previous commit but the flag to enable it was never set. Alex fixes the e1000 driver from grossly overestimated the descriptors needed to transmit a frame. ==================== Signed-off-by: David S. Miller commit 541d8f4d59d79f5d37c8c726f723d42ff307db57 Merge: 5003bc6 95272c2 Author: Linus Torvalds Date: Tue Apr 5 16:16:00 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Miscellaneous bugfixes. The ARM and s390 fixes are for new regressions from the merge window, others are usual stable material" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: compiler-gcc: disable -ftracer for __noclone functions kvm: x86: make lapic hrtimer pinned s390/mm/kvm: fix mis-merge in gmap handling kvm: set page dirty only if page has been writable KVM: x86: reduce default value of halt_poll_ns parameter KVM: Hyper-V: do not do hypercall userspace exits if SynIC is disabled KVM: x86: Inject pending interrupt even if pending nmi exist arm64: KVM: Register CPU notifiers when the kernel runs at HYP arm64: kvm: 4.6-rc1: Fix VTCR_EL2 VS setting commit a4605fef7132f19afded76ee025c957558271a7d Author: Alexander Duyck Date: Wed Mar 2 16:16:08 2016 -0500 e1000: Double Tx descriptors needed check for 82544 The 82544 has code that adds one additional descriptor per data buffer. However we weren't taking that into account when determining the descriptors needed for the next transmit at the end of the xmit_frame path. This change takes that into account by doubling the number of descriptors needed for the 82544 so that we can avoid a potential issue where we could hang the Tx ring by loading frames with xmit_more enabled and then stopping the ring without writing the tail. In addition it adds a few more descriptors to account for some additional workarounds that have been added over time. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_main.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 847a1d6796c767f8b697ead60997b847a84b897b Author: Alexander Duyck Date: Wed Mar 2 16:16:01 2016 -0500 e1000: Do not overestimate descriptor counts in Tx pre-check The current code path is capable of grossly overestimating the number of descriptors needed to transmit a new frame. This specifically occurs if the skb contains a number of 4K pages. The issue is that the logic for determining the descriptors needed is ((S) >> (X)) + 1. When X is 12 it means that we were indicating that we required 2 descriptors for each 4K page when we only needed one. This change corrects this by instead adding (1 << (X)) - 1 to the S value instead of adding 1 after the fact. This way we get an accurate descriptor needed count as we are essentially doing a DIV_ROUNDUP(). Reported-by: Ivan Suzdal Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e2cc0e67f4aa33931cd15a553938163a19dcab3 Author: Jesse Brandeburg Date: Mon Feb 29 11:00:24 2016 -0800 i40e: fix errant PCIe bandwidth message There was an error introduced with commit 3fced535079a ("i40e: X722 is on the IOSF bus and does not report the PCI bus info"), where code was added but the enabling flag is never set. CC: Anjali Singhai Jain CC: Stefan Assman Fixes: 3fced535079a ("i40e: X722 is on the IOSF bus ...") Reported-by: Steve Best Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 1 file changed, 1 insertion(+) commit b2d7a9cd3ff8ec561348267c2ef7d47b2b91e801 Author: Fabio Estevam Date: Mon Mar 28 18:45:36 2016 -0300 Revert "PCI: imx6: Add support for active-low reset GPIO" Commit 5c5fb40de8f1 ("PCI: imx6: Add support for active-low reset GPIO") cause regressions on some boards like MX6 Gateworks Ventana, for example. The reason for the breakage is that this commit sets the GPIO polarity in the wrong logic level. Also, the commit log is wrong because active-low reset GPIO is what the driver used to support since the beginning. So keep the old behavior that ignores the GPIO polarity specified in the device tree and treat the PCI reset GPIO as active-low. Reported-by: Krzysztof Hałasa Tested-by: Tim Harvey # Gateworks Ventana Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Tim Harvey Acked-by: Lucas Stach CC: stable@vger.kernel.org # v4.5+ drivers/pci/host/pci-imx6.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 5003bc6cc60ef700692da9bf4d3953aa0770d300 Merge: 1b5caa3 cb39f73 Author: Linus Torvalds Date: Tue Apr 5 13:41:37 2016 -0700 Merge tag 'spi-fix-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of driver specific fixes here that came in since the merge window plus one core fix for locking in cases where a client driver grabs a lock on the whole bus for an extended series of operations that was introduced by the changes to support accelerated flash operations" * tag 'spi-fix-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: rockchip: fix probe deferral handling spi: omap2-mcspi: fix dma transfer for vmalloced buffer spi: fix possible deadlock between internal bus locks and bus_lock_flag spi: imx: Fix possible NULL pointer deref spi: imx: only do necessary changes to ECSPIx_CONFIGREG spi: rockchip: Spelling s/divsor/divisor/ commit 2224d879c7c0f85c14183ef82eb48bd875ceb599 Author: David Disseldorp Date: Tue Apr 5 11:13:39 2016 +0200 rbd: use GFP_NOIO consistently for request allocations As of 5a60e87603c4c533492c515b7f62578189b03c9c, RBD object request allocations are made via rbd_obj_request_create() with GFP_NOIO. However, subsequent OSD request allocations in rbd_osd_req_create*() use GFP_ATOMIC. With heavy page cache usage (e.g. OSDs running on same host as krbd client), rbd_osd_req_create() order-1 GFP_ATOMIC allocations have been observed to fail, where direct reclaim would have allowed GFP_NOIO allocations to succeed. Cc: stable@vger.kernel.org # 3.18+ Suggested-by: Vlastimil Babka Suggested-by: Neil Brown Signed-off-by: David Disseldorp Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb8e97715f29a1240cdf67b0df725be27433259f Author: Marcelo Ricardo Leitner Date: Fri Apr 1 14:30:32 2016 -0300 sctp: use list_* in sctp_list_dequeue Use list_* helpers in sctp_list_dequeue, more readable. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e43569e6d3c71eb266641c6297ea54f7ac66954f Author: Marcelo Ricardo Leitner Date: Fri Apr 1 14:05:48 2016 -0300 sctp: flush if we can't fit another DATA chunk There is no point on delaying the packet if we can't fit a single byte of data on it anymore. So lets just reduce the threshold by the amount that a data chunk with 4 bytes (rounding) would use. v2: based on the right tree Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7c0ecda15b01bc88d762d9263d2cf0f69ffd4c23 Author: Chunming Zhou Date: Fri Apr 1 17:05:30 2016 +0800 drm/amdgpu: total vram size also reduces pin size Signed-off-by: Chunming Zhou Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + 1 file changed, 1 insertion(+) commit 92dc20d83adec565378254c0630e839ff5674e14 Author: Andrey Vostrikov Date: Tue Apr 5 15:33:14 2016 +0300 spi: spi-fsl-dspi: Fix cs_change handling in message transfer There are use cases when chip select should be triggered between transfers in single SPI message. Current implementation does this only on last transfer in message ignoring cs_change value provided in current transfer. Signed-off-by: Andrey Vostrikov Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 330ed4da2c8eb821e70b1366a7af53eb1c7421fb Author: Franck Jullien Date: Tue Mar 22 11:52:22 2016 +0100 dmaengine: vdma: don't crash when bad channel is requested When client request a non existing channel from of_dma_xilinx_xlate we get a NULL pointer dereferencing. This patch fix this problem. Signed-off-by: Franck Jullien Acked-by: Laurent Pinchart Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d63b0f0c0f19dc8687387ead5a28148dcad1a4b9 Author: Silvan Jegen Date: Thu Mar 17 17:15:01 2016 -0700 Input: xpad - add Mad Catz FightStick TE 2 VID/PID This adds the VID/PID combination for the Xbox One version of the Mad Catz FightStick TE 2. The functionality that this provides is about on par with what the Windows drivers for the stick manage to deliver. What works: - Digital stick - 6 main buttons - Xbox button - The two buttons on the back - The locking buttons (preventing accidental Xbox button press) What doesn't work: - Two of the main buttons (don't work on Windows either) - The "Haptic" button setting does not have an effect (not sure if it works on Windows) I added the MAP_TRIGGERS_TO_BUTTONS option but in my (limited) testing there was no practical difference with or without. The FightStick does not have triggers though so adding it makes sense. Signed-off-by: Silvan Jegen Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit b96c033cc8fa6484b1771d43e2fcce61e1fa5097 Author: Peter Ujfalusi Date: Tue Apr 5 15:20:21 2016 +0300 dmaengine: omap-dma: Do not suppress interrupts for memcpy If the client queues up more transfers the driver will not able to move to the next transfer without knowing that the previous descriptor is completed. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 689d3c5ecc9e2eac714d32ca152b72988bc2a67b Author: Peter Ujfalusi Date: Tue Apr 5 15:20:20 2016 +0300 dmaengine: omap-dma: Fix polled channel completion detection and handling When based on the CCR_ENABLE bit the channel is stopped we should not call omap_dma_callback(), only change the return value to DMA_COMPLETE. Client drivers will do the right thing to clean up the channel after the transfer has been completed. Check the CCR_ENABLE only if the channel is running and not paused since pause in sDMA means that the channel is stopped. This will fix one hard to reproduce race condition when the channel is terminated during transfer (affecting cyclic operation). Fixes: 1a7cf7b26f25 ("dmaengine: omap-dma: Handle cases when the channel is polled for completion") Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 326ea2a90500fe4add86c5fb95d914d46910e780 Author: Jason Gerecke Date: Mon Apr 4 11:26:52 2016 -0700 HID: wacom: Support switching from vendor-defined device mode on G9 and G11 A tablet PC booted into Windows may have its pen/touch hardware switched into "Wacom mode" similar to what we do with explicitly-supported hardware. Some devices appear to maintain this state across reboots, preventing their use with the generic HID driver. This patch adds support for detecting the presence of the mode switch feature report used by devices based on the G9 and G11 chips and has the HID codepath always attempt to reset the device back to sending standard HID reports. Fixes: https://sourceforge.net/p/linuxwacom/bugs/307/ Fixes: https://sourceforge.net/p/linuxwacom/bugs/310/ Fixes: https://github.com/linuxwacom/input-wacom/issues/15 Co-authored-by: Benjamin Tissoires Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 100 ++++++++++++++++++++++++++++++++++-------------- drivers/hid/wacom_wac.h | 8 ++++ 2 files changed, 80 insertions(+), 28 deletions(-) commit c6fa1aeba02111ed8676494ac7cd453a03efef3c Author: Jason Gerecke Date: Mon Apr 4 11:26:51 2016 -0700 HID: wacom: Initialize hid_data.inputmode to -1 Commit 5ae6e89 introduced hid_data.inputmode with a comment that it would have the value -1 if undefined, but then forgot to actually perform the initialization. Although this doesn't appear to have caused any problems in practice, it should still be remedied. Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b5caa3eaa5f98a0d29ac46c7b545091520c5b26 Merge: 62d2def e1641c9 Author: Linus Torvalds Date: Tue Apr 5 07:45:29 2016 -0700 Merge tag 'pinctrl-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here is a set of pin control fixes for the v4.6 series. A bit bigger than what I hoped for, but all fixes are confined to drivers, a few of them also targeted to stable. Summary: - On Super-H PFC (Renesas) controllers: only use dummies on legacy systems. This fixes a serious ethernet regression on a Renesas board. - Pistachio: Fix errors in the pin table. - Allwinner SunXi: fix the external interrupts to work. - Intel: fix so the high level interrupts start working, and fix a spurious interrupt issue. - Qualcomm ipq4019: fix the number of GPIOs provided (bump to 100), correct register offsets and handle GPIO mode properly. - Revert the revert on the revert so that Xway has a .to_irq() callback again. - Minor fixes to errorpaths and debug info. - A MAINTAINERS update" * tag 'pinctrl-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: Revert "Revert "pinctrl: lantiq: Implement gpio_chip.to_irq"" pinctrl: qcom: ipq4019: fix register offsets pinctrl: qcom: ipq4019: fix the function enum for gpio mode pinctrl: qcom: ipq4019: set ngpios to correct value pinctrl: nomadik: fix pull debug print inversion MAINTAINERS: pinctrl: samsung: Add two new maintainers pinctrl: intel: implement gpio_irq_enable pinctrl: intel: make the high level interrupt working pinctrl: freescale: imx: fix bogus check of of_iomap() return value pinctrl: sunxi: Fix A33 external interrupts not working pinctrl: pistachio: fix mfio84-89 function description and pinmux. pinctrl: sh-pfc: only use dummy states for non-DT platforms commit 62d2def9a5143ba5c8cd009e7f07e5dfa79830d2 Merge: 1e1e5ce 405ddbf Author: Linus Torvalds Date: Tue Apr 5 06:47:50 2016 -0700 Merge tag 'media/v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Some bug fixes on au0828 and snd-usb-audio: - the au0828+snd-usb-audio MC patch broke several things and produced some race conditions. Better to revert the patches, and re-work on them for a next version - fix a regression at tuner disable links logic - properly handle dev_state as a bitmask" * tag 'media/v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] Revert "[media] media: au0828 change to use Managed Media Controller API" [media] Revert "[media] sound/usb: Use Media Controller API to share media resources" [media] au0828: Fix dev_state handling [media] au0828: fix au0828_v4l2_close() dev_state race condition [media] media: au0828 fix to clear enable/disable/change source handlers [media] v4l2-mc: cleanup a warning [media] au0828: disable tuner links and cache tuner/decoder commit 07b48ac4bbe527e68cfc555f2b2b206908437141 Author: Robin Murphy Date: Thu Mar 10 19:28:12 2016 +0000 iommu/dma: Restore scatterlist offsets correctly With the change to stashing just the IOVA-page-aligned remainder of the CPU-page offset rather than the whole thing, the failure path in __invalidate_sg() also needs tweaking to account for that in the case of differing page sizes where the two offsets may not be equivalent. Similarly in __finalise_sg(), lest the architecture-specific wrappers later get the wrong address for cache maintenance on sync or unmap. Fixes: 164afb1d85b8 ("iommu/dma: Use correct offset in map_sg") Reported-by: Magnus Damm Signed-off-by: Robin Murphy Cc: stable@ver.kernel.org # v4.4+ Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47cd30608f3fc3dbb4fdf37300baca911e2dde34 Author: Álvaro Fernández Rojas Date: Sun Apr 3 14:18:22 2016 +0200 hwrng: bcm63xx - fix device tree compilation Adds missing include that resulted in implicit device tree functions errors. Fixes: 7b651706712b ("hwrng: bcm63xx - add device tree support") Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Herbert Xu drivers/char/hw_random/bcm63xx-rng.c | 1 + 1 file changed, 1 insertion(+) commit 95272c29378ee7dc15f43fa2758cb28a5913a06d Author: Paolo Bonzini Date: Thu Mar 31 09:38:51 2016 +0200 compiler-gcc: disable -ftracer for __noclone functions -ftracer can duplicate asm blocks causing compilation to fail in noclone functions. For example, KVM declares a global variable in an asm like asm("2: ... \n .pushsection data \n .global vmx_return \n vmx_return: .long 2b"); and -ftracer causes a double declaration. Cc: Andrew Morton Cc: Michal Marek Cc: stable@vger.kernel.org Cc: kvm@vger.kernel.org Reported-by: Linda Walsh Signed-off-by: Paolo Bonzini include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61abdbe0bcc2b32745ab4479cc550f4c1f518ee2 Author: Luiz Capitulino Date: Mon Apr 4 16:46:07 2016 -0400 kvm: x86: make lapic hrtimer pinned When a vCPU runs on a nohz_full core, the hrtimer used by the lapic emulation code can be migrated to another core. When this happens, it's possible to observe milisecond latency when delivering timer IRQs to KVM guests. The huge latency is mainly due to the fact that apic_timer_fn() expects to run during a kvm exit. It sets KVM_REQ_PENDING_TIMER and let it be handled on kvm entry. However, if the timer fires on a different core, we have to wait until the next kvm exit for the guest to see KVM_REQ_PENDING_TIMER set. This problem became visible after commit 9642d18ee. This commit changed the timer migration code to always attempt to migrate timers away from nohz_full cores. While it's discussable if this is correct/desirable (I don't think it is), it's clear that the lapic emulation code has a requirement on firing the hrtimer in the same core where it was started. This is achieved by making the hrtimer pinned. Lastly, note that KVM has code to migrate timers when a vCPU is scheduled to run in different core. However, this forced migration may fail. When this happens, we can have the same problem. If we want 100% correctness, we'll have to modify apic_timer_fn() to cause a kvm exit when it runs on a different core than the vCPU. Not sure if this is possible. Here's a reproducer for the issue being fixed: 1. Set all cores but core0 to be nohz_full cores 2. Start a guest with a single vCPU 3. Trace apic_timer_fn() and kvm_inject_apic_timer_irqs() You'll see that apic_timer_fn() will run in core0 while kvm_inject_apic_timer_irqs() runs in a different core. If you get both on core0, try running a program that takes 100% of the CPU and pin it to core0 to force the vCPU out. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9c650d09a9c3029cc90cae5d2cd7ab131bdb86c2 Author: Christian Borntraeger Date: Mon Apr 4 09:41:32 2016 +0200 s390/mm/kvm: fix mis-merge in gmap handling commit 1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c") dropped some changes from commit a3a92c31bf0b ("KVM: s390: fix mismatch between user and in-kernel guest limit") - this breaks KVM for some memory sizes (kvm-s390: failed to commit memory region) like exactly 2GB. Cc: Dominik Dingel Cc: Martin Schwidefsky Acked-by: Heiko Carstens Signed-off-by: Christian Borntraeger Signed-off-by: Paolo Bonzini arch/s390/mm/gmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b70bb984489363aadd5ccc94d919629d9e264d36 Author: Arnd Bergmann Date: Tue Mar 15 22:37:17 2016 +0100 iommu: provide of_xlate pointer unconditionally iommu drivers that support the standard DT bindings use a of_xlate callback pointer, but that is only part of struct iommu_ops when CONFIG_OF_IOMMU is enabled, leading to build errors in randconfig builds when that is not provided: drivers/iommu/mtk_iommu.c:497:2: error: unknown field 'of_xlate' specified in initializer .of_xlate = mtk_iommu_of_xlate, ^ drivers/iommu/mtk_iommu.c:497:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .of_xlate = mtk_iommu_of_xlate, ^~~~~~~~~~~~~~~~~~ drivers/iommu/mtk_iommu.c:497:14: note: (near initialization for 'mtk_iommu_ops.domain_get_attr') We can work around it by adding more #ifdefs in each driver, but it seems nicer to just allow setting the pointer even if it is unused. This makes the driver code look nicer, and it gives better compile-time coverage when test building on other architectures. Signed-off-by: Arnd Bergmann Fixes: 0df4fabe208d ("iommu/mediatek: Add mt8173 IOMMU driver") Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel include/linux/iommu.h | 2 -- 1 file changed, 2 deletions(-) commit 6ea7e3873e52902af9ee8c0837450fdb69d54140 Merge: 5ddfe08 f55532a Author: James Bottomley Date: Tue Apr 5 06:56:47 2016 -0400 Merge branch 'fixes-base' into fixes commit 5ddfe0858ea7848c5d4efe3f4319e7543522e0ee Author: Hannes Reinecke Date: Fri Apr 1 08:57:36 2016 +0200 scsi: Do not attach VPD to devices that don't support it The patch "scsi: rescan VPD attributes" introduced a regression in which devices that don't support VPD were being scanned for VPD attributes anyway. This could cause issues for some devices and should be avoided so the check for scsi_level has been moved out of scsi_add_lun and into scsi_attach_vpd so that all callers will not scan VPD for devices that don't support it. [mkp: Merge fix] Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes") Cc: #v4.5+ Suggested-by: Alexander Duyck Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 3 ++- drivers/scsi/sd.c | 19 +------------------ include/scsi/scsi_device.h | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 19 deletions(-) commit 01d6b2a40a0fa73c90e05b1033f181a51fec9292 Author: Adrian Hunter Date: Mon Apr 4 12:40:37 2016 +0300 mmc: sdhci-pci: Add support and PCI IDs for more Broxton host controllers Add support and PCI IDs for more Broxton host controllers Other BXT IDs were added in v4.4 so cc'ing stable. This patch is dependent on commit 163cbe31e516 ("mmc: sdhci-pci: Fix card detect race for Intel BXT/APL") but that is already in stable since v4.4.4. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 25 +++++++++++++++++++++++++ drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 28 insertions(+) commit 735b100f6d84b60da68e81e0bcb953d2021e0aa8 Author: Paul Parsons Date: Mon Apr 4 20:36:34 2016 +0100 drm/edid: Fix DMT 1024x768@43Hz (interlaced) timings One of the VESA DMT timings in drm_dmt_modes[] is slightly off. 1024x768@43Hz (interlaced) vsync_end should be 776, not 772. This brings it into line with the identical timings in edid_est_modes[]. Signed-off-by: Paul Parsons Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160404193639.8631D6E66B@gabe.freedesktop.org drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6d4671a08810ff5111099dd1febe57e7eb9ba59 Author: Emmanuel Grumbach Date: Thu Mar 17 16:51:42 2016 +0200 mac80211: close the SP when we enqueue frames during the SP Since we enqueued the frame that was supposed to be sent during the SP, and that frame may very well cary the IEEE80211_TX_STATUS_EOSP bit, we may never close the SP (WLAN_STA_SP will never be cleared). If that happens, we will not open any new SP and will never respond to any poll frame from the client. Clear WLAN_STA_SP manually if a frame that was polled during the SP is queued because of a starting A-MPDU session. The client may not see the EOSP bit, but it will at least be able to poll new frames in another SP. Reported-by: Alesya Shapira Signed-off-by: Emmanuel Grumbach [remove erroneous comment] Signed-off-by: Johannes Berg net/mac80211/tx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4b559ec0bfc3a9f41a127cea6964f38b2b4bb323 Author: Ilan Peer Date: Tue Mar 8 13:35:31 2016 +0200 mac80211: Fix BW upgrade for TDLS peers It is possible that the station is connected to an AP with bandwidth of 80+80MHz or 160MHz. In such cases there is no need to perform an upgrade as the maximal supported bandwidth is 80MHz. In addition, when upgrading and setting center_freq1 and bandwidth to 80MHz also set center_freq2 to 0. Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible" Signed-off-by: Ilan Peer Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/tdls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit facde7f332f91353c7a6d34c9cff6b329cc0c3ab Author: Emmanuel Grumbach Date: Thu Mar 17 16:51:41 2016 +0200 mac80211: don't send deferred frames outside the SP Frames that are sent between ampdu_action(IEEE80211_AMPDU_TX_START) and the move to the HT_AGG_STATE_OPERATIONAL state are buffered. If we try to start an A-MPDU session while the peer is sleeping and polling frames with U-APSD, we may have frames that will be buffered by ieee80211_tx_prep_agg. These frames have IEEE80211_TX_CTL_NO_PS_BUFFER set since they are sent to a sleeping client and possibly IEEE80211_TX_STATUS_EOSP. If the frame is buffered, we need clear these two flags since they will be re-sent after the move to HT_AGG_STATE_OPERATIONAL state which is very likely to happen after the SP ends. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c2d45923e3df43b58bddf80debd8e22edd5077bf Author: Luis de Bethencourt Date: Fri Mar 18 19:23:18 2016 +0000 mac80211: remove description of dropped member Commit 976bd9efdae6 ("mac80211: move beacon_loss_count into ifmgd") removed the member from the sta_info struct but the description stayed lingering. Remove it. Signed-off-by: Luis de Bethencourt Signed-off-by: Johannes Berg net/mac80211/sta_info.h | 1 - 1 file changed, 1 deletion(-) commit 84ea3a18c06c7ae94b76f763c462bf1e0ce4dc79 Author: Luis de Bethencourt Date: Fri Mar 18 16:09:29 2016 +0000 mac80211: add doc for RX_FLAG_DUP_VALIDATED flag Add documentation for the flag for duplication check. Fixes the following warning when running make htmldocs: warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 'mac80211_rx_flags' Signed-off-by: Luis de Bethencourt [fix description] Signed-off-by: Johannes Berg include/net/mac80211.h | 2 ++ 1 file changed, 2 insertions(+) commit b6bf8c688e07c056f3059d870f6db44777259fe7 Author: Ben Greear Date: Fri Apr 1 14:13:31 2016 -0700 mac80211: ensure no limits on station rhashtable By default, the rhashtable logic will fail to insert objects if the key-chains are too long and un-balanced. In the degenerate case where mac80211 is creating many virtual interfaces connected to the same peer(s), this case can happen. St insecure_elasticity to true to allow chains to grow as long as needed. Signed-off-by: Ben Greear [remove message, change commit message slightly] Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 1 + 1 file changed, 1 insertion(+) commit 62b14b241ca6f790a17ccd9dd9f62ce1b006d406 Author: Johannes Berg Date: Thu Mar 31 17:22:45 2016 +0200 mac80211: properly deal with station hashtable insert errors The original hand-implemented hash-table in mac80211 couldn't result in insertion errors, and while converting to rhashtable I evidently forgot to check the errors. This surfaced now only because Ben is adding many identical keys and that resulted in hidden insertion errors. Cc: stable@vger.kernel.org Fixes: 7bedd0cfad4e1 ("mac80211: use rhashtable for station table") Reported-by: Ben Greear Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit aa507a7bc5ab7513b83fc37ed040b5254737a518 Author: Arik Nemtsov Date: Wed Mar 2 23:28:33 2016 +0200 mac80211: recalc min_def chanctx even when chandef is identical The min_def chanctx is affected not only by the current chandef, but sometimes also by other stations on the vif. There's a valid scenario where a TDLS peer can widen its BW, thereby causing the min_def to increase. Signed-off-by: Arik Nemtsov Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/chan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 59021c675995281d453eee45b3e2e1e3edbc0ec2 Author: Arik Nemtsov Date: Wed Mar 2 23:28:32 2016 +0200 mac80211: TDLS: change BW calculation for WIDER_BW peers The previous approach simply ignored chandef restrictions when calculating the appropriate peer BW for a WIDER_BW peer. This could result in a regulatory violation if both peers indicated 80MHz support, but the regdomain forbade it. Change the approach to setting a WIDER_BW peer's BW. Don't exempt it from the chandef width at first. If during TDLS negotiation the chandef width is upgraded, update the peer's BW to match. Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible") Signed-off-by: Arik Nemtsov Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 4 ++++ net/mac80211/tdls.c | 38 ++++++++++++++++++++++++++++++++------ net/mac80211/vht.c | 30 +++++++++++++++++++++++++----- 3 files changed, 61 insertions(+), 11 deletions(-) commit db8d99774c2682559b7648857697b9b588c6795a Author: Arik Nemtsov Date: Wed Mar 2 23:28:31 2016 +0200 mac80211: TDLS: always downgrade invalid chandefs Even if the current chandef width is equal to the station's max-BW, it doesn't mean it's a valid width for TDLS. Make sure to always check regulatory constraints in these cases. Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible") Signed-off-by: Arik Nemtsov Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/tdls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3732a7b37bca52bdd23aacde001f2038f9cb11a Author: Felix Fietkau Date: Sun Feb 28 15:19:53 2016 +0100 mac80211: fix AP buffered multicast frames with queue control and txq Buffered multicast frames must be passed to the driver directly via drv_tx instead of going through the txq, otherwise they cannot easily be scheduled to be sent after DTIM. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9dbaab56ac09f07a73fe83bf69bec3e31060080a Author: Chris Wilson Date: Mon Mar 14 09:01:57 2016 +0000 drm/i915: Exit cherryview_irq_handler() after one pass This effectively reverts commit 8e5fd599eb219f1054e39b40d18b217af669eea9 Author: Ville Syrjälä Date: Wed Apr 9 13:28:50 2014 +0300 drm/i915/chv: Make CHV irq handler loop until all interrupts are consumed as under continuous execlists load we can saturate the IRQ handler, destablising the tsc clock and triggering the NMI watchdog to declare a hung CPU. [ 552.756051] clocksource: timekeeping watchdog on CPU0: Marking clocksource 'tsc' as unstable because the skew is too large: [ 552.756080] clocksource: 'refined-jiffies' wd_now: 10003b480 wd_last: 10003b28c mask: ffffffff [ 552.756091] clocksource: 'tsc' cs_now: d55d31aa50 cs_last: d17446166c mask: ffffffffffffffff [ 552.756210] clocksource: Switched to clocksource refined-jiffies [ 575.217870] NMI watchdog: Watchdog detected hard LOCKUP on cpu 1 [ 575.217893] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.5.0-rc7+ #18 [ 575.217905] Hardware name: /NUC5CPYB, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 575.217915] 0000000000000000 ffff88027fd05bc0 ffffffff81288c6d 0000000000000000 [ 575.217935] 0000000000000001 ffff88027fd05be0 ffffffff810e72d1 0000000000000000 [ 575.217951] ffff88027fd05c80 ffff88027fd05c20 ffffffff81114b60 0000000181015f1e [ 575.217967] Call Trace: [ 575.217973] [] dump_stack+0x4f/0x72 [ 575.217994] [] watchdog_overflow_callback+0x151/0x160 [ 575.218003] [] __perf_event_overflow+0xa0/0x1e0 [ 575.218016] [] perf_event_overflow+0x14/0x20 [ 575.218028] [] intel_pmu_handle_irq+0x1da/0x460 [ 575.218042] [] ? poll_idle+0x3e/0x70 [ 575.218052] [] ? poll_idle+0x3e/0x70 [ 575.218064] [] perf_event_nmi_handler+0x28/0x50 [ 575.218075] [] nmi_handle+0x60/0x130 [ 575.218086] [] ? poll_idle+0x3e/0x70 [ 575.218096] [] do_nmi+0x140/0x470 [ 575.218108] [] end_repeat_nmi+0x1a/0x1e [ 575.218119] [] ? poll_idle+0x3e/0x70 [ 575.218129] [] ? poll_idle+0x3e/0x70 [ 575.218139] [] ? poll_idle+0x3e/0x70 [ 575.218148] <> [] cpuidle_enter_state+0xf3/0x2f0 [ 575.218164] [] cpuidle_enter+0x17/0x20 [ 575.218175] [] call_cpuidle+0x2a/0x40 [ 575.218185] [] cpu_startup_entry+0x273/0x330 [ 575.218196] [] start_secondary+0x10e/0x130 However, not servicing all available IIR within the handler does hurt the throughput of pathological nop execbuf by about 20%, with a similar effect upon the dispatch latency of a series of execbuf. v2: use do {} while(0) for a smaller patch, and easier to revert again I have reasonable confidence that we do not miss GT interrupts (as execlists provides a stress case with a failure mechanism easily detected by igt), however I have less confidence about all the other sources of interrupts and worry that may lose a display hotplug interrupt, for example. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93467 Testcase: igt/gem_exec_nop/basic # requires NMI watchdog Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Antti Koskipää Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1457946117-6714-1-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit 579de73b048a0a4c66c25a033ac76a2836e0cf73) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e8817b7f603464369b3f70895946254bf62ba8e Author: Lyude Date: Fri Mar 11 10:57:01 2016 -0500 drm/i915: Call intel_dp_mst_resume() before resuming displays Since we need MST devices ready before we try to resume displays, calling this after intel_display_resume() can result in some issues with various laptop docks where the monitor won't turn back on after suspending the system. This order was originally changed in commit e7d6f7d70829 ("drm/i915: resume MST after reading back hw state") In order to fix some unclaimed register errors, however the actual cause of those has since been fixed. CC: stable@vger.kernel.org Signed-off-by: Lyude [danvet: Resolve conflicts with locking changes.] Signed-off-by: Daniel Vetter (cherry picked from commit a16b7658f4e0d4aec9bc3e75a5f0cc3f7a3a0422) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e60290dbafdf577766e5fc5f2fdb3be450cf9a6 Author: Lyude Date: Wed Mar 16 15:18:04 2016 -0400 drm/i915: Fix race condition in intel_dp_destroy_mst_connector() After unplugging a DP MST display from the system, we have to go through and destroy all of the DRM connectors associated with it since none of them are valid anymore. Unfortunately, intel_dp_destroy_mst_connector() doesn't do a good enough job of ensuring that throughout the destruction process that no modesettings can be done with the connectors. As it is right now, intel_dp_destroy_mst_connector() works like this: * Take all modeset locks * Clear the configuration of the crtc on the connector, if there is one * Drop all modeset locks, this is required because of circular dependency issues that arise with trying to remove the connector from sysfs with modeset locks held * Unregister the connector * Take all modeset locks, again * Do the rest of the required cleaning for destroying the connector * Finally drop all modeset locks for good This only works sometimes. During the destruction process, it's very possible that a userspace application will attempt to do a modesetting using the connector. When we drop the modeset locks, an ioctl handler such as drm_mode_setcrtc has the oppurtunity to take all of the modeset locks from us. When this happens, one thing leads to another and eventually we end up committing a mode with the non-existent connector: [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to enable link training [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f [drm:intel_dp_start_link_train [i915]] *ERROR* failed to start channel equalization [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f [drm:intel_mst_pre_enable_dp [i915]] *ERROR* failed to allocate vcpi And in some cases, such as with the T460s using an MST dock, this results in breaking modesetting and/or panicking the system. To work around this, we now unregister the connector at the very beginning of intel_dp_destroy_mst_connector(), grab all the modesetting locks, and then hold them until we finish the rest of the function. CC: stable@vger.kernel.org Signed-off-by: Lyude Signed-off-by: Rob Clark Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1458155884-13877-1-git-send-email-cpaul@redhat.com (cherry picked from commit 1f7717552ef1306be3b7ed28c66c6eff550e3a23) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp_mst.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f3a32d74ef733e1ed1a0b804c17ec27081e0ff37 Author: Paul Parsons Date: Sat Mar 26 13:18:38 2016 +0000 drm/edid: Fix parsing of EDID 1.4 Established Timings III descriptor The EDID 1.4 specification section 3.10.3.9 defines an Established Timings III descriptor (tag #F7h). The parsing of this descriptor by drm_est3_modes() is off by one byte: the offset of the first timing bitmap is 6, not 5. Signed-off-by: Paul Parsons Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160328002258.E75DF6E35D@gabe.freedesktop.org drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87707cfdc387681dc702f00dfcffc26ca0bc5f71 Author: Paul Parsons Date: Sat Apr 2 11:08:06 2016 +0100 drm/edid: Fix EDID Established Timings I and II Three of the VESA DMT timings in edid_est_modes[] are slightly off. 1. 640x480@72Hz vsync_end should be 492, not 491. 2. 640x480@60Hz clock should be 25175, not 25200. 3. 1024x768@75Hz clock should be 78750, not 78800. This patch corrects those timings per the VESA DMT specification, and thus brings them into line with the identical timings in drm_dmt_modes[]. Signed-off-by: Paul Parsons Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20160402100817.B60776E23A@gabe.freedesktop.org drivers/gpu/drm/drm_edid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8fd2910e31155d8562180cc8580bc27e3be4f4bf Author: Krzysztof Kozlowski Date: Sun Apr 3 12:23:07 2016 +0900 PM / runtime: Document steps for device removal Put a reminder that during device removal drivers should revert all PM runtime changes from the probe. Signed-off-by: Krzysztof Kozlowski Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki Documentation/power/runtime_pm.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 462d8083fb2da951ad6edb9e8000c1f2578d27a9 Author: Srinivas Pandruvada Date: Sat Mar 26 05:03:38 2016 -0700 powercap: intel_rapl: Add missing Haswell model Added missing model 0x46. Tested-and-reported-by: Piotr Maksymiuk Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+) commit b318556479cc923970a79d6c2311138581c0db83 Author: Viresh Kumar Date: Thu Mar 24 09:51:57 2016 +0530 cpufreq: dt: Drop stale comment The comment in file header doesn't hold true anymore, drop it. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 3 --- 1 file changed, 3 deletions(-) commit 13ad7701f9d0ab7806eb91f1fe1ca43d41b31fa2 Author: Srinivas Pandruvada Date: Sun Apr 3 13:06:46 2016 -0700 cpufreq: intel_pstate: Documenation for structures No code change. Only added kernel doc style comments for structures. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 135 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) commit 30a3915385f124a6e3c81df4070f531d4f84299b Author: Srinivas Pandruvada Date: Sun Apr 3 19:42:11 2016 -0700 cpufreq: intel_pstate: fix inconsistency in setting policy limits When user sets performance policy using cpufreq interface, it is possible that because of policy->max limits, the actual performance is still limited. But the current implementation will silently switch the policy to powersave and start using powersave limits. If user modifies any limits using intel_pstate sysfs, this is actually changing powersave limits. The current implementation tracks limits under powersave and performance policy using two different variables. When policy->max is less than policy->cpuinfo.max_freq, only powersave limit variable is used. This fix causes the performance limits variable to be used always when the policy is performance. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 1e1e5ce78ff0fb2b1b9296894883c82de29057d0 Merge: c3b1feb 505ce68 Author: Linus Torvalds Date: Mon Apr 4 16:56:49 2016 -0700 Merge tag 'linux-kselftest-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "This update for Kselftest contains seccomp fixes" * tag 'linux-kselftest-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftest/seccomp: Fix the seccomp(2) signature selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC commit c3b1feb024d1a3997a3e689711283c38bb05075e Merge: 93e2aea 3d50a7f Author: Linus Torvalds Date: Mon Apr 4 16:53:26 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "This is the first round of MIPS fixes for 4.6: - Fix spelling mistakes all over arch/mips - Provide __bswapsi2 so XZ kernel compression will build with older GCC - ATH79 clock fixes. - Fix clock-rated copy-paste erros in ATH79 DTS. - Fix gisb-arb compatible string for 7435 BMIPS - Enable NAND and UBIFS support in CI20. - Fix BUG() assertion caused by inapropriate smp_processor_id() use. - Fix exception handling issues for the sake of debuggers - Fix the last remaining instance of irq_to_gpio in the db1xxx_ss PCMCIA code - Fix MSA unaligned load failures - Panic if kernel is configured for a not TLB-supported page size - Bail out on unsupported relocs in modules. - Partial fix for Qemu breakage after recent IPI rewrite - Wire up the preadv2 and pwrite2 syscalls - Fix the ar724x clock calculation" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation MIPS: BMIPS: Fix gisb-arb compatible string for 7435 MIPS: Bail on unsupported module relocs MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name MIPS: ath79: Fix the ar913x reference clock rate MIPS: ath79: Fix the ar724x clock calculation dt-bindings: clock: qca,ath79-pll: fix copy-paste typos MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp' FIRMWARE: Broadcom: Fix grammar of warning messages in bcm47xx_sprom.c. MIPS: ci20: Enable NAND and UBIFS support in defconfig. MIPS: Fix misspellings in comments. MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE MIPS: zboot: Remove copied source files on clean MIPS: zboot: Fix the build with XZ compression on older GCC versions MIPS: Wire up preadv2 and pwrite2 syscalls. MIPS: cpu_name_string: Use raw_smp_processor_id(). pcmcia: db1xxx_ss: fix last irq_to_gpio user MIPS: Fix MSA ld unaligned failure cases MIPS: Fix broken malta qemu commit 93e2aeaca520743d66ec66b757db3a3e27936e91 Merge: e865f49 101ecde Author: Linus Torvalds Date: Mon Apr 4 16:38:36 2016 -0700 Merge tag 'for-linus-4.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from David Vrabel: "Regression and bug fixes for 4.6-rc2: - safely migrate event channels between CPUs - fix CPU hotplug - maintainer changes" * tag 'for-linus-4.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: MAINTAINERS: xen: Konrad to step down and Juergen to pick up xen/events: Mask a moving irq Xen on ARM and ARM64: update MAINTAINERS info xen/x86: Call cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead() xen/apic: Provide Xen-specific version of cpu_present_to_apicid APIC op commit 9162823145208b3ce1b9531639e4641d5d22bd3f Author: Rex Zhu Date: Mon Apr 4 16:38:55 2016 +0800 drm/amd/powerplay: add uvd/vce dpm enabling flag default. These should be set by default otherwise the UVD/VCE performance won't be optimal. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 3 +++ 1 file changed, 3 insertions(+) commit 0168f78fe19727d04f1b5468dcbd9f9c68099496 Author: Rex Zhu Date: Mon Apr 4 15:57:10 2016 +0800 drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d23be4e34c2bcbcb37cba10bf0f2b9f5c23ac90e Author: Leo Liu Date: Mon Apr 4 10:55:43 2016 -0400 drm/amdgpu: save and restore the firwmware cache part when suspend resume Signed-off-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 3f99dd814a6fdf9e06562f210b8e7702db9e9158 Author: Leo Liu Date: Fri Apr 1 10:36:06 2016 -0400 drm/amdgpu: save and restore UVD context with suspend and resume and revert fix following it accordingly Revert "drm/amdgpu: stop trying to suspend UVD sessions v2" Revert "drm/amdgpu: fix the UVD suspend sequence order" Signed-off-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 45 +++++++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 +-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +-- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 7 ++--- 5 files changed, 35 insertions(+), 26 deletions(-) commit 749b48faaf64d1081d7216068ff3da92c230bad0 Author: Alex Deucher Date: Fri Apr 1 10:12:49 2016 -0400 drm/ttm: use phys_addr_t for ttm_bus_placement Fixes ttm on platforms like PPC460 where the CPU is in 32-bit mode, but the physical addresses are >32 bits. Extracted from a patch by Hans Verkuil. Tested-by: Julian Margetson Acked-by: Thomas Hellstrom Reviewed-by: Christian König Cc: Thomas Hellstrom Cc: Julian Margetson Cc: Hans Verkuil Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53c43c5ca13328ac8f415aa2251791b441a12b51 Author: Greg Kroah-Hartman Date: Mon Apr 4 13:52:35 2016 -0700 Revert "Staging: olpc_dcon: Remove obsolete driver" This reverts commit 82ef33af9dd30075adbd9f3dd161b606b8ba88ac. It turns out these machines are still out there, and the original patch broke them. So revert it, adding back the driver, so people's machines still work properly. Reported-by: James Cameron Cc: Shraddha Barke Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 8 + drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/olpc_dcon/Kconfig | 35 ++ drivers/staging/olpc_dcon/Makefile | 6 + drivers/staging/olpc_dcon/TODO | 9 + drivers/staging/olpc_dcon/olpc_dcon.c | 813 +++++++++++++++++++++++++++ drivers/staging/olpc_dcon/olpc_dcon.h | 111 ++++ drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 205 +++++++ drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 161 ++++++ 10 files changed, 1351 insertions(+) commit 6d79b6c761dd76b947505340adb07c8b90296a9e Author: Markus Böhme Date: Fri Apr 1 01:04:05 2016 +0200 staging/rdma/hfi1: select CRC32 The function parse_platform_config in firmware.c calls crc32_le. Building without CRC32 selected causes a link error: drivers/built-in.o: In function `parse_platform_config': (.text+0x92ffa): undefined reference to `crc32_le' Signed-off-by: Markus Böhme Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5a269ca9a6022b6fa19e68e92b38495844337abc Merge: a34d5df b475c59 Author: Greg Kroah-Hartman Date: Mon Apr 4 13:45:10 2016 -0700 Merge tag 'iio-fixes-for-4.6b' 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.6 cycle. This lot are either dependent on patches from the merge window or just came in recently enough that they ended up in this tree. * core - The watermark for the buffers was given a value that meant that it was impossible to actually set the watermark to anything sensible. * at91_adc - Fix a build config dependency on HAS_IOMEM * bmc150 - Fix wrong output on big endian systems * bmg160 - Fix wrong output on big endian systems - Fix an issue in which the regmap return value was stored to the buffer rather than the value actually being read in a bulk read. * inv_mpu6050 - Fix an indirect build config dependency on HAS_IOMEM * max30100 - Fix an error in fifo check condition that leads to a double read of the final reading. * st_magn - Make sure ST_MAGN_TRIGGER_SET_STATE is always defined to avoid a build error for relatively obscure config combinations. commit e865f4965ff636cf18c9bed52dba44899ff63594 Merge: c7e82c6 8f9e8f5 Author: Linus Torvalds Date: Mon Apr 4 13:18:27 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota fixes from Jan Kara: "Fixes for oopses when the new quotactl gets used with quotas disabled" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ocfs2: Fix Q_GETNEXTQUOTA for filesystem without quotas quota: Handle Q_GETNEXTQUOTA when quota is disabled commit c862cc9b70526a71d07e7bd86d9b61d1c792cead Author: Bastien Philbert Date: Sun Apr 3 19:04:26 2016 -0400 bridge: Fix incorrect variable assignment on error path in br_sysfs_addbr This fixes the incorrect variable assignment on error path in br_sysfs_addbr for when the call to kobject_create_and_add fails to assign the value of -EINVAL to the returned variable of err rather then incorrectly return zero making callers think this function has succeededed due to the previous assignment being assigned zero when assigning it the successful return value of the call to sysfs_create_group which is zero. Signed-off-by: Bastien Philbert Signed-off-by: David S. Miller net/bridge/br_sysfs_br.c | 1 + 1 file changed, 1 insertion(+) commit c7e82c648598b6fc8aa65b4bb99b55b6dd23faad Merge: 166c5a6 b2dde6f Author: Linus Torvalds Date: Mon Apr 4 13:00:39 2016 -0700 Merge tag 'f2fs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim. * tag 'f2fs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: retrieve IO write stat from the right place f2fs crypto: fix corrupted symlink in encrypted case f2fs: cover large section in sanity check of super commit be447f305494e019dfc37ea4cdf3b0e4200b4eba Author: Haishuang Yan Date: Sun Apr 3 22:09:24 2016 +0800 ipv6: l2tp: fix a potential issue in l2tp_ip6_recv pskb_may_pull() can change skb->data, so we have to load ptr/optr at the right place. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/l2tp/l2tp_ip6.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5745b8232e942abd5e16e85fa9b27cc21324acf0 Author: Haishuang Yan Date: Sun Apr 3 22:09:23 2016 +0800 ipv4: l2tp: fix a potential issue in l2tp_ip_recv pskb_may_pull() can change skb->data, so we have to load ptr/optr at the right place. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/l2tp/l2tp_ip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a34d5df85ebb8317592360b1611354f8b9853e55 Merge: f55532a 655048a Author: Greg Kroah-Hartman Date: Mon Apr 4 12:59:48 2016 -0700 Merge tag 'iio-fixes-for-4.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into usb-linus Jonathan writes: First round of IIO fixes for the 4.6 cycle. Again I've ended up with two early fix sets, depending on whether they are dependent on elements of the merge window or simply came in after I had patches with that dependency already, vs older fixes that were just too late for the last cycle. This first set is for the older ones. - max1353 * Add a missing adc to max1363_id - the driver has supported the max11644-11647 for a while, but as they weren't in the id table there was no way of actually initializing it. * Fix a wrong reference voltage for the above models. Given you couldn't initialize the driver for these parts without patching, no one noticed that the reference voltage used in computing the scaling was wrong. - apds9960 * The fifo last enelement was read twice (and hence pushed out twice) due to a small logic bug. commit 166c5a6ef765653848161e6f4af81c05e4b3ecf6 Author: Linus Torvalds Date: Mon Apr 4 12:38:46 2016 -0700 gma500: remove annoying deprecation warning In commit e45708976aea ("drm/dp-helper: Move the legacy helpers to gma500") the legacy i2c helpers were moved to the only remaining user of them, the gma500 driver. Together with that move, i2c_dp_aux_add_bus() was marked deprecated and started warning about its remaining use. It's now been a year and a half of annoying warning, and apparently nobody cares enough about gma500 to try to move it along to the more modern models. Get rid of the warning - if even the gma500 people don't care enough, then they should certainly not spam other innocent developers with a warning that might hide other, much more real issues. Cc: Daniel Vetter Cc: Alan Cox Signed-off-by: Linus Torvalds drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a2d057e4fc4f9ebd32351837c14c10a0773b956 Merge: 9735a22 1fa64f1 Author: Linus Torvalds Date: Mon Apr 4 10:50:24 2016 -0700 Merge branch 'PAGE_CACHE_SIZE-removal' Merge PAGE_CACHE_SIZE removal patches from Kirill Shutemov: "PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. Let's stop pretending that pages in page cache are special. They are not. The first patch with most changes has been done with coccinelle. The second is manual fixups on top. The third patch removes macros definition" [ I was planning to apply this just before rc2, but then I spaced out, so here it is right _after_ rc2 instead. As Kirill suggested as a possibility, I could have decided to only merge the first two patches, and leave the old interfaces for compatibility, but I'd rather get it all done and any out-of-tree modules and patches can trivially do the converstion while still also working with older kernels, so there is little reason to try to maintain the redundant legacy model. - Linus ] * PAGE_CACHE_SIZE-removal: mm: drop PAGE_CACHE_* and page_cache_{get,release} definition mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros commit 1fa64f198b9f8d6ec0f7aec7c18dc94684391140 Author: Kirill A. Shutemov Date: Fri Apr 1 15:29:49 2016 +0300 mm: drop PAGE_CACHE_* and page_cache_{get,release} definition All users gone. We can remove these macros. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds include/linux/pagemap.h | 15 --------------- 1 file changed, 15 deletions(-) commit ea1754a084760e68886f5b725c8eaada9cc57155 Author: Kirill A. Shutemov Date: Fri Apr 1 15:29:48 2016 +0300 mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage Mostly direct substitution with occasional adjustment or removing outdated comments. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds Documentation/filesystems/cramfs.txt | 2 +- Documentation/filesystems/tmpfs.txt | 2 +- Documentation/filesystems/vfs.txt | 4 ++-- arch/parisc/mm/init.c | 2 +- block/bio.c | 4 ++-- drivers/block/drbd/drbd_int.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 4 ++-- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- .../lustre/lustre/include/lustre/lustre_idl.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre_net.h | 4 ++-- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/llite/dir.c | 5 ++--- drivers/staging/lustre/lustre/llite/rw.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +++---- .../lustre/lustre/obdclass/linux/linux-obdo.c | 1 - drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- fs/btrfs/check-integrity.c | 4 ++-- fs/btrfs/extent_io.c | 8 +++---- fs/btrfs/struct-funcs.c | 4 ++-- fs/btrfs/tests/extent-io-tests.c | 2 +- fs/cifs/cifsglob.h | 4 ++-- fs/cifs/file.c | 2 +- fs/cramfs/README | 26 +++++++++++----------- fs/cramfs/inode.c | 2 +- fs/dax.c | 4 ++-- fs/ecryptfs/inode.c | 4 ++-- fs/ext2/dir.c | 4 ++-- fs/ext4/ext4.h | 4 ++-- fs/ext4/inode.c | 2 +- fs/ext4/mballoc.c | 4 ++-- fs/ext4/readpage.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/mpage.c | 2 +- fs/ntfs/aops.c | 2 +- fs/ntfs/aops.h | 2 +- fs/ntfs/compress.c | 21 +++++------------ fs/ntfs/dir.c | 16 ++++++------- fs/ntfs/file.c | 2 +- fs/ntfs/index.c | 2 +- fs/ntfs/inode.c | 4 ++-- fs/ntfs/super.c | 14 ++++++------ fs/ocfs2/aops.c | 2 +- fs/ocfs2/refcounttree.c | 2 +- fs/reiserfs/journal.c | 2 +- fs/squashfs/cache.c | 4 ++-- fs/squashfs/file.c | 2 +- fs/ubifs/file.c | 2 +- fs/ubifs/super.c | 2 +- fs/xfs/xfs_aops.c | 4 ++-- fs/xfs/xfs_super.c | 4 ++-- include/linux/backing-dev-defs.h | 2 +- include/linux/mm.h | 2 +- include/linux/mm_types.h | 2 +- include/linux/nfs_page.h | 4 ++-- include/linux/nilfs2_fs.h | 4 ++-- include/linux/pagemap.h | 3 +-- include/linux/sunrpc/svc.h | 2 +- include/linux/swap.h | 2 +- mm/gup.c | 2 +- mm/memory.c | 1 - mm/mincore.c | 4 ++-- mm/swap.c | 2 +- net/sunrpc/xdr.c | 2 +- 65 files changed, 120 insertions(+), 135 deletions(-) commit 09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a Author: Kirill A. Shutemov Date: Fri Apr 1 15:29:47 2016 +0300 mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. We have many places where PAGE_CACHE_SIZE assumed to be equal to PAGE_SIZE. And it's constant source of confusion on whether PAGE_CACHE_* or PAGE_* constant should be used in a particular case, especially on the border between fs and mm. Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much breakage to be doable. Let's stop pretending that pages in page cache are special. They are not. The changes are pretty straight-forward: - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ; - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ; - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN}; - page_cache_get() -> get_page(); - page_cache_release() -> put_page(); This patch contains automated changes generated with coccinelle using script below. For some reason, coccinelle doesn't patch header files. I've called spatch for them manually. The only adjustment after coccinelle is revert of changes to PAGE_CAHCE_ALIGN definition: we are going to drop it later. There are few places in the code where coccinelle didn't reach. I'll fix them manually in a separate patch. Comments and documentation also will be addressed with the separate patch. virtual patch @@ expression E; @@ - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ expression E; @@ - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ @@ - PAGE_CACHE_SHIFT + PAGE_SHIFT @@ @@ - PAGE_CACHE_SIZE + PAGE_SIZE @@ @@ - PAGE_CACHE_MASK + PAGE_MASK @@ expression E; @@ - PAGE_CACHE_ALIGN(E) + PAGE_ALIGN(E) @@ expression E; @@ - page_cache_get(E) + get_page(E) @@ expression E; @@ - page_cache_release(E) + put_page(E) Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Linus Torvalds arch/arc/mm/cache.c | 2 +- arch/arm/mm/flush.c | 4 +- arch/parisc/kernel/cache.c | 2 +- arch/powerpc/platforms/cell/spufs/inode.c | 4 +- arch/s390/hypfs/inode.c | 4 +- block/bio.c | 8 +- block/blk-core.c | 2 +- block/blk-settings.c | 12 +- block/blk-sysfs.c | 8 +- block/cfq-iosched.c | 2 +- block/compat_ioctl.c | 4 +- block/ioctl.c | 4 +- block/partition-generic.c | 8 +- drivers/block/aoe/aoeblk.c | 2 +- drivers/block/brd.c | 2 +- drivers/block/drbd/drbd_nl.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 4 +- drivers/gpu/drm/drm_gem.c | 4 +- drivers/gpu/drm/i915/i915_gem.c | 8 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- drivers/gpu/drm/ttm/ttm_tt.c | 4 +- drivers/gpu/drm/via/via_dmablit.c | 2 +- drivers/md/bitmap.c | 2 +- drivers/media/v4l2-core/videobuf-dma-sg.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 4 +- drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 +- drivers/mmc/core/host.c | 6 +- drivers/mmc/host/sh_mmcif.c | 2 +- drivers/mmc/host/tmio_mmc_dma.c | 4 +- drivers/mmc/host/tmio_mmc_pio.c | 2 +- drivers/mmc/host/usdhi6rol0.c | 2 +- drivers/mtd/devices/block2mtd.c | 6 +- drivers/mtd/nand/nandsim.c | 6 +- drivers/nvdimm/btt.c | 2 +- drivers/nvdimm/pmem.c | 2 +- drivers/oprofile/oprofilefs.c | 4 +- drivers/scsi/sd.c | 2 +- drivers/scsi/st.c | 4 +- .../lustre/include/linux/libcfs/libcfs_private.h | 2 +- .../lustre/include/linux/libcfs/linux/linux-mem.h | 4 +- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 2 +- drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.c | 16 +- drivers/staging/lustre/lnet/libcfs/tracefile.h | 6 +- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 6 +- drivers/staging/lustre/lnet/lnet/lib-socket.c | 4 +- drivers/staging/lustre/lnet/lnet/router.c | 6 +- drivers/staging/lustre/lnet/selftest/brw_test.c | 20 +- drivers/staging/lustre/lnet/selftest/conctl.c | 4 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 10 +- drivers/staging/lustre/lnet/selftest/framework.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- .../lustre/include/linux/lustre_patchless_compat.h | 2 +- .../lustre/lustre/include/lustre/lustre_idl.h | 2 +- drivers/staging/lustre/lustre/include/lustre_mdc.h | 4 +- drivers/staging/lustre/lustre/include/lustre_net.h | 6 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 12 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/llite/dir.c | 18 +- .../staging/lustre/lustre/llite/llite_internal.h | 8 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 8 +- drivers/staging/lustre/lustre/llite/lloop.c | 12 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 18 +- drivers/staging/lustre/lustre/llite/rw.c | 22 +- drivers/staging/lustre/lustre/llite/rw26.c | 28 +-- drivers/staging/lustre/lustre/llite/vvp_io.c | 8 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 8 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 22 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 6 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 +- .../lustre/lustre/obdclass/linux/linux-obdo.c | 4 +- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 6 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +- .../staging/lustre/lustre/obdecho/echo_client.c | 30 +-- drivers/staging/lustre/lustre/osc/lproc_osc.c | 16 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 42 ++-- drivers/staging/lustre/lustre/osc/osc_page.c | 6 +- drivers/staging/lustre/lustre/osc/osc_request.c | 26 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/recover.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/usb/gadget/function/f_fs.c | 4 +- drivers/usb/gadget/legacy/inode.c | 4 +- drivers/usb/storage/scsiglue.c | 2 +- drivers/video/fbdev/pvr2fb.c | 2 +- fs/9p/vfs_addr.c | 18 +- fs/9p/vfs_file.c | 4 +- fs/9p/vfs_super.c | 2 +- fs/affs/file.c | 26 +- fs/afs/dir.c | 2 +- fs/afs/file.c | 4 +- fs/afs/mntpt.c | 6 +- fs/afs/super.c | 4 +- fs/afs/write.c | 26 +- fs/binfmt_elf.c | 2 +- fs/binfmt_elf_fdpic.c | 2 +- fs/block_dev.c | 4 +- fs/btrfs/check-integrity.c | 60 ++--- fs/btrfs/compression.c | 84 +++---- fs/btrfs/disk-io.c | 14 +- fs/btrfs/extent-tree.c | 4 +- fs/btrfs/extent_io.c | 262 ++++++++++----------- fs/btrfs/extent_io.h | 6 +- fs/btrfs/file-item.c | 4 +- fs/btrfs/file.c | 40 ++-- fs/btrfs/free-space-cache.c | 30 +-- fs/btrfs/inode-map.c | 10 +- fs/btrfs/inode.c | 104 ++++---- fs/btrfs/ioctl.c | 84 +++---- fs/btrfs/lzo.c | 32 +-- fs/btrfs/raid56.c | 28 +-- fs/btrfs/reada.c | 30 +-- fs/btrfs/relocation.c | 16 +- fs/btrfs/scrub.c | 24 +- fs/btrfs/send.c | 16 +- fs/btrfs/tests/extent-io-tests.c | 42 ++-- fs/btrfs/tests/free-space-tests.c | 2 +- fs/btrfs/volumes.c | 14 +- fs/btrfs/zlib.c | 38 +-- fs/buffer.c | 100 ++++---- fs/cachefiles/rdwr.c | 38 +-- fs/ceph/addr.c | 114 ++++----- fs/ceph/caps.c | 2 +- fs/ceph/dir.c | 4 +- fs/ceph/file.c | 32 +-- fs/ceph/inode.c | 6 +- fs/ceph/mds_client.c | 2 +- fs/ceph/mds_client.h | 2 +- fs/ceph/super.c | 8 +- fs/cifs/cifsfs.c | 2 +- fs/cifs/cifssmb.c | 16 +- fs/cifs/connect.c | 2 +- fs/cifs/file.c | 94 ++++---- fs/cifs/inode.c | 10 +- fs/configfs/mount.c | 4 +- fs/cramfs/inode.c | 30 +-- fs/crypto/crypto.c | 8 +- fs/dax.c | 30 +-- fs/direct-io.c | 26 +- fs/dlm/lowcomms.c | 8 +- fs/ecryptfs/crypto.c | 22 +- fs/ecryptfs/inode.c | 4 +- fs/ecryptfs/keystore.c | 2 +- fs/ecryptfs/main.c | 8 +- fs/ecryptfs/mmap.c | 44 ++-- fs/ecryptfs/read_write.c | 14 +- fs/efivarfs/super.c | 4 +- fs/exofs/dir.c | 30 +-- fs/exofs/inode.c | 34 +-- fs/exofs/namei.c | 4 +- fs/ext2/dir.c | 32 +-- fs/ext2/namei.c | 6 +- fs/ext4/crypto.c | 8 +- fs/ext4/dir.c | 4 +- fs/ext4/file.c | 4 +- fs/ext4/inline.c | 18 +- fs/ext4/inode.c | 116 ++++----- fs/ext4/mballoc.c | 36 +-- fs/ext4/move_extent.c | 16 +- fs/ext4/page-io.c | 4 +- fs/ext4/readpage.c | 10 +- fs/ext4/super.c | 4 +- fs/ext4/symlink.c | 4 +- fs/f2fs/data.c | 52 ++-- fs/f2fs/debug.c | 6 +- fs/f2fs/dir.c | 4 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 74 +++--- fs/f2fs/inline.c | 10 +- fs/f2fs/namei.c | 4 +- fs/f2fs/node.c | 10 +- fs/f2fs/recovery.c | 2 +- fs/f2fs/segment.c | 16 +- fs/f2fs/super.c | 4 +- fs/freevxfs/vxfs_immed.c | 4 +- fs/freevxfs/vxfs_lookup.c | 12 +- fs/freevxfs/vxfs_subr.c | 2 +- fs/fs-writeback.c | 2 +- fs/fscache/page.c | 10 +- fs/fuse/dev.c | 26 +- fs/fuse/file.c | 72 +++--- fs/fuse/inode.c | 16 +- fs/gfs2/aops.c | 44 ++-- fs/gfs2/bmap.c | 12 +- fs/gfs2/file.c | 16 +- fs/gfs2/meta_io.c | 4 +- fs/gfs2/quota.c | 14 +- fs/gfs2/rgrp.c | 5 +- fs/hfs/bnode.c | 12 +- fs/hfs/btree.c | 20 +- fs/hfs/inode.c | 8 +- fs/hfsplus/bitmap.c | 2 +- fs/hfsplus/bnode.c | 90 +++---- fs/hfsplus/btree.c | 22 +- fs/hfsplus/inode.c | 8 +- fs/hfsplus/super.c | 2 +- fs/hfsplus/xattr.c | 6 +- fs/hostfs/hostfs_kern.c | 18 +- fs/hugetlbfs/inode.c | 8 +- fs/isofs/compress.c | 36 +-- fs/isofs/inode.c | 2 +- fs/jbd2/commit.c | 4 +- fs/jbd2/journal.c | 2 +- fs/jbd2/transaction.c | 4 +- fs/jffs2/debug.c | 8 +- fs/jffs2/file.c | 23 +- fs/jffs2/fs.c | 8 +- fs/jffs2/gc.c | 8 +- fs/jffs2/nodelist.c | 8 +- fs/jffs2/write.c | 7 +- fs/jfs/jfs_metapage.c | 42 ++-- fs/jfs/jfs_metapage.h | 4 +- fs/jfs/super.c | 2 +- fs/kernfs/mount.c | 4 +- fs/libfs.c | 24 +- fs/logfs/dev_bdev.c | 2 +- fs/logfs/dev_mtd.c | 10 +- fs/logfs/dir.c | 12 +- fs/logfs/file.c | 26 +- fs/logfs/readwrite.c | 20 +- fs/logfs/segment.c | 28 +-- fs/logfs/super.c | 16 +- fs/minix/dir.c | 18 +- fs/minix/namei.c | 4 +- fs/mpage.c | 20 +- fs/ncpfs/dir.c | 10 +- fs/ncpfs/ncplib_kernel.h | 2 +- fs/nfs/blocklayout/blocklayout.c | 24 +- fs/nfs/blocklayout/blocklayout.h | 4 +- fs/nfs/client.c | 8 +- fs/nfs/dir.c | 4 +- fs/nfs/direct.c | 8 +- fs/nfs/file.c | 20 +- fs/nfs/internal.h | 6 +- fs/nfs/nfs4xdr.c | 2 +- fs/nfs/objlayout/objio_osd.c | 2 +- fs/nfs/pagelist.c | 6 +- fs/nfs/pnfs.c | 6 +- fs/nfs/read.c | 16 +- fs/nfs/write.c | 4 +- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/btnode.c | 10 +- fs/nilfs2/dir.c | 32 +-- fs/nilfs2/gcinode.c | 2 +- fs/nilfs2/inode.c | 4 +- fs/nilfs2/mdt.c | 14 +- fs/nilfs2/namei.c | 4 +- fs/nilfs2/page.c | 18 +- fs/nilfs2/recovery.c | 4 +- fs/nilfs2/segment.c | 2 +- fs/ntfs/aops.c | 48 ++-- fs/ntfs/aops.h | 2 +- fs/ntfs/attrib.c | 28 +-- fs/ntfs/bitmap.c | 10 +- fs/ntfs/compress.c | 56 ++--- fs/ntfs/dir.c | 40 ++-- fs/ntfs/file.c | 54 ++--- fs/ntfs/index.c | 12 +- fs/ntfs/inode.c | 8 +- fs/ntfs/lcnalloc.c | 6 +- fs/ntfs/logfile.c | 16 +- fs/ntfs/mft.c | 34 +-- fs/ntfs/ntfs.h | 2 +- fs/ntfs/super.c | 58 ++--- fs/ocfs2/alloc.c | 28 +-- fs/ocfs2/aops.c | 48 ++-- fs/ocfs2/cluster/heartbeat.c | 10 +- fs/ocfs2/dlmfs/dlmfs.c | 4 +- fs/ocfs2/file.c | 14 +- fs/ocfs2/mmap.c | 6 +- fs/ocfs2/ocfs2.h | 20 +- fs/ocfs2/refcounttree.c | 22 +- fs/ocfs2/super.c | 4 +- fs/orangefs/inode.c | 10 +- fs/orangefs/orangefs-bufmap.c | 4 +- fs/orangefs/orangefs-utils.c | 2 +- fs/pipe.c | 6 +- fs/proc/task_mmu.c | 2 +- fs/proc/vmcore.c | 4 +- fs/pstore/inode.c | 4 +- fs/qnx6/dir.c | 16 +- fs/qnx6/inode.c | 4 +- fs/qnx6/qnx6.h | 2 +- fs/ramfs/inode.c | 4 +- fs/reiserfs/file.c | 4 +- fs/reiserfs/inode.c | 44 ++-- fs/reiserfs/ioctl.c | 4 +- fs/reiserfs/journal.c | 4 +- fs/reiserfs/stree.c | 4 +- fs/reiserfs/tail_conversion.c | 4 +- fs/reiserfs/xattr.c | 18 +- fs/splice.c | 32 +-- fs/squashfs/block.c | 4 +- fs/squashfs/cache.c | 14 +- fs/squashfs/decompressor.c | 2 +- fs/squashfs/file.c | 22 +- fs/squashfs/file_direct.c | 22 +- fs/squashfs/lz4_wrapper.c | 8 +- fs/squashfs/lzo_wrapper.c | 8 +- fs/squashfs/page_actor.c | 4 +- fs/squashfs/page_actor.h | 2 +- fs/squashfs/super.c | 2 +- fs/squashfs/symlink.c | 6 +- fs/squashfs/xz_wrapper.c | 4 +- fs/squashfs/zlib_wrapper.c | 4 +- fs/sync.c | 4 +- fs/sysv/dir.c | 18 +- fs/sysv/namei.c | 4 +- fs/ubifs/file.c | 52 ++-- fs/ubifs/super.c | 4 +- fs/ubifs/ubifs.h | 4 +- fs/udf/file.c | 6 +- fs/udf/inode.c | 4 +- fs/ufs/balloc.c | 6 +- fs/ufs/dir.c | 32 +-- fs/ufs/inode.c | 4 +- fs/ufs/namei.c | 6 +- fs/ufs/util.c | 4 +- fs/ufs/util.h | 2 +- fs/xfs/libxfs/xfs_bmap.c | 4 +- fs/xfs/xfs_aops.c | 18 +- fs/xfs/xfs_bmap_util.c | 4 +- fs/xfs/xfs_file.c | 12 +- fs/xfs/xfs_linux.h | 2 +- fs/xfs/xfs_mount.c | 2 +- fs/xfs/xfs_mount.h | 4 +- fs/xfs/xfs_pnfs.c | 4 +- fs/xfs/xfs_super.c | 4 +- include/linux/bio.h | 2 +- include/linux/blkdev.h | 2 +- include/linux/buffer_head.h | 4 +- include/linux/ceph/libceph.h | 4 +- include/linux/f2fs_fs.h | 4 +- include/linux/fs.h | 4 +- include/linux/nfs_page.h | 2 +- include/linux/pagemap.h | 14 +- include/linux/swap.h | 2 +- ipc/mqueue.c | 4 +- kernel/events/uprobes.c | 8 +- mm/fadvise.c | 8 +- mm/filemap.c | 126 +++++----- mm/hugetlb.c | 8 +- mm/madvise.c | 6 +- mm/memory-failure.c | 2 +- mm/memory.c | 54 ++--- mm/mincore.c | 4 +- mm/nommu.c | 2 +- mm/page-writeback.c | 12 +- mm/page_io.c | 2 +- mm/readahead.c | 20 +- mm/rmap.c | 2 +- mm/shmem.c | 130 +++++----- mm/swap.c | 12 +- mm/swap_state.c | 12 +- mm/swapfile.c | 12 +- mm/truncate.c | 40 ++-- mm/userfaultfd.c | 4 +- mm/zswap.c | 4 +- net/ceph/messenger.c | 6 +- net/ceph/pagelist.c | 4 +- net/ceph/pagevec.c | 30 +-- net/sunrpc/auth_gss/auth_gss.c | 8 +- net/sunrpc/auth_gss/gss_krb5_crypto.c | 2 +- net/sunrpc/auth_gss/gss_krb5_wrap.c | 4 +- net/sunrpc/cache.c | 4 +- net/sunrpc/rpc_pipe.c | 4 +- net/sunrpc/socklib.c | 6 +- net/sunrpc/xdr.c | 48 ++-- 381 files changed, 2722 insertions(+), 2721 deletions(-) commit cb39f732abbe4f38d2bef8e0a1c8bd5c242fc1b7 Merge: 2b657a5 3525e0a e4c0e06 Author: Mark Brown Date: Mon Apr 4 10:05:49 2016 -0700 Merge remote-tracking branches 'spi/fix/omap2' and 'spi/fix/rockchip' into spi-linus commit 2b657a586a84ed65bb5f5af773140578ce5f15a0 Merge: d7124d6 cd8dd41 Author: Mark Brown Date: Mon Apr 4 10:05:47 2016 -0700 Merge remote-tracking branch 'spi/fix/imx' into spi-linus commit d7124d69a519fdbc52e7bb18f8726872122b2a1e Merge: 9735a22 24c8cd1 Author: Mark Brown Date: Mon Apr 4 10:05:45 2016 -0700 Merge remote-tracking branch 'spi/fix/core' into spi-linus commit 4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab Author: Andy Shevchenko Date: Fri Mar 18 14:26:32 2016 +0200 dmaengine: hsu: correct use of channel status register There is a typo in documentation regarding to descriptor empty bit (DESCE) which is set to 1 when descriptor is empty. Thus, status register at the end of a transfer usually returns all DESCE bits set and thus it will never be zero. Moreover, there are 2 bits (CDESC) that encode current descriptor, on which interrupt has been asserted. In case when we have few descriptors programmed we might have non-zero value. Remove DESCE and CDESC bits from DMA channel status register (HSU_CH_SR) when reading it. Fixes: 2b49e0c56741 ("dmaengine: append hsu DMA driver") Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/hsu/hsu.c | 2 +- drivers/dma/hsu/hsu.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit a197f3c7d48c0c1f45076ea47533a76ba9b1a959 Author: Andy Shevchenko Date: Fri Mar 18 14:26:33 2016 +0200 dmaengine: hsu: correct residue calculation of active descriptor The commit f0579c8ceaf1 ("dmaengine: hsu: speed up residue calculation") speeded up calculation of the queued descriptor but broke the initial residue value for active descriptor. In accordance with documentation the hardware descriptor is updated each time DMA transfered some bytes. It means we have to calculate a sum of lengths of non-submitted hardware descriptors and whatever current values in the hardware. Do this straightforward. Fixes: f0579c8ceaf1 ("dmaengine: hsu: speed up residue calculation") Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/hsu/hsu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 080edf75d337d35faa6fc3df99342b10d2848d16 Author: Andy Shevchenko Date: Fri Mar 18 14:26:31 2016 +0200 dmaengine: hsu: set HSU_CH_MTSR to memory width HSU_CH_MTSR register should be programmed to a minimum size to transfer. This size on a memory side of the transfer. Program it accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/hsu/hsu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ccefb98ce3e5c4493cd213cd03714b7149cf0cb Author: Yauhen Kharuzhy Date: Tue Mar 29 14:17:48 2016 -0700 btrfs: Reset IO error counters before start of device replacing If device replace entry was found on disk at mounting and its num_write_errors stats counter has non-NULL value, then replace operation will never be finished and -EIO error will be reported by btrfs_scrub_dev() because this counter is never reset. # mount -o degraded /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/ # btrfs replace status /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/ Started on 25.Mar 07:28:00, canceled on 25.Mar 07:28:01 at 0.0%, 40 write errs, 0 uncorr. read errs # btrfs replace start -B 4 /dev/sdg /media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/ ERROR: ioctl(DEV_REPLACE_START) failed on "/media/a4fb5c0a-21c5-4fe7-8d0e-fdd87d5f71ee/": Input/output error, no error Reset num_write_errors and num_uncorrectable_read_errors counters in the dev_replace structure before start of replacing. Signed-off-by: Yauhen Kharuzhy Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 ++ 1 file changed, 2 insertions(+) commit 0f5dcf8de974db5970d48d12a202997baa2846a1 Author: Mark Fasheh Date: Tue Mar 29 17:19:55 2016 -0700 btrfs: Add qgroup tracing This patch adds tracepoints to the qgroup code on both the reporting side (insert_dirty_extents) and the accounting side. Taken together it allows us to see what qgroup operations have happened, and what their result was. Signed-off-by: Mark Fasheh Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 9 +++++ include/trace/events/btrfs.h | 89 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 97 insertions(+), 1 deletion(-) commit c79b4713304f812d3d6c95826fc3e5fc2c0b0c14 Author: Josef Bacik Date: Fri Mar 25 10:02:41 2016 -0400 Btrfs: don't use src fd for printk The fd we pass in may not be on a btrfs file system, so don't try to do BTRFS_I() on it. Thanks, Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f282f71eaee7ac979cdbe525f76daa0722798a8 Author: David Sterba Date: Wed Mar 30 16:01:12 2016 +0200 btrfs: fallback to vmalloc in btrfs_compare_tree The allocation of node could fail if the memory is too fragmented for a given node size, practically observed with 64k. http://article.gmane.org/gmane.comp.file-systems.btrfs/54689 Reported-and-tested-by: Jean-Denis Girard Signed-off-by: David Sterba fs/btrfs/ctree.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 918c2ee103cf9956f1c61d3f848dbb49fd2d104a Author: Mark Fasheh Date: Wed Mar 30 17:57:48 2016 -0700 btrfs: handle non-fatal errors in btrfs_qgroup_inherit() create_pending_snapshot() will go readonly on _any_ error return from btrfs_qgroup_inherit(). If qgroups are enabled, a user can crash their fs by just making a snapshot and asking it to inherit from an invalid qgroup. For example: $ btrfs sub snap -i 1/10 /btrfs/ /btrfs/foo Will cause a transaction abort. Fix this by only throwing errors in btrfs_qgroup_inherit() when we know going readonly is acceptable. The following xfstests test case reproduces this bug: seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { cd / rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter # remove previous $seqres.full before test rm -f $seqres.full # real QA test starts here _supported_fs btrfs _supported_os Linux _require_scratch rm -f $seqres.full _scratch_mkfs _scratch_mount _run_btrfs_util_prog quota enable $SCRATCH_MNT # The qgroup '1/10' does not exist and should be silently ignored _run_btrfs_util_prog subvolume snapshot -i 1/10 $SCRATCH_MNT $SCRATCH_MNT/snap1 _scratch_unmount echo "Silence is golden" status=0 exit Signed-off-by: Mark Fasheh Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 54 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit 0305bc279317a6ba261a663cc32721d78e6544cf Author: Qu Wenruo Date: Wed Mar 23 11:38:17 2016 +0800 btrfs: Output more info for enospc_debug mount option As one user in mail list report reproducible balance ENOSPC error, it's better to add more debug info for enospc_debug mount option. Reported-by: Marc Haber Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 264813acb1c756aebc337b16b832604a0c9aadaf Author: Liu Bo Date: Mon Mar 21 14:59:53 2016 -0700 Btrfs: fix invalid reference in replace_path Dan Carpenter's static checker has found this error, it's introduced by commit 64c043de466d ("Btrfs: fix up read_tree_block to return proper error") It's really supposed to 'break' the loop on error like others. Cc: Dan Carpenter Reported-by: Dan Carpenter Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/relocation.c | 1 + 1 file changed, 1 insertion(+) commit 2a162ce93232eb78124601996744f8eafec845ab Author: Davide Italiano Date: Mon Apr 6 22:09:15 2015 -0700 Btrfs: Improve FL_KEEP_SIZE handling in fallocate - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified. - As an optimisation we can skip the call if (off + len) isn't greater than the current size of the file. This operation is called under the lock so the less work we do, the better. - If we call inode_size_ok() pass to it the correct value rather than a more conservative estimation. Signed-off-by: Davide Italiano Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c847a89a871e1ea21d45120c3045c9b443e258f5 Author: Alistair Leslie-Hughes Date: Mon Apr 4 20:51:40 2016 +1000 HID: microsoft: add support for 3 more devices Adds support for the Micrsift Digital 4K, Media 600 and Media 3000 V1 Keyboards, which have the same quirks as the already existing hardware MS_NE4K. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=52841 [jkosina@suse.cz: rephrase changelog] Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-microsoft.c | 6 ++++++ 3 files changed, 12 insertions(+) commit ef609c238a8ea163cb0af759cc73c9e2555c89da Author: Herbert Xu Date: Sun Apr 3 12:37:15 2016 +0800 sunrpc: Fix skcipher/shash conversion The skcpiher/shash conversion introduced a number of bugs in the sunrpc code: 1) Missing calls to skcipher_request_set_tfm lead to crashes. 2) The allocation size of shash_desc is too small which leads to memory corruption. Fixes: 3b5cf20cf439 ("sunrpc: Use skcipher and ahash/shash") Reported-by: J. Bruce Fields Tested-by: J. Bruce Fields Signed-off-by: Herbert Xu net/sunrpc/auth_gss/gss_krb5_crypto.c | 8 ++++++-- net/sunrpc/auth_gss/gss_krb5_mech.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) commit 3d50a7fb42992545e45e10b068406546ea699489 Author: Maciej W. Rozycki Date: Sat Jan 30 09:08:43 2016 +0000 MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation Make sure it's the microMIPS rather than MIPS16 ISA before emulating microMIPS RDHWR. Mostly needed as an optimisation for configurations where `cpu_has_mmips' is hardcoded to 0 and also a good measure in case we add further microMIPS instructions to emulate in the future, as the corresponding MIPS16 encoding is ADDIUSP, not supposed to trap. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12282/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6870e707c6d934329872eadc77a7d2d07586e36c Author: Florian Fainelli Date: Sun Jan 31 14:52:05 2016 -0800 MIPS: BMIPS: Fix gisb-arb compatible string for 7435 The SUN GISB arbiter was added with the wrong compatible string, leading to using the wrong register layout, use the correct compatible string for this chip: brcm,bcm7435-gisb-arb. Fixes: 8394968be4c7 ("MIPS: BMIPS: Add BCM7435 dtsi") Signed-off-by: Florian Fainelli Cc: blogic@openwrt.org Cc: cernekee@gmail.com Cc: jogo@openwrt.org Cc: jaedon.shin@gmail.com Cc: pgynther@google.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12285/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm7435.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fccb0767fdbdb781a9c5b5c15ee7b219443c89d Author: Yoshihiro Shimoda Date: Mon Apr 4 20:40:20 2016 +0900 usb: renesas_usbhs: fix to avoid using a disabled ep in usbhsg_queue_done() This patch fixes an issue that usbhsg_queue_done() may cause kernel panic when dma callback is running and usb_ep_disable() is called by interrupt handler. (Especially, we can reproduce this issue using g_audio with usb-dmac driver.) For example of a flow: usbhsf_dma_complete (on tasklet) --> usbhsf_pkt_handler (on tasklet) --> usbhsg_queue_done (on tasklet) *** interrupt happened and usb_ep_disable() is called *** --> usbhsg_queue_pop (on tasklet) Then, oops happened. Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ecd9a7ad453c5effc9a26355b79ee83f1337cba4 Author: Przemek Rudy Date: Wed Mar 16 23:10:26 2016 +0100 usb: dwc2: do not override forced dr_mode in gadget setup The host/device mode set with dr_mode should be kept all the time, not being changed to OTG in gadget setup (by overriding CFGUSB_FORCEDEVMODE and CFGUSB_FORCEHOSTMODE bits). Acked-by: John Youn Tested-by: John Youn Signed-off-by: Przemek Rudy Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4fc50ba5965ac2b360499d4a23eb10d04414dd36 Author: Dan Carpenter Date: Sat Apr 2 07:51:08 2016 +0300 usb: gadget: f_midi: unlock on error We added some new locking here, but missed an error path where we need to unlock. Fixes: 9acdf4df2fc4 ('usb: gadget: f_midi: added spinlock on transmit function') Acked-by: Michal Nazarewicz Acked-by: Felipe F. Tonello Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 101ecde566963b8d95d2b1b5ce0d4f3ed2f75933 Author: Konrad Rzeszutek Wilk Date: Fri Apr 1 11:26:08 2016 -0400 MAINTAINERS: xen: Konrad to step down and Juergen to pick up I've lately been concentrating on other projects and haven't been doing much of Xen core maintainership for the last year. I am quite thrilled that Juergen is willing to help out! P.S. I am still the maintainer of Xen-SWIOTLB, Xen PCI-[front|backend], and co-maintainer of Xen block-[front|backend]; amongst others. Acked-by: Juergen Gross Acked-by: Boris Ostrovsky Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: David Vrabel MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff1e22e7a638a0782f54f81a6c9cb139aca2da35 Author: Boris Ostrovsky Date: Fri Mar 18 10:11:07 2016 -0400 xen/events: Mask a moving irq Moving an unmasked irq may result in irq handler being invoked on both source and target CPUs. With 2-level this can happen as follows: On source CPU: evtchn_2l_handle_events() -> generic_handle_irq() -> handle_edge_irq() -> eoi_pirq(): irq_move_irq(data); /***** WE ARE HERE *****/ if (VALID_EVTCHN(evtchn)) clear_evtchn(evtchn); If at this moment target processor is handling an unrelated event in evtchn_2l_handle_events()'s loop it may pick up our event since target's cpu_evtchn_mask claims that this event belongs to it *and* the event is unmasked and still pending. At the same time, source CPU will continue executing its own handle_edge_irq(). With FIFO interrupt the scenario is similar: irq_move_irq() may result in a EVTCHNOP_unmask hypercall which, in turn, may make the event pending on the target CPU. We can avoid this situation by moving and clearing the event while keeping event masked. Signed-off-by: Boris Ostrovsky Cc: stable@vger.kernel.org Signed-off-by: David Vrabel drivers/xen/events/events_base.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit f03b24a851d32ca85dacab01785b24a7ee717d37 Author: Takashi Iwai Date: Mon Apr 4 11:47:50 2016 +0200 ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320 Phoenix Audio TMX320 gives the similar error when the sample rate is asked: usb 2-1.3: 2:1: cannot get freq at ep 0x85 usb 2-1.3: 1:1: cannot get freq at ep 0x2 .... Add the corresponding USB-device ID (1de7:0014) to snd_usb_get_sample_rate_quirk() list. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221 Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit bfa5fb14fb9e698ae2d9429a82ef0ab67a17df37 Author: Takashi Iwai Date: Tue Mar 29 15:03:06 2016 +0200 ALSA: hda - Bind with i915 only when Intel graphics is present On Skylake and onwards, the HD-audio controller driver needs to bind with i915 for having the control of power well audio domain before actually probing the codec. This leads to the load of i915 driver from the audio driver side. But, there are systems that have no Intel graphics but Nvidia or AMD GPU, although they still use HD-audio bus for the onboard audio codecs. On these, loading the i915 driver is nothing but a useless memory and CPU consumption. A simple way to avoid it is just to look for the Intel graphics PCI entry beforehand, and try to bind with i915 only when such an entry is found. Currently, it assumes the PCI display class. If another class appears, this needs to be extended (although it's very unlikely). Signed-off-by: Takashi Iwai sound/hda/hdac_i915.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5c8a010c2411729a07cb1b90c09fa978ac0ac6c0 Author: Borislav Petkov Date: Mon Apr 4 10:42:07 2016 +0200 locking/lockdep: Fix print_collision() unused warning Fix this: kernel/locking/lockdep.c:2051:13: warning: ‘print_collision’ defined but not used [-Wunused-function] static void print_collision(struct task_struct *curr, ^ Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1459759327-2880-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 2 ++ 1 file changed, 2 insertions(+) commit 69c2565a3cca3d79572941d62165af7805d72762 Author: Dan Carpenter Date: Sat Apr 2 08:42:24 2016 +0300 drm: ARM HDLCD - fix an error code We accidentally return PTR_ERR(NULL) which is success instead of a negative error code. Fixes: 879e40bea6f2 ('drm: ARM HDLCD - get rid of devm_clk_put()') Signed-off-by: Dan Carpenter Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 61a6dcd77af74e925bb301475fb6e43d8fe72da8 Author: Alexey Brodkin Date: Fri Feb 19 11:15:01 2016 +0300 drm: ARM HDLCD - get rid of devm_clk_put() Clock is acquired with devm_clk_get() which already manages corresponding resource. I.e. in case of driver removal or failure on installaiton clock resources will be automatically released and explicit call of devm_clk_put() is not required. Cc: Arnd Bergmann Cc: Daniel Vetter Cc: David Airlie Cc: Robin Murphy Signed-off-by: Alexey Brodkin Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 03cc0789a690eb9ab07070376252961caeae7441 Author: Al Viro Date: Sat Apr 2 14:56:58 2016 -0400 do_splice_to(): cap the size before passing to ->splice_read() pipe capacity won't exceed 2G anyway. Signed-off-by: Al Viro fs/splice.c | 3 +++ 1 file changed, 3 insertions(+) commit f75587b8ca69768c6cf8a38a0b61e68e1bea3d36 Author: Nishanth Menon Date: Fri Apr 1 08:52:47 2016 -0500 extcon: palmas: Drop stray IRQF_EARLY_RESUME flag Palmas extcon IRQs are nested threaded and wired to the Palmas interrupt controller. So, this flag is not required for nested IRQs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. However, the fix in commit ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag") missed a stray flag causing the following crash on resume on BeagleBoard-X15 platform: [ 53.670141] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 [..] [ 53.670141] [] (omap_set_gpio_triggering) from [] (omap_gpio_unmask_irq+0xc0/0xc4) [ 53.670141] [] (omap_gpio_unmask_irq) from [] (irq_enable+0x30/0x44) [ 53.670141] [] (irq_enable) from [] (__enable_irq+0x54/0x78) [ 53.670141] [] (__enable_irq) from [] (resume_irqs+0xe8/0x100) [ 53.670141] [] (resume_irqs) from [] (syscore_resume+0x94/0x298) [ 53.670141] [] (syscore_resume) from [] (suspend_devices_and_enter+0x790/0x9e4) [ 53.670141] [] (suspend_devices_and_enter) from [] (pm_suspend+0x640/0x75c) [ 53.670141] [] (pm_suspend) from [] (state_store+0x64/0xb8) [ 53.670141] [] (state_store) from [] (kernfs_fop_write+0xc0/0x1bc) [ 53.670141] [] (kernfs_fop_write) from [] (__vfs_write+0x1c/0xd8) [ 53.670141] [] (__vfs_write) from [] (vfs_write+0x90/0x16c) [ 53.670141] [] (vfs_write) from [] (SyS_write+0x44/0x9c) [ 53.670141] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) [..] Fixes: ae64e42cc2b3 ("extcon: palmas: Drop IRQF_EARLY_RESUME flag") Cc: Grygorii Strashko Cc: MyungJoo Ham Cc: Chanwoo Choi Cc: Tony Lindgren Cc: Lee Jones Cc: Roger Quadros Reviewed-by: Grygorii Strashko Signed-off-by: Nishanth Menon Acked-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c325a67c72903e1cc30e990a15ce745bda0dbfde Author: Theodore Ts'o Date: Sun Apr 3 17:03:37 2016 -0400 ext4: ignore quota mount options if the quota feature is enabled Previously, ext4 would fail the mount if the file system had the quota feature enabled and quota mount options (used for the older quota setups) were present. This broke xfstests, since xfs silently ignores the usrquote and grpquota mount options if they are specified. This commit changes things so that we are consistent with xfs; having the mount options specified is harmless, so no sense break users by forbidding them. Cc: stable@vger.kernel.org Signed-off-by: Theodore Ts'o fs/ext4/super.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 9735a22799b9214d17d3c231fe377fc852f042e9 Author: Linus Torvalds Date: Sun Apr 3 09:09:40 2016 -0500 Linux 4.6-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c3b73c6a2eea0cf27fb058086a0eb94e90bffd4 Merge: 7b367f5 85dc600 Author: Linus Torvalds Date: Sun Apr 3 07:22:12 2016 -0500 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc kernel side fixes: - fix event leak - fix AMD PMU driver bug - fix core event handling bug - fix build bug on certain randconfigs Plus misc tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/amd/ibs: Fix pmu::stop() nesting perf/core: Don't leak event in the syscall error path perf/core: Fix time tracking bug with multiplexing perf jit: genelf makes assumptions about endian perf hists: Fix determination of a callchain node's childlessness perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples perf tools: Fix build break on powerpc perf/x86: Move events_sysfs_show() outside CPU_SUP_INTEL perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers perf tests: Fix tarpkg build test error output redirection commit 7b367f5dba5c5162a7308e85d3fc9170b0cb3e5f Merge: 17084b7 353def9 Author: Linus Torvalds Date: Sun Apr 3 07:06:53 2016 -0500 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core kernel fixes from Ingo Molnar: "This contains the nohz/atomic cleanup/fix for the fetch_or() ugliness you noted during the original nohz pull request, plus there's also misc fixes: - fix liblockdep build bug - fix uapi header build bug - print more lockdep hash collision info to help debug recent reports of hash collisions - update MAINTAINERS email address" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Update my email address locking/lockdep: Print chain_key collision information uapi/linux/stddef.h: Provide __always_inline to userspace headers tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh locking/atomic, sched: Unexport fetch_or() timers/nohz: Convert tick dependency mask to atomic_t locking/atomic: Introduce atomic_fetch_or() commit 17084b7e07909d3a8d51b66b7dfb50a2083a2685 Author: Linus Torvalds Date: Sun Apr 3 07:03:49 2016 -0500 v4l2-mc: avoid warning about unused variable Commit 840f5b0572ea ("media: au0828 disable tuner to demod link in au0828_media_device_register()") removed all uses of the 'dtv_demod', but left the variable itself around. Remove it. Signed-off-by: Linus Torvalds drivers/media/v4l2-core/v4l2-mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30cebb6ca1e0eb2691339a0caa6600f646af0be5 Merge: f7eeb8a 34a4cce Author: Linus Torvalds Date: Sun Apr 3 06:32:28 2016 -0500 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "This lot contains: - Some fixups for the fallout of the topology consolidation which unearthed AMD/Intel inconsistencies - Documentation for the x86 topology management - Support for AMD advanced power management bits - Two simple cleanups removing duplicated code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add advanced power management bits x86/thread_info: Merge two !__ASSEMBLY__ sections x86/cpufreq: Remove duplicated TDP MSR macro definitions x86/Documentation: Start documenting x86 topology x86/cpu: Get rid of compute_unit_id perf/x86/amd: Cleanup Fam10h NB event constraints x86/topology: Fix AMD core count commit 04211a574641e29b529dcc84e75c03d7e9e368cf Author: Paul Burton Date: Thu Feb 4 13:05:02 2016 +0000 MIPS: Bail on unsupported module relocs When an unsupported reloc is encountered in a module, we currently blindly branch to whatever would be at its entry in the reloc handler function pointer arrays. This may be NULL, or if the unsupported reloc has a type greater than that of the supported reloc with the highest type then we'll dereference some value after the function pointer array & branch to that. The result is at best a kernel oops. Fix this by checking that the reloc type has an entry in the function pointer array (ie. is less than the number of items in the array) and that the handler is non-NULL, returning an error code to fail the module load if no handler is found. Signed-off-by: Paul Burton Cc: James Hogan Cc: Steven J. Hill Cc: Andrey Ryabinin Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12432/ Signed-off-by: Ralf Baechle arch/mips/kernel/module-rela.c | 19 ++++++++++++++++--- arch/mips/kernel/module.c | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) commit f7f797cfc6c80a3505d1a316ee9aa3ec329289e9 Author: Antony Pavlov Date: Thu Mar 17 06:34:13 2016 +0300 MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name Current ath79 clock.c code does not read reference clock and pll setup from devicetree. The ar724x_clocks_init() function recreates the clocks from scratch so devicetree clock information is dropped. After adding the code which picked up reference clock from devicetree I have found that kernel does not boot anymore. The SPI and UART drivers can't get clk; here are the bootlog error messages: of_serial: probe of 18020000.uart failed with error -22 ath79-spi: probe of 1f000000.spi failed with error -22 The problem is that clock code assumes that reference clock name is "ref" but current dts-file uses another name: "oscillator". This patch fixes the problem by changing external oscillator dt node name to "ref". Please note that there is an alternative solution for the problem: > --- a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts > +++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts > @@ -16,6 +16,7 @@ > > extosc: oscillator { > compatible = "fixed-clock"; > + clock-output-names = "ref"; > #clock-cells = <0>; > clock-frequency = <40000000>; > }; Signed-off-by: Antony Pavlov Cc: Alban Bedel Cc: Michael Turquette Cc: Rob Herring Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12874/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4c87b7a944adcc34f67a925d50889088fd87992 Author: Alban Bedel Date: Thu Mar 17 06:34:10 2016 +0300 MIPS: ath79: Fix the ar913x reference clock rate The reference clock on ar913x is at 40MHz and not 5MHz. The current implementation use the wrong reference rate because it doesn't take the PLL divider in account. But if we fix the code to use the divider it becomes identical with the implementation for ar724x, so just drop the broken ar913x implementation. Signed-off-by: Alban Bedel Tested-by: Antony Pavlov Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12871/ Signed-off-by: Ralf Baechle arch/mips/ath79/clock.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) commit c338d59d12dc93c3287160acd7e726b56dc94f43 Author: Weijie Gao Date: Thu Mar 17 06:34:09 2016 +0300 MIPS: ath79: Fix the ar724x clock calculation According to the AR7242 datasheet section 2.8, AR724X CPUs use a 40MHz input clock as the REF_CLK instead of 5MHz. The correct CPU PLL calculation procedure is as follows: CPU_PLL = (FB * REF_CLK) / REF_DIV / 2. This patch is compatible with the current calculation procedure with default FB and REF_DIV values. Tested on AR7240, AR7241 and AR7242. Signed-off-by: Weijie Gao Signed-off-by: Alban Bedel (Fixed the commit log message) Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12870/ Signed-off-by: Ralf Baechle arch/mips/ath79/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b885ea66f4cb15cc3812dc90ddfb3b6b0567561 Author: Antony Pavlov Date: Thu Mar 17 06:34:08 2016 +0300 dt-bindings: clock: qca,ath79-pll: fix copy-paste typos Signed-off-by: Antony Pavlov Acked-by: Rob Herring Cc: Alban Bedel Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12869/ Signed-off-by: Ralf Baechle Documentation/devicetree/bindings/clock/qca,ath79-pll.txt | 6 +++--- arch/mips/boot/dts/qca/ar9132.dtsi | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3b143cca6e1397188f507a6c727f4108861ceb8b Author: Maciej W. Rozycki Date: Fri Mar 4 01:44:28 2016 +0000 MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp' Follow our own rules set in for SIGTRAP signals issued from `do_watch' and `do_trap_or_bp' by setting the signal code to TRAP_HWBKPT and TRAP_BRKPT respectively, for Watch exceptions and for those Breakpoint exceptions whose originating BREAK instruction's code does not have a special meaning. Keep Trap exceptions unaffected as these are not debug events. No existing user software is expected to examine signal codes for these signals as SI_KERNEL has been always used here. This change makes the MIPS port more like other Linux ports, which reduces the complexity and provides for performance improvement in GDB. Signed-off-by: Maciej W. Rozycki Cc: Pedro Alves Cc: Luis Machado Cc: linux-mips@linux-mips.org Cc: gdb@sourceware.org Patchwork: https://patchwork.linux-mips.org/patch/12758/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-r2-to-r6-emul.h | 2 +- arch/mips/kernel/mips-r2-to-r6-emul.c | 12 ++++++------ arch/mips/kernel/traps.c | 18 +++++++++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) commit 748ac56bb9533f867b25325a805d64f52a1a3a88 Author: Ralf Baechle Date: Tue Mar 8 10:01:19 2016 +0100 FIRMWARE: Broadcom: Fix grammar of warning messages in bcm47xx_sprom.c. Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 732d4ba61be8144789eec66995c0bfd702c19b32 Author: Harvey Hunt Date: Fri Feb 26 16:03:48 2016 +0000 MIPS: ci20: Enable NAND and UBIFS support in defconfig. Update the Ci20's defconfig to enable the JZ4780's NAND driver and therefore access to the UBIFS rootfs. Signed-off-by: Harvey Hunt Cc: Paul Burton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12699/ Signed-off-by: Ralf Baechle arch/mips/configs/ci20_defconfig | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 92a76f6d8545efc67f03278009e9a828bdad3419 Author: Adam Buchbinder Date: Thu Feb 25 00:44:58 2016 -0800 MIPS: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12617/ Signed-off-by: Ralf Baechle arch/mips/alchemy/common/dbdma.c | 4 ++-- .../cavium-octeon/executive/cvmx-interrupt-decodes.c | 14 +++++++------- arch/mips/cavium-octeon/executive/cvmx-pko.c | 2 +- arch/mips/cavium-octeon/smp.c | 2 +- arch/mips/dec/int-handler.S | 2 +- arch/mips/fw/arc/memory.c | 2 +- .../include/asm/mach-cavium-octeon/kernel-entry-init.h | 2 +- arch/mips/include/asm/mach-generic/kernel-entry-init.h | 2 +- arch/mips/include/asm/mach-ip27/irq.h | 2 +- arch/mips/include/asm/mach-ip27/kernel-entry-init.h | 2 +- arch/mips/include/asm/mach-jz4740/gpio.h | 2 +- arch/mips/include/asm/mips-cm.h | 2 +- arch/mips/include/asm/octeon/cvmx-config.h | 2 +- arch/mips/include/asm/octeon/cvmx.h | 2 +- arch/mips/include/asm/pci/bridge.h | 18 +++++++++--------- arch/mips/include/asm/sgi/hpc3.h | 2 +- arch/mips/include/asm/sgiarcs.h | 4 ++-- arch/mips/include/asm/sn/ioc3.h | 2 +- arch/mips/include/asm/sn/sn0/hubio.h | 2 +- arch/mips/include/asm/uaccess.h | 2 +- arch/mips/kernel/mips-cm.c | 2 +- arch/mips/kernel/perf_event_mipsxx.c | 2 +- arch/mips/kernel/pm-cps.c | 2 +- arch/mips/kernel/process.c | 2 +- arch/mips/kernel/traps.c | 2 +- arch/mips/kvm/tlb.c | 2 +- arch/mips/kvm/trap_emul.c | 2 +- arch/mips/math-emu/ieee754dp.c | 6 +++--- arch/mips/math-emu/ieee754sp.c | 6 +++--- arch/mips/mm/sc-ip22.c | 2 +- arch/mips/mm/tlbex.c | 2 +- arch/mips/sgi-ip27/ip27-memory.c | 2 +- 32 files changed, 52 insertions(+), 52 deletions(-) commit b475c59b113db1e66eb9527ffdec3c5241c847e5 Author: Irina Tirdea Date: Mon Mar 28 20:15:46 2016 +0300 iio: gyro: bmg160: fix buffer read values When reading gyroscope axes using iio buffers, the values returned are always 0. In the interrupt handler, the return value of the read operation is returned to the user instead of the value read. Return the value read to the user. This is also fixed in commit 82d8e5da1a33 ("iio: accel: bmg160: optimize transfers in trigger handler"). Signed-off-by: Irina Tirdea Cc: Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95e7ff034175db7d8aefabe7716c4d42bea24fde Author: Irina Tirdea Date: Tue Mar 29 15:37:30 2016 +0300 iio: gyro: bmg160: fix endianness when reading axes For big endian platforms, reading the axes will return invalid values. The device stores each axis value in a 16 bit little endian register. The driver uses regmap_read_bulk to get the axis value, resulting in a 16 bit little endian value. This needs to be converted to cpu endianness to work on big endian platforms. Fix endianness for big endian platforms by converting the values for the axes read from little endian to cpu. This is also partially fixed in commit 82d8e5da1a33 ("iio: accel: bmg160: optimize transfers in trigger handler"). Signed-off-by: Irina Tirdea Cc: Signed-off-by: Jonathan Cameron drivers/iio/gyro/bmg160_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2215f31dc6f88634c1916362e922b1ecdce0a6b3 Author: Irina Tirdea Date: Tue Mar 29 15:35:45 2016 +0300 iio: accel: bmc150: fix endianness when reading axes For big endian platforms, reading the axes will return invalid values. The device stores each axis value in a 16 bit little endian register. The driver uses regmap_read_bulk to get the axis value, resulting in a 16 bit little endian value. This needs to be converted to cpu endianness to work on big endian platforms. Fix endianness for big endian platforms by converting the values for the axes read from little endian to cpu. This is also partially fixed in commit b6fb9b6d6552 ("iio: accel: bmc150: optimize transfers in trigger handler"). Signed-off-by: Irina Tirdea Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/bmc150-accel-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9b090a98e95c2530ef0ce474e3b6218621b8ae25 Author: Arnd Bergmann Date: Tue Mar 29 22:27:27 2016 +0200 iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE When CONFIG_IIO_TRIGGER is enabled but CONFIG_IIO_BUFFER is not, we get a build error in the st_magn driver: drivers/iio/magnetometer/st_magn_core.c:573:23: error: 'ST_MAGN_TRIGGER_SET_STATE' undeclared here (not in a function) .set_trigger_state = ST_MAGN_TRIGGER_SET_STATE, ^~~~~~~~~~~~~~~~~~~~~~~~~ Apparently, this ST_MAGN_TRIGGER_SET_STATE macro was meant to be set to NULL when the definition is not available because st_magn_buffer.c is not compiled, but the alternative definition was not included in the original patch. This adds it. Signed-off-by: Arnd Bergmann Fixes: 74f5683f35fe ("iio: st_magn: Add irq trigger handling") Acked-by: Denis Ciocca Cc: Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn.h | 1 + 1 file changed, 1 insertion(+) commit 091bc3a4049cb0cb28b8e3e71d8738387b91a007 Author: Paul Burton Date: Mon Jul 13 17:12:44 2015 +0100 MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE After writing the appropriate mask to the cop0 PageMask register, read the register back & check it matches what we want. If it doesn't then the MMU does not support the page size the kernel is configured for and we're better off bailing than continuing to do odd things with TLB exceptions. Signed-off-by: Paul Burton Cc: Steven J. Hill Cc: Joshua Kinard Cc: Rafał Miłecki Cc: James Hogan Cc: Markos Chandras Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/10691/ Signed-off-by: Ralf Baechle arch/mips/mm/tlb-r4k.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8961b28f09dd2b5bb67738968e38a4d40a5b11bc Author: Alban Bedel Date: Tue Jan 26 09:38:28 2016 +0100 MIPS: zboot: Remove copied source files on clean The copied source files must be added to the extra-y list to have them removed on clean. Signed-off-by: Alban Bedel Cc: Andrew Bresticker Cc: Alex Smith Cc: Wu Zhangjin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12233/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) commit c50ec67875363d7a012889d049fb45d3c8ef3c48 Author: Alban Bedel Date: Tue Jan 26 09:38:27 2016 +0100 MIPS: zboot: Fix the build with XZ compression on older GCC versions Some older GCC version (at least 4.6) emits calls to __bswapsi2() when building the XZ decompressor. The link of the compressed image then fails with the following error: arch/mips/boot/compressed/decompress.o: In function '__fswab32': include/uapi/linux/swab.h:60: undefined reference to '__bswapsi2' Add bswapsi.o to the link to fix the build with these versions. Signed-off-by: Alban Bedel Cc: Andrew Bresticker Cc: Alex Smith Cc: Wu Zhangjin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12232/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62d8e64423adf5a044acbdffc6ca69c5b8067702 Author: Ralf Baechle Date: Sun Apr 3 09:41:34 2016 +0200 MIPS: Wire up preadv2 and pwrite2 syscalls. Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/unistd.h | 18 ++++++++++++------ arch/mips/kernel/scall32-o32.S | 2 ++ arch/mips/kernel/scall64-64.S | 2 ++ arch/mips/kernel/scall64-n32.S | 2 ++ arch/mips/kernel/scall64-o32.S | 2 ++ 5 files changed, 20 insertions(+), 6 deletions(-) commit 20c07a5bf094198ff2382aa5e7c930b3c9807792 Author: Ezequiel García Date: Fri Apr 1 18:29:23 2016 -0300 mtd: nand: Drop mtd.owner requirement in nand_scan Since commit 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set"), it's now legal for drivers to call nand_scan and nand_scan_ident without setting mtd.owner. Drop the check and while at it remove the BUG() abuse. Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set") Signed-off-by: Ezequiel Garcia Acked-by: Boris Brezillon [Brian: editorial note - while commit 807f16d4db95 wasn't explicitly broken, some follow-up commits in the v4.4 release broke a few drivers, since they would hit this BUG() if they used nand_scan() and were built as modules] Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 10c0f0e92f019ab8d0c17da3696e35b0eef4ec16 Author: Andy Gross Date: Fri Apr 1 15:02:06 2016 -0500 Revert "dts: msm8974: Add dma channels for blsp2_i2c1 node" Revert this commit to fix regressions on non-dragonboard MSM8974 boards. This will be put back in after the correct fixes to the bam driver are accepted that allow remote processor control of the main control registers. This reverts commit 0a5d0f85bba61d8643d78869c7c4214d6c2a7ce6. Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 338d51889851cb2ac900d2ec75c8185afcde8caf Author: Andy Gross Date: Fri Apr 1 15:00:25 2016 -0500 Revert "dts: msm8974: Add blsp2_bam dma node" Revert this commit to fix regressions on non-dragonboard MSM8974 boards. This will be put back in after the correct fixes to the bam driver are accepted that allow remote processor control of the main control registers. This reverts commit 62bc8179222372624fd8a52b88327b962614d7b2. Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit f7eeb8a87c033d126ff6b8c35405ba5dc4e55754 Merge: d6c24df d758684 Author: Linus Torvalds Date: Sat Apr 2 18:57:49 2016 -0500 Merge tag 'rproc-v4.6-rc1' of git://github.com/andersson/remoteproc Pull remoteproc fix from Bjorn Andersson: "Fix incorrect error check in the ST remoteproc driver and advertise the newly created linux-remoteproc mailing list" * tag 'rproc-v4.6-rc1' of git://github.com/andersson/remoteproc: MAINTAINERS: Add mailing list for remote processor subsystems remoteproc: st: fix check of syscon_regmap_lookup_by_phandle() return value commit d6c24df08255e24dbd19b52dd322f61fbc30b11d Merge: cb10716 839559e Author: Linus Torvalds Date: Sat Apr 2 18:48:37 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "This includes fixes from HCH for -rc1 configfs default_groups conversion changes that ended up breaking some iscsi-target default_groups, along with Sagi's ib_drain_qp() conversion for iser-target to use the common caller now available to RDMA kernel consumers in v4.6+ code" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: add a new add_wwn_groups fabrics method target: initialize the nacl base CIT begfore init_nodeacl target: remove ->fabric_cleanup_nodeacl iser-target: Use ib_drain_qp commit cb107161df3c52e58033554dcb40065964350f67 Author: Linus Torvalds Date: Sat Apr 2 18:35:05 2016 -0500 Convert straggling drivers to new six-argument get_user_pages() Commit d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm") switched get_user_pages() callers to the simpler model where they no longer pass in the thread and mm pointer. But since then we've merged changes to a few drivers that re-introduce use of the old interface. Let's fix them up. They continued to work fine (thanks to the truly disgusting macros introduced in commit cde70140fed8: "mm/gup: Overload get_user_pages() functions"), but cause unnecessary build noise. Signed-off-by: Linus Torvalds drivers/platform/goldfish/goldfish_pipe.c | 3 +-- drivers/rapidio/devices/rio_mport_cdev.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 4762cc3fbbd89e5fd316d6e4d3244a8984444f8d Author: Dan Carpenter Date: Sat Apr 2 18:13:38 2016 -0400 ext4 crypto: fix some error handling We should be testing for -ENOMEM but the minus sign is missing. Fixes: c9af28fdd449 ('ext4 crypto: don't let data integrity writebacks fail with ENOMEM') Signed-off-by: Dan Carpenter Signed-off-by: Theodore Ts'o fs/ext4/page-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 264800b5ecc7be49b2c6027738091ff3385e0cae Merge: 05cf807 96c22a32 Author: Linus Torvalds Date: Sat Apr 2 16:46:56 2016 -0500 Merge tag 'configfs-for-linus-2' of git://git.infradead.org/users/hch/configfs Pull configfs fix from Christoph Hellwig: "A trivial fix to the recently introduced binary attribute helper macros" * tag 'configfs-for-linus-2' of git://git.infradead.org/users/hch/configfs: configfs: fix CONFIGFS_BIN_ATTR_[RW]O definitions commit af037412629d8549e04039a57cf99a59b6e7a01b Author: Subhransu S. Prusty Date: Fri Apr 1 13:36:27 2016 +0530 ASoC: Intel: Skylake: Fix to turn OFF codec power when entering S3 Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 1b377ccddd14cd04df4b9523a426b34f928002bc Author: Subhransu S. Prusty Date: Fri Apr 1 13:36:26 2016 +0530 ASoC: hdac_hdmi: Fix codec power state in S3 during playback If the system enters S3 during a playback, codec power needs to be turned OFF during suspend and restored during resume. With this patch the AFG node is set to D3 and codec power is turned OFF during controller suspend call. During resume, the codec power is left in ON state if the playback was in progress while suspending. Also setting power state for AFG node is optimized. With this the loop with timeout is removed and codec_read is used instead. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 83 ++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 45 deletions(-) commit 0fee1798af81b1428d8d5886ea48116444e635fc Author: Subhransu S. Prusty Date: Fri Apr 1 13:36:25 2016 +0530 ASoC: hdac_hdmi: Fix to use dev_pm ops instead soc pm Use dev_pm ops feature instead of soc pm as core assumes system is capable of direct complete. Register with complete callback instead of resume to synchronize with Jack notification from display driver. This ensures correct Jack notification to user space. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 15da5d11040c636cddf85bd93fd4abe85f02fc9f Merge: 2acd846 7fdf966 Author: Kalle Valo Date: Sat Apr 2 17:59:57 2016 +0300 Merge tag 'iwlwifi-for-kalle-2016-03-30' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * lower the debug level of a benign print * fix a memory leak commit f4d5b8adf3668a2fb69a411974057ec3b150b747 Merge: c05c2ec 7cc8cbc Author: Ingo Molnar Date: Sat Apr 2 09:31:10 2016 +0200 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/urgent Pull EFI/arm64 fix from Matt Fleming: " * Fix a boot crash on arm64 caused by a recent commit to mark the EFI memory map as 'MEMBLOCK_NOMAP' which causes the regions to be omitted from the kernel direct mapping - Ard Biesheuvel " Signed-off-by: Ingo Molnar commit 05cf8077e54b20dddb756eaa26f3aeb5c38dd3cf Merge: cf78031 db5dd0d Author: Linus Torvalds Date: Fri Apr 1 20:03:33 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Missing device reference in IPSEC input path results in crashes during device unregistration. From Subash Abhinov Kasiviswanathan. 2) Per-queue ISR register writes not being done properly in macb driver, from Cyrille Pitchen. 3) Stats accounting bugs in bcmgenet, from Patri Gynther. 4) Lightweight tunnel's TTL and TOS were swapped in netlink dumps, from Quentin Armitage. 5) SXGBE driver has off-by-one in probe error paths, from Rasmus Villemoes. 6) Fix race in save/swap/delete options in netfilter ipset, from Vishwanath Pai. 7) Ageing time of bridge not set properly when not operating over a switchdev device. Fix from Haishuang Yan. 8) Fix GRO regression wrt nested FOU/GUE based tunnels, from Alexander Duyck. 9) IPV6 UDP code bumps wrong stats, from Eric Dumazet. 10) FEC driver should only access registers that actually exist on the given chipset, fix from Fabio Estevam. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits) net: mvneta: fix changing MTU when using per-cpu processing stmmac: fix MDIO settings Revert "stmmac: Fix 'eth0: No PHY found' regression" stmmac: fix TX normal DESC net: mvneta: use cache_line_size() to get cacheline size net: mvpp2: use cache_line_size() to get cacheline size net: mvpp2: fix maybe-uninitialized warning tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter net: usb: cdc_ncm: adding Telit LE910 V2 mobile broadband card rtnl: fix msg size calculation in if_nlmsg_size() fec: Do not access unexisting register in Coldfire net: mvneta: replace MVNETA_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES net: mvpp2: replace MVPP2_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES net: dsa: mv88e6xxx: Clear the PDOWN bit on setup net: dsa: mv88e6xxx: Introduce _mv88e6xxx_phy_page_{read, write} bpf: make padding in bpf_tunnel_key explicit ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates bnxt_en: Fix ethtool -a reporting. bnxt_en: Fix typo in bnxt_hwrm_set_pause_common(). bnxt_en: Implement proper firmware message padding. ... commit cf78031a659c05905f817f398df8e749dcd6e75d Merge: 1826907 2aac7dd Author: Linus Torvalds Date: Fri Apr 1 19:57:13 2016 -0500 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of const updates for reset ops and a couple fixes to the newly introduced IPQ4019 clock driver" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll clk: qcom: ipq4019: switch remaining defines to enums clk: qcom: Make reset_control_ops const clk: tegra: Make reset_control_ops const clk: sunxi: Make reset_control_ops const clk: atlas7: Make reset_control_ops const clk: rockchip: Make reset_control_ops const clk: mmp: Make reset_control_ops const clk: mediatek: Make reset_control_ops const commit 1826907c1f591f820748d33ac77736fe42d18a08 Merge: 4e19fd9 8fbd4ad Author: Linus Torvalds Date: Fri Apr 1 19:52:10 2016 -0500 Merge tag 'pm+acpi-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fix from Rafael J. Wysocki: "Just one fix for a nasty boot failure on some systems based on Intel Skylake that shipped with broken firmware where enabling hardware-coordinated P-states management (HWP) causes a faulty interrupt handler in SMM to be invoked and crash the system (Srinivas Pandruvada)" * tag 'pm+acpi-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / processor: Request native thermal interrupt handling via _OSC commit 4e19fd9395f92e0fa250595d2da06d2c427c15f5 Merge: 82d2a34 394532e Author: Linus Torvalds Date: Fri Apr 1 19:31:19 2016 -0500 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "11 fixes" * emailed patches from Andrew Morton : .mailmap: add Christophe Ricard Make CONFIG_FHANDLE default y mm/page_isolation.c: fix the function comments oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head mm/page_isolation: fix tracepoint to mirror check function behavior mm/rmap: batched invalidations should use existing api x86/mm: TLB_REMOTE_SEND_IPI should count pages mm: fix invalid node in alloc_migrate_target() include/linux/huge_mm.h: return NULL instead of false for pmd_trans_huge_lock() mm, kasan: fix compilation for CONFIG_SLAB MAINTAINERS: orangefs mailing list is subscribers-only commit 8fbd4ade93dc67f035914cd4030f1c58797d9e59 Merge: f55532a a212116 Author: Rafael J. Wysocki Date: Sat Apr 2 01:17:36 2016 +0200 Merge branch 'acpi-processor' * acpi-processor: ACPI / processor: Request native thermal interrupt handling via _OSC commit 82d2a348bb9a1e265fe1c62e39341128ec014ed9 Merge: 22fed39 232cad8 Author: Linus Torvalds Date: Fri Apr 1 18:08:34 2016 -0500 Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "This has a few fixes Dave Sterba had queued up. These are all pretty small, but since they were tested I decided against waiting for more" * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: transaction_kthread() is not freezable btrfs: cleaner_kthread() doesn't need explicit freeze btrfs: do not write corrupted metadata blocks to disk btrfs: csum_tree_block: return proper errno value commit febce40febcff3ccdb33f63456ffc4cfc61640c8 Author: Rafael J. Wysocki Date: Sat Apr 2 01:06:21 2016 +0200 intel_pstate: Avoid extra invocation of intel_pstate_sample() The initialization of intel_pstate for a given CPU involves populating the fields of its struct cpudata that represent the previous sample, but currently that is done in a problematic way. Namely, intel_pstate_init_cpu() makes an extra call to intel_pstate_sample() so it reads the current register values that will be used to populate the "previous sample" record during the next invocation of intel_pstate_sample(). However, after commit a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) that doesn't work for last_sample_time, because the time value is passed to intel_pstate_sample() as an argument now. Passing 0 to it from intel_pstate_init_cpu() is problematic, because that causes cpu->last_sample_time == 0 to be visible in get_target_pstate_use_performance() (and hence the extra cpu->last_sample_time > 0 check in there) and effectively allows the first invocation of intel_pstate_sample() from intel_pstate_update_util() to happen immediately after the initialization which may lead to a significant "turn on" effect in the governor algorithm. To mitigate that issue, rework the initialization to avoid the extra intel_pstate_sample() call from intel_pstate_init_cpu(). Instead, make intel_pstate_sample() return false if it has been called with cpu->sample.time equal to zero, which will make intel_pstate_update_util() skip the sample in that case, and reset cpu->sample.time from intel_pstate_set_update_util_hook() to make the algorithm start properly every time the hook is set. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 0fc03d4c87611cefa4df10404a7e0df49b0a2132 Author: Russell King Date: Tue Mar 29 11:08:22 2016 +0100 ARM: SMP enable of cache maintanence broadcast Masahiro Yamada reports that we can fail to set the FW bit in the auxiliary control register, which enables broadcasting the cache maintanence operations. This occurs because we only check that the SMP/nAMP bit is set, rather than checking whether all the bits we want to be set are set. Rearrange the code to ensure that all desired bits are set, and only update the register if we discover some required bits are not set. Tested-by: Masahiro Yamada arch/arm/mm/proc-v7.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 22fed39775c6f06e275075e1570e1cebb12593e0 Merge: 4fff505 878dfd3 Author: Linus Torvalds Date: Fri Apr 1 17:17:32 2016 -0500 Merge tag 'for-linus' of git://github.com/martinbrandenburg/linux Pull OrangeFS fixes from Martin Brandenburg: "Two bugfixes for OrangeFS. One is a reference counting bug and the other is a typo in client minimum version" * tag 'for-linus' of git://github.com/martinbrandenburg/linux: orangefs: minimum userspace version is 2.9.3 orangefs: don't put readdir slot twice commit 4fff5056600300402472dcc99cd814bfa012d8ee Merge: 2708d17 431597b Author: Linus Torvalds Date: Fri Apr 1 17:15:51 2016 -0500 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - fix oops when patching in alternative sequences on big-endian CPUs - reconcile asm/perf_event.h after merge window fallout with KVM ARM - defconfig updates * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: defconfig: updates for 4.6 arm64: perf: Move PMU register related defines to asm/perf_event.h arm64: opcodes.h: Add arm big-endian config options before including arm header commit 2708d17d07d2968a0fb0efa692b82cd544c3e9d4 Merge: 6ddf37d 4a07083 Author: Linus Torvalds Date: Fri Apr 1 17:13:23 2016 -0500 Merge tag 'sound-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - a fix in ALSA timer core to avoid possible BUG() trigger - a fix in ALSA timer core 32bit compat layer - a few HD-audio quirks for ASUS and HP machines - AMD HD-audio HDMI controller quirks - fixes of USB-audio double-free at some error paths - a fix for memory leak in DICE driver at hotunplug" * tag 'sound-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: timer: Use mod_timer() for rearming the system timer ALSA: hda - fix front mic problem for a HP desktop ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call ALSA: hda: add AMD Polaris-10/11 AZ PCI IDs with proper driver caps ALSA: dice: fix memory leak when unplugging ALSA: hda - Apply fix for white noise on Asus N550JV, too ALSA: hda - Fix white noise on Asus N750JV headphone ALSA: hda - Asus N750JV external subwoofer fixup ALSA: timer: fix gparams ioctl compatibility for different architectures commit 394532e4b639dd6ac6053f0d777fb86948f29233 Author: Christophe Ricard Date: Fri Apr 1 14:31:42 2016 -0700 .mailmap: add Christophe Ricard Different computers had different settings in the mail client. Some contributions appear as Christophe Ricard, others as Christophe RICARD. Signed-off-by: Christophe Ricard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit f76be61755c52f4e827755901f6317cc1d007b51 Author: Andi Kleen Date: Fri Apr 1 14:31:40 2016 -0700 Make CONFIG_FHANDLE default y Newer Fedora and OpenSUSE didn't boot with my standard configuration. It took me some time to figure out why, in fact I had to write a script to try different config options systematically. The problem is that something (systemd) in dracut depends on CONFIG_FHANDLE, which adds open by file handle syscalls. While it is set in defconfigs it is very easy to miss when updating older configs because it is not default y. Make it default y and also depend on EXPERT, as dracut use is likely widespread. Signed-off-by: Andi Kleen Cc: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec3b6882509188602dfaadf2814a9cca062f2786 Author: Neil Zhang Date: Fri Apr 1 14:31:37 2016 -0700 mm/page_isolation.c: fix the function comments Commit fea85cff11de ("mm/page_isolation.c: return last tested pfn rather than failure indicator") changed the meaning of the return value. Let's change the function comments as well. Signed-off-by: Neil Zhang Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af8e15cc85a253155fdcea707588bf6ddfc0be2e Author: Michal Hocko Date: Fri Apr 1 14:31:34 2016 -0700 oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head Commit bb29902a7515 ("oom, oom_reaper: protect oom_reaper_list using simpler way") has simplified the check for tasks already enqueued for the oom reaper by checking tsk->oom_reaper_list != NULL. This check is not sufficient because the tsk might be the head of the queue without any other tasks queued and then we would simply lockup looping on the same task. Fix the condition by checking for the head as well. Fixes: bb29902a7515 ("oom, oom_reaper: protect oom_reaper_list using simpler way") Signed-off-by: Michal Hocko Acked-by: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bbe3de2560280c0420d36a192e69f2772e893cf4 Author: Lucas Stach Date: Fri Apr 1 14:31:32 2016 -0700 mm/page_isolation: fix tracepoint to mirror check function behavior Page isolation has not failed if the fin pfn extends beyond the end pfn and test_pages_isolated checks this correctly. Fix the tracepoint to report the same result as the actual check function. Signed-off-by: Lucas Stach Acked-by: Vlastimil Babka Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/page_isolation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 858eaaa711700ce4595e039441e239e56d7b9514 Author: Nadav Amit Date: Fri Apr 1 14:31:26 2016 -0700 mm/rmap: batched invalidations should use existing api The recently introduced batched invalidations mechanism uses its own mechanism for shootdown. However, it does wrong accounting of interrupts (e.g., inc_irq_stat is called for local invalidations), trace-points (e.g., TLB_REMOTE_SHOOTDOWN for local invalidations) and may break some platforms as it bypasses the invalidation mechanisms of Xen and SGI UV. This patch reuses the existing TLB flushing mechnaisms instead. We use NULL as mm to indicate a global invalidation is required. Fixes 72b252aed506b8 ("mm: send one IPI per CPU to TLB flush all entries after unmapping pages") Signed-off-by: Nadav Amit Cc: Mel Gorman Cc: Rik van Riel Cc: Dave Hansen Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/tlbflush.h | 6 ------ arch/x86/mm/tlb.c | 2 +- mm/rmap.c | 28 +++++++--------------------- 3 files changed, 8 insertions(+), 28 deletions(-) commit 18c98243ddf05a1827ad2c359c5ac051101e7ff7 Author: Nadav Amit Date: Fri Apr 1 14:31:23 2016 -0700 x86/mm: TLB_REMOTE_SEND_IPI should count pages TLB_REMOTE_SEND_IPI was recently introduced, but it counts bytes instead of pages. In addition, it does not report correctly the case in which flush_tlb_page flushes a page. Fix it to be consistent with other TLB counters. Fixes: 5b74283ab251b9d ("x86, mm: trace when an IPI is about to be sent") Signed-off-by: Nadav Amit Cc: Mel Gorman Cc: Rik van Riel Cc: Dave Hansen Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/tlb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6f25a14a7053b69917e2ebea0d31dd444cd31fd5 Author: Xishi Qiu Date: Fri Apr 1 14:31:20 2016 -0700 mm: fix invalid node in alloc_migrate_target() It is incorrect to use next_node to find a target node, it will return MAX_NUMNODES or invalid node. This will lead to crash in buddy system allocation. Fixes: c8721bbbdd36 ("mm: memory-hotplug: enable memory hotplug to handle hugepage") Signed-off-by: Xishi Qiu Acked-by: Vlastimil Babka Acked-by: Naoya Horiguchi Cc: Joonsoo Kim Cc: David Rientjes Cc: "Laura Abbott" Cc: Hui Zhu Cc: Wang Xiaoqiang Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 969e8d7e47f93ef693028667480558de8f70523f Author: Chen Gang Date: Fri Apr 1 14:31:17 2016 -0700 include/linux/huge_mm.h: return NULL instead of false for pmd_trans_huge_lock() The return value of pmd_trans_huge_lock() is a pointer, not a boolean value, so use NULL instead of false as the return value. Signed-off-by: Chen Gang Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b355eaaaae9bb8bb08b563ef55ecb23a4d743da Author: Alexander Potapenko Date: Fri Apr 1 14:31:15 2016 -0700 mm, kasan: fix compilation for CONFIG_SLAB Add the missing argument to set_track(). Fixes: cd11016e5f52 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") Signed-off-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Steven Rostedt Cc: Joonsoo Kim Cc: Konstantin Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b39c3cf44cda4770025a660af9abcd4cf9b62f56 Author: Joe Perches Date: Fri Apr 1 14:31:12 2016 -0700 MAINTAINERS: orangefs mailing list is subscribers-only So update MAINTAINERS to say so. Signed-off-by: Joe Perches Cc: Mike Marshall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a67b1182e5abfcfcec24762ea95a77332f035e Author: Guoqing Jiang Date: Fri Apr 1 17:08:49 2016 +0800 md/bitmap: clear bitmap if bitmap_create failed If bitmap_create returns an error, we need to call either bitmap_destroy or bitmap_free to do clean up, and the selection is based on mddev->bitmap is set or not. And the sysfs_put(bitmap->sysfs_can_clear) is moved from bitmap_destroy to bitmap_free, and the comment of bitmap_create is changed as well. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit db5dd0db2d8352bb7fd5e9d16e17b79d66c7e4e3 Author: Marcin Wojtas Date: Fri Apr 1 15:21:18 2016 +0200 net: mvneta: fix changing MTU when using per-cpu processing After enabling per-cpu processing it appeared that under heavy load changing MTU can result in blocking all port's interrupts and transmitting data is not possible after the change. This commit fixes above issue by disabling percpu interrupts for the time, when TXQs and RXQs are reconfigured. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit ce2a04c15f4b943015aab0c7476cb1460654e914 Merge: c66e98c a7657f1 Author: David S. Miller Date: Fri Apr 1 14:38:59 2016 -0400 Merge branch 'stmmac-fixes' Giuseppe Cavallaro says: ==================== stmmac MDIO and normal descr fixes This patch series is to fix the problems below and recently debugged in this mailing list: o to fix a problem for the HW where the normal descriptor o to fix the mdio registration according to the different platform configurations I am resending all the patches again: built on top of net.git repo. ==================== Signed-off-by: David S. Miller commit a7657f128c279ae5796ab2ca7d04a7819f4259f0 Author: Giuseppe CAVALLARO Date: Fri Apr 1 09:07:16 2016 +0200 stmmac: fix MDIO settings Initially the phy_bus_name was added to manipulate the driver name but it was recently just used to manage the fixed-link and then to take some decision at run-time. So the patch uses the is_pseudo_fixed_link and removes the phy_bus_name variable not necessary anymore. The driver can manage the mdio registration by using phy-handle, dwmac-mdio and own parameter e.g. snps,phy-addr. This patch takes care about all these possible configurations and fixes the mdio registration in case of there is a real transceiver or a switch (that needs to be managed by using fixed-link). Signed-off-by: Giuseppe Cavallaro Reviewed-by: Andreas Färber Tested-by: Frank Schäfer Cc: Gabriel Fernandez Cc: Dinh Nguyen Cc: David S. Miller Cc: Phil Reid Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 19 +---- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 84 +++++++++++++++++----- include/linux/stmmac.h | 2 +- 4 files changed, 73 insertions(+), 48 deletions(-) commit d7e944c8ddc0983640a9a32868fb217485d12ca2 Author: Giuseppe CAVALLARO Date: Fri Apr 1 09:07:15 2016 +0200 Revert "stmmac: Fix 'eth0: No PHY found' regression" This reverts commit 88f8b1bb41c6208f81b6a480244533ded7b59493. due to problems on GeekBox and Banana Pi M1 board when connected to a real transceiver instead of a switch via fixed-link. Signed-off-by: Giuseppe Cavallaro Cc: Gabriel Fernandez Cc: Andreas Färber Cc: Frank Schäfer Cc: Dinh Nguyen Cc: David S. Miller Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 11 ++++++++++- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 +-------- include/linux/stmmac.h | 1 - 3 files changed, 11 insertions(+), 10 deletions(-) commit a00e3ab64be2e482bd25fe30bdc9bfa6e2b0cf1c Author: Giuseppe CAVALLARO Date: Fri Apr 1 09:07:14 2016 +0200 stmmac: fix TX normal DESC This patch fixs a regression raised when test on chips that use the normal descriptor layout. In fact, no len bits were set for the TDES1 and no OWN bit inside the TDES0. Signed-off-by: Giuseppe CAVALLARO Tested-by: Andreas Färber Cc: Fabrice Gasnier Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c66e98c9532bf7b58fe78cc59fb37d3ff651756d Author: Jisheng Zhang Date: Fri Apr 1 17:12:49 2016 +0800 net: mvneta: use cache_line_size() to get cacheline size L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size to determine the cacheline size in runtime. Signed-off-by: Jisheng Zhang Suggested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a0a12d27ca5e892579f3c61c18c8dcfebf425d4 Author: Jisheng Zhang Date: Fri Apr 1 17:11:05 2016 +0800 net: mvpp2: use cache_line_size() to get cacheline size L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size to determine the cacheline size in runtime. Signed-off-by: Jisheng Zhang Suggested-by: Marcin Wojtas Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d82b0c21d44d1cc61a23db56c2b2cf52ea9f3220 Author: Jisheng Zhang Date: Thu Mar 31 17:01:23 2016 +0800 net: mvpp2: fix maybe-uninitialized warning This is to fix the following maybe-uninitialized warning: drivers/net/ethernet/marvell/mvpp2.c:6007:18: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a5abb1fa3b05dd6aa821525832644c1e7d2905f Author: Daniel Borkmann Date: Thu Mar 31 02:13:18 2016 +0200 tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter Sasha Levin reported a suspicious rcu_dereference_protected() warning found while fuzzing with trinity that is similar to this one: [ 52.765684] net/core/filter.c:2262 suspicious rcu_dereference_protected() usage! [ 52.765688] other info that might help us debug this: [ 52.765695] rcu_scheduler_active = 1, debug_locks = 1 [ 52.765701] 1 lock held by a.out/1525: [ 52.765704] #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 [ 52.765721] stack backtrace: [ 52.765728] CPU: 1 PID: 1525 Comm: a.out Not tainted 4.5.0+ #264 [...] [ 52.765768] Call Trace: [ 52.765775] [] dump_stack+0x85/0xc8 [ 52.765784] [] lockdep_rcu_suspicious+0xd5/0x110 [ 52.765792] [] sk_detach_filter+0x82/0x90 [ 52.765801] [] tun_detach_filter+0x35/0x90 [tun] [ 52.765810] [] __tun_chr_ioctl+0x354/0x1130 [tun] [ 52.765818] [] ? selinux_file_ioctl+0x130/0x210 [ 52.765827] [] tun_chr_ioctl+0x13/0x20 [tun] [ 52.765834] [] do_vfs_ioctl+0x96/0x690 [ 52.765843] [] ? security_file_ioctl+0x43/0x60 [ 52.765850] [] SyS_ioctl+0x79/0x90 [ 52.765858] [] do_syscall_64+0x62/0x140 [ 52.765866] [] entry_SYSCALL64_slow_path+0x25/0x25 Same can be triggered with PROVE_RCU (+ PROVE_RCU_REPEATEDLY) enabled from tun_attach_filter() when user space calls ioctl(tun_fd, TUN{ATTACH, DETACH}FILTER, ...) for adding/removing a BPF filter on tap devices. Since the fix in f91ff5b9ff52 ("net: sk_{detach|attach}_filter() rcu fixes") sk_attach_filter()/sk_detach_filter() now dereferences the filter with rcu_dereference_protected(), checking whether socket lock is held in control path. Since its introduction in 994051625981 ("tun: socket filter support"), tap filters are managed under RTNL lock from __tun_chr_ioctl(). Thus the sock_owned_by_user(sk) doesn't apply in this specific case and therefore triggers the false positive. Extend the BPF API with __sk_attach_filter()/__sk_detach_filter() pair that is used by tap filters and pass in lockdep_rtnl_is_held() for the rcu_dereference_protected() checks instead. Reported-by: Sasha Levin Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/tun.c | 8 +++++--- include/linux/filter.h | 4 ++++ net/core/filter.c | 33 +++++++++++++++++++++------------ 3 files changed, 30 insertions(+), 15 deletions(-) commit 8f0e8746b4d57303d84f7b161a201e94fe22638f Author: Theodore Ts'o Date: Fri Apr 1 12:00:03 2016 -0400 ext4: avoid calling dquot_get_next_id() if quota is not enabled This should be fixed in the quota layer so we can test with the quota mutex held, but for now, we need this to avoid tests from crashing the kernel aborting the regression test suite. Signed-off-by: Theodore Ts'o fs/ext4/super.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 4f375903ccbff78e1da02133e51e37a097cd3313 Author: Sudip Mukherjee Date: Fri Apr 1 13:35:16 2016 +0100 s390/seccomp: include generic seccomp header file Fixes this build error on linux-next: kernel/seccomp.c: In function '__secure_computing_strict': kernel/seccomp.c:526:3: error: implicit declaration of function 'get_compat_mode1_syscalls' The retrieval of compat syscall numbers were moved into inline function defined in asm-generic header but the asm-generic header is not being used by s390. [heiko.carstens@de.ibm.com]: even though the build error will trigger only in the next merge window it makes sense to include the generic header file already now. Fixes: ("seccomp: Get compat syscalls from asm-generic header") Cc: Matt Redfearn Signed-off-by: Sudip Mukherjee Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/seccomp.h | 2 ++ 1 file changed, 2 insertions(+) commit 9d89d9e61d361f3adb75e1aebe4bb367faf16cfa Author: Sebastian Ott Date: Thu Mar 31 11:48:31 2016 +0200 s390/pci: add extra padding to function measurement block Newer machines might use a different (larger) format for function measurement blocks. To ensure that we comply with the alignment requirement on these machines and prevent memory corruption (when firmware writes more data than we expect) add 16 padding bytes at the end of the fmb. Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b707c65ae70e24c47a0ce4a7279224ce8f0ffb7f Author: Sebastian Ott Date: Tue Mar 22 19:00:55 2016 +0100 s390/scm_blk: fix deadlock for requests != REQ_TYPE_FS When we refuse a non REQ_TYPE_FS request in the build request function we already hold the queue lock. Thus we must not call blk_end_request_all but __blk_end_request_all. Reported-by: Peter Oberparleiter Fixes: de9587a ('s390/scm_blk: fix endless loop for requests != REQ_TYPE_FS') Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/scm_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb4add2ce991e4ec891b5a0287fd1ab77b631979 Author: Srinivas Kandagatla Date: Fri Apr 1 08:52:58 2016 +0100 ARM: dts: apq8064: add ahci ports-implemented mask This patch adds new ports-implemented mask, which is required to get achi working on the mainline. Without this patch value read from PORTS_IMPL register which is zero would not enable any ports for software to use. Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Srinivas Kandagatla Reviewed-by: Andy Gross Signed-off-by: Tejun Heo arch/arm/boot/dts/qcom-apq8064.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17dcc37e3e847bc0e67a5b1ec52471fcc6c18682 Author: Srinivas Kandagatla Date: Fri Apr 1 08:52:57 2016 +0100 ata: ahci-platform: Add ports-implemented DT bindings. On some SOCs PORTS_IMPL register value is never programmed by the firmware and left at zero value. Which means that no sata ports are available for software. AHCI driver used to cope up with this by fabricating the port_map if the PORTS_IMPL register is read zero, but recent patch broke this workaround as zero value was valid for NVMe disks. This patch adds ports-implemented DT bindings as workaround for this issue in a way that DT can can override the PORTS_IMPL register in cases where the firmware did not program it already. Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Srinivas Kandagatla Acked-by: Tejun Heo Reviewed-by: Andy Gross Signed-off-by: Tejun Heo Documentation/devicetree/bindings/ata/ahci-platform.txt | 4 ++++ drivers/ata/ahci_platform.c | 3 +++ 2 files changed, 7 insertions(+) commit 2fd0f46cb1b82587c7ae4a616d69057fb9bd0af7 Author: Srinivas Kandagatla Date: Fri Apr 1 08:52:56 2016 +0100 libahci: save port map for forced port map In usecases where force_port_map is used saved_port_map is never set, resulting in not programming the PORTS_IMPL register as part of initial config. This patch fixes this by setting it to port_map even in case where force_port_map is used, making it more inline with other parts of the code. Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Srinivas Kandagatla Acked-by: Tejun Heo Reviewed-by: Andy Gross Signed-off-by: Tejun Heo drivers/ata/libahci.c | 1 + 1 file changed, 1 insertion(+) commit 5e916a3ada5f0c3e8a97ee3bb674e81a9bf78a71 Author: Michel Dänzer Date: Fri Apr 1 17:28:44 2016 +0900 drm/radeon: Only call drm_vblank_on/off between drm_vblank_init/cleanup Prevents the if (WARN_ON(pipe >= dev->num_crtcs)) in drm_vblank_on/off from triggering if acceleration fails to initialize, in which case we call drm_vblank_cleanup. Reported-and-Tested-by: Julian Margetson Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_crtc.c | 6 ++++-- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit fc387a0b183150b5beb953d740441f19b49a1fb3 Author: Chunming Zhou Date: Thu Mar 31 11:07:14 2016 +0800 drm/amdgpu: fence wait old rcu slot since the rcu slot was initialized to be num_hw_submission, if command submission doesn't use scheduler, this limitation will be invalid like uvd test. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ab7e9c137a85cf942c720498501d29719e61160c Author: Christian König Date: Thu Mar 31 13:05:51 2016 +0200 drm/amdgpu: fix leaking fence in the pageflip code This fixes a memory leak when we can't register the callback on a fence. Signed-off-by: Christian König Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f8628c76454561de3c3acd513fa9b17abf864cf Author: Alex Deucher Date: Thu Mar 31 16:56:22 2016 -0400 drm/amdgpu: print vram type rather than just DDR We have the info, so use it rather than reporting just DDR. Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit b634de4f446c062a0c95ec4d150b4cf7c85e3526 Author: Alex Deucher Date: Thu Mar 31 16:41:32 2016 -0400 drm/amdgpu/gmc: use proper register for vram type on Fiji The offset changed on Fiji. Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d1518a1db31a25682ea09c4b135fa72d9883be42 Author: Alex Deucher Date: Thu Mar 31 16:07:38 2016 -0400 drm/amdgpu/gmc: move vram type fetching into sw_init early_init gets called before atom asic init so on non-posted cards, the vram type is not initialized. Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 354edd8e94e910a68bb74a434f055bc3600499f2 Author: Michel Dänzer Date: Thu Mar 31 15:46:43 2016 +0900 drm/amdgpu: Set vblank_disable_allowed = true Without this, since the conversion from drm_vblank_pre/post_modeset to drm_vblank_on/off, the vblank interrupt could never be disabled after userspace triggered enabling it. Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 ++ 1 file changed, 2 insertions(+) commit 978ccad69f8da5d24dabe3e4352acc22c82eb873 Author: Michel Dänzer Date: Thu Mar 31 15:46:42 2016 +0900 drm/radeon: Set vblank_disable_allowed = true Without this, since the conversion from drm_vblank_pre/post_modeset to drm_vblank_on/off, the vblank interrupt could never be disabled after userspace triggered enabling it. Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 ++ 1 file changed, 2 insertions(+) commit e0c771637f5a4713a99abac79bcff5d743047328 Author: Rex Zhu Date: Tue Mar 29 18:45:59 2016 +0800 drm/amd/powerplay: Need to change boot to performance state in resume. Fixes slow performance on resume. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbe6aa9953b2cef7f3a060e8b543a2271d0d5014 Author: Rex Zhu Date: Tue Mar 29 18:31:43 2016 +0800 drm/amd/powerplay: add new Fiji function for not setting same ps. Add comparison function used by powerplay to determine which power state to select. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 5349ece70600bd574d9a825801c00f900acda3d4 Author: Rex Zhu Date: Tue Mar 29 14:34:51 2016 +0800 drm/amdgpu: check dpm state before pm system fs initialized. Make sure powerplay initialized properly before enabling debugfs pm files. Signed-off-by: Rex Zhu Reviewed- by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5 Author: Rex Zhu Date: Tue Mar 29 14:24:33 2016 +0800 drm/amd/powerplay: notify amdgpu whether dpm is enabled or not. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1587f6e40b94527fa38811a9a49c8b6656597e9d Author: Rex Zhu Date: Tue Mar 29 14:21:50 2016 +0800 drm/amdgpu: Not support disable dpm in powerplay. We don't support the dpm parameter in powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4c90080b19aad59c3a4a91a0a2d68fdee0643c37 Author: Rex Zhu Date: Tue Mar 29 14:20:37 2016 +0800 drm/amdgpu: add an cgs interface to notify amdgpu the dpm state. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 11 +++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 8 ++++++++ 2 files changed, 19 insertions(+) commit f9e9c08e20d71cabef7d5c2a7eb75e1d953dad16 Author: Rex Zhu Date: Tue Mar 29 13:21:59 2016 +0800 drm/amd/powerplay: fix segment fault issue in multi-display case. Signed-off-by: Rex Zhu Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit e1641c9d174ee21b4a75a64ab6df9063cf60ac4a Author: Linus Walleij Date: Fri Apr 1 15:21:27 2016 +0200 Revert "Revert "pinctrl: lantiq: Implement gpio_chip.to_irq"" This reverts commit 446f59acb70b70a425ea4105277a71eb615327cd. drivers/pinctrl/pinctrl-xway.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6ddf37da05cd71bf9e43349d607e810b43c9008a Merge: 52bef0c 72b9ff0 Author: Linus Torvalds Date: Fri Apr 1 07:21:18 2016 -0500 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Nothing too crazy in here: a bunch of AMD fixes/quirks, two msm fixes, some rockchip fixes, and a udl warning fix, along with one locking fix for displayport that seems to fix some dodgy monitors" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/udl: Use unlocked gem unreferencing drm/dp: move hw_mutex up the call stack drm/amdgpu: Don't move pinned BOs drm/radeon: Don't move pinned BOs drm/radeon: add a dpm quirk for all R7 370 parts drm/radeon: add another R7 370 quirk drm/rockchip: dw_hdmi: Don't call platform_set_drvdata() drm/rockchip: vop: Fix vop crtc cleanup drm/rockchip: dw_hdmi: Call drm_encoder_cleanup() in error path drm/rockchip: vop: Disable planes when disabling CRTC drm/rockchip: vop: Don't reject empty modesets drm/rockchip: cancel pending vblanks on close drm/rockchip: vop: fix crtc size in plane check drm/radeon: add a dpm quirk for sapphire Dual-X R7 370 2G D5 drm/amd: Beef up ACP Kconfig menu text drm/msm: fix typo in the !COMMON_CLK case drm/msm: fix bug after preclose removal commit 52bef0cb107d0cc801bbdb931de97d3e501ebf2c Merge: dc8a64e 71528d8 Author: Linus Torvalds Date: Fri Apr 1 07:18:27 2016 -0500 Merge tag 'powerpc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fixup preempt underflow with huge pages from Sebastian Siewior - Fix altivec SPR not being saved from Oliver O'Halloran - Correct used_vsr comment from Simon Guo * tag 'powerpc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Correct used_vsr comment powerpc/process: Fix altivec SPR not being saved powerpc/mm: Fixup preempt underflow with huge pages commit dc8a64ee1ab3f7ef34488392de7ee908047d6f99 Merge: c05c2ec 3358999 Author: Linus Torvalds Date: Fri Apr 1 07:15:54 2016 -0500 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - A proper fix for the locking issue in the dasd driver - Wire up the new preadv2 nad pwritev2 system calls - Add the mark_rodata_ro function and set DEBUG_RODATA=y - A few more bug fixes. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: wire up preadv2/pwritev2 syscalls s390/pci: PCI function group 0 is valid for clp_query_pci_fn s390/crypto: provide correct file mode at device register. s390/mm: handle PTE-mapped tail pages in fast gup s390: add DEBUG_RODATA support s390: disable postinit-readonly for now s390/dasd: reorder lcu and device lock s390/cpum_sf: Fix cpu hotplug notifier transitions s390/cpum_cf: Fix missing cpu hotplug notifier transition commit 7d4bd1d2819ef1035ba1ed648358df37b51ade6f Author: Will Deacon Date: Fri Apr 1 12:12:22 2016 +0100 arm64: KVM: Add braces to multi-line if statement in virtual PMU code The kernel is written in C, not python, so we need braces around multi-line if statements. GCC 6 actually warns about this, thanks to the fantastic new "-Wmisleading-indentation" flag: | virt/kvm/arm/pmu.c: In function ‘kvm_pmu_overflow_status’: | virt/kvm/arm/pmu.c:198:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] | reg &= vcpu_sys_reg(vcpu, PMCNTENSET_EL0); | ^~~ | arch/arm64/kvm/../../../virt/kvm/arm/pmu.c:196:2: note: ...this ‘if’ clause, but it is not | if ((vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E)) | ^~ As it turns out, this particular case is harmless (we just do some &= operations with 0), but worth fixing nonetheless. Signed-off-by: Will Deacon Signed-off-by: Christoffer Dall virt/kvm/arm/pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0c508a418f9daeb49bf9c387c84d89381b28540 Author: Ben Hutchings Date: Thu Mar 31 16:40:05 2016 +0100 i2c: mux: demux-pinctrl: Clean up sysfs attributes sysfs attributes should use the same format for reads and writes, rather than pretty-printing on read. * Make the "cur_master" attribute read back as just the name of the master * Expose the list of all masters as a read-only "available_masters" attribute, using space separators as in similar attributes of other devices Also, spell out "cur_master" in full as "current_master". Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver") Signed-off-by: Ben Hutchings Tested-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-demux-pinctrl.c | 39 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) commit 4a07083ed613644c96c34a7dd2853dc5d7c70902 Author: Takashi Iwai Date: Fri Apr 1 12:28:16 2016 +0200 ALSA: timer: Use mod_timer() for rearming the system timer ALSA system timer backend stops the timer via del_timer() without sync and leaves del_timer_sync() at the close instead. This is because of the restriction by the design of ALSA timer: namely, the stop callback may be called from the timer handler, and calling the sync shall lead to a hangup. However, this also triggers a kernel BUG() when the timer is rearmed immediately after stopping without sync: kernel BUG at kernel/time/timer.c:966! Call Trace: [] snd_timer_s_start+0x13e/0x1a0 [] snd_timer_interrupt+0x504/0xec0 [] ? debug_check_no_locks_freed+0x290/0x290 [] snd_timer_s_function+0xb4/0x120 [] call_timer_fn+0x162/0x520 [] ? call_timer_fn+0xcd/0x520 [] ? snd_timer_interrupt+0xec0/0xec0 .... It's the place where add_timer() checks the pending timer. It's clear that this may happen after the immediate restart without sync in our cases. So, the workaround here is just to use mod_timer() instead of add_timer(). This looks like a band-aid fix, but it's a right move, as snd_timer_interrupt() takes care of the continuous rearm of timer. Reported-by: Jiri Slaby Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14f4760562e41d50817d56b42c821d70ad10b483 Author: Yu Zhao Date: Wed Mar 30 13:38:09 2016 -0700 kvm: set page dirty only if page has been writable In absence of shadow dirty mask, there is no need to set page dirty if page has never been writable. This is a tiny optimization but good to have for people who care much about dirty page tracking. Signed-off-by: Yu Zhao Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 14ebda3394fd3e5388747e742e510b0802a65d24 Author: Paolo Bonzini Date: Tue Mar 29 17:56:57 2016 +0200 KVM: x86: reduce default value of halt_poll_ns parameter Windows lets applications choose the frequency of the timer tick, and in Windows 10 the maximum rate was changed from 1024 Hz to 2048 Hz. Unfortunately, because of the way the Windows API works, most applications who need a higher rate than the default 64 Hz will just do timeGetDevCaps(&tc, sizeof(tc)); timeBeginPeriod(tc.wPeriodMin); and pick the maximum rate. This causes very high CPU usage when playing media or games on Windows 10, even if the guest does not actually use the CPU very much, because the frequent timer tick causes halt_poll_ns to kick in. There is no really good solution, especially because Microsoft could sooner or later bump the limit to 4096 Hz, but for now the best we can do is lower a bit the upper limit for halt_poll_ns. :-( Reported-by: Jon Panozzo Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2b5c3c0c8eea2d5d0eefcfc0fc0bdf386daa260 Author: Paolo Bonzini Date: Tue Mar 29 11:23:25 2016 +0200 KVM: Hyper-V: do not do hypercall userspace exits if SynIC is disabled If SynIC is disabled, there is nothing that userspace can do to handle these exits; on the other hand, userspace probably will not know about KVM_EXIT_HYPERV_HCALL and complain about it or even exit. Just prevent anything bad from happening by handling the hypercall in KVM and returning an "invalid hypercall" code. Fixes: 83326e43f27e9a8a501427a0060f8af519a39bb2 Cc: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 321c5658c5e9192dea0d58ab67cf1791e45b2b26 Author: Yuki Shibuya Date: Thu Mar 24 05:17:03 2016 +0000 KVM: x86: Inject pending interrupt even if pending nmi exist Non maskable interrupts (NMI) are preferred to interrupts in current implementation. If a NMI is pending and NMI is blocked by the result of nmi_allowed(), pending interrupt is not injected and enable_irq_window() is not executed, even if interrupts injection is allowed. In old kernel (e.g. 2.6.32), schedule() is often called in NMI context. In this case, interrupts are needed to execute iret that intends end of NMI. The flag of blocking new NMI is not cleared until the guest execute the iret, and interrupts are blocked by pending NMI. Due to this, iret can't be invoked in the guest, and the guest is starved until block is cleared by some events (e.g. canceling injection). This patch injects pending interrupts, when it's allowed, even if NMI is blocked. And, If an interrupts is pending after executing inject_pending_event(), enable_irq_window() is executed regardless of NMI pending counter. Cc: stable@vger.kernel.org Signed-off-by: Yuki Shibuya Suggested-by: Paolo Bonzini Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c26e5f303a1e10a76dab81cd4c93dfec3a8bff6b Merge: 1993b17 5f5560b Author: Paolo Bonzini Date: Fri Apr 1 12:10:06 2016 +0200 Merge tag 'kvm-arm-for-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Fixes for Linux v4.6-rc2. Fixes a bug that corrupts stage-2 translationson 16-bit VMID equipped systems and fixes CPU PM and Hotplug after the EL2 init code has been moved to C. commit 0a0f5b7e5b56829b91d3637cf6999e0ade791ddb Author: Gabriele Mazzotta Date: Tue Mar 29 22:10:41 2016 +0200 HID: multitouch: Synchronize MT frame on reset_resume input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called at each frame. Do it when releasing the touches, or else we won't get a proper slot number after mt_reset_resume(). Signed-off-by: Gabriele Mazzotta Reviewed-by: Benson Leung Reviewed-by: Benjamin TIssoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 1 + 1 file changed, 1 insertion(+) commit f87e0434a3bedeb5e4d75d96d9f3ad424dae6b33 Author: Rusty Russell Date: Fri Apr 1 12:15:46 2016 +1030 lguest, x86/entry/32: Fix handling of guest syscalls using interrupt gates In a798f091113e ("x86/entry/32: Change INT80 to be an interrupt gate") Andy broke lguest. This is because lguest had special code to allow the 0x80 trap gate go straight into the guest itself; interrupts gates (without more work, as mentioned in the file's comments) bounce via the hypervisor. His change made them go via the hypervisor, but as it's in the range of normal hardware interrupts, they were not directed through to the guest at all. Turns out the guest userspace isn't very effective if syscalls are all noops. I haven't ripped out all the now-useless trap-direct-to-guest-kernel code yet, since it will still be needed if someone decides to update this optimization. Signed-off-by: Rusty Russell Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Weisbecker Cc: x86\@kernel.org Link: http://lkml.kernel.org/r/87fuv685kl.fsf@rustcorp.com.au Signed-off-by: Ingo Molnar drivers/lguest/interrupts_and_traps.c | 6 +++++- drivers/lguest/lg.h | 1 + drivers/lguest/x86/core.c | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) commit 3358999a8e7ae82912e5908adb7150a6558d6702 Author: Heiko Carstens Date: Mon Mar 21 13:48:43 2016 +0100 s390: wire up preadv2/pwritev2 syscalls Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/unistd.h | 4 +++- arch/s390/kernel/syscalls.S | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit aa624886b6fa5807ef0540d153f542d72c64acf3 Author: Pierre Morel Date: Wed Mar 16 13:56:35 2016 +0100 s390/pci: PCI function group 0 is valid for clp_query_pci_fn The PCI function group 0 is a valid function group, it is wrong to reject it. Let's accept PCI function group 0. Signed-off-by: Pierre Morel Acked-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_clp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 353def94606fda16d9ae1761b4b0583286481ec5 Author: Masami Hiramatsu Date: Thu Mar 31 22:33:23 2016 +0900 MAINTAINERS: Update my email address Since I moved to Linaro, this old address doesn't work anymore. I'll use my kernel.org account for upstreaming. Signed-off-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@redhat.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/1459431203-7438-1-git-send-email-mhiramat@kernel.org Signed-off-by: Ingo Molnar MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e84dfbe2bf170c626778079e5b94435b05b8d572 Author: Jan Kara Date: Fri Apr 1 02:07:22 2016 -0400 ext4: retry block allocation for failed DIO and DAX writes Currently if block allocation for DIO or DAX write fails due to ENOSPC, we just returned it to userspace. However these ENOSPC errors can be transient because the transaction freeing blocks has not yet committed. This demonstrates as failures of generic/102 test when the filesystem is mounted with 'dax' mount option. Fix the problem by properly retrying the allocation in case of ENOSPC error in get blocks functions used for direct IO. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Tested-by: Ross Zwisler fs/ext4/inode.c | 58 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit e549d190f7b5f94e9ab36bd965028112914d010d Author: Hui Wang Date: Fri Apr 1 11:00:15 2016 +0800 ALSA: hda - fix front mic problem for a HP desktop The front mic jack (pink color) can't detect any plug or unplug. After applying this fix, both detecting function and recording function work well. BugLink: https://bugs.launchpad.net/bugs/1564712 Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit daf647d2dd58cec59570d7698a45b98e580f2076 Author: Theodore Ts'o Date: Fri Apr 1 01:31:28 2016 -0400 ext4: add lockdep annotations for i_data_sem With the internal Quota feature, mke2fs creates empty quota inodes and quota usage tracking is enabled as soon as the file system is mounted. Since quotacheck is no longer preallocating all of the blocks in the quota inode that are likely needed to be written to, we are now seeing a lockdep false positive caused by needing to allocate a quota block from inside ext4_map_blocks(), while holding i_data_sem for a data inode. This results in this complaint: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem); lock(&s->s_dquot.dqio_mutex); lock(&ei->i_data_sem); lock(&s->s_dquot.dqio_mutex); Google-Bug-Id: 27907753 Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/ext4.h | 23 +++++++++++++++++++++++ fs/ext4/move_extent.c | 11 +++++++++-- fs/ext4/super.c | 25 +++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 4 deletions(-) commit 5e00bbfbc5ec21e87d24e206bba9fc2cbe6631a1 Author: Peter Hurley Date: Thu Mar 31 17:47:07 2016 -0700 tty: Fix merge of "tty: Refactor tty_open()" Commit e9036d066236 ("tty: Drop krefs for interrupted tty lock") fixed a tty reference counting problem introduced in commit 0bfd464d3fdd ("tty: Wait interruptibly for tty lock on reopen"), so v4.5.0 is correct. However, commit d6203d0c7b73 ("tty: Refactor tty_open()") moved the relevant code for 4.6-rc1; correct the merge. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 72b9ff0612ad8fc969b910cd00ac16b57a1a9ba4 Author: Daniel Vetter Date: Wed Mar 30 11:40:43 2016 +0200 drm/udl: Use unlocked gem unreferencing For drm_gem_object_unreference callers are required to hold dev->struct_mutex, which these paths don't. Enforcing this requirement has become a bit more strict with commit ef4c6270bf2867e2f8032e9614d1a8cfc6c71663 Author: Daniel Vetter Date: Thu Oct 15 09:36:25 2015 +0200 drm/gem: Check locking in drm_gem_object_unreference Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/udl/udl_fb.c | 2 +- drivers/gpu/drm/udl/udl_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7779c5e23c5132c22a219f1f5554ef81dd15ee91 Author: Rob Clark Date: Thu Feb 25 16:15:05 2016 -0500 drm/dp: move hw_mutex up the call stack 1) don't let other threads trying to bang on aux channel interrupt the defer timeout/logic 2) don't let other threads interrupt the i2c over aux logic Technically, according to people who actually have the DP spec, this should not be required. In practice, it makes some troublesome Dell monitor (and perhaps others) work, so probably a case of "It's compliant if it works with windows" on the hw vendor's part.. v2: rebased to come before DPCD/AUX logging patch for easier backport to stable branches. Reported-by: Dave Wysochanski Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1274157 Cc: stable@vger.kernel.org Signed-off-by: Rob Clark Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_helper.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 5456248d6647c61d333961ab919cec0350cdcb83 Merge: 90516d8 06b898e Author: Dave Airlie Date: Fri Apr 1 13:14:24 2016 +1000 Merge branch 'drm-rockchip-next-fixes-2016-03-28' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes bunch of rockchip fixes. * 'drm-rockchip-next-fixes-2016-03-28' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: dw_hdmi: Don't call platform_set_drvdata() drm/rockchip: vop: Fix vop crtc cleanup drm/rockchip: dw_hdmi: Call drm_encoder_cleanup() in error path drm/rockchip: vop: Disable planes when disabling CRTC drm/rockchip: vop: Don't reject empty modesets drm/rockchip: cancel pending vblanks on close drm/rockchip: vop: fix crtc size in plane check commit 90516d89cd02cbd18e87b9add68c448cd54579a8 Merge: 2f4fcb3 0a69509 Author: Dave Airlie Date: Fri Apr 1 13:14:10 2016 +1000 Merge branch 'msm-fixes-4.6-rc1' of git://people.freedesktop.org/~robclark/linux into drm-fixes two minor msm fixes. * 'msm-fixes-4.6-rc1' of git://people.freedesktop.org/~robclark/linux: drm/msm: fix typo in the !COMMON_CLK case drm/msm: fix bug after preclose removal commit 2f4fcb3eafd7e5d3e12f7e74093d2e8c43ef5eb6 Merge: c05c2ec 104ece9 Author: Dave Airlie Date: Fri Apr 1 13:13:34 2016 +1000 Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just a few fixes for 4.6 this week: - Add some SI DPM quirks - Improve the ACP Kconfig text - Additional BO pinning checks * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: Don't move pinned BOs drm/radeon: Don't move pinned BOs drm/radeon: add a dpm quirk for all R7 370 parts drm/radeon: add another R7 370 quirk drm/radeon: add a dpm quirk for sapphire Dual-X R7 370 2G D5 drm/amd: Beef up ACP Kconfig menu text commit f08bb1e0dbdd0297258d0b8cd4dbfcc057e57b2a Author: Martin K. Petersen Date: Mon Mar 28 21:18:56 2016 -0400 sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes During revalidate we check whether device capacity has changed before we decide whether to output disk information or not. The check for old capacity failed to take into account that we scaled sdkp->capacity based on the reported logical block size. And therefore the capacity test would always fail for devices with sectors bigger than 512 bytes and we would print several copies of the same discovery information. Avoid scaling sdkp->capacity and instead adjust the value on the fly when setting the block device capacity and generating fake C/H/S geometry. Signed-off-by: Martin K. Petersen Cc: Reported-by: Hannes Reinecke Reviewed-by: Hannes Reinicke Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 28 ++++++++-------------------- drivers/scsi/sd.h | 7 ++++++- 2 files changed, 14 insertions(+), 21 deletions(-) commit da5a0fc6743df9b5a3e9f915a1ed16f45465d529 Author: Peter Hurley Date: Thu Mar 31 17:05:30 2016 -0700 tty: Fix UML console breakage User-Mode Linux supplies an alternate TTY_MAJOR driver for stdio console, so the noctty check in tty_open() must apply only to VT driver tty0 devnode and not the UML console driver tty0 devnode. Fixes: 11e1d4aa4da1 ("tty: Consolidate noctty checks in tty_open()") Reported-by: Richard Weinberger Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79f4223257bfef52b0a26d0d7ad4019e764be6ce Author: Daniele Palmas Date: Thu Mar 31 15:16:47 2016 +0200 net: usb: cdc_ncm: adding Telit LE910 V2 mobile broadband card Telit LE910 V2 is a mobile broadband card with no ARP capabilities: the patch makes this device to use wwan_noarp_info struct Signed-off-by: Daniele Palmas Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c57c7a95da842807b475b823ed2e5435c42cb3b0 Author: Nicolas Dichtel Date: Thu Mar 31 18:10:31 2016 +0200 rtnl: fix msg size calculation in if_nlmsg_size() Size of the attribute IFLA_PHYS_PORT_NAME was missing. Fixes: db24a9044ee1 ("net: add support for phys_port_name") CC: David Ahern Signed-off-by: Nicolas Dichtel Acked-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 2ed94f6fde066fb37bc3553b786edb805561699e Author: Mark Brown Date: Thu Mar 31 10:18:09 2016 -0700 regmap: mmio: Explicitly say little endian is the defualt in the bus config Otherwise the DT parsing will default to big endian if nothing is specified. Reported-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/base/regmap/regmap-mmio.c | 1 + 1 file changed, 1 insertion(+) commit 7cc8cbcf82d165dd658d89a7a287140948e76413 Author: Ard Biesheuvel Date: Wed Mar 30 09:46:23 2016 +0200 efi/arm64: Don't apply MEMBLOCK_NOMAP to UEFI memory map mapping Commit 4dffbfc48d65 ("arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP") updated the mapping logic of both the RuntimeServices regions as well as the kernel's copy of the UEFI memory map to set the MEMBLOCK_NOMAP flag, which causes these regions to be omitted from the kernel direct mapping, and from being covered by a struct page. For the RuntimeServices regions, this is an obvious win, since the contents of these regions have significance to the firmware executable code itself, and are mapped in the EFI page tables using attributes that are described in the UEFI memory map, and which may differ from the attributes we use for mapping system RAM. It also prevents the contents from being modified inadvertently, since the EFI page tables are only live during runtime service invocations. None of these concerns apply to the allocation that covers the UEFI memory map, since it is entirely owned by the kernel. Setting the MEMBLOCK_NOMAP on the region did allow us to use ioremap_cache() to map it both on arm64 and on ARM, since the latter does not allow ioremap_cache() to be used on regions that are covered by a struct page. The ioremap_cache() on ARM restriction will be lifted in the v4.7 timeframe, but in the mean time, it has been reported that commit 4dffbfc48d65 causes a regression on 64k granule kernels. This is due to the fact that, given the 64 KB page size, the region that we end up removing from the kernel direct mapping is rounded up to 64 KB, and this 64 KB page frame may be shared with the initrd when booting via GRUB (which does not align its EFI_LOADER_DATA allocations to 64 KB like the stub does). This will crash the kernel as soon as it tries to access the initrd. Since the issue is specific to arm64, revert back to memblock_reserve()'ing the UEFI memory map when running on arm64. This is a temporary fix for v4.5 and v4.6, and will be superseded in the v4.7 timeframe when we will be able to move back to memblock_reserve() unconditionally. Fixes: 4dffbfc48d65 ("arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP") Reported-by: Mark Salter Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Cc: Leif Lindholm Cc: Mark Rutland Cc: Jeremy Linton Cc: Mark Langsdorf Cc: # v4.5 Signed-off-by: Matt Fleming drivers/firmware/efi/arm-init.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 162f98dea487206d9ab79fc12ed64700667a894d Author: Vladis Dronov Date: Thu Mar 31 10:53:42 2016 -0700 Input: gtco - fix crash on detecting device without endpoints The gtco driver expects at least one valid endpoint. If given malicious descriptors that specify 0 for the number of endpoints, it will crash in the probe function. Ensure there is at least one endpoint on the interface before using it. Also let's fix a minor coding style issue. The full correct report of this issue can be found in the public Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283385 Reported-by: Ralf Spenneberg Signed-off-by: Vladis Dronov Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/tablet/gtco.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 32867fcc0ef9e56939d5200ad983801bbfd581ad Author: Fabio Estevam Date: Thu Mar 31 12:05:17 2016 -0300 fec: Do not access unexisting register in Coldfire Commit 55cd48c821de ("net: fec: stop the "rcv is not +last, " error messages") introduces a write to a register that does not exist in Coldfire. Move the FEC_FTRL register access inside the FEC_QUIRK_HAS_RACC 'if' block, so that we guarantee it will not be used on Coldfire CPUs. Reported-by: Greg Ungerer Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bd9ddb7f89edae241d2da78e3119f226b9b0cf6 Author: Jisheng Zhang Date: Wed Mar 30 19:55:21 2016 +0800 net: mvneta: replace MVNETA_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES The mvneta is also used in some Marvell berlin family SoCs which may have 64bytes cacheline size. Replace the MVNETA_CPU_D_CACHE_LINE_SIZE usage with L1_CACHE_BYTES. And since dma_alloc_coherent() is always cacheline size aligned, so remove the align checks. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit b7854efce20be7c7bcd43424dee027124e9af27f Author: Jisheng Zhang Date: Wed Mar 30 19:53:41 2016 +0800 net: mvpp2: replace MVPP2_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES The mvpp2 ip maybe used in SoCs which may have have 64bytes cacheline size. Replace the MVPP2_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES. And since dma_alloc_coherent() is always cacheline size aligned, so remove the align checks. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 13a7ebb38a659254e71a4a95cf39429a9287912b Author: Patrick Uiterwijk Date: Wed Mar 30 01:39:41 2016 +0000 net: dsa: mv88e6xxx: Clear the PDOWN bit on setup Some of the vendor-specific bootloaders set up this part of the initialization for us, so this was never added. However, since upstream bootloaders don't initialize the chip specifically, they leave the fiber MII's PDOWN flag set, which means that the CPU port doesn't connect. This patch checks whether this flag has been clear prior by something else, and if not make us clear it. Reviewed-by: Andrew Lunn Signed-off-by: Patrick Uiterwijk Tested-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx.h | 8 ++++++++ 2 files changed, 44 insertions(+) commit 75baacf00fb471c3b01e604357ab53da7cf72dd4 Author: Patrick Uiterwijk Date: Wed Mar 30 01:39:40 2016 +0000 net: dsa: mv88e6xxx: Introduce _mv88e6xxx_phy_page_{read, write} Add versions of the phy_page_read and _write functions to be used in a context where the SMI mutex is held. Tested-by: Vivien Didelot Reviewed-by: Vivien Didelot Signed-off-by: Patrick Uiterwijk Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 49 +++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 13 deletions(-) commit e4c0e06f949b9493cafe952c3029576b47c2a7c4 Author: Shawn Lin Date: Thu Mar 31 11:11:41 2016 +0800 spi: rockchip: fix probe deferral handling Use dma_request_chan instead of dma_request_slave_channel, in this case we can check EPROBE_DEFER without static warning. Reported-by: Dan Carpenter Signed-off-by: Shawn Lin Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit c877ef8ae7b8edaedccad0fc8c23d4d1de7e2480 Author: Kaixu Xia Date: Thu Mar 31 13:19:41 2016 +0000 writeback: fix the wrong congested state variable definition The right variable definition should be wb_congested_state that include WB_async_congested and WB_sync_congested. So fix it. Signed-off-by: Kaixu Xia Acked-by: Tejun Heo Signed-off-by: Jens Axboe mm/backing-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 405ddbfa68177b6169d09bc2308a39196a8eb64a Author: Mauro Carvalho Chehab Date: Thu Mar 31 10:54:05 2016 -0300 [media] Revert "[media] media: au0828 change to use Managed Media Controller API" Extending the lifetime of the media_device struct is not handled well by the core, as it will erase some data from the struct, when media_device_cleanup() is called after unregistering it. While we have a fixup patch for it already, the usage of those new functions are needed only when we share data with other drivers. So, better to revert the changes. This reverts commit 182dde7c5d4c ("[media] media: au0828 change to use Managed Media Controller API") Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c89178f57a19300b2056f58167e183e966a4836d Author: Mauro Carvalho Chehab Date: Thu Mar 31 09:57:29 2016 -0300 [media] Revert "[media] sound/usb: Use Media Controller API to share media resources" Unfortunately, this patch caused several regressions at au0828 and snd-usb-audio, like this one: https://bugzilla.kernel.org/show_bug.cgi?id=115561 It also showed several troubles at the MC core that handles pretty poorly the memory protections and data lifetime management. So, better to revert it and fix the core before reapplying this change. This reverts commit aebb2b89bff0 ("[media] sound/usb: Use Media Controller API to share media resources")' Signed-off-by: Mauro Carvalho Chehab sound/usb/Kconfig | 4 - sound/usb/Makefile | 2 - sound/usb/card.c | 14 --- sound/usb/card.h | 3 - sound/usb/media.c | 318 ----------------------------------------------- sound/usb/media.h | 72 ----------- sound/usb/mixer.h | 3 - sound/usb/pcm.c | 28 +---- sound/usb/quirks-table.h | 1 - sound/usb/stream.c | 2 - sound/usb/usbaudio.h | 6 - 11 files changed, 5 insertions(+), 448 deletions(-) commit e8e3039f5b941f7825d335f8ca11c12a8104db11 Author: Mauro Carvalho Chehab Date: Tue Mar 22 09:21:57 2016 -0300 [media] au0828: Fix dev_state handling The au0828 dev_state is actually a bit mask. It should not be checking with "==" but, instead, with a logic and. There are some places where it was doing it wrong. Fix that by replacing the dev_state set/clear/test with the bitops. As reviewed by Shuah: "Looks good. Tested running bind/unbind au0828 loop for 1000 times. Didn't see any problems and the v4l2_querycap() problem has been fixed with this patch. After the above test, ran bind/unbind snd_usb_audio 1000 times. Didn't see any problems. Generated media graph and the graph looks good." Cc: stable@vger.kernel.org Reviewed-by: Shuah Khan Tested-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 2 +- drivers/media/usb/au0828/au0828-input.c | 4 +-- drivers/media/usb/au0828/au0828-video.c | 63 ++++++++++++++++----------------- drivers/media/usb/au0828/au0828.h | 9 ++--- 4 files changed, 39 insertions(+), 39 deletions(-) commit ed940cd27416f9887864b95e1f8f8845aa9d6391 Author: Shuah Khan Date: Tue Mar 22 01:04:05 2016 -0300 [media] au0828: fix au0828_v4l2_close() dev_state race condition au0828_v4l2_close() check for dev_state == DEV_DISCONNECTED will fail to detect the device disconnected state correctly, if au0828_v4l2_open() runs to set the DEV_INITIALIZED bit. A loop test of bind/unbind found this bug by increasing the likelihood of au0828_v4l2_open() occurring while unbind is in progress. When au0828_v4l2_close() fails to detect that the device is in disconnect state, it attempts to power down the device and fails with the following general protection fault: [ 260.992962] Call Trace: [ 260.993008] [] ? xc5000_sleep+0x8f/0xd0 [xc5000] [ 260.993095] [] ? fe_standby+0x3c/0x50 [tuner] [ 260.993186] [] au0828_v4l2_close+0x53c/0x620 [au0828] [ 260.993298] [] v4l2_release+0xf0/0x210 [videodev] [ 260.993382] [] __fput+0x1fc/0x6c0 [ 260.993449] [] ____fput+0xe/0x10 [ 260.993519] [] task_work_run+0x133/0x1f0 [ 260.993602] [] exit_to_usermode_loop+0x140/0x170 [ 260.993681] [] syscall_return_slowpath+0x16a/0x1a0 [ 260.993754] [] entry_SYSCALL_64_fastpath+0xa6/0xa8 Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffa8576a5380e098c4f066f50c5ec812b9abef43 Author: Shuah Khan Date: Sun Mar 13 00:57:40 2016 -0300 [media] media: au0828 fix to clear enable/disable/change source handlers Fix to clear enable/disable/change source handlers in the media device when media device is unregistered in au0828_unregister_media_device(). When au0828 module is removed, snd-usb-audio shouldn't call the handlers. Clearing will ensure snd-usb-audio won't call them once au0828 is removed. [mchehab@osg.samsung.com: fix a compilation breakage] Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0fed3fcef48aff793f00aca44f366ff77fa95a01 Author: Mauro Carvalho Chehab Date: Fri Mar 11 12:55:16 2016 -0300 [media] v4l2-mc: cleanup a warning A previous patch removing dtv_demod needed to be rebased, but the hunk removing the data was not merged by mistake. Fixes: 840f5b0572ea ('media: au0828 disable tuner to demod link in au0828_media_device_register()'] Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e208c64e3aa7abe7b79963bb29f5d14a4b96e58 Author: Mauro Carvalho Chehab Date: Fri Mar 11 16:02:14 2016 -0300 [media] au0828: disable tuner links and cache tuner/decoder For au0828_enable_source() to work, the tuner links should be disabled and the tuner/decoder should be cached at au0828 struct. While here, put dev->decoder cache together with dev->tuner, as it makes easier to drop both latter if/when we move the enable routines to the V4L2 core. Fixes: 9822f4173f84 ('[media] au0828: use v4l2_mc_create_media_graph()') Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Shuah Khan Tested-by: Shuah Khan drivers/media/usb/au0828/au0828-cards.c | 4 ---- drivers/media/usb/au0828/au0828-core.c | 42 +++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 19 deletions(-) commit ed3b98c71cd91fa05954df52a79dcd6be08dd730 Author: Shaohua Li Date: Tue Mar 29 14:00:19 2016 -0700 MD: add rdev reference for super write Xiao Ni reported below crash: [26396.335146] BUG: unable to handle kernel NULL pointer dereference at 00000000000002a8 [26396.342990] IP: [] super_written+0x20/0x80 [md_mod] [26396.349449] PGD 0 [26396.351468] Oops: 0002 [#1] SMP [26396.354898] Modules linked in: ext4 mbcache jbd2 raid456 async_raid6_recov async_memcpy async_pq async_xor xor async_td [26396.408404] CPU: 5 PID: 3261 Comm: loop0 Not tainted 4.5.0 #1 [26396.414140] Hardware name: Dell Inc. PowerEdge R715/0G2DP3, BIOS 3.2.2 09/15/2014 [26396.421608] task: ffff8808339be680 ti: ffff8808365f4000 task.ti: ffff8808365f4000 [26396.429074] RIP: 0010:[] [] super_written+0x20/0x80 [md_mod] [26396.437952] RSP: 0018:ffff8808365f7c38 EFLAGS: 00010046 [26396.443252] RAX: ffffffffa0425ae0 RBX: ffff8804336a7900 RCX: ffffe8f9f7b41198 [26396.450371] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8804336a7900 [26396.457489] RBP: ffff8808365f7c50 R08: 0000000000000005 R09: 00001801e02ce3d7 [26396.464608] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 [26396.471728] R13: ffff8808338d9a00 R14: 0000000000000000 R15: ffff880833f9fe00 [26396.478849] FS: 00007f9e5066d740(0000) GS:ffff880237b40000(0000) knlGS:0000000000000000 [26396.486922] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [26396.492656] CR2: 00000000000002a8 CR3: 00000000019ea000 CR4: 00000000000006e0 [26396.499775] Stack: [26396.501781] ffff8804336a7900 0000000000000000 0000000000000000 ffff8808365f7c68 [26396.509199] ffffffff81308cd0 ffff8804336a7900 ffff8808365f7ca8 ffffffff81310637 [26396.516618] 00000000a0233a00 ffff880833f9fe00 0000000000000000 ffff880833fb0000 [26396.524038] Call Trace: [26396.526485] [] bio_endio+0x40/0x60 [26396.531529] [] blk_update_request+0x87/0x320 [26396.537439] [] blk_mq_end_request+0x1a/0x70 [26396.543261] [] blk_flush_complete_seq+0xd9/0x2a0 [26396.549517] [] flush_end_io+0x15f/0x240 [26396.554993] [] blk_mq_end_request+0x3a/0x70 [26396.560815] [] __blk_mq_complete_request+0xb4/0xe0 [26396.567246] [] blk_mq_complete_request+0x1c/0x20 [26396.573506] [] loop_queue_work+0x6f/0x72c [loop] [26396.579764] [] ? __schedule+0x2b4/0x8f0 [26396.585242] [] kthread_worker_fn+0x52/0x170 [26396.591065] [] ? kthread_create_on_node+0x1a0/0x1a0 [26396.597582] [] kthread+0xd8/0xf0 [26396.602453] [] ? kthread_park+0x60/0x60 [26396.607929] [] ret_from_fork+0x3f/0x70 [26396.613319] [] ? kthread_park+0x60/0x60 md_super_write() and corresponding md_super_wait() generally are called with reconfig_mutex locked, which prevents disk disappears. There is one case this rule is broken. write_sb_page of bitmap.c doesn't hold the mutex. next_active_rdev does increase rdev reference, but it decreases the reference too early (eg, before IO finish). disk can disappear at the window. We unconditionally increase rdev reference in md_super_write() to avoid the race. Reported-and-tested-by: Xiao Ni Reviewed-by: Neil Brown Signed-off-by: Shaohua Li drivers/md/md.c | 3 +++ 1 file changed, 3 insertions(+) commit 466ad292235bd7f23d5cf04c7b507d146424d019 Author: Wei Fang Date: Mon Mar 21 19:19:30 2016 +0800 md: fix a trivial typo in comments Fix a trivial typo in md_ioctl(). Signed-off-by: Wei Fang Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 816b0acf3deb6d6be5d0519b286fdd4bafade905 Author: Wei Fang Date: Mon Mar 21 19:18:32 2016 +0800 md:raid1: fix a dead loop when read from a WriteMostly disk If first_bad == this_sector when we get the WriteMostly disk in read_balance(), valid disk will be returned with zero max_sectors. It'll lead to a dead loop in make_request(), and OOM will happen because of endless allocation of struct bio. Since we can't get data from this disk in this case, so continue for another disk. Signed-off-by: Wei Fang Signed-off-by: Shaohua Li drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f Author: Oliver Neukum Date: Thu Mar 31 12:04:26 2016 -0400 USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum [johan: fix OOB endpoint check and add error messages ] Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/digi_acceleport.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 Author: Oliver Neukum Date: Thu Mar 31 12:04:25 2016 -0400 USB: cypress_m8: add endpoint sanity check An attack using missing endpoints exists. CVE-2016-3137 Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/cypress_m8.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4e9a0b05257f29cf4b75f3209243ed71614d062e Author: Oliver Neukum Date: Thu Mar 31 12:04:24 2016 -0400 USB: mct_u232: add sanity checking in probe An attack using the lack of sanity checking in probe is known. This patch checks for the existence of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org [johan: add error message ] Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/mct_u232.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 836b34a935abc91e13e63053d0a83b24dfb5ea78 Author: Vladis Dronov Date: Thu Mar 31 12:05:43 2016 -0400 ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and create_uaxx_quirk() functions allocate the audioformat object by themselves and free it upon error before returning. However, once the object is linked to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be double-freed, eventually resulting in a memory corruption. This patch fixes these failures in the error paths by unlinking the audioformat object before freeing it. Based on a patch by Takashi Iwai [Note for stable backports: this patch requires the commit 902eb7fd1e4a ('ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk()')] Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283358 Reported-by: Ralf Spenneberg Cc: # see the note above Signed-off-by: Vladis Dronov Signed-off-by: Takashi Iwai sound/usb/quirks.c | 4 ++++ sound/usb/stream.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 878dfd3210e0bfc047995022de3091724ea9a5f6 Author: Martin Brandenburg Date: Wed Mar 30 16:18:43 2016 -0400 orangefs: minimum userspace version is 2.9.3 Version 2.9.4 isn't even released yet. Signed-off-by: Martin Brandenburg fs/orangefs/protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 641bb3246dbb64c0b4a0b6dfa6a024e82c155533 Author: Martin Brandenburg Date: Mon Mar 28 17:18:27 2016 -0400 orangefs: don't put readdir slot twice This was quite an oversight. After a readdir, the module could not be unloaded, the number of slots is wrong, and memory near the slot bitmap is possibly corrupt. Oops. Signed-off-by: Martin Brandenburg fs/orangefs/dir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bb6ab52f2befe1fb29ac198f27d8a6aadf510f81 Author: Rafael J. Wysocki Date: Thu Mar 31 17:42:15 2016 +0200 intel_pstate: Do not set utilization update hook too early The utilization update hook in the intel_pstate driver is set too early, as it only should be set after the policy has been fully initialized by the core. That may cause intel_pstate_update_util() to use incorrect data and put the CPUs into incorrect P-states as a result. To prevent that from happening, make intel_pstate_set_policy() set the utilization update hook instead of intel_pstate_init_cpu() so intel_pstate_update_util() only runs when all things have been initialized as appropriate. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 4833a0096a914d24a4c54b5aa6a664a50e6dd076 Merge: c0e760c b5aea3d Author: David S. Miller Date: Thu Mar 31 11:40:16 2016 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-03-29 This series contains fixes to ixgbe and ixgbevf. Tushar fixes an issue which was introduced with an earlier commit, where hardware register RAR0 default MAC address does not get set properly. Alex fixes two issues, first being the VXLAN port number should be stored in network order instead of in host order. The second fix corrects the ATR code to handle IPv6 extension headers. The issue was ATR code was assuming that it would be able to use tcp_hdr for every TCP frame that came through, but that is not the case, which resulted in bad filters being setup. Mark fixes a use of usleep_range() to udelay() in the case where a lock is being held. Stefan fixes the offline self tests where ndo_stop() should be used instead of ndo_close(), which causes IFF_UP to be cleared and interface routes get removed. Emil fixes the error case where we need to return an error when a MAC address change is rejected by the PF. This helps prevent the user from modifying the MAC address when the operation is not permitted. Sridhar provides three fixes for ixgbe, all dealing with traffic class offload handling. ==================== Signed-off-by: David S. Miller commit 39e2e173fb1f900959d3a25c21c65fa88b06c6ee Author: Alfredo Alvarez Fernandez Date: Wed Mar 30 19:03:36 2016 +0200 locking/lockdep: Print chain_key collision information A sequence of pairs [class_idx -> corresponding chain_key iteration] is printed for both the current held_lock chain and the cached chain. That exposes the two different class_idx sequences that led to that particular hash value. This helps with debugging hash chain collision reports. Signed-off-by: Alfredo Alvarez Fernandez Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-fsdevel@vger.kernel.org Cc: sedat.dilek@gmail.com Cc: tytso@mit.edu Link: http://lkml.kernel.org/r/1459357416-19190-1-git-send-email-alfredoalvarezernandez@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) commit 8eb22214b7cb0c0a28be6caf3b81201629d8ea7c Author: Maruthi Srinivas Bayyavarapu Date: Thu Mar 31 18:10:03 2016 +0530 ALSA: hda: add AMD Polaris-10/11 AZ PCI IDs with proper driver caps This commit fixes garbled audio on Polaris-10/11 variants Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 ++++ 1 file changed, 4 insertions(+) commit c05c2ec96bb8b7310da1055c7b9d786a3ec6dc0c Merge: e9dcfaf 910cd32 Author: Linus Torvalds Date: Thu Mar 31 07:55:14 2016 -0500 Merge branch 'parisc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Fix seccomp filter support and SIGSYS signals on compat kernel. Both patches are tagged for v4.5 stable kernel" * 'parisc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix and enable seccomp filter support parisc: Fix SIGSYS signals in compat case commit e9dcfaff0105045d6bbacb7620ee13f1976ecf07 Merge: ca45720 7500c38 Author: Linus Torvalds Date: Thu Mar 31 07:19:39 2016 -0500 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro. Automount handling was broken by commit e3c13928086f ("namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()") moving the test for negative dentry too early. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()" commit ca4572042e41a1aed2139ef66b0427c1f8d10179 Merge: c5bce40 8d8ee18 Author: Linus Torvalds Date: Thu Mar 31 07:13:56 2016 -0500 Merge tag 'gpio-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here are two GPIO fixes for the v4.6 series, both in drivers: - Prevent NULL dereference in the Xgene driver - Fix an uninitialized spinlock in the menz127 driver" * tag 'gpio-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: xgene: Prevent NULL pointer dereference gpio: menz127: Drop lock field from struct men_z127_gpio commit c5bce408e4b53e4498ac75c3c39eaf7ca9b7f296 Merge: 1e6d88c fc0c202 Author: Linus Torvalds Date: Thu Mar 31 06:56:50 2016 -0500 Merge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull nvdimm mcsafe_memcpy use from Dan Williams: "Now that mcsafe_memcpy() has landed, and the return value was been clarified in commit cbf8b5a2b649 ("x86/mm, x86/mce: Fix return type/value for memcpy_mcsafe()"), let's hook up its primary usage in the pmem driver. The compilation problems from the initial posting have been fixed, this has appeared in a -next release with no reported issues, and it picked up an ack from Ingo. There is no pressing need to merge this in 4.6- rc2. However, if we wait until 4.7 the new memcpy_mcsafe() capability will ship without a user in 4.6-final" * 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem() commit 910cd32e552ea09caa89cdbe328e468979b030dd Author: Helge Deller Date: Wed Mar 30 14:14:31 2016 +0200 parisc: Fix and enable seccomp filter support The seccomp filter support requires careful handling of task registers. This includes reloading of the return value (%r28) and proper syscall exit if secure_computing() returned -1. Additionally we need to sign-extend the syscall number from signed 32bit to signed 64bit in do_syscall_trace_enter() since the ptrace interface only allows storing 32bit values in compat mode. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v4.5 arch/parisc/Kconfig | 1 + arch/parisc/include/asm/syscall.h | 13 +++++++++++++ arch/parisc/kernel/ptrace.c | 9 +++++++-- arch/parisc/kernel/syscall.S | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) commit 4f4acc9472e54ce702f1d85fc9e6d57767dec91f Author: Helge Deller Date: Wed Mar 30 14:11:50 2016 +0200 parisc: Fix SIGSYS signals in compat case Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v4.5 arch/parisc/include/asm/compat.h | 7 +++++++ arch/parisc/kernel/signal32.c | 5 +++++ 2 files changed, 12 insertions(+) commit a9b0b1fe9ecc6ca18ee710f23606532d6aafc05e Author: Matthew McClintock Date: Wed Mar 23 17:04:58 2016 -0500 pinctrl: qcom: ipq4019: fix register offsets For this SoC the register offsets changed from previous versions to be separated by a larger amount. Signed-off-by: Matthew McClintock Acked-by: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ipq4019.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cdbac7349f978dd3355e04a6724537964d6fdacd Author: Matthew McClintock Date: Wed Mar 23 17:04:57 2016 -0500 pinctrl: qcom: ipq4019: fix the function enum for gpio mode Without this, we would fail to set the mode to gpio if trying to configure for that mode Signed-off-by: Matthew McClintock Acked-by: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ipq4019.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5303f7827fcd41d1cf4da9ca9b6b7d360bc07bb7 Author: Matthew McClintock Date: Wed Mar 23 17:04:56 2016 -0500 pinctrl: qcom: ipq4019: set ngpios to correct value This should have been bumped to 100 when the extra pins were added in the original pinctrl patch Signed-off-by: Matthew McClintock Acked-by: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ipq4019.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e51f17a049d102a3bc9af3e43f2f45b0538da871 Author: Daniel Vetter Date: Wed Mar 30 11:51:23 2016 +0200 drm/imx: Don't set a gamma table size imx doesn't have any functions for setting the gamma table, so this is completely defunct. Not nice to lie to userspace, so let's stop! Cc: Russell King Signed-off-by: Daniel Vetter Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 10 ---------- 1 file changed, 10 deletions(-) commit 6bcaf0c5819165984f1039f9ee42fda10c7fd591 Author: Liu Ying Date: Mon Mar 14 16:10:11 2016 +0800 drm/imx: ipuv3-plane: Configure DMFC wait4eot bit after slots are determined Just as the function ipu_dmfc_config_wait4eot() tells, the DMFC wait4eot bit depends on the number of DMFC slots to be used, so it should be called after the slots are determined in the function ipu_dmfc_alloc_bandwidth(). Based on tests, this patch may eliminate display distortion issue on overlay plane with small resolutions. To reproduce the issue, we may run this drm modetest case - 'modetest -P 19:64x64'. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27630c206bb00a252d21576d92f57bdcc3ab9455 Author: Liu Ying Date: Mon Mar 14 16:10:10 2016 +0800 gpu: ipu-v3: ipu-dmfc: Rename ipu_dmfc_init_channel to ipu_dmfc_config_wait4eot The function name 'ipu_dmfc_config_wait4eot' matches the implementation of the function better than 'ipu_dmfc_init_channel', since it only touches the wait4eot bits. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 ++-- include/video/imx-ipu-v3.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 2bbe32f7398c9b38916983b5823e11d6aaa10be2 Author: Liu Ying Date: Mon Mar 14 16:10:09 2016 +0800 gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void Since the function ipu_dmfc_init_channel() always returns zero, we may change the return type to void to simplify the code. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 6 +----- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 +--- include/video/imx-ipu-v3.h | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) commit 32c26a56af3ae823a883e926b96e3ff00854e6a8 Author: Liu Ying Date: Mon Mar 14 16:10:08 2016 +0800 gpu: ipu-v3: ipu-dmfc: Protect function ipu_dmfc_init_channel() with mutex To avoid race condition issue, we should protect the function ipu_dmfc_init_channel() with the mutex dmfc->priv->mutex, since it configures the register DMFC_GENERAL1 at runtime which contains several control bits for various display channels. This matches better with fine grained locking logic in upper layer. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-dmfc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1cc9daea2a79720cdd8b13ce97515bf1b2b41939 Author: Douglas Anderson Date: Mon Mar 7 14:00:54 2016 -0800 drm/imx: dw_hdmi: Don't call platform_set_drvdata() The IMX dw_hdmi driver just called platform_set_drvdata() to get your hopes up that maybe, somehow, you'd be able to retrieve the 'struct imx_hdmi' from a pointer to the 'struct device'. You can't. When we call dw_hdmi_bind() the main driver calls dev_set_drvdata(), which clobbers our setting. Let's just remove the platform_set_drvdata() to avoid dashing people's hopes. Signed-off-by: Douglas Anderson Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/dw_hdmi-imx.c | 2 -- 1 file changed, 2 deletions(-) commit 788c8ddb4f67e7eb6dec9fa1d9189ff5e736a01b Author: Douglas Anderson Date: Mon Mar 7 14:00:51 2016 -0800 drm/imx: dw_hdmi: Call drm_encoder_cleanup() in error path The drm_encoder_cleanup() was missing both from the error path of dw_hdmi_imx_bind(). This caused a crash when slub_debug was enabled and we ended up deferring probe of HDMI at boot. This call isn't needed from unbind() because if dw_hdmi_bind() returns no error then it takes over the job of freeing the encoder (in dw_hdmi_unbind). Signed-off-by: Douglas Anderson Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/dw_hdmi-imx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6ac217eef5d46fe9e3d6f85ea2e303422615a18c Author: Philipp Zabel Date: Tue Feb 23 10:22:52 2016 +0100 drm/imx: ipuv3-plane: fix planar YUV 4:2:0 support The driver already advertises multi-planar YUV support, but previously the U/V offset and stride setup was missing. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 67ca6b60a72aa940f1db41268f8530e19a7525fd Author: Philipp Zabel Date: Tue Feb 23 10:22:51 2016 +0100 drm/imx: ipuv3-plane: Add more thorough checks for plane parameter limitations The IPU addresses multiplanar formats using a base address and relative offsets for the secondary planes. Since those offsets must be positive and not too large, and none of the plane parameters except the base address may be changed while scanout is active, store the pitches and u/v offsets and check all values against IDMAC limitations. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 103 +++++++++++++++++++++++++++++++++----- drivers/gpu/drm/imx/ipuv3-plane.h | 4 ++ 2 files changed, 95 insertions(+), 12 deletions(-) commit 90195c3651800f9a7c14956f90c2b4eb0bc8f1fb Author: Philipp Zabel Date: Tue Feb 23 10:22:50 2016 +0100 gpu: ipu-cpmem: modify ipu_cpmem_set_yuv_planar_full for better control Let ipu_cpmem_set_yuv_planar_full take a DRM_FORMAT instead of a V4L2_PIXFMT and allow better control over U/V stride, U offset and V offset settings in the CPMEM. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 79 +++++++++++++++++++----------------------- include/video/imx-ipu-v3.h | 5 +-- 2 files changed, 39 insertions(+), 45 deletions(-) commit 6ee334559324a55725e22463de633b99ad99fcad Author: Linus Walleij Date: Thu Mar 24 13:15:45 2016 +0100 pinctrl: nomadik: fix pull debug print inversion Pull up was reported as pull down and vice versa. Fix this. Fixes: 8f1774a2a971 "pinctrl: nomadik: improve GPIO debug prints" Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f5560b1c5f3a80e91c6babb2da34a51943bbdec Author: James Morse Date: Wed Mar 30 18:33:04 2016 +0100 arm64: KVM: Register CPU notifiers when the kernel runs at HYP When the kernel is running at EL2, it doesn't need init_hyp_mode() to configure page tables for HYP. This function also registers the CPU hotplug and lower power notifiers that cause HYP to be re-initialised after the CPU has been reset. To avoid losing the register state that controls stage2 translation, move the registering of these notifiers into init_subsystems(), and add a is_kernel_in_hyp_mode() path to each callback. Acked-by: Marc Zyngier Acked-by: Christoffer Dall Fixes: 1e947bad0b6 ("arm64: KVM: Skip HYP setup when already running in HYP") Signed-off-by: James Morse Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit d59a1f71ff1aeda4b4630df92d3ad4e3b1dfc885 Author: John Keeping Date: Wed Nov 18 11:17:25 2015 +0000 drm/qxl: fix cursor position with non-zero hotspot The SPICE protocol considers the position of a cursor to be the location of its active pixel on the display, so the cursor is drawn with its top-left corner at "(x - hot_spot_x, y - hot_spot_y)" but the DRM cursor position gives the location where the top-left corner should be drawn, with the hotspot being a hint for drivers that need it. This fixes the location of the window resize cursors when using Fluxbox with the QXL DRM driver and both the QXL and modesetting X drivers. Signed-off-by: John Keeping Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/1447845445-2116-1-git-send-email-john@metanate.com Signed-off-by: Jani Nikula drivers/gpu/drm/qxl/qxl_display.c | 13 +++++++++---- drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) commit 85dc600263c2291cea33bffa90038808ee64198b Author: Peter Zijlstra Date: Mon Mar 21 11:47:52 2016 +0100 perf/x86/amd/ibs: Fix pmu::stop() nesting Patch 5a50f5291701 ("perf/x86/ibs: Fix race with IBS_STARTING state") closed a big hole while opening another, smaller hole. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 5a50f5291701 ("perf/x86/ibs: Fix race with IBS_STARTING state") Signed-off-by: Ingo Molnar arch/x86/events/amd/ibs.c | 52 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 7 deletions(-) commit 201c2f85bd0bc13b712d9c0b3d11251b182e06ae Author: Alexander Shishkin Date: Mon Mar 21 10:02:42 2016 +0200 perf/core: Don't leak event in the syscall error path In the error path, event_file not being NULL is used to determine whether the event itself still needs to be free'd, so fix it up to avoid leaking. Reported-by: Leon Yu Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 130056275ade ("perf: Do not double free") Link: http://lkml.kernel.org/r/87twk06yxp.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit 8fdc65391c6ad16461526a685f03262b3b01bfde Author: Peter Zijlstra Date: Tue Mar 29 09:26:44 2016 +0200 perf/core: Fix time tracking bug with multiplexing Stephane reported that commit: 3cbaa5906967 ("perf: Fix ctx time tracking by introducing EVENT_TIME") introduced a regression wrt. time tracking, as easily observed by: > This patch introduce a bug in the time tracking of events when > multiplexing is used. > > The issue is easily reproducible with the following perf run: > > $ perf stat -a -C 0 -e branches,branches,branches,branches,branches,branches -I 1000 > 1.000730239 652,394 branches (66.41%) > 1.000730239 597,809 branches (66.41%) > 1.000730239 593,870 branches (66.63%) > 1.000730239 651,440 branches (67.03%) > 1.000730239 656,725 branches (66.96%) > 1.000730239 branches > > One branches event is shown as not having run. Yet, with > multiplexing, all events should run especially with a 1s (-I 1000) > interval. The delta for time_running comes out to 0. Yet, the event > has run because the kernel is actually multiplexing the events. The > problem is that the time tracking is the kernel and especially in > ctx_sched_out() is wrong now. > > The problem is that in case that the kernel enters ctx_sched_out() with the > following state: > ctx->is_active=0x7 event_type=0x1 > Call Trace: > [] dump_stack+0x63/0x82 > [] ctx_sched_out+0x2bc/0x2d0 > [] perf_mux_hrtimer_handler+0xf6/0x2c0 > [] ? __perf_install_in_context+0x130/0x130 > [] __hrtimer_run_queues+0xf8/0x2f0 > [] hrtimer_interrupt+0xb7/0x1d0 > [] local_apic_timer_interrupt+0x38/0x60 > [] smp_apic_timer_interrupt+0x3d/0x50 > [] apic_timer_interrupt+0x8c/0xa0 > > In that case, the test: > if (is_active & EVENT_TIME) > > will be false and the time will not be updated. Time must always be updated on > sched out. Fix this by always updating time if EVENT_TIME was set, as opposed to only updating time when EVENT_TIME changed. Reported-by: Stephane Eranian Tested-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) 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 Cc: namhyung@kernel.org Fixes: 3cbaa5906967 ("perf: Fix ctx time tracking by introducing EVENT_TIME") Link: http://lkml.kernel.org/r/20160329072644.GB3408@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/events/core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d6af1a31cc72fbd558c7eddbc36f61bf09d1cf6a Author: Steffen Klassert Date: Wed Mar 16 10:17:37 2016 +0100 vti: Add pmtu handling to vti_xmit. We currently rely on the PMTU discovery of xfrm. However if a packet is locally sent, the PMTU mechanism of xfrm tries to do local socket notification what might not work for applications like ping that don't check for this. So add pmtu handling to vti_xmit to report MTU changes immediately. Reported-by: Mark McKinstry Signed-off-by: Steffen Klassert net/ipv4/ip_vti.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c932cf07ddc02f79e093596924e41cf6d7fda509 Merge: f6343be 9f56c09 Author: Ingo Molnar Date: Thu Mar 31 08:27:35 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160330' 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 determination of a callchain node's childlessness in the top/report TUI, which was preventing navigating some callchains, --stdio unnaffected (Andres Freund) - Fix jitdump's genelf assumption that PowerPC is big endian only (Anton Blanchard) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 59b9023c356c54e5f468029fa504461d04c0f02b Author: Mathias Nyman Date: Tue Mar 29 13:47:09 2016 +0300 usb: fix regression in SuperSpeed endpoint descriptor parsing commit b37d83a6a414 ("usb: Parse the new USB 3.1 SuperSpeedPlus Isoc endpoint companion descriptor") caused a regression in 4.6-rc1 and fails to parse SuperSpeed endpoint companion descriptors. The new SuperSpeedPlus Isoc endpoint companion parsing code incorrectly decreased the the remaining buffer size before comparing the size with the expected length of the descriptor. This lead to possible failure in reading the SuperSpeed endpoint companion descriptor of the last endpoint, displaying a message like: "No SuperSpeed endpoint companion for config 1 interface 0 altsetting 0 ep 129: using minimum values" Fix it by decreasing the size after comparing it. Also finish all the SS endpoint companion parsing before calling SSP isoc endpoint parsing function. Fixes: b37d83a6a414 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb Author: Ignat Korchagin Date: Thu Mar 17 18:00:29 2016 +0000 USB: usbip: fix potential out-of-bounds write Fix potential out-of-bounds write to urb->transfer_buffer usbip handles network communication directly in the kernel. When receiving a packet from its peer, usbip code parses headers according to protocol. As part of this parsing urb->actual_length is filled. Since the input for urb->actual_length comes from the network, it should be treated as untrusted. Any entity controlling the network may put any value in the input and the preallocated urb->transfer_buffer may not be large enough to hold the data. Thus, the malicious entity is able to write arbitrary data to kernel memory. Signed-off-by: Ignat Korchagin Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/usbip_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8ef34aa5a1b4fd940df6cba185fd28d3b750b727 Merge: f55532a 7e8ac87 Author: Greg Kroah-Hartman Date: Wed Mar 30 21:49:30 2016 -0700 Merge tag 'fixes-for-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.6-rc2 A couple fixes for the new SuperSpeedPlus that went in during this merge window. Also two minor fixes for dwc3 (one for setting endpoint naming correctly and another to improve time spent in our reset sequence) and an old bug fix on Atmel UDC which was disabling endpoints when it shouldn't. There's also a build breakage fix to the qcom phy driver and a fix to the f_midi gadget to avoid a race condition with f_midi_transmit(). commit 7500c38ac3258815f86f41744a538850c3221b23 Author: Al Viro Date: Thu Mar 31 00:23:05 2016 -0400 fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()" We should try to trigger automount *before* bailing out on negative dentry. Reported-by: Jun'ichi Nomura Reported-by: Jun'ichi Nomura Reported-by: Arend van Spriel Tested-by: Arend van Spriel Tested-by: Jun'ichi Nomura Signed-off-by: Al Viro fs/namei.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 839559e10601ed4459c802cbfb69747bf1844078 Author: Christoph Hellwig Date: Tue Mar 29 13:03:35 2016 +0200 target: add a new add_wwn_groups fabrics method We need to have the WWN fully initialized before addig default groups to it, so add a new method to add these groups after the WWN has been initialized. Also remove the default groups in the core while we're at it. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 19 +++++++++++-------- drivers/target/target_core_fabric_configfs.c | 3 +++ include/target/target_core_fabric.h | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) commit e6e202edf000004422a901dfa301d600e32f17e3 Author: Christoph Hellwig Date: Tue Mar 29 13:03:34 2016 +0200 target: initialize the nacl base CIT begfore init_nodeacl The iSCSI targets wants to add a default group, for which we need to have the list of default groups initialized previously. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_fabric_configfs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ce7043fd903eb9722a885b98b53fffe2cedfb047 Author: Christoph Hellwig Date: Tue Mar 29 13:03:33 2016 +0200 target: remove ->fabric_cleanup_nodeacl Instead we can clean up the list of default ACLs in core code. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 9 --------- drivers/target/target_core_fabric_configfs.c | 4 +--- include/target/target_core_fabric.h | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) commit 572a143489a10360ce2aca98c64f8be43c8400a6 Author: Sagi Grimberg Date: Wed Feb 24 19:24:09 2016 +0200 iser-target: Use ib_drain_qp Now the rdma core offers a QP draining service in v4.6-rc1, use it instead of our own. Signed-off-by: Sagi Grimberg Reported-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 39 ++++----------------------------- drivers/infiniband/ulp/isert/ib_isert.h | 2 -- 2 files changed, 4 insertions(+), 37 deletions(-) commit 1028b55bafb7611dda1d8fed2aeca16a436b7dff Author: Theodore Ts'o Date: Wed Mar 30 22:36:24 2016 -0400 ext4: allow readdir()'s of large empty directories to be interrupted If a directory has a large number of empty blocks, iterating over all of them can take a long time, leading to scheduler warnings and users getting irritated when they can't kill a process in the middle of one of these long-running readdir operations. Fix this by adding checks to ext4_readdir() and ext4_htree_fill_tree(). Reported-by: Benjamin LaHaise Google-Bug-Id: 27880676 Signed-off-by: Theodore Ts'o fs/ext4/dir.c | 5 +++++ fs/ext4/namei.c | 5 +++++ 2 files changed, 10 insertions(+) commit 1e6d88ccf41c7ef2d6c99aa5e7fb9215aa0e5423 Merge: 62f444e 8fe8892 Author: Linus Torvalds Date: Wed Mar 30 20:40:42 2016 -0500 Merge tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 fix from Ley Foon Tan: "Replace fdt_translate_address with of_flat_dt_translate_address" Fixes a build failure. * tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: Replace fdt_translate_address with of_flat_dt_translate_address commit 8fe889274c7a4d95c3e2d06f87ead499ea6faa2d Author: Guenter Roeck Date: Tue Mar 29 17:02:13 2016 +0800 nios2: Replace fdt_translate_address with of_flat_dt_translate_address nios2 builds fail with the following build error. arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial': arch/nios2/kernel/prom.c:100:2: error: implicit declaration of function 'fdt_translate_address' Commit c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") replaced fdt_translate_address() with of_flat_dt_translate_address() but missed updating the nios2 code. Fixes: c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") Cc: Peter Hurley Cc: Rob Herring Signed-off-by: Guenter Roeck Acked-by: Ley Foon Tan arch/nios2/kernel/prom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de17e793b104d690e1d007dfc5cb6b4f649598ca Author: Filipe Manana Date: Wed Mar 30 19:03:13 2016 -0400 btrfs: fix crash/invalid memory access on fsync when using overlayfs If the lower or upper directory of an overlayfs mount belong to a btrfs file system and we fsync the file through the overlayfs' merged directory we ended up accessing an inode that didn't belong to btrfs as if it were a btrfs inode at btrfs_sync_file() resulting in a crash like the following: [ 7782.588845] BUG: unable to handle kernel NULL pointer dereference at 0000000000000544 [ 7782.590624] IP: [] btrfs_sync_file+0x11b/0x3e9 [btrfs] [ 7782.591931] PGD 4d954067 PUD 1e878067 PMD 0 [ 7782.592016] Oops: 0002 [#6] PREEMPT SMP DEBUG_PAGEALLOC [ 7782.592016] Modules linked in: btrfs overlay ppdev crc32c_generic evdev xor raid6_pq psmouse pcspkr sg serio_raw acpi_cpufreq parport_pc parport tpm_tis i2c_piix4 tpm i2c_core processor button loop autofs4 ext4 crc16 mbcache jbd2 sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix virtio_pci libata virtio_ring virtio scsi_mod e1000 floppy [last unloaded: btrfs] [ 7782.592016] CPU: 10 PID: 16437 Comm: xfs_io Tainted: G D 4.5.0-rc6-btrfs-next-26+ #1 [ 7782.592016] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 7782.592016] task: ffff88001b8d40c0 ti: ffff880137488000 task.ti: ffff880137488000 [ 7782.592016] RIP: 0010:[] [] btrfs_sync_file+0x11b/0x3e9 [btrfs] [ 7782.592016] RSP: 0018:ffff88013748be40 EFLAGS: 00010286 [ 7782.592016] RAX: 0000000080000000 RBX: ffff880133b30c88 RCX: 0000000000000001 [ 7782.592016] RDX: 0000000000000001 RSI: ffffffff8148fec0 RDI: 00000000ffffffff [ 7782.592016] RBP: ffff88013748bec0 R08: 0000000000000001 R09: 0000000000000000 [ 7782.624248] R10: ffff88013748be40 R11: 0000000000000246 R12: 0000000000000000 [ 7782.624248] R13: 0000000000000000 R14: 00000000009305a0 R15: ffff880015e3be40 [ 7782.624248] FS: 00007fa83b9cb700(0000) GS:ffff88023ed40000(0000) knlGS:0000000000000000 [ 7782.624248] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7782.624248] CR2: 0000000000000544 CR3: 00000001fa652000 CR4: 00000000000006e0 [ 7782.624248] Stack: [ 7782.624248] ffffffff8108b5cc ffff88013748bec0 0000000000000246 ffff8800b005ded0 [ 7782.624248] ffff880133b30d60 8000000000000000 7fffffffffffffff 0000000000000246 [ 7782.624248] 0000000000000246 ffffffff81074f9b ffffffff8104357c ffff880015e3be40 [ 7782.624248] Call Trace: [ 7782.624248] [] ? arch_local_irq_save+0x9/0xc [ 7782.624248] [] ? ___might_sleep+0xce/0x217 [ 7782.624248] [] ? __do_page_fault+0x3c0/0x43a [ 7782.624248] [] vfs_fsync_range+0x8c/0x9e [ 7782.624248] [] vfs_fsync+0x1c/0x1e [ 7782.624248] [] do_fsync+0x31/0x4a [ 7782.624248] [] SyS_fsync+0x10/0x14 [ 7782.624248] [] entry_SYSCALL_64_fastpath+0x12/0x6b [ 7782.624248] Code: 85 c0 0f 85 e2 02 00 00 48 8b 45 b0 31 f6 4c 29 e8 48 ff c0 48 89 45 a8 48 8d 83 d8 00 00 00 48 89 c7 48 89 45 a0 e8 fc 43 18 e1 41 ff 84 24 44 05 00 00 48 8b 83 58 ff ff ff 48 c1 e8 07 83 [ 7782.624248] RIP [] btrfs_sync_file+0x11b/0x3e9 [btrfs] [ 7782.624248] RSP [ 7782.624248] CR2: 0000000000000544 [ 7782.661994] ---[ end trace 721e14960eb939bc ]--- This started happening since commit 4bacc9c9234 (overlayfs: Make f_path always point to the overlay and f_inode to the underlay) and even though after this change we could still access the btrfs inode through struct file->f_mapping->host or struct file->f_inode, we would end up resulting in more similar issues later on at check_parent_dirs_for_sync() because the dentry we got (from struct file->f_path.dentry) was from overlayfs and not from btrfs, that is, we had no way of getting the dentry that belonged to btrfs (we always got the dentry that belonged to overlayfs). The new patch from Miklos Szeredi, titled "vfs: add file_dentry()" and recently submitted to linux-fsdevel, adds a file_dentry() API that allows us to get the btrfs dentry from the input file and therefore being able to fsync when the upper and lower directories belong to btrfs filesystems. This issue has been reported several times by users in the mailing list and bugzilla. A test case for xfstests is being submitted as well. Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101951 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109791 Signed-off-by: Filipe Manana Signed-off-by: Chris Mason Cc: stable@vger.kernel.org fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0e760c9c66ebd8a5a1ede81868677f4df993dfb Author: Daniel Borkmann Date: Wed Mar 30 00:02:00 2016 +0200 bpf: make padding in bpf_tunnel_key explicit Make the 2 byte padding in struct bpf_tunnel_key between tunnel_ttl and tunnel_label members explicit. No issue has been observed, and gcc/llvm does padding for the old struct already, where tunnel_label was not yet present, so the current code works, but since it's part of uapi, make sure we don't introduce holes in structs. Therefore, add tunnel_ext that we can use generically in future (f.e. to flag OAM messages for backends, etc). Also add the offset to the compat tests to be sure should some compilers not padd the tail of the old version of bpf_tunnel_key. Fixes: 4018ab1875e0 ("bpf: support flow label for bpf_skb_{set, get}_tunnel_key") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 2d4212261fdf13e29728ddb5ea9d60c342cc92b5 Author: Eric Dumazet Date: Tue Mar 29 08:43:41 2016 -0700 ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates IPv6 counters updates use a different macro than IPv4. Fixes: 36cbb2452cbaf ("udp: Increment UDP_MIB_IGNOREDMULTI for arriving unmatched multicasts") Signed-off-by: Eric Dumazet Cc: Rick Jones Cc: Willem de Bruijn Signed-off-by: David S. Miller net/ipv6/udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c02d1bb32347d0674714ee170772d771d513469 Author: Michael Chan Date: Mon Mar 28 19:46:07 2016 -0400 bnxt_en: Fix ethtool -a reporting. To report flow control tx/rx settings accurately regardless of autoneg setting, we should use link_info->req_flow_ctrl. Before this patch, the reported settings were only correct when autoneg was on. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 49b5c7a125201bb42c25831fda3a50305c29ef50 Author: Michael Chan Date: Mon Mar 28 19:46:06 2016 -0400 bnxt_en: Fix typo in bnxt_hwrm_set_pause_common(). The typo caused the wrong flow control bit to be set. Reported by: Ajit Khaparde Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6ef26991a46e20879bebb8298080eb7ceed4ae8 Author: Michael Chan Date: Mon Mar 28 19:46:05 2016 -0400 bnxt_en: Implement proper firmware message padding. The size of every padded firmware message is specified in the first HWRM_VER_GET response message. Use this value to pad every message after that. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 33e52d888d0c84a0c66f13357a53113fd9710bd6 Author: Prashant Sreedharan Date: Mon Mar 28 19:46:04 2016 -0400 bnxt_en: Initialize CP doorbell value before ring allocation The existing code does the following: allocate completion ring initialize completion ring doorbell disable interrupts on this completion ring by writing to the doorbell We can have a race where firmware sends an asynchronous event to the host after completion ring allocation and before doorbell is initialized. When this happens driver can crash while ringing the doorbell using uninitialized value as part of handling the IRQ/napi request. Signed-off-by: Prashant Sreedharan Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f40fed1c911f218e1e189a404b26ef19effabb5 Author: Yegor Yefremov Date: Fri Mar 18 08:43:22 2016 +0100 ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type In Baltos iR5221 cpsw_emac0 is connected directly to the switch IC and hence needs to be configured as "fixed-link". Signed-off-by: Yegor Yefremov Reviewed-by: Andrew Lunn Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos-ir5221.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6b4725743100ab9a0731b952aa64b29a5808070d Author: Jon Hunter Date: Thu Mar 17 14:19:06 2016 +0000 ARM: OMAP: Correct interrupt type for ARM TWD The ARM TWD interrupt is a private peripheral interrupt (PPI) and per the ARM GIC documentation, whether the type for PPIs can be set is IMPLEMENTATION DEFINED. For OMAP4 devices the PPI type cannot be set and so when we attempt to set the type for the ARM TWD interrupt it fails. This has done unnoticed because it fails silently and because we cannot re-configure the type it has had no impact. Nevertheless fix the type for the TWD interrupt so that it matches the hardware configuration. Reported-by: Grygorii Strashko Signed-off-by: Jon Hunter Tested-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b532c4a66f44aaf5aa0dbea6aadd44981478025 Author: Vishal Mahaveer Date: Wed Mar 9 14:56:31 2016 -0600 ARM: DRA722: Add ID detect for Silicon Rev 2.0 Silicon Rev 2.0 is a minor variant of Rev 1.0. Rev 2.0 is an incremental revision with various fixes including the following: - Reset logic fixes - Few asymmetric aging logic fixes - Ethernet speed fixes - EDMA fixes for McASP Signed-off-by: Vishal Mahaveer Acked-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/id.c | 4 ++-- arch/arm/mach-omap2/soc.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit d41676ddddef27224a398609d874055866694cfa Author: Tero Kristo Date: Mon Mar 14 11:01:50 2016 +0200 ARM: dts: am43xx: fix edma memcpy channel allocation EDMA was allocating DMA channels 32 and 33 for memcpy usage, out of which channel 33 is actually used by DES crypto engine. This bad allocation of the channel causes a crash in the DES crypto engine, as the channel gets configured for memcpy usage instead of hardware <-> memory DMA. Fixed by allocating DMA channels 58 and 59 for memcpy usage (I2C0 RX/TX), which are not used by anybody. Fixes: cce1ee000187 ("ARM: DTS: am437x: Use the new DT bindings for the eDMA3") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Tero Kristo Suggested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfe1580a6415bc37fd62d79eb8102a618f7650b2 Author: Lokesh Vutla Date: Tue Mar 8 12:24:35 2016 +0530 ARM: dts: AM43x-epos: Fix clk parent for synctimer commit 55ee7017ee31 ("arm: omap2: board-generic: use omap4_local_timer_init for AM437x") makes synctimer32k as the clocksource on AM43xx. By default the synctimer32k is clocked by 32K RTC OSC on AM43xx. But this 32K RTC OSC is not available on epos boards which makes it fail to boot. Synctimer32k can also be clocked by a peripheral PLL, so making this as clock parent for synctimer3k on epos boards. Fixes: 55ee7017ee31 ("arm: omap2: board-generic: use omap4_local_timer_init for AM437x") Cc: stable@vger.kernel.org # v4.4+ Reported-by: Nishanth Menon Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 456e8d53482537616899a146b706eccd095404e6 Author: Nishanth Menon Date: Fri Mar 11 10:12:28 2016 -0600 ARM: OMAP2: Fix up interconnect barrier initialization for DRA7 The following commits: commit 3fa609755c11 ("ARM: omap2: restore OMAP4 barrier behaviour") commit f746929ffdc8 ("Revert "ARM: OMAP4: remove dead kconfig option OMAP4_ERRATA_I688"") and commit ea827ad5ffbb ("ARM: DRA7: Provide proper IO map table") came in around the same time, unfortunately this seem to have missed initializing the barrier for DRA7 platforms - omap5_map_io was reused for dra7 till it was split out by the last patch. barrier_init needs to be hence carried forward as it is valid for DRA7 family of processors as they are for OMAP5. Fixes: ea827ad5ffbb7 ("ARM: DRA7: Provide proper IO map table") Cc: stable@vger.kernel.org # v4.1+ Reported-by: Laurent Pinchart Reported-by: Tomi Valkeinen Cc: Russell King Signed-off-by: Nishanth Menon Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren arch/arm/mach-omap2/io.c | 1 + 1 file changed, 1 insertion(+) commit 9f56c092b99b40ce3cf4c6d0134ff7e513c9f1a6 Author: Anton Blanchard Date: Tue Mar 29 17:59:44 2016 +1100 perf jit: genelf makes assumptions about endian Commit 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") incorrectly assumed that PowerPC is big endian only. Simplify things by consolidating the define of GEN_ELF_ENDIAN and checking for __BYTE_ORDER == __BIG_ENDIAN. The PowerPC checks were also incorrect, they do not match what gcc emits. We should first look for __powerpc64__, then __powerpc__. Signed-off-by: Anton Blanchard Acked-by: Michael Ellerman Cc: Carl Love Cc: Stephane Eranian Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Link: http://lkml.kernel.org/r/20160329175944.33a211cc@kryten Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/genelf.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 909890355507e92bdaf648e73870f6b5df606da8 Author: Andres Freund Date: Wed Mar 30 21:02:45 2016 +0200 perf hists: Fix determination of a callchain node's childlessness The 4b3a3212233a ("perf hists browser: Support flat callchains") commit over-aggressively tried to optimize callchain_node__init_have_children(). That lead to --tui mode not allowing to expand call chain elements if a call chain element had only one parent. That's why --inverted callgraphs looked halfway sane, but plain ones didn't. Revert that individual optimization, it wasn't really related to the rest of the commit. Signed-off-by: Andres Freund Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Fixes: 4b3a3212233a ("perf hists browser: Support flat callchains") Link: http://lkml.kernel.org/r/20160330190245.GB13305@awork2.anarazel.de Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb41c997d4446b39dd03b8a74196125739d7c3ac Author: Xin Long Date: Wed Mar 30 10:58:39 2016 +0800 team: team should sync the port's uc/mc addrs when add a port There is an issue when we use mavtap over team: When we replug nic links from team0, the real nics's mc list will not include the maddr for macvtap any more. then we can't receive pkts to macvtap device, as they are filterred by mc list of nic. In Bonding Driver, it syncs the uc/mc addrs in bond_enslave(). We will fix this issue on team by adding the port's uc/mc addrs sync in team_port_add. Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/team/team.c | 5 +++++ 1 file changed, 5 insertions(+) commit b2dde6fca37e947628b82ae8f35e183ff112d07c Author: Shuoran Liu Date: Tue Mar 29 18:00:15 2016 +0800 f2fs: retrieve IO write stat from the right place In the following patch, f2fs: split journal cache from curseg cache journal cache is split from curseg cache. So IO write statistics should be retrived from journal cache but not curseg->sum_blk. Otherwise, it will get 0, and the stat is lost. Signed-off-by: Shuoran Liu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c90e09f7fb498f81cd4e8bb6460d3a26ccebeca3 Author: Jaegeuk Kim Date: Wed Mar 30 13:13:16 2016 -0700 f2fs crypto: fix corrupted symlink in encrypted case In the encrypted symlink case, we should check its corrupted symname after decrypting it. Otherwise, we can report -ENOENT incorrectly, if encrypted symname starts with '\0'. Cc: stable 4.5+ Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cb678d6016510cc8c6572dd9f426fe74dd4eda84 Author: Suzuki K Poulose Date: Wed Mar 30 14:33:59 2016 +0100 arm64: kvm: 4.6-rc1: Fix VTCR_EL2 VS setting When we detect support for 16bit VMID in ID_AA64MMFR1, we set the VTCR_EL2_VS field to 1 to make use of 16bit vmids. But, with commit 3a3604bc5eb4 ("arm64: KVM: Switch to C-based stage2 init") this is broken and we corrupt VTCR_EL2:T0SZ instead of updating the VS field. VTCR_EL2_VS was actually defined to the field shift (19) and not the real value for VS. This patch fixes the issue. Fixes: commit 3a3604bc5eb4 ("arm64: KVM: Switch to C-based stage2 init") Cc: Christoffer Dall Cc: Mark Rutland Acked-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_arm.h | 4 +++- arch/arm64/include/asm/sysreg.h | 3 +++ arch/arm64/kvm/hyp/s2-setup.c | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) commit c3483384ee511ee2af40b4076366cd82a6a47b86 Author: Alexander Duyck Date: Tue Mar 29 14:55:22 2016 -0700 gro: Allow tunnel stacking in the case of FOU/GUE This patch should fix the issues seen with a recent fix to prevent tunnel-in-tunnel frames from being generated with GRO. The fix itself is correct for now as long as we do not add any devices that support NETIF_F_GSO_GRE_CSUM. When such a device is added it could have the potential to mess things up due to the fact that the outer transport header points to the outer UDP header and not the GRE header as would be expected. Fixes: fac8e0f579695 ("tunnels: Don't apply GRO to multiple layers of encapsulation.") Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fou.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit fea24857bb62990b839feb62090ad72a1c93735a Author: Colin Ian King Date: Tue Mar 29 18:00:50 2016 +0100 qed: initialize return rc to avoid returning garbage in the case where qed_slowpath_irq_req is not called, rc is not assigned and so qed_int_igu_enable will return a garbage value. Fix this by initializing rc to 0. Signed-off-by: Colin Ian King Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28fd34985bd5edaea6282a0586f91bcddd336f5e Author: Marcelo Ricardo Leitner Date: Tue Mar 29 10:41:03 2016 -0300 sctp: really allow using GFP_KERNEL on sctp_packet_transmit Somehow my patch for commit cea8768f333e ("sctp: allow sctp_transmit_packet and others to use gfp") missed two important chunks, which are now added. Fixes: cea8768f333e ("sctp: allow sctp_transmit_packet and others to use gfp") Signed-off-by: Marcelo Ricardo Leitner Acked-By: Neil Horman Signed-off-by: David S. Miller net/sctp/output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5e263f712691615fb802f06c98d7638c378f5d11 Author: Haishuang Yan Date: Tue Mar 29 18:48:08 2016 +0800 bridge: Allow set bridge ageing time when switchdev disabled When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP, we should ignore this error code and continue to set the ageing time. Fixes: c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") Signed-off-by: Haishuang Yan Acked-by: Ido Schimmel Signed-off-by: David S. Miller net/bridge/br_stp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62f444e0548eb503b42c8447675b468f5cf40c69 Merge: 07c0db7 e543589 Author: Linus Torvalds Date: Wed Mar 30 13:28:34 2016 -0500 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a bug in pkcs7_validate_trust and its users where the output value may in fact be taken from uninitialised memory" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument commit 07c0db771dffe5856c8456e40e2d3066a351e270 Merge: 8b8c877 82c7d82 Author: Linus Torvalds Date: Wed Mar 30 13:24:28 2016 -0500 Merge tag 'dlm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm fix from David Teigland: "This fixes a bug from the configfs cleanup" * tag 'dlm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: config: Fix ENOMEM failures in make_cluster() commit 8b8c877febd2610050758f1b7b97050a7d2dc794 Merge: 1993b17 3c2e226 Author: Linus Torvalds Date: Wed Mar 30 13:22:47 2016 -0500 Merge tag 'hwmon-for-linus-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Fix crash due to NULL pointer access in max1111 driver" * tag 'hwmon-for-linus-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated commit 11ca873574c2314de9f0cf1adf8b3be88e4e19ae Author: Carlo Caione Date: Wed Mar 23 10:14:00 2016 +0100 documentation: Fix pinctrl documentation for Meson8 / Meson8b Fix pin controller documentation introducing the new compatibles for the pinctrl drivers specific for aobus / cbus. This is needed because we have changed the pin controller driver: we have now a single specialized pinctrl driver / compatible for each bus the controller is attached to, instead of one single driver dealing with all the controllers we have on different buses. Signed-off-by: Carlo Caione Acked-by: Rob Herring .../devicetree/bindings/pinctrl/meson,pinctrl.txt | 38 ++++------------------ 1 file changed, 7 insertions(+), 31 deletions(-) commit b60e1157d8faa7a44556fcda2d4f06e71e839fd3 Author: Carlo Caione Date: Wed Mar 23 10:13:59 2016 +0100 ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b Signed-off-by: Carlo Caione Reviewed-by: Andreas Färber Tested-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 57 ++++++++++++++++++++++++------------------ arch/arm/boot/dts/meson8b.dtsi | 12 +++++++-- 2 files changed, 42 insertions(+), 27 deletions(-) commit 1809de7e7d37c585e01a1bcc583ea92b78fc759d Merge: ebf2441 3ca4a23 Author: Tony Lindgren Date: Wed Mar 30 10:36:06 2016 -0700 Merge tag 'for-v4.6-rc/omap-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v4.6/fixes ARM: OMAP2+: first hwmod fix for v4.6-rc Fix a longstanding bug in the hwmod code that could cause hardware SYSCONFIG register values to not match the kernel's idea of what they should be, and that could result in lower performance during IP block idle entry. Basic build, boot, and PM test logs are available here: http://www.pwsan.com/omap/testlogs/omap-hwmod-fixes-a-for-v4.6-rc/20160326231727/ commit 0dbdb76c0ca8e7caf27c9a210f64c4359e2974a4 Author: Mark Brown Date: Tue Mar 29 12:30:44 2016 -0700 regmap: mmio: Parse endianness definitions from DT Since we changed to do formatting in the bus we now skip all the format parsing that the core does for its data marshalling code. This means that we skip the DT parsing it does which breaks some systems, we need to add an explict call in the MMIO code to do this. Reported-by: Alexander Stein Tested-by: Alexander Stein Signed-off-by: Mark Brown drivers/base/regmap/regmap-mmio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f7d6dd4df8b388e2056c89b528254cdd79dea2a Author: Mark Brown Date: Tue Mar 29 12:28:33 2016 -0700 regmap: Fix implicit inclusion of device.h internal.h is using dev_name() but doesn't include device.h which defines it. Add an explicit include to avoid build problems due to this. Tested-by: Alexander Stein Signed-off-by: Mark Brown drivers/base/regmap/internal.h | 1 + 1 file changed, 1 insertion(+) commit 6490865c67825277b29638e839850882600b48ec Author: Yoshihiro Shimoda Date: Thu Mar 10 11:30:15 2016 +0900 usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer This patch adds a code to surely disable TX IRQ of the pipe before starting TX DMAC transfer. Otherwise, a lot of unnecessary TX IRQs may happen in rare cases when DMAC is used. Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 1 + 1 file changed, 1 insertion(+) commit 894f2fc44f2f3f48c36c973b1123f6ab298be160 Author: Yoshihiro Shimoda Date: Thu Mar 10 11:30:14 2016 +0900 usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler() When unexpected situation happened (e.g. tx/rx irq happened while DMAC is used), the usbhsf_pkt_handler() was possible to cause NULL pointer dereference like the followings: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 80000007 [#1] SMP ARM Modules linked in: usb_f_acm u_serial g_serial libcomposite CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.5.0-rc6-00842-gac57066-dirty #63 Hardware name: Generic R8A7790 (Flattened Device Tree) task: c0729c00 ti: c0724000 task.ti: c0724000 PC is at 0x0 LR is at usbhsf_pkt_handler+0xac/0x118 pc : [<00000000>] lr : [] psr: 60000193 sp : c0725db8 ip : 00000000 fp : c0725df4 r10: 00000001 r9 : 00000193 r8 : ef3ccab4 r7 : ef3cca10 r6 : eea4586c r5 : 00000000 r4 : ef19ceb4 r3 : 00000000 r2 : 0000009c r1 : c0725dc4 r0 : ef19ceb4 This patch adds a condition to avoid the dereference. Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support") Cc: # v3.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8dcf32175b4e1817ea037a051f10dd7823e52344 Author: Wolfram Sang Date: Wed Mar 23 20:47:02 2016 +0100 i2c: prevent endless uevent loop with CONFIG_I2C_DEBUG_CORE Jan reported this: === After enabling CONFIG_I2C_DEBUG_CORE my system was broken (no network, console login not possible). System log was flooded with the this message: ... [ 608.052077] rtc-ds1307 0-0068: uevent [ 608.052500] rtc-ds1307 0-0068: uevent [ 608.052925] rtc-ds1307 0-0068: uevent ... The culprit is the dev_dbg printk in the i2c uevent handler. If this is activated (for instance by CONFIG_I2C_DEBUG_CORE) it results in an endless loop with systemd-journald. This happens if user-space scans the system log and reads the uevent file to get information about a newly created device, which seems fair use to me. Unfortunately reading the "uevent" file uses the same function that runs for creating the uevent for a new device, generating the next syslog entry. Ideally user-space would implement a recursion detection and after reading the same device file for the 1000th time call it a day, but nevertheless I think we should avoid this problem by removing the debug print completely or using another print variant. The same problem seems to be reported here: https://bugs.freedesktop.org/show_bug.cgi?id=76886 === His patch converted the message to pr_debug, but I think the debug can simply go. We have other means to see code paths these days. This enables us to clean up the function some more while we are here. Reported-by: Jan Glauber Signed-off-by: Wolfram Sang Acked-by: Alexander Sverdlin Tested-by: Jan Glauber drivers/i2c/i2c-core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 283d757378371e8044d873e661b1dccee46c5887 Author: Denys Vlasenko Date: Wed Mar 30 00:14:57 2016 +0200 uapi/linux/stddef.h: Provide __always_inline to userspace headers Josh Boyer reported that my recent change to uapi/linux/swab.h broke the Qemu build: bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining of some byteswap operations") Unfortunately, UAPI headers don't include compiler.h so fixing it there is not enough, add an __always_inline definition to uapi/linux/stddef.h instead. Testcase: "make headers_install" and try to compile this: #include void main() {} Reported-by: Josh Boyer Signed-off-by: Denys Vlasenko Cc: Andrew Morton Cc: Arnd Bergmann Cc: David Rientjes Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Thomas Graf Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1459289697-12875-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar include/uapi/linux/stddef.h | 4 ++++ 1 file changed, 4 insertions(+) commit 03d27ade4941076b34c823d63d91dc895731a595 Author: Felipe F. Tonello Date: Wed Mar 9 19:39:30 2016 +0000 usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed devices. That caused the OUT endpoint to freeze if the host send any data packet of length greater than 256 bytes. This is an example dump of what happended on that enpoint: HOST: [DATA][Length=260][...] DEVICE: [NAK] HOST: [PING] DEVICE: [NAK] HOST: [PING] DEVICE: [NAK] ... HOST: [PING] DEVICE: [NAK] This patch fixes this problem by setting the minimum usb_request's buffer size for the OUT endpoint as its wMaxPacketSize. Acked-by: Michal Nazarewicz Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a189c017ded0f13650793067fb7a1afbc2b98cd5 Author: Sedat Dilek Date: Wed Mar 30 10:22:49 2016 +0200 tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh Here on Ubuntu/precise I have GNU/coreutils v8.13 installed where 'basename -s' is not supported. The result is that run_tests.sh is not done properly. How to reproduce: $ cd $BUILD_DIR $ LC_ALL=C make -C tools/ liblockdep $ cd tools/lib/lockdep/ $ LC_ALL=C ./run_tests.sh basename: invalid option -- 's' Try `basename --help' for more information. ... timeout: failed to run command `./tests/': Permission denied FAILED! rm: cannot remove `tests/': Is a directory Due to unsupported basename the tests programs are not generated and cannot be removed. Fix this by doing a compatible basename invocation and check for the existence of generated tests programs. For more details see this LKML thread: http://marc.info/?t=145906667300001&r=1&w=2 Signed-off-by: Sedat Dilek Cc: Boqun Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin (maintainer:LIBLOCKDEP) Cc: Shuah Khan Cc: Theodore Ts'o Cc: Thomas Gleixner Cc: linux-fsdevel Link: http://lkml.kernel.org/r/1459326169-7009-1-git-send-email-sedat.dilek@gmail.com Signed-off-by: Ingo Molnar tools/lib/lockdep/run_tests.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7e8ac87a44746b03a37d296fdb3e6b5d96350952 Author: Arnd Bergmann Date: Wed Mar 23 17:29:14 2016 +0100 usb: phy: qcom-8x16: fix regulator API abuse gcc warns about the use of regulators in phy_8x16_probe: drivers/usb/phy/phy-qcom-8x16-usb.c: In function 'phy_8x16_probe': drivers/usb/phy/phy-qcom-8x16-usb.c:284:13: error: 'regs[0].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/usb/phy/phy-qcom-8x16-usb.c:285:13: error: 'regs[1].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/usb/phy/phy-qcom-8x16-usb.c:286:12: error: 'regs[2].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized] According to Mark Brown, this is the result of various abuses of the PHY interfaces [1], so let's fix the driver instead. This puts the regulator bulk data into the device structure so it gets properly initialized and lets us call regulator_bulk_enable() and regulator_bulk_disable() rather than open-coding them. Setting the voltages the way the driver does is rather pointless because for each regulator there is only one valid voltage range, so that can just get set up in the DT. As there doesn't seem to be any user of the newly added driver yet, we can simply make sure the DTs are setting this up right when they get added. I'm also fixing the handling of regulator_bulk_enable() failure. Right now, the driver just ignores any failure, which doesn't make sense, so I'm changing it to loudly complain (in case we actually had a bug here) and error out. Doing a fly-by review of the driver, I notice a couple of other problems that I'm not addressing here: - It really should not have been written as a USB PHY driver, but instead should use the PHY subsystem. - The DT compatible string does not follow the usual conventions, and it should have a proper identifier in it rather than a wildcard. - The example in the devicetree binding lists a register address that is the same as the actual EHCI host controller in the SoC as well as the otg-snps and the ci-hdrc device, which indicates that these are probably not even distinct devices (or all but one of them are wrong), and if more than one of them tries to request the resources correctly, they fail. [1] https://lkml.org/lkml/2016/1/26/267 Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/phy/phy-qcom-8x16-usb.c | 72 ++++++------------------------------- 1 file changed, 11 insertions(+), 61 deletions(-) commit f6343be96ebbae38a07e0878810f5bbc0c38cade Merge: 5dc1037 3ea223a Author: Ingo Molnar Date: Wed Mar 30 12:31:03 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160329' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Add missing initialization of perf_sample.cpumode in synthesized samples, affects jitdump, records for pre-existing threads and records synthesized from processor trace data, noticed while testing intel_pt events with 'perf script' (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 199831c77c50e6913e893b6bc268ba9f4a9a2bf8 Author: Patrick Uiterwijk Date: Tue Mar 29 16:57:40 2016 +0000 ARM: mvebu: Correct unit address for linksys The USB2 port for Armada 38x is defined to be at 58000, not at 50000. Cc: Fixes: 2d0a7addbd10 ("ARM: Kirkwood: Add support for many Synology NAS devices") Signed-off-by: Patrick Uiterwijk Acked-by: Imre Kaloz Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77644ad86abd205742937010fa1cf4795e927212 Author: Arnd Bergmann Date: Tue Mar 15 11:03:39 2016 +0100 bus: mvebu-mbus: use %pa to print phys_addr_t A recent change to the mbus driver added a warning printk that prints a phys_addr_t using the %x format string, which fails in case we build with 64-bit phys_addr_t: drivers/bus/mvebu-mbus.c: In function 'mvebu_mbus_get_dram_win_info': drivers/bus/mvebu-mbus.c:975:9: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=] This uses the special %pa format string instead, so we always print the correct type. Signed-off-by: Arnd Bergmann Fixes: f2900acea801 ("bus: mvebu-mbus: provide api for obtaining IO and DRAM window information") Signed-off-by: Gregory CLEMENT drivers/bus/mvebu-mbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44b03c105106842580f31f37cf88a2a95ae5074e Author: Krzysztof Kozlowski Date: Wed Mar 16 09:02:01 2016 +0900 MAINTAINERS: pinctrl: samsung: Add two new maintainers Extend the list of maintainers for Samsung pinctrl driver with Sylwester and Krzysztof. Cc: Kukjin Kim Cc: Sylwester Nawrocki Cc: Marek Szyprowski Cc: Linus Walleij Signed-off-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Signed-off-by: Linus Walleij MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit a939bb57cd4716fdae213f6cb60a626fa6d5a60a Author: Qi Zheng Date: Thu Mar 17 02:15:26 2016 +0800 pinctrl: intel: implement gpio_irq_enable There is unexpected gpio interrupt after irq_enable. If not implemeted gpio_irq_enable callback, irq_enable calls irq_unmask instead. But if there was interrupt set before the irq_enable, unmask it may trigger the unexpected interrupt. By implementing the gpio_irq_enable callback, do interrupt status ack, the issue has gone. Signed-off-by: Qi Zheng Signed-off-by: Mika Westerberg Signed-off-by: Qipeng Zha Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit bf380cfa60db1f44d4884dbea0372dac5d9db633 Author: Qipeng Zha Date: Thu Mar 17 02:15:25 2016 +0800 pinctrl: intel: make the high level interrupt working High level trigger mode of GPIO interrupt is not set correctly in intel_gpio_irq_type(), and will make this kind of interrupt not respond. Signed-off-by: Qi Zheng Signed-off-by: Qipeng Zha Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9a4f424531dabd877259ae0071b8bcc4dede9eb5 Author: Vladimir Zapolskiy Date: Wed Mar 9 02:45:36 2016 +0200 pinctrl: freescale: imx: fix bogus check of of_iomap() return value On error path of_iomap() returns NULL, hence IS_ERR() check is invalid and may cause a NULL pointer dereference, the change fixes this problem. While we are here invert a device node check to simplify the code. Fixes: 26d8cde5260b ("pinctrl: freescale: imx: add shared input select reg support") Signed-off-by: Vladimir Zapolskiy Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 5e7515ba78fff2f5407eaa2f97c1d5c07801ac3d Author: Hans de Goede Date: Sat Mar 12 19:44:57 2016 +0100 pinctrl: sunxi: Fix A33 external interrupts not working pinctrl-sun8i-a33.c (and the dts) declare only 2 interrupt banks, where as the closely related a23 has 3 banks. This matches with the datasheet for the A33 where only interrupt banks B and G are specified where as the A23 has banks A, B and G. However the A33 being the A23 derative it is means that the interrupt configure/status io-addresses for the 2 banks it has are not changed from the A23, iow they have the same address as if bank A was still present. Where as the sunxi pinctrl currently tries to use the A23 bank A addresses for bank B, since the pinctrl code does not know about the removed bank A. Add a irq_bank_base parameter and use this where appropriate to take the missing bank A into account. This fixes external interrupts not working on the A33 (tested with an i2c touchscreen controller which uses an external interrupt). Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 1 + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 17 ++++++++++------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 21 +++++++++++---------- 3 files changed, 22 insertions(+), 17 deletions(-) commit e9adb336d0bf391be23e820975ca5cd12c31d781 Author: Govindraj Raja Date: Fri Mar 4 15:28:22 2016 +0000 pinctrl: pistachio: fix mfio84-89 function description and pinmux. mfio 84 to 89 are described wrongly, fix it to describe the right pin and add them to right pin-mux group. The correct order is: pll1_lock => mips_pll -- MFIO_83 pll2_lock => audio_pll -- MFIO_84 pll3_lock => rpu_v_pll -- MFIO_85 pll4_lock => rpu_l_pll -- MFIO_86 pll5_lock => sys_pll -- MFIO_87 pll6_lock => wifi_pll -- MFIO_88 pll7_lock => bt_pll -- MFIO_89 Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: James Hartley Cc: # v4.2+ Fixes: cefc03e5995e("pinctrl: Add Pistachio SoC pin control driver") Signed-off-by: Govindraj Raja Acked-by: Andrew Bresticker Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/img,pistachio-pinctrl.txt | 12 +++++------ drivers/pinctrl/pinctrl-pistachio.c | 24 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) commit 0129801be4b87226bf502f18f5a9eabd356d1058 Author: Wolfram Sang Date: Mon Mar 7 19:40:57 2016 +0100 pinctrl: sh-pfc: only use dummy states for non-DT platforms If pinctrl_provide_dummies() is used unconditionally, then the dummy state will be used even on DT platforms when the "init" state was intentionally left out. Instead of "default", the dummy "init" state will then be used during probe. Thus, when probing an I2C controller on cold boot, communication triggered by bus notifiers broke because the pins were not initialized. Do it like OMAP2: use the dummy state only for non-DT platforms. Cc: stable@vger.kernel.org Fixes: ef0eebc05130 ("drivers/pinctrl: Add the concept of an "init" state") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Acked-by: Sergei Shtylyov Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/pinctrl/sh-pfc/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8d8ee18cc707f498b6dad18915576f23b00bcff8 Author: Axel Lin Date: Mon Mar 21 20:03:50 2016 +0800 gpio: xgene: Prevent NULL pointer dereference platform_get_resource() can return NULL, thus add NULL test to prevent NULL pointer dereference. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-xgene.c | 5 +++++ 1 file changed, 5 insertions(+) commit fd975a7b180c9a8f6e02d2251eaabe9b0dcfeed6 Author: Axel Lin Date: Wed Mar 9 20:38:55 2016 +0800 gpio: menz127: Drop lock field from struct men_z127_gpio Current code uses a uninitialized spin lock. bgpio_init() already initialized a spin lock, so let's switch to use &gc->bgpio_lock instead and remove the lock from struct men_z127_gpio. Fixes: f436bc2726c6 "gpio: add driver for MEN 16Z127 GPIO controller" Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-menz127.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b5aea3de88e526a46839b7ccf049fab4f8ad7a4b Author: Sridhar Samudrala Date: Mon Mar 7 09:41:49 2016 -0800 ixgbe: Fix cls_u32 offload support for L4 ports Fix support for 16 bit source/dest port matches in ixgbe model. u32 uses a single 32-bit key value for both source and destination ports starting at offset 0. So replace the 2 functions with a single function that takes this key value/mask to program both source and dest ports. Verified with the following filter: #tc qdisc add dev p4p1 ingress #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 1: u32 divisor 1 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:10 u32 ht 800: link 1: \ offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 1:0:10 u32 ht 1: \ match tcp src 1024 ffff match tcp dst 80 ffff action drop #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 1:0:11 u32 ht 1: \ match tcp src 1025 ffff action drop #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 1:0:12 u32 ht 1: \ match tcp dst 81 ffff action drop Signed-off-by: Sridhar Samudrala Acked-by: John Fastabend Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_model.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit ebd83ad818d2d4502d5e343388000d5dc829b7a8 Author: Sridhar Samudrala Date: Mon Mar 7 09:41:48 2016 -0800 ixgbe: Fix cls_u32 offload support for fields with masks Remove the incorrect check for mask in ixgbe_configure_clsu32 and drop the 'mask' field that is not required in struct ixgbe_mat_field Verified with the following filters: #tc qdisc add dev p4p1 ingress #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:1 u32 ht 800: \ match ip dst 10.0.0.1/8 match ip src 10.0.0.2/8 action drop #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:2 u32 ht 800: \ match ip dst 11.0.0.1/16 match ip src 11.0.0.2/16 action drop #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:3 u32 ht 800: \ match ip dst 12.0.0.1/24 match ip src 12.0.0.2/24 action drop #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:4 u32 ht 800: \ match ip dst 13.0.0.1/32 match ip src 13.0.0.2/32 action drop Signed-off-by: Sridhar Samudrala Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +-- drivers/net/ethernet/intel/ixgbe/ixgbe_model.h | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) commit 176621c964e9279c42c6b641688360e5cd0baedf Author: Sridhar Samudrala Date: Mon Mar 7 09:41:47 2016 -0800 ixgbe: fix error handling in TC cls_u32 offload routines Check for handle ids when adding/deleting hash nodes OR adding/deleting filter entries and limit them to max number of links or header nodes supported(IXGBE_MAX_LINK_HANDLE). Start from bit 0 when setting hash table bit-map.(adapter->tables) Signed-off-by: Sridhar Samudrala Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 52 +++++++++++++++++---------- 1 file changed, 34 insertions(+), 18 deletions(-) commit 6e2a60b57a83ea134c06c5226aaff20e7e9ce221 Author: Emil Tantilov Date: Wed Feb 17 15:55:06 2016 -0800 ixgbe: make __ixgbe_setup_tc static This function is only used in ixgbe_main.c Resolves a "missing prototype" warning when building the driver with W=1 Reported-by: Phil Schmitt Signed-off-by: Emil Tantilov Acked-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32ca68683532ab629d16cede1102b36ae5346f40 Author: Emil Tantilov Date: Wed Feb 10 15:16:30 2016 -0800 ixgbevf: fix error code path when setting MAC address Return error when a MAC address change is rejected by the PF. This will prevent the user from modifying the MAC address when that operation is not permitted. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 12 ++++++++---- drivers/net/ethernet/intel/ixgbevf/vf.c | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) commit 324d086709978fce1671ba04087bf90865b04398 Author: Stefan Assmann Date: Wed Feb 3 09:20:49 2016 +0100 ixgbevf: call ndo_stop() instead of dev_close() when running offline selftest Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 4 ++-- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 2 ++ drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 6c211fe1e71e2bf7baa45a78ac5358a1f45a7fe9 Author: Stefan Assmann Date: Wed Feb 3 09:20:48 2016 +0100 ixgbe: call ndo_stop() instead of dev_close() when running offline selftest Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit d90b5b0ec1c7a3099dee9c18071a5b714eb3de52 Author: Mark Rustad Date: Fri Jan 29 14:44:29 2016 -0800 ixgbe: Use udelay to avoid sleeping while atomic Use udelay instead of usleep_range because this can be called while a lock is held. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2873d43f9c607e9d855b8ae120d5990ba1722df Author: Alexander Duyck Date: Mon Jan 25 19:39:40 2016 -0800 ixgbe: Fix ATR so that it correctly handles IPv6 extension headers The ATR code was assuming that it would be able to use tcp_hdr for every TCP frame that came through. However this isn't the case as it is possible for a frame to arrive that is TCP but sent through something like a raw socket. As a result the driver was setting up bad filters in which tcp_hdr was really pointing to the network header so the data was all invalid. In order to correct this I have added a bit of parsing logic that will determine the TCP header location based off of the network header and either the offset in the case of the IPv4 header, or a walk through the IPv6 extension headers until it encounters the header that indicates IPPROTO_TCP. In addition I have added checks to verify that the lowest protocol provided is recognized as IPv4 or IPv6 to help mitigate raw sockets using ETH_P_ALL from having ATR applied to them. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 45 +++++++++++++-------------- 1 file changed, 21 insertions(+), 24 deletions(-) commit 9f12df906cd807a05d71aa53a951532d1dd3b888 Author: Alexander Duyck Date: Mon Jan 25 19:36:29 2016 -0800 ixgbe: Store VXLAN port number in network order The VXLAN port number should be stored in network order instead of in host order as it is accessed from the hot-path in ATR. This way we can avoid having to do any byte swaps in order to validate the port number. I moved the vxlan_port value into a hole in the read-mostly region of the adapter struct. This way it should be in a warm cache-line instead of in some isolated region in memory when it needs to be accessed. In addition I went through and stripped a bunch of unneeded ifdef flags since having an extra variable present doesn't really hurt anything and makes the code easier to read. I also went through and dropped the NETIF_F_RXCSUM flag which was being set in hw_encap_features but provides no value as the flag is not evaluated in the Rx path. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 8 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 61 ++++++++------------------- 2 files changed, 20 insertions(+), 49 deletions(-) commit 56768045186c183f1d6e5cd916dd07751a777a8d Author: Tushar Dave Date: Thu Jan 7 14:17:03 2016 -0800 ixgbe: Fix for RAR0 not being set to default MAC addr commit c9f53e63c208 ("ixgbe: Refactor MAC address configuration code") introduced code that doesn't set HW register RAR0 to default mac address but FF:FF:FF:FF:FF:FF. Due to this, ixgbe HW discards all incoming packets that doesn't have destination mac address equals to FF:FF:FF:FF:FF:FF. This commit sets RAR0 correctly to default HW mac address. Signed-off-by: Tushar Dave Tested-by: Sowmini Varadhan Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 5ec712934ce1ff6e33bf3878034a91ca9bd600c9 Author: David S. Miller Date: Tue Mar 29 18:39:26 2016 -0700 sparc: Write up preadv2/pwritev2 syscalls. Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/unistd.h | 4 +++- arch/sparc/kernel/systbls_32.S | 2 +- arch/sparc/kernel/systbls_64.S | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit b30a337ca27c4f40439e4bfb290cba5f88d73bb7 Author: Ming Lei Date: Wed Mar 30 08:46:31 2016 +0800 block: partition: initialize percpuref before sending out KOBJ_ADD The initialization of partition's percpu_ref should have been done before sending out KOBJ_ADD uevent, which may cause userspace to read partition table. So the uninitialized percpu_ref may be accessed in data path. This patch fixes this issue reported by Naveen. Reported-by: Naveen Kaje Tested-by: Naveen Kaje Fixes: 6c71013ecb7e2(block: partition: convert percpu ref) Cc: # v4.3+ Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/partition-generic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d0c31e02005764dae0aab130a57e9794d06b824d Author: Babu Moger Date: Thu Mar 24 13:02:22 2016 -0700 sparc/PCI: Fix for panic while enabling SR-IOV We noticed this panic while enabling SR-IOV in sparc. mlx4_core: Mellanox ConnectX core driver v2.2-1 (Jan 1 2015) mlx4_core: Initializing 0007:01:00.0 mlx4_core 0007:01:00.0: Enabling SR-IOV with 5 VFs mlx4_core: Initializing 0007:01:00.1 Unable to handle kernel NULL pointer dereference insmod(10010): Oops [#1] CPU: 391 PID: 10010 Comm: insmod Not tainted 4.1.12-32.el6uek.kdump2.sparc64 #1 TPC: I7: <__mlx4_init_one+0x324/0x500 [mlx4_core]> Call Trace: [00000000104c5ea4] __mlx4_init_one+0x324/0x500 [mlx4_core] [00000000104c613c] mlx4_init_one+0xbc/0x120 [mlx4_core] [0000000000725f14] local_pci_probe+0x34/0xa0 [0000000000726028] pci_call_probe+0xa8/0xe0 [0000000000726310] pci_device_probe+0x50/0x80 [000000000079f700] really_probe+0x140/0x420 [000000000079fa24] driver_probe_device+0x44/0xa0 [000000000079fb5c] __device_attach+0x3c/0x60 [000000000079d85c] bus_for_each_drv+0x5c/0xa0 [000000000079f588] device_attach+0x88/0xc0 [000000000071acd0] pci_bus_add_device+0x30/0x80 [0000000000736090] virtfn_add.clone.1+0x210/0x360 [00000000007364a4] sriov_enable+0x2c4/0x520 [000000000073672c] pci_enable_sriov+0x2c/0x40 [00000000104c2d58] mlx4_enable_sriov+0xf8/0x180 [mlx4_core] [00000000104c49ac] mlx4_load_one+0x42c/0xd40 [mlx4_core] Disabling lock debugging due to kernel taint Caller[00000000104c5ea4]: __mlx4_init_one+0x324/0x500 [mlx4_core] Caller[00000000104c613c]: mlx4_init_one+0xbc/0x120 [mlx4_core] Caller[0000000000725f14]: local_pci_probe+0x34/0xa0 Caller[0000000000726028]: pci_call_probe+0xa8/0xe0 Caller[0000000000726310]: pci_device_probe+0x50/0x80 Caller[000000000079f700]: really_probe+0x140/0x420 Caller[000000000079fa24]: driver_probe_device+0x44/0xa0 Caller[000000000079fb5c]: __device_attach+0x3c/0x60 Caller[000000000079d85c]: bus_for_each_drv+0x5c/0xa0 Caller[000000000079f588]: device_attach+0x88/0xc0 Caller[000000000071acd0]: pci_bus_add_device+0x30/0x80 Caller[0000000000736090]: virtfn_add.clone.1+0x210/0x360 Caller[00000000007364a4]: sriov_enable+0x2c4/0x520 Caller[000000000073672c]: pci_enable_sriov+0x2c/0x40 Caller[00000000104c2d58]: mlx4_enable_sriov+0xf8/0x180 [mlx4_core] Caller[00000000104c49ac]: mlx4_load_one+0x42c/0xd40 [mlx4_core] Caller[00000000104c5f90]: __mlx4_init_one+0x410/0x500 [mlx4_core] Caller[00000000104c613c]: mlx4_init_one+0xbc/0x120 [mlx4_core] Caller[0000000000725f14]: local_pci_probe+0x34/0xa0 Caller[0000000000726028]: pci_call_probe+0xa8/0xe0 Caller[0000000000726310]: pci_device_probe+0x50/0x80 Caller[000000000079f700]: really_probe+0x140/0x420 Caller[000000000079fa24]: driver_probe_device+0x44/0xa0 Caller[000000000079fb08]: __driver_attach+0x88/0xa0 Caller[000000000079d90c]: bus_for_each_dev+0x6c/0xa0 Caller[000000000079f29c]: driver_attach+0x1c/0x40 Caller[000000000079e35c]: bus_add_driver+0x17c/0x220 Caller[00000000007a02d4]: driver_register+0x74/0x120 Caller[00000000007263fc]: __pci_register_driver+0x3c/0x60 Caller[00000000104f62bc]: mlx4_init+0x60/0xcc [mlx4_core] Kernel panic - not syncing: Fatal exception Press Stop-A (L1-A) to return to the boot prom ---[ end Kernel panic - not syncing: Fatal exception Details: Here is the call sequence virtfn_add->__mlx4_init_one->dma_set_mask->dma_supported The panic happened at line 760(file arch/sparc/kernel/iommu.c) 758 int dma_supported(struct device *dev, u64 device_mask) 759 { 760 struct iommu *iommu = dev->archdata.iommu; 761 u64 dma_addr_mask = iommu->dma_addr_mask; 762 763 if (device_mask >= (1UL << 32UL)) 764 return 0; 765 766 if ((device_mask & dma_addr_mask) == dma_addr_mask) 767 return 1; 768 769 #ifdef CONFIG_PCI 770 if (dev_is_pci(dev)) 771 return pci64_dma_supported(to_pci_dev(dev), device_mask); 772 #endif 773 774 return 0; 775 } 776 EXPORT_SYMBOL(dma_supported); Same panic happened with Intel ixgbe driver also. SR-IOV code looks for arch specific data while enabling VFs. When VF device is added, driver probe function makes set of calls to initialize the pci device. Because the VF device is added different way than the normal PF device(which happens via of_create_pci_dev for sparc), some of the arch specific initialization does not happen for VF device. That causes panic when archdata is accessed. To fix this, I have used already defined weak function pcibios_setup_device to copy archdata from PF to VF. Also verified the fix. Signed-off-by: Babu Moger Signed-off-by: Sowmini Varadhan Reviewed-by: Ethan Zhao Signed-off-by: David S. Miller arch/sparc/kernel/pci.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ccc7d5a1cdae78ccd623540dc87e281135a1c053 Author: Rich Felker Date: Tue Mar 29 22:50:02 2016 +0000 sh: fix function signature of cpu_coregroup_mask to match pointer type The signedness mismatch of the argument type produces an error compiling kernel/sched/core.c with -Werror=incompatible-pointer-types, which is now used by default. Fixes: ea8daa7b9784 "kbuild: Add option to turn incompatible pointer check into error" Signed-off-by: Rich Felker arch/sh/include/asm/topology.h | 2 +- arch/sh/kernel/topology.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 38c315992338a6c26050477b50700e0f8e08ff96 Author: Bart Van Assche Date: Mon Mar 28 11:14:04 2016 -0700 scsi_dh_alua: Fix a recently introduced deadlock While retesting the SRP initiator I ran the command "rmmod mlx4_ib" while I/O was in progress. That command triggers SCSI device removal indirectly. Avoid that this action triggers the following deadlock: ================================= [ INFO: inconsistent lock state ] 4.6.0-rc0-dbg+ #2 Tainted: G O --------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. multipathd/484 [HC0[0]:SC0[0]:HE1:SE1] takes: (&(&pg->lock)->rlock){+.?...}, at: [] alua_bus_detach+0x52/0xa0 [scsi_dh_alua] {IN-SOFTIRQ-W} state was registered at: [] __lock_acquire+0x7e9/0x1ad0 [] lock_acquire+0x60/0x80 [] _raw_spin_lock_irqsave+0x3e/0x60 [] alua_rtpg_queue+0x41/0x1d0 [scsi_dh_alua] [] alua_check+0xe1/0x220 [scsi_dh_alua] [] alua_check_sense+0x99/0xb0 [scsi_dh_alua] [] scsi_check_sense+0x71/0x3f0 [] scsi_decide_disposition+0x18b/0x1d0 [] scsi_softirq_done+0x52/0x140 [] blk_done_softirq+0x52/0x90 [] __do_softirq+0x10f/0x230 [] irq_exit+0xa8/0xb0 [] do_IRQ+0x65/0x110 [] ret_from_intr+0x0/0x19 [] kmem_cache_alloc+0x151/0x190 [] create_object+0x34/0x2d0 [] kmemleak_alloc_percpu+0x56/0xd0 [] pcpu_alloc+0x38d/0x660 [] __alloc_percpu_gfp+0xd/0x10 [] __percpu_counter_init+0x55/0xb0 [] blkg_alloc+0x79/0x230 [] blkcg_init_queue+0x26/0x1d0 [] blk_alloc_queue_node+0x27d/0x2e0 [] dm_create+0x20c/0x570 [dm_mod] [] dev_create+0x56/0x2c0 [dm_mod] [] ctl_ioctl+0x26e/0x520 [dm_mod] [] dm_ctl_ioctl+0xe/0x20 [dm_mod] [] do_vfs_ioctl+0x8e/0x660 [] SyS_ioctl+0x3c/0x70 [] entry_SYSCALL_64_fastpath+0x1c/0xac irq event stamp: 4290931 hardirqs last enabled at (4290931): [ 1662.892772] [] _raw_spin_unlock_irqrestore+0x31/0x50 hardirqs last disabled at (4290930): [] _raw_spin_lock_irqsave+0x17/0x60 softirqs last enabled at (4290774): [] __do_softirq+0x1cb/0x230 softirqs last disabled at (4289831): [] irq_exit+0xa8/0xb0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&pg->lock)->rlock); lock(&(&pg->lock)->rlock); *** DEADLOCK *** 2 locks held by multipathd/484: #0: (&bdev->bd_mutex){+.+.+.}, at: [] __blkdev_put+0x33/0x360 #1: (sd_ref_mutex){+.+...}, at: [] scsi_disk_put+0x1c/0x40 stack backtrace: CPU: 6 PID: 484 Comm: multipathd Tainted: G O 4.6.0-rc0-dbg+ #2 Call Trace: [] dump_stack+0x67/0x92 [] print_usage_bug+0x215/0x240 [] mark_lock+0x54a/0x610 [] __lock_acquire+0x845/0x1ad0 [] lock_acquire+0x60/0x80 [] _raw_spin_lock+0x33/0x50 [] alua_bus_detach+0x52/0xa0 [scsi_dh_alua] [] scsi_dh_release_device+0x17/0x50 [] scsi_device_dev_release_usercontext+0x2a/0x120 [] execute_in_process_context+0x80/0x90 [] scsi_device_dev_release+0x17/0x20 [] device_release+0x2d/0x90 [] kobject_release+0x7a/0x190 [] kobject_put+0x26/0x50 [] put_device+0x12/0x20 [] scsi_device_put+0x26/0x30 [] scsi_disk_put+0x2d/0x40 [] sd_release+0x48/0xb0 [] __blkdev_put+0x29e/0x360 [] blkdev_put+0x49/0x170 [] blkdev_close+0x20/0x30 [] __fput+0xe8/0x1f0 [] ____fput+0x9/0x10 [] task_work_run+0x6e/0xa0 [] exit_to_usermode_loop+0xa9/0xb0 [] syscall_return_slowpath+0xb0/0xc0 [] entry_SYSCALL_64_fastpath+0xaa/0xac Fixes: cb0a168cb6b8 (scsi_dh_alua: update 'access_state' field) Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Reviewed-by: Laurence Oberman Reviewed-by: Hannes Reinicke Reviewed-by: Christoph Hellwig Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d78540dae77fd18e2eba57e5dc7021953f9506f4 Author: Bart Van Assche Date: Mon Mar 28 11:13:16 2016 -0700 scsi: Declare local symbols static Avoid that building with W=1 causes gcc to report warnings about symbols that have not been declared. Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinicke Reviewed-by: Christoph Hellwig Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2aac7ddf9a410e3418c9cc69618f304550466793 Author: Matthew McClintock Date: Wed Mar 23 17:05:00 2016 -0500 clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll Drivers for these don't exist yet so we will add them as fixed clocks so we don't BUG() if we change clocks that reference these clocks. Signed-off-by: Matthew McClintock Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bc95d4f0a920150e77083c2946fe7b7d2f6e217c Author: Matthew McClintock Date: Wed Mar 23 17:04:59 2016 -0500 clk: qcom: ipq4019: switch remaining defines to enums When this was added not all the remaining defines were switched over to use enums, so let's complete that process here Reported-by: Stephen Boyd Signed-off-by: Matthew McClintock Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-ipq4019.c | 60 ++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 35 deletions(-) commit add479eeb1a208a31ab913ae7c97506a81383079 Author: Philipp Zabel Date: Thu Feb 25 10:45:12 2016 +0100 clk: qcom: Make reset_control_ops const The qcom_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/qcom/reset.c | 2 +- drivers/clk/qcom/reset.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7ba256d2aa2a18e24b7c9ec4e03cd22b0149c51c Author: Philipp Zabel Date: Thu Feb 25 10:45:11 2016 +0100 clk: tegra: Make reset_control_ops const The rst_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/tegra/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e7bc9c6cee68fdd3583eb689583214a3d56341e Author: Philipp Zabel Date: Thu Feb 25 10:45:10 2016 +0100 clk: sunxi: Make reset_control_ops const The sunxi_ve_reset_ops, sun9i_mmc_reset_ops, and sunxi_usb_reset_ops structures are never modified. Make them const. Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-a10-ve.c | 2 +- drivers/clk/sunxi/clk-sun9i-mmc.c | 2 +- drivers/clk/sunxi/clk-usb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b1b69c5dd5ada9be222721dd297c329dafb65d06 Author: Philipp Zabel Date: Thu Feb 25 10:45:09 2016 +0100 clk: atlas7: Make reset_control_ops const The atlas7_rst_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/sirf/clk-atlas7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fb950fea6e14b159899b713ede0b7506ca03649 Author: Philipp Zabel Date: Thu Feb 25 10:45:08 2016 +0100 clk: rockchip: Make reset_control_ops const The rockchip_softrst_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd drivers/clk/rockchip/softrst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd92f41dc2527722e5fd63f859ff811482f0ce1a Author: Philipp Zabel Date: Thu Feb 25 10:45:07 2016 +0100 clk: mmp: Make reset_control_ops const The mmp_clk_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/mmp/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f39bb4579cbf3ff174d936d37aa3669eb98370c6 Author: Philipp Zabel Date: Thu Feb 25 10:45:06 2016 +0100 clk: mediatek: Make reset_control_ops const The mtk_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ea223adcb0c5893a6dc8ed3a84dce264cbb61d6 Author: Arnaldo Carvalho de Melo Date: Tue Mar 29 18:46:04 2016 -0300 perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples In 473398a21d28 ("perf tools: Add cpumode to struct perf_sample"), I missed some places where perf_sample fields are directly initialized in addition to what is done in perf_evsel__parse_sample(), namely when synthesizing PERF_RECORD_{MMAP*,COMM,FORK,EXIT} for pre-existing threads and also in intel_pt and intel_bts when synthesizing events from processor trace, the jitdump code also was affected, fix it. The problem was noticed with running: # perf record -e intel_pt//u true # perf script Where the samples wouldn't get resolved because perf_sample.cpumode would be left as zero, i.e. PERF_RECORD_MISC_CPUMODE_UNKNOWN, not resolving as kernel, hypervisor or user cpu modes. Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Fixes: 473398a21d28 ("perf tools: Add cpumode to struct perf_sample") Link: http://lkml.kernel.org/n/tip-n5sdauxgk24d5nun8kuuu2mh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 23 ++++++++++++++++------- tools/perf/util/intel-bts.c | 1 + tools/perf/util/intel-pt.c | 3 +++ tools/perf/util/jitdump.c | 2 ++ 4 files changed, 22 insertions(+), 7 deletions(-) commit e6cc3be552f9fedf5fa6b37c285d7d27ffc08b03 Author: Jayachandran C Date: Sun Feb 28 13:07:17 2016 +0530 arm64: dts: vulcan: Update PCI ranges The PCI memory windows available in vulcan.dtsi are limited to 128MB for 32-bit BARs, and 4GB for 64-bit BARs. Given the memory mapped IO space available in arm64, these windows can be increased substantially to support more use cases. The change increases the 32-bit window to 256MB and the 64-bit window to 128 GB. The firmware on vulcan boards will use these ranges as well. PCI IO windows are not supported on Vulcan, so remove them instead of keeping an unused value. Signed-off-by: Jayachandran C Signed-off-by: Florian Fainelli Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/broadcom/vulcan.dtsi | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 427b1d3faa448212337c599e5454325af64e9a8e Author: Linus Walleij Date: Mon Mar 21 09:50:37 2016 +0100 ARM: u8500_defconfig: turn on the Synaptics RMI4 driver The Ux500 boards may have an RMI4 unit, and the DT fragments for them have been merged upstream. Add it to the defconfig. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/u8500_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit ef21b32a60fbfdf2370465e52036c1c5ed1f6b43 Author: Rich Felker Date: Sun Mar 27 16:57:23 2016 +0000 sh: fix smp-shx3 build regression from removal of arch localtimer The removal was not complete and left behind one reference to a removed function in smp-shx3.c. For completeness, also remove declarations for functions that were removed. Fixes: 45624ac38926 "sh: remove arch-specific localtimer and use generic one" Reported-by: Geert Uytterhoeven Signed-off-by: Rich Felker arch/sh/include/asm/smp.h | 5 ----- arch/sh/kernel/cpu/sh4a/smp-shx3.c | 2 -- 2 files changed, 7 deletions(-) commit e95008a121e37cbee9cdc029483f059206d323be Author: James Hogan Date: Mon Jan 25 16:06:59 2016 +0000 MIPS: cpu_name_string: Use raw_smp_processor_id(). If cpu_name_string() is used in non-atomic context when preemption is enabled, it can trigger a BUG such as this one: BUG: using smp_processor_id() in preemptible [00000000] code: unaligned/156 caller is __show_regs+0x1e4/0x330 CPU: 2 PID: 156 Comm: unaligned Tainted: G W 4.3.0-00366-ga3592179816d-dirty #1501 Stack : ffffffff80900000 ffffffff8019bc18 000000000000005f ffffffff80a20000 0000000000000000 0000000000000009 ffffffff8019c0e0 ffffffff80835648 a8000000ff2bdec0 ffffffff80a1e628 000000000000009c 0000000000000002 ffffffff80840000 a8000000fff2ffb0 0000000000000020 ffffffff8020e43c a8000000fff2fcf8 ffffffff80a20000 0000000000000000 ffffffff808f2607 ffffffff8082b138 ffffffff8019cd1c 0000000000000030 ffffffff8082b138 0000000000000002 000000000000009c 0000000000000000 0000000000000000 0000000000000000 a8000000fff2fc40 0000000000000000 ffffffff8044dbf4 0000000000000000 0000000000000000 0000000000000000 ffffffff8010c400 ffffffff80855bb0 ffffffff8010d008 0000000000000000 ffffffff8044dbf4 ... Call Trace: [] show_stack+0x90/0xb0 [] dump_stack+0x84/0xe0 [] check_preemption_disabled+0x10c/0x110 [] __show_regs+0x1e4/0x330 [] show_registers+0x28/0xc0 [] do_ade+0xcc8/0xce0 [] resume_userspace_check+0x0/0x10 This is possible because cpu_name_string() is used by __show_regs(), which is used by both show_regs() and show_registers(). These two functions are used by various exception handling functions, only some of which ensure that interrupts or preemption is disabled. However the following have interrupts explicitly enabled or not explicitly disabled: - do_reserved() (irqs enabled) - do_ade() (irqs not disabled) This can be hit by setting /sys/kernel/debug/mips/unaligned_action to 2, and triggering an address error exception, e.g. an unaligned access or access to kernel segment from user mode. To fix the above cases, use raw_smp_processor_id() instead. It is unusual for CPU names to be different in the same system, and even if they were, its possible the process has migrated between the exception of interest and the cpu_name_string() call anyway. Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12212/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16b02d711f4059b8338ef967064195b47cae65ea Merge: b15d53d f55532a Author: Rich Felker Date: Tue Mar 29 21:53:03 2016 +0000 Merge tag 'v4.6-rc1' Linux 4.6-rc1 commit e34b6fcf9b09ec9d93503edd5f81489791ffd602 Author: Manuel Lauss Date: Wed Mar 2 10:34:43 2016 +0100 pcmcia: db1xxx_ss: fix last irq_to_gpio user remove the usage of removed irq_to_gpio() function. On pre-DB1200 boards, pass the actual carddetect GPIO number instead of the IRQ, because we need the gpio to actually test card status (inserted or not) and can get the irq number with gpio_to_irq() instead. Tested on DB1300 and DB1500, this patch fixes PCMCIA on the DB1500, which used irq_to_gpio(). Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h") Signed-off-by: Manuel Lauss Acked-by: Arnd Bergmann Reviewed-by: Linus Walleij Cc: linux-pcmcia@lists.infradead.org Cc: Linux-MIPS Cc: stable@vger.kernel.org # v4.3+ Patchwork: https://patchwork.linux-mips.org/patch/12747/ Signed-off-by: Ralf Baechle arch/mips/alchemy/devboards/db1000.c | 18 ++++++++---------- arch/mips/alchemy/devboards/db1550.c | 4 ++-- drivers/pcmcia/db1xxx_ss.c | 11 +++++++++-- 3 files changed, 19 insertions(+), 14 deletions(-) commit 505ce68c6da3432454c62e43c24a22ea5b1d754b Author: Mickaël Salaün Date: Tue Mar 29 20:51:49 2016 +0200 selftest/seccomp: Fix the seccomp(2) signature Signed-off-by: Mickaël Salaün Cc: Andy Lutomirski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Acked-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/seccomp_bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c045d07bb305c527140bdec4cf8ab50f7c980d8 Author: Mickaël Salaün Date: Tue Mar 29 20:46:07 2016 +0200 selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC Rename SECCOMP_FLAG_FILTER_TSYNC to SECCOMP_FILTER_FLAG_TSYNC to match the UAPI. Signed-off-by: Mickaël Salaün Cc: Andy Lutomirski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Acked-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/seccomp_bpf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 4c35430ad18f5a034302cb90e559ede5a27f93b9 Author: Robert Jarzmik Date: Wed Mar 9 00:46:11 2016 +0100 ARM: pxa: fix the number of DMA requestor lines The number of requestor lines was clamped to 0 for all pxa architectures in the requestor declaration. Fix this by using the value. Fixes: 72b195cb7162 ("ARM: pxa: add the number of DMA requestor lines") Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/devices.c | 1 + 1 file changed, 1 insertion(+) commit 85d1a29de8e4e5bce20ca02103acf1082a6e530a Author: Stefano Stabellini Date: Tue Mar 29 11:01:16 2016 +0100 Xen on ARM and ARM64: update MAINTAINERS info Not my full time job anymore, but still maintaining it. Signed-off-by: Stefano Stabellini Signed-off-by: Konrad Rzeszutek Wilk MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 33362c69c8e68281633a7c3a1d5c840e940097b7 Author: Charles Keepax Date: Mon Mar 28 10:47:34 2016 +0100 ASoC: wm8962: Correct typo when setting DSPCLK rate The variable dspclk holds the rate of the DSPCLK, but the variable sysclk holds an identifier for the clock. Currently if read a non-sensical value from the DSPCLK_DIV register we assign sysclk to dspclk, clearly this was intended to be sysclk_rate. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8962.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 431597bb95560c975221c0394c442723d7a21f2d Author: Will Deacon Date: Tue Mar 29 16:39:12 2016 +0100 arm64: defconfig: updates for 4.6 A few defconfig updates got dropped on the floor during the merge window, so I've rounded up the remainder here: * Fix duplicate definition of MMC_BLOCK_MINORS and bump to 32 for msm8916 * CPUFreq support for the Juno platform, using the MHU/SCPI interface * Removal of the default command line, which assumed a console called ttyAMA0 * Bits and pieces for the Hi6220 (96Boards HiKey) Signed-off-by: Will Deacon arch/arm64/configs/defconfig | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 8f9e8f5fcc059a3cba87ce837c88316797ef3645 Author: Jan Kara Date: Tue Mar 29 17:44:11 2016 +0200 ocfs2: Fix Q_GETNEXTQUOTA for filesystem without quotas When Q_GETNEXTQUOTA was called for filesystem with quotas disabled ocfs2_get_next_id() oopses. Fix the problem by checking early whether the filesystem has quotas enabled. Signed-off-by: Jan Kara fs/ocfs2/quota_global.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 82c7d823cc31cf56d964eebe1f91aaf1691cddce Author: Andrew Price Date: Tue Mar 22 17:36:34 2016 +0000 dlm: config: Fix ENOMEM failures in make_cluster() Commit 1ae1602de0 "configfs: switch ->default groups to a linked list" left the NULL gps pointer behind after removing the kcalloc() call which made it non-NULL. It also left the !gps check in place so make_cluster() now fails with ENOMEM. Remove the remaining uses of the gps variable to fix that. Reviewed-by: Bob Peterson Reviewed-by: Andreas Gruenbacher Signed-off-by: Andrew Price Signed-off-by: David Teigland fs/dlm/config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17e8a8936c3f28085a858e65baee90dff5e8d48b Author: Jan Kara Date: Tue Mar 29 17:20:10 2016 +0200 quota: Handle Q_GETNEXTQUOTA when quota is disabled Currently we oopsed when Q_GETNEXTQUOTA got called when quota was disabled. Properly check whether quota is enabled for the filesystem before calling into quota format handler. Reported-by: Ted Tso Signed-off-by: Jan Kara fs/quota/dquot.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b8cfadfcefdc8c306ca2c0b1bdbdd4e01f0155e3 Author: Shannon Zhao Date: Thu Mar 24 16:01:16 2016 +0000 arm64: perf: Move PMU register related defines to asm/perf_event.h To use the ARMv8 PMU related register defines from the KVM code, we move the relevant definitions to asm/perf_event.h header file and rename them with prefix ARMV8_PMU_. This allows us to get rid of kvm_perf_event.h. Signed-off-by: Anup Patel Signed-off-by: Shannon Zhao Acked-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/kvm_perf_event.h | 68 ------------------------------- arch/arm64/include/asm/perf_event.h | 47 +++++++++++++++++++++ arch/arm64/kernel/perf_event.c | 72 +++++++++------------------------ 5 files changed, 66 insertions(+), 123 deletions(-) commit a6002ec5a8c68e69706b2efd6db6d682d0ab672c Author: James Morse Date: Thu Mar 24 16:54:34 2016 +0000 arm64: opcodes.h: Add arm big-endian config options before including arm header arm and arm64 use different config options to specify big endian. This needs taking into account when including code/headers between the two architectures. A case in point is PAN, which uses the __instr_arm() macro to output instructions. The macro comes from opcodes.h, which lives under arch/arm. On a big-endian build the mismatched config options mean the instruction isn't byte swapped correctly, resulting in undefined instruction exceptions during boot: | alternatives: patching kernel code | kdevtmpfs[87]: undefined instruction: pc=ffffffc0004505b4 | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | kdevtmpfs[87]: undefined instruction: pc=ffffffc00076231c | Internal error: Oops - undefined instruction: 0 [#1] SMP | Modules linked in: | CPU: 0 PID: 87 Comm: kdevtmpfs Not tainted 4.1.16+ #5 | Hardware name: Hisilicon PhosphorHi1382 EVB (DT) | task: ffffffc336591700 ti: ffffffc3365a4000 task.ti: ffffffc3365a4000 | PC is at dump_instr+0x68/0x100 | LR is at do_undefinstr+0x1d4/0x2a4 | pc : [] lr : [] pstate: 604001c5 | sp : ffffffc3365a6450 Cc: #4.3.x- Reported-by: Hanjun Guo Tested-by: Xuefeng Wang Signed-off-by: James Morse Signed-off-by: Will Deacon arch/arm64/include/asm/opcodes.h | 4 ++++ 1 file changed, 4 insertions(+) commit d75868496ca0af1685f31726d8f5b5037c092a7a Author: Bjorn Andersson Date: Mon Mar 21 22:43:54 2016 -0700 MAINTAINERS: Add mailing list for remote processor subsystems Add the newly created linux-remoteproc mailing list for the three subsystems related to remote processor management and communication. Acked-by: Ohad Ben-Cohen Acked-by: Suman Anna Signed-off-by: Bjorn Andersson MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 580549ef6b3e3fb3b958de490ca99f43a089a2cf Author: Benjamin Tissoires Date: Fri Mar 25 15:26:55 2016 +0100 HID: wacom: fix Bamboo ONE oops Looks like recent changes in the Wacom driver made the Bamboo ONE crashes. The tablet behaves as if it was a regular Bamboo device with pen, touch and pad, but there is no physical pad connected to it. The weird part is that the pad is still sending events and given that there is no input node connected to it, we get anull pointer exception. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317116 Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ea36ae09105b7688225c02d33f1f3213299360f6 Author: Josh Boyer Date: Mon Mar 28 09:22:14 2016 -0400 HID: lenovo: Don't use stack variables for DMA buffers The lenovo_send_cmd_cptkbd function uses a stack variable to submit commands via hid_hw_raw_request. Eventually this gets to the usb_hcd_map_urb_for_dma function, which causes a warning to be thrown if the CONFIG_DMA_API_DEBUG option is enabled. Fix this by allocating a temporary buffer instead. [jkosina@suse.cz: no need to NULL-initialize buf, spotted by Benjamin] Reported-by: lejeczek Signed-off-by: Josh Boyer Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-lenovo.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit dc6416f1d711eb4c1726e845d653235dcaae12e1 Author: Boris Ostrovsky Date: Thu Mar 17 09:03:25 2016 -0400 xen/x86: Call cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead() This call has always been missing from xen_play dead() but until recently this was rather benign. With new cpu hotplug framework (commit 8df3e07e7f21 ("cpu/hotplug: Let upcoming cpu bring itself fully up"). however this call is required, otherwise a hot-plugged CPU will not be properly brough up (by never calling cpuhp_online_idle()) Signed-off-by: Boris Ostrovsky Signed-off-by: Konrad Rzeszutek Wilk arch/x86/xen/smp.c | 2 ++ 1 file changed, 2 insertions(+) commit 8041dcc881c928134c546ae85e6e59e65804357c Merge: ed6069b f55532a Author: Konrad Rzeszutek Wilk Date: Tue Mar 29 09:33:47 2016 -0400 Merge tag 'v4.6-rc1' into for-linus-4.6 Linux 4.6-rc1 * tag 'v4.6-rc1': (12823 commits) Linux 4.6-rc1 f2fs/crypto: fix xts_tweak initialization NTB: Remove _addr functions from ntb_hw_amd orangefs: fix orangefs_superblock locking orangefs: fix do_readv_writev() handling of error halfway through orangefs: have ->kill_sb() evict the VFS side of things first orangefs: sanitize ->llseek() orangefs-bufmap.h: trim unused junk orangefs: saner calling conventions for getting a slot orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointer orangefs: get rid of readdir_handle_s thp: fix typo in khugepaged_scan_pmd() MAINTAINERS: fill entries for KASAN mm/filemap: generic_file_read_iter(): check for zero reads unconditionally kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2 mm, kasan: stackdepot implementation. Enable stackdepot for SLAB arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections mm, kasan: add GFP flags to KASAN API mm, kasan: SLAB support kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right() ... commit fa8ff601d72bad3078ddf5ef17a5547700d06908 Author: Paul Burton Date: Wed Feb 3 03:35:49 2016 +0000 MIPS: Fix MSA ld unaligned failure cases Copying the content of an MSA vector from user memory may involve TLB faults & mapping in pages. This will fail when preemption is disabled due to an inability to acquire mmap_sem from do_page_fault, which meant such vector loads to unmapped pages would always fail to be emulated. Fix this by disabling preemption later only around the updating of vector register state. This change does however introduce a race between performing the load into thread context & the thread being preempted, saving its current live context & clobbering the loaded value. This should be a rare occureence, so optimise for the fast path by simply repeating the load if we are preempted. Additionally if the copy failed then the failure path was taken with preemption left disabled, leading to the kernel typically encountering further issues around sleeping whilst atomic. The change to where preemption is disabled avoids this issue. Fixes: e4aa1f153add "MIPS: MSA unaligned memory access support" Reported-by: James Hogan Signed-off-by: Paul Burton Reviewed-by: James Hogan Cc: Leonid Yegoshin Cc: Maciej W. Rozycki Cc: James Cowgill Cc: Markos Chandras Cc: stable # v4.3 Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12345/ Signed-off-by: Ralf Baechle arch/mips/kernel/unaligned.c | 51 ++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 21 deletions(-) commit 19fb5818ed60ac2e9609ad16bc48116f4ce269a8 Author: Qais Yousef Date: Thu Mar 17 21:08:09 2016 +0000 MIPS: Fix broken malta qemu Malta defconfig compiles with GIC on. Hence when compiling for SMP it causes the new IPI code to be activated. But on qemu malta there's no GIC causing a BUG_ON(!ipidomain) to be hit in mips_smp_ipi_init(). Since in that configuration one can only run a single core SMP (!), skip IPI initialisation if we detect that this is the case. It is a sensible behaviour to introduce and should keep such possible configuration to run rather than die hard unnecessarily. Signed-off-by: Qais Yousef Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12892/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6d92bc9d483aa1751755a66fee8fb39dffb088c0 Author: H.J. Lu Date: Wed Mar 16 20:04:35 2016 -0700 x86/build: Build compressed x86 kernels as PIE The 32-bit x86 assembler in binutils 2.26 will generate R_386_GOT32X relocation to get the symbol address in PIC. When the compressed x86 kernel isn't built as PIC, the linker optimizes R_386_GOT32X relocations to their fixed symbol addresses. However, when the compressed x86 kernel is loaded at a different address, it leads to the following load failure: Failed to allocate space for phdrs during the decompression stage. If the compressed x86 kernel is relocatable at run-time, it should be compiled with -fPIE, instead of -fPIC, if possible and should be built as Position Independent Executable (PIE) so that linker won't optimize R_386_GOT32X relocation to its fixed symbol address. Older linkers generate R_386_32 relocations against locally defined symbols, _bss, _ebss, _got and _egot, in PIE. It isn't wrong, just less optimal than R_386_RELATIVE. But the x86 kernel fails to properly handle R_386_32 relocations when relocating the kernel. To generate R_386_RELATIVE relocations, we mark _bss, _ebss, _got and _egot as hidden in both 32-bit and 64-bit x86 kernels. To build a 64-bit compressed x86 kernel as PIE, we need to disable the relocation overflow check to avoid relocation overflow errors. We do this with a new linker command-line option, -z noreloc-overflow, which got added recently: commit 4c10bbaa0912742322f10d9d5bb630ba4e15dfa7 Author: H.J. Lu Date: Tue Mar 15 11:07:06 2016 -0700 Add -z noreloc-overflow option to x86-64 ld Add -z noreloc-overflow command-line option to the x86-64 ELF linker to disable relocation overflow check. This can be used to avoid relocation overflow check if there will be no dynamic relocation overflow at run-time. The 64-bit compressed x86 kernel is built as PIE only if the linker supports -z noreloc-overflow. So far 64-bit relocatable compressed x86 kernel boots fine even when it is built as a normal executable. Signed-off-by: H.J. Lu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org [ Edited the changelog and comments. ] Signed-off-by: Ingo Molnar arch/x86/boot/compressed/Makefile | 14 +++++++++++++- arch/x86/boot/compressed/head_32.S | 28 ++++++++++++++++++++++++++++ arch/x86/boot/compressed/head_64.S | 8 ++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) commit 1dceb0415aa0c6bc11dacdab47c9ef83a3604166 Author: Adrian Hunter Date: Tue Mar 29 12:45:43 2016 +0300 mmc: sdhci: Fix regression setting power on Trats2 board Several commits relating to setting power have been introducing problems by putting driver-specific rules into generic SDHCI code. Krzysztof Kozlowski reported that after commit 918f4cbd4340 ("mmc: sdhci: restore behavior when setting VDD via external regulator") on Trats2 board there are warnings for invalid VDD value (2.8V): [ 3.119656] ------------[ cut here ]------------ [ 3.119666] WARNING: CPU: 3 PID: 90 at ../drivers/mmc/host/sdhci.c:1234 sdhci_do_set_ios+0x4cc/0x5e0 [ 3.119669] mmc0: Invalid vdd 0x10 [ 3.119673] Modules linked in: [ 3.119679] CPU: 3 PID: 90 Comm: kworker/3:1 Tainted: G W 4.5.0-next-20160324 #23 [ 3.119681] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 3.119690] Workqueue: events_freezable mmc_rescan [ 3.119708] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 3.119719] [] (show_stack) from [] (dump_stack+0x88/0x9c) [ 3.119728] [] (dump_stack) from [] (__warn+0xe8/0x100) [ 3.119734] [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [ 3.119740] [] (warn_slowpath_fmt) from [] (sdhci_do_set_ios+0x4cc/0x5e0) [ 3.119748] [] (sdhci_do_set_ios) from [] (sdhci_runtime_resume_host+0x60/0x114) [ 3.119758] [] (sdhci_runtime_resume_host) from [] (__rpm_callback+0x2c/0x60) [ 3.119767] [] (__rpm_callback) from [] (rpm_callback+0x20/0x80) [ 3.119773] [] (rpm_callback) from [] (rpm_resume+0x36c/0x558) [ 3.119780] [] (rpm_resume) from [] (__pm_runtime_resume+0x4c/0x64) [ 3.119788] [] (__pm_runtime_resume) from [] (__mmc_claim_host+0x170/0x1b0) [ 3.119795] [] (__mmc_claim_host) from [] (mmc_rescan+0x54/0x348) [ 3.119807] [] (mmc_rescan) from [] (process_one_work+0x120/0x3f4) [ 3.119815] [] (process_one_work) from [] (worker_thread+0x38/0x554) [ 3.119823] [] (worker_thread) from [] (kthread+0xdc/0xf4) [ 3.119831] [] (kthread) from [] (ret_from_fork+0x14/0x3c) [ 3.119834] ---[ end trace a22d652aa3276886 ]--- Fix by adding a 'set_power' callback and restoring the default behaviour prior to commit 918f4cbd4340 ("mmc: sdhci: restore behavior when setting VDD via external regulator"). The desired behaviour of that commit is gotten by having sdhci-pxav3 provide its own set_power callback. Reported-by: Krzysztof Kozlowski Link: http://lkml.kernel.org/r/CAJKOXPcGDnPm-Ykh6wHqV1YxfTaov5E8iVqBoBn4OJc7BnhgEQ@mail.gmail.com Fixes: 918f4cbd4340 ("mmc: sdhci: restore behavior when setting VDD...) Tested-by: Krzysztof Kozlowski Tested-by: Ludovic Desroches Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.5+ Reviewed-by: Jisheng Zhang Tested-by: Jisheng Zhang Tested-by: Jaehoon Chung Tested-by: Anand Moon Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav3.c | 22 ++++++++++++++++++++++ drivers/mmc/host/sdhci.c | 39 ++++++++++++++++++++++++++++++--------- drivers/mmc/host/sdhci.h | 4 ++++ 3 files changed, 56 insertions(+), 9 deletions(-) commit 743bc4b069517d3bae69349a1a23511eaaae5ede Author: John Youn Date: Mon Mar 28 16:12:21 2016 -0700 usb: ch9: Fix SSP Device Cap wFunctionalitySupport type The wFunctionalitySupport field should be __le16. Signed-off-by: John Youn Signed-off-by: Felipe Balbi include/uapi/linux/usb/ch9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08f8cabf715654634a0bae8bee7afea964c6c9cb Author: John Youn Date: Mon Mar 28 16:12:24 2016 -0700 usb: gadget: composite: Access SSP Dev Cap fields properly Access multi-byte fields of the SSP Dev Cap descriptor using the correct endianness. Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5529578a27288d11d4d15635c258c6dde0f0fb10 Author: Frederic Weisbecker Date: Thu Mar 24 15:38:01 2016 +0100 locking/atomic, sched: Unexport fetch_or() This patch functionally reverts: 5fd7a09cfb8c ("atomic: Export fetch_or()") During the merge Linus observed that the generic version of fetch_or() was messy: " This makes the ugly "fetch_or()" macro that the scheduler used internally a new generic helper, and does a bad job at it. " e23604edac2a Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Now that we have introduced atomic_fetch_or(), fetch_or() is only used by the scheduler in order to deal with thread_info flags which type can vary across architectures. Lets confine fetch_or() back to the scheduler so that we encourage future users to use the more robust and well typed atomic_t version instead. While at it, fetch_or() gets robustified, pasting improvements from a previous patch by Ingo Molnar that avoids needless expression re-evaluations in the loop. Reported-by: Linus Torvalds Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1458830281-4255-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/atomic.h | 21 --------------------- kernel/sched/core.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 21 deletions(-) commit f009a7a767e792d5ab0b46c08d46236ea5271dd9 Author: Frederic Weisbecker Date: Thu Mar 24 15:38:00 2016 +0100 timers/nohz: Convert tick dependency mask to atomic_t The tick dependency mask was intially unsigned long because this is the type on which clear_bit() operates on and fetch_or() accepts it. But now that we have atomic_fetch_or(), we can instead use atomic_andnot() to clear the bit. This consolidates the type of our tick dependency mask, reduce its size on structures and benefit from possible architecture optimizations on atomic_t operations. Suggested-by: Linus Torvalds Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1458830281-4255-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/sched.h | 4 ++-- kernel/time/tick-sched.c | 61 ++++++++++++++++++++++++------------------------ kernel/time/tick-sched.h | 2 +- 3 files changed, 33 insertions(+), 34 deletions(-) commit 5acba71e18833b9d06686b3751598bfa263a3ac3 Author: Frederic Weisbecker Date: Thu Mar 24 15:37:59 2016 +0100 locking/atomic: Introduce atomic_fetch_or() This is deemed to replace the type generic fetch_or() which brings a lot of issues such as macro induced block variable aliasing and sloppy types. Not to mention fetch_or() doesn't refer to any namespace, adding even more confusion. So lets provide an atomic_t version. Current and next users of fetch_or() are thus encouraged to use atomic_t. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1458830281-4255-2-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar include/linux/atomic.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 591b1d8d86074ac3a3163d89bcfe7b232cf83902 Author: Dave Hansen Date: Mon Dec 14 11:06:34 2015 -0800 x86/mm/pkeys: Add missing Documentation Stefan Richter noticed that the X86_INTEL_MEMORY_PROTECTION_KEYS option in arch/x86/Kconfig references Documentation/x86/protection-keys.txt, but the file does not exist. This is a patch merging mishap: the final (v8) version of the pkeys series did not include the documentation patch 32 and v7 included. Add it now. Reported-by: Stefan Richter Signed-off-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20151214190634.426BEE41@viggo.jf.intel.com [ Added changelog. ] Signed-off-by: Ingo Molnar Signed-off-by: Ingo Molnar Documentation/x86/protection-keys.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da Author: Huang Rui Date: Fri Mar 25 10:08:40 2016 +0800 x86/cpu: Add advanced power management bits Bit 11 of CPUID 8000_0007 edx is processor feedback interface. Bit 12 of CPUID 8000_0007 edx is accumulated power. Print proper names in proc/cpuinfo Reported-and-tested-by: Borislav Petkov Signed-off-by: Huang Rui Cc: Tony Li Cc: Fenghua Yu Cc: Tony Luck Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Andy Lutomirski Cc: Fengguang Wu Cc: Sherry Hurwitz Cc: Borislav Petkov Cc: "Len Brown" Link: http://lkml.kernel.org/r/1458871720-3209-1-git-send-email-ray.huang@amd.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/powerflags.c | 2 ++ 1 file changed, 2 insertions(+) commit 5f870a3f7188065e13efafe1faeb01c136173bc4 Author: Borislav Petkov Date: Mon Mar 28 20:20:17 2016 +0200 x86/thread_info: Merge two !__ASSEMBLY__ sections We have #ifndef __ASSEMBLY__ ... #endif #ifndef __ASSEMBLY__ ... #endif Merge the two. No functionality change. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1459189217-25532-1-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/thread_info.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4a6772f514891eaacf26bcb7c2c808c557d23c6f Author: Vladimir Zapolskiy Date: Sat Mar 26 20:47:00 2016 +0200 x86/cpufreq: Remove duplicated TDP MSR macro definitions The list of CPU model specific registers contains two copies of TDP registers, remove the one, which is out of numerical order in the list. Fixes: 6a35fc2d6c22 ("cpufreq: intel_pstate: get P1 from TAR when available") Signed-off-by: Vladimir Zapolskiy Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Kristen Carlson Accardi Cc: Srinivas Pandruvada Link: http://lkml.kernel.org/r/1459018020-24577-1-git-send-email-vladimir_zapolskiy@mentor.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 74b2375e6767935e6d9220bdbc6ed0db57f71a59 Author: Harald Freudenberger Date: Thu Mar 17 14:52:17 2016 +0100 s390/crypto: provide correct file mode at device register. When the prng device driver calls misc_register() there is the possibility to also provide the recommented file permissions. This fix now gives useful values (0644) where previously just the default was used (resulting in 0600 for the device file). Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/prng.c | 2 ++ 1 file changed, 2 insertions(+) commit f7be8610bca88e59dd2fd5d98fcbc5031ef0e079 Author: Borislav Petkov Date: Mon Mar 28 11:56:09 2016 +0200 x86/Documentation: Start documenting x86 topology This should contain important aspects of how we represent the system topology on x86. If people have questions about it and this file doesn't answer it, then it must be updated. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20160328095609.GD26651@pd.tnic Signed-off-by: Thomas Gleixner Documentation/x86/topology.txt | 208 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit 8196dab4fc159943df6baaac04973bb1accb7100 Author: Borislav Petkov Date: Fri Mar 25 15:52:36 2016 +0100 x86/cpu: Get rid of compute_unit_id It is cpu_core_id anyway. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1458917557-8757-3-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/processor.h | 2 -- arch/x86/kernel/amd_nb.c | 6 ++---- arch/x86/kernel/cpu/amd.c | 10 +++------- arch/x86/kernel/smpboot.c | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) commit 32b62f446827f696cc474a6d83cea93693c5ed49 Author: Peter Zijlstra Date: Fri Mar 25 15:52:35 2016 +0100 perf/x86/amd: Cleanup Fam10h NB event constraints Avoid allocating the AMD NB event constraints data structure when not needed. This gets rid of x86_max_cores usage and avoids allocating this on AMD Core Perfctr supporting hardware (which has separate MSRs for NB events). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Cc: aherrmann@suse.com Cc: Rui Huang Cc: Borislav Petkov Cc: jencce.kernel@gmail.com Link: http://lkml.kernel.org/r/20160320124629.GY6375@twins.programming.kicks-ass.net Signed-off-by: Thomas Gleixner arch/x86/events/amd/core.c | 21 ++++++++++++++++++--- arch/x86/events/perf_event.h | 5 +++++ 2 files changed, 23 insertions(+), 3 deletions(-) commit ee6825c80e870fff1a370c718ec77022ade0889b Author: Peter Zijlstra Date: Fri Mar 25 15:52:34 2016 +0100 x86/topology: Fix AMD core count It turns out AMD gets x86_max_cores wrong when there are compute units. The issue is that Linux assumes: nr_logical_cpus = nr_cores * nr_siblings But AMD reports its CU unit as 2 cores, but then sets num_smp_siblings to 2 as well. Boris: fixup ras/mce_amd_inj.c too, to compute the Node Base Core properly, according to the new nomenclature. Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Reported-by: Xiong Zhou Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Cc: Andreas Herrmann Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/20160317095220.GO6344@twins.programming.kicks-ass.net Signed-off-by: Thomas Gleixner arch/x86/include/asm/smp.h | 1 + arch/x86/kernel/cpu/amd.c | 8 ++++---- arch/x86/ras/mce_amd_inj.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) commit 5dc1037305140d8a7e580e916ac17df5d0124add Merge: a49ac9f 379649c Author: Ingo Molnar Date: Tue Mar 29 10:39:12 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160328' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Fix build break on PowerPC due to missing headers with prototypes for functions defined in tools/perf/arch/powerpc/util/header.c (Sukadev Bhattiprolu) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 38e58986e6fc14617f6361ec5178e5191e7ab5c1 Author: Felipe Balbi Date: Mon Mar 21 09:04:23 2016 +0200 usb: gadget: udc: atmel: don't disable enpdoints we don't own UDC driver should NEVER do anything behind udc-core's back, so let's stop disabling endpoints we don't exactly own - rather we provide as resources for gadget drivers. This fixes the regression reported by Gil. Reported-by: Gil Weber Tested-by: Gil Weber Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 14 -------------- 1 file changed, 14 deletions(-) commit e901aa159dac9988c9961c31c01730effe8f5c22 Author: Felipe Balbi Date: Wed Mar 16 14:01:37 2016 +0200 usb: dwc3: gadget: fix endpoint renaming We were exitting the function before actually renaming anything. While at that, also always leave control endpoint un-renamed. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ad14d4e0308afda06a60036020a15025571604af Author: Jiebing Li Date: Thu Dec 11 13:26:29 2014 +0800 usb: dwc3: gadget: release spin lock during gadget resume It's a requirement that we release controller's lock while calling gadget API function pointers. This patch just fixes that long standing bug. Signed-off-by: Jiebing Li Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f59dcab176293b646e1358144c93c58c3cda2813 Author: Felipe Balbi Date: Fri Mar 11 10:51:52 2016 +0200 usb: dwc3: core: improve reset sequence According to Synopsys Databook, we shouldn't be relying on GCTL.CORESOFTRESET bit as that's only for debugging purposes. Instead, let's use DCTL.CSFTRST if we're OTG or PERIPHERAL mode. Host side block will be reset by XHCI driver if necessary. Note that this reduces amount of time spent on dwc3_probe() by a long margin. We're still gonna wait for reset to finish for a long time (default to 1ms max), but tests show that the reset polling loop executed at most 19 times (modprobe dwc3 && modprobe -r dwc3 executed 1000 times in a row). Suggested-by: Mian Yousaf Kaukab Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) commit 9acdf4df2fc4680b08fa242b09717892cd687d4a Author: Felipe F. Tonello Date: Tue Mar 8 20:21:47 2016 +0000 usb: gadget: f_midi: added spinlock on transmit function Since f_midi_transmit is called by both ALSA and USB sub-systems, it can potentially cause a race condition between both calls because f_midi_transmit is not reentrant nor thread-safe. This is due to an implementation detail that the transmit function looks for the next available usb request from the fifo and only enqueues it if there is data to send, otherwise just re-uses it. So, if both ALSA and USB frameworks calls this function at the same time, kfifo_seek() will return the same usb_request, which will cause a race condition. To solve this problem a syncronization mechanism is necessary. In this case it is used a spinlock since f_midi_transmit is also called by usb_request->complete callback in interrupt context. Cc: # v4.5+ Fixes: e1e3d7ec5da3 ("usb: gadget: f_midi: pre-allocate IN requests") Signed-off-by: Felipe F. Tonello Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 71528d8bd7a8aa920cd69d4223c6c87d5849257d Author: Simon Guo Date: Fri Mar 25 01:12:21 2016 +0800 powerpc: Correct used_vsr comment The used_vsr flag is set if process has used VSX registers, not Altivec registers. But the comment says otherwise, correct the comment. Signed-off-by: Simon Guo Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01d7c2a2de47890934faba91a71d183795e4348d Author: Oliver O'Halloran Date: Tue Mar 8 09:08:47 2016 +1100 powerpc/process: Fix altivec SPR not being saved In save_sprs() in process.c contains the following test: if (cpu_has_feature(cpu_has_feature(CPU_FTR_ALTIVEC))) t->vrsave = mfspr(SPRN_VRSAVE); CPU feature with the mask 0x1 is CPU_FTR_COHERENT_ICACHE so the test is equivilent to: if (cpu_has_feature(CPU_FTR_ALTIVEC) && cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) On CPUs without support for both (i.e G5) this results in vrsave not being saved between context switches. The vector register save/restore code doesn't use VRSAVE to determine which registers to save/restore, but the value of VRSAVE is used to determine if altivec is being used in several code paths. Fixes: 152d523e6307 ("powerpc: Create context switch helpers save_sprs() and restore_sprs()") Cc: stable@vger.kernel.org Signed-off-by: Oliver O'Halloran Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08a5bb2921e490939f78f38fd0d02858bb709942 Author: Sebastian Siewior Date: Tue Mar 8 10:03:56 2016 +0100 powerpc/mm: Fixup preempt underflow with huge pages hugepd_free() used __get_cpu_var() once. Nothing ensured that the code accessing the variable did not migrate from one CPU to another and soon this was noticed by Tiejun Chen in 94b09d755462 ("powerpc/hugetlb: Replace __get_cpu_var with get_cpu_var"). So we had it fixed. Christoph Lameter was doing his __get_cpu_var() replaces and forgot PowerPC. Then he noticed this and sent his fixed up batch again which got applied as 69111bac42f5 ("powerpc: Replace __get_cpu_var uses"). The careful reader will noticed one little detail: get_cpu_var() got replaced with this_cpu_ptr(). So now we have a put_cpu_var() which does a preempt_enable() and nothing that does preempt_disable() so we underflow the preempt counter. Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea76543127da32dec28af0a13ea1b06625fc085e Author: Manoj N. Kumar Date: Fri Mar 25 14:26:49 2016 -0500 cxlflash: Move to exponential back-off when cmd_room is not available While profiling the cxlflash_queuecommand() path under a heavy load it was found that number of retries to find cmd_room was fairly high. There are two problems with the current back-off: a) It starts with a udelay of 0 b) It backs-off linearly Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2, 2^n) and found that the exponential back-off(2^n) approach had the least overall cost. Cost as being defined as overall time spent waiting. The fix is to change the linear back-off to an exponential back-off. This solution also takes care of the problem with the initial delay (starts with 1 usec). Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Johannes Thumshirn Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9526f36026f778e82b5175249443854c03b2e660 Author: Manoj N. Kumar Date: Fri Mar 25 14:26:34 2016 -0500 cxlflash: Fix regression issue with re-ordering patch While running 'sg_reset -H' back to back the following exception was seen: [ 735.115695] Faulting instruction address: 0xd0000000098c0864 cpu 0x0: Vector: 300 (Data Access) at [c000000ffffafa80] pc: d0000000098c0864: cxlflash_async_err_irq+0x84/0x5c0 [cxlflash] lr: c00000000013aed0: handle_irq_event_percpu+0xa0/0x310 sp: c000000ffffafd00 msr: 9000000000009033 dar: 2010000 dsisr: 40000000 current = 0xc000000001510880 paca = 0xc00000000fb80000 softe: 0 irq_happened: 0x01 pid = 0, comm = swapper/0 Linux version 4.5.0-491-26f710d+ enter ? for help [c000000ffffafe10] c00000000013aed0 handle_irq_event_percpu+0xa0/0x310 [c000000ffffafed0] c00000000013b1a8 handle_irq_event+0x68/0xc0 [c000000ffffaff00] c0000000001404ec handle_fasteoi_irq+0xec/0x2a0 [c000000ffffaff30] c00000000013a084 generic_handle_irq+0x54/0x80 [c000000ffffaff60] c000000000011130 __do_irq+0x80/0x1d0 [c000000ffffaff90] c000000000024d40 call_do_irq+0x14/0x24 [c000000001573a20] c000000000011318 do_IRQ+0x98/0x140 [c000000001573a70] c000000000002594 hardware_interrupt_common+0x114/0x180 This exception is being hit because the async_err interrupt path performs an MMIO to read the interrupt status register. The MMIO region in this case is not available. Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") re-ordered the sequence in which term_mc() and stop_afu() are called. This introduces a window for interrupts to come in with the problem space area unmapped, that did not exist previously. The fix is to separate the disabling of all AFU interrupts to a distinct function, term_intr() so that it is the first thing that is done in the tear down process. To keep the initialization process symmetric, separate the AFU interrupt setup also to a distinct function: init_intr(). Fixes: 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Johannes Thumshirn Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 130 ++++++++++++++++++++++++++++++------------- drivers/scsi/cxlflash/main.h | 5 +- 2 files changed, 93 insertions(+), 42 deletions(-) commit fc0c2028135c7f75fce36b90e44efb8003a9173b Author: Dan Williams Date: Tue Mar 8 10:30:19 2016 -0800 x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem() Update the definition of memcpy_from_pmem() to return 0 or a negative error code. Implement x86/arch_memcpy_from_pmem() with memcpy_mcsafe(). Cc: Borislav Petkov Cc: Tony Luck Cc: Thomas Gleixner Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Andrew Morton Cc: Linus Torvalds Acked-by: Ingo Molnar Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 9 +++++++++ drivers/nvdimm/pmem.c | 4 ++-- include/linux/pmem.h | 22 ++++++++++++++++------ 3 files changed, 27 insertions(+), 8 deletions(-) commit e84810c7b85a2d7897797b3ad3e879168a8e032a Author: Bjørn Mork Date: Mon Mar 28 22:38:16 2016 +0200 qmi_wwan: add "D-Link DWM-221 B1" device id Thomas reports: "Windows: 00 diagnostics 01 modem 02 at-port 03 nmea 04 nic Linux: T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7e19 Rev=02.32 S: Manufacturer=Mobile Connect S: Product=Mobile Connect S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage" Reported-by: Thomas Schäfer Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 4b28038fd60d346337dcaca80c255db2724adf76 Author: Vladimir Zapolskiy Date: Sat Mar 19 15:31:10 2016 +0200 remoteproc: st: fix check of syscon_regmap_lookup_by_phandle() return value syscon_regmap_lookup_by_phandle() returns either a valid pointer to struct regmap or ERR_PTR() error value, check for NULL is invalid and on error path may lead to oops, the change corrects the check. Signed-off-by: Vladimir Zapolskiy Acked-by: Lee Jones Signed-off-by: Bjorn Andersson drivers/remoteproc/st_remoteproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00c9329ebe2d19a13afd86ba75218f868f2788ba Author: Javier Martinez Canillas Date: Mon Feb 15 11:11:06 2016 -0300 rtc: s3c: Document in binding that only s3c6410 needs a src clk The S3C binding doc says that the RTC and RTC source clocks are required but the S3C driver supports different HW IP and only the s3c6410 needs a source clock. Fix the binding explaining that the source clock is only needed for the s3c6410-rtc compatible controller. Reported-by: Krzysztof Kozlowski Signed-off-by: Javier Martinez Canillas Acked-by: Alexandre Belloni Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/s3c-rtc.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 379649cfeafef29b77d29860741f4d1c5870b65f Author: Sukadev Bhattiprolu Date: Mon Mar 28 09:31:41 2016 -0300 perf tools: Fix build break on powerpc Commit 531d2410635c ("perf tools: Do not include stringify.h from the kernel sources") seems to have accidentially removed the inclusion of "util/header.h" from "arch/powerpc/util/header.c". "util/header.h" provides the prototype for get_cpuid() and is needed to build perf on Powerpc: arch/powerpc/util/header.c:17:1: error: no previous prototype for 'get_cpuid' [-Werror=missing-prototypes] Reported-by: Michael Ellerman Tested-by: Arnaldo Carvalho de Melo Cc: Stephen Rothwell Fixes: 531d2410635c ("perf tools: Do not include stringify.h from the kernel sources") Signed-off-by: Sukadev Bhattiprolu [ Included "util.h" too, to get the scnprintf() prototype ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/header.c | 2 ++ 1 file changed, 2 insertions(+) commit 1993b176a8224e371e0732ffada7ab9eb3b0912b Merge: d4dc3b2 0d7ef45 Author: Linus Torvalds Date: Mon Mar 28 15:17:02 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE fixes from David Miller: "Just two small changes: 1) Remove bogus init annotation in icside, from Arnd Bergmann. 2) Don't use zero clock rates in palm_bk3710 driver, from Wolfram Sang" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: palm_bk3710: test clock rate to avoid division by 0 ide: icside: remove incorrect initconst annotation commit d4dc3b24427f91f112b18562dac73f7af60b7a21 Merge: ec3c073 9ef595d Author: Linus Torvalds Date: Mon Mar 28 15:14:11 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Minor typing cleanup from Joe Perches, and some comment typo fixes from Adam Buchbinder" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: Convert naked unsigned uses to unsigned int sparc: Fix misspellings in comments. commit ec3c07377bd87e24a9a17a352fa4771173d4638a Merge: f55532a 35b90a2 Author: Linus Torvalds Date: Mon Mar 28 15:04:55 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile bugfixes from Chris Metcalf: "These include updates to MAINTAINERS, some comment spelling fixes, and a bugfix to the tile kgdb.c support" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tile: Fix misspellings in comments. MAINTAINERS: update web link for tile architecture MAINTAINERS: update arch/tile maintainer email domain tile kgdb: fix bug in copy to gdb regs, and optimize memset commit 0c84ea17ff22df83d72b20e336ae69d6035c8bbf Merge: 0e3e799 2942119 Author: David S. Miller Date: Mon Mar 28 15:38:59 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for you net tree, they are: 1) There was a race condition between parallel save/swap and delete, which resulted a kernel crash due to the increase ref for save, swap, wrong ref decrease operations. Reported and fixed by Vishwanath Pai. 2) OVS should call into CT NAT for packets of new expected connections only when the conntrack state is persisted with the 'commit' option to the OVS CT action. From Jarno Rajahalme. 3) Resolve kconfig dependencies with new OVS NAT support. From Arnd Bergmann. 4) Early validation of entry->target_offset to make sure it doesn't take us out from the blob, from Florian Westphal. 5) Again early validation of entry->next_offset to make sure it doesn't take out from the blob, also from Florian. 6) Check that entry->target_offset is always of of sizeof(struct xt_entry) for unconditional entries, when checking both from check_underflow() and when checking for loops in mark_source_chains(), again from Florian. 7) Fix inconsistent behaviour in nfnetlink_queue when NFQA_CFG_F_FAIL_OPEN is set and netlink_unicast() fails due to buffer overrun, we have to reinject the packet as the user expects. 8) Enforce nul-terminated table names from getsockopt GET_ENTRIES requests. 9) Don't assume skb->sk is set from nft_bridge_reject and synproxy, this fixes a recent update of the code to namespaceify ip_default_ttl, patch from Liping Zhang. This batch comes with four patches to validate x_tables blobs coming from userspace. CONFIG_USERNS exposes the x_tables interface to unpriviledged users and to be honest this interface never received the attention for this move away from the CAP_NET_ADMIN domain. Florian is working on another round with more patches with more sanity checks, so expect a bit more Netfilter fixes in this development cycle than usual. ==================== Signed-off-by: David S. Miller commit fd694733d523df1e0a583cf5c4c08e41d7bf9fa3 Author: Jaegeuk Kim Date: Sun Mar 20 15:33:20 2016 -0700 f2fs: cover large section in sanity check of super This patch fixes the bug which does not cover a large section case when checking the sanity of superblock. If f2fs detects misalignment, it will fix the superblock during the mount time, so it doesn't need to trigger fsck.f2fs further. Reported-by: Matthias Prager Reported-by: David Gnedt Cc: stable 4.5+ Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 102 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 37 deletions(-) commit 45aa56cd0ffc2ebc2274f1bacc985b6f032c0120 Author: Alex Hung Date: Mon Mar 21 16:08:42 2016 +0800 intel-hid: add a workaround to ignore an event after waking up from S4. This is the same as the original workaround from S3 but for S4. Without this workaround, a rfkill event will be received and it will toggle wireless devices when radio hotkey is not pressed. Signed-off-by: Alex Hung Signed-off-by: Darren Hart drivers/platform/x86/intel-hid.c | 2 ++ 1 file changed, 2 insertions(+) commit 29421198c3a860092e27c2ad8499dfe603398817 Author: Liping Zhang Date: Sat Mar 26 16:32:57 2016 +0800 netfilter: ipv4: fix NULL dereference Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") use sock_net(skb->sk) to get the net namespace, but we can't assume that sk_buff->sk is always exist, so when it is NULL, oops will happen. Signed-off-by: Liping Zhang Reviewed-by: Nikolay Borisov Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_reject_bridge.c | 20 ++++++------ net/ipv4/netfilter/ipt_SYNPROXY.c | 54 +++++++++++++++++--------------- 2 files changed, 38 insertions(+), 36 deletions(-) commit b301f2538759933cf9ff1f7c4f968da72e3f0757 Author: Pablo Neira Ayuso Date: Thu Mar 24 21:29:53 2016 +0100 netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES Make sure the table names via getsockopt GET_ENTRIES is nul-terminated in ebtables and all the x_tables variants and their respective compat code. Uncovered by KASAN. Reported-by: Baozeng Ding Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 4 ++++ net/ipv4/netfilter/arp_tables.c | 2 ++ net/ipv4/netfilter/ip_tables.c | 2 ++ net/ipv6/netfilter/ip6_tables.c | 2 ++ 4 files changed, 10 insertions(+) commit 931401137f60fc299256bbc221c0b756be31c32c Author: Pablo Neira Ayuso Date: Wed Mar 23 12:58:01 2016 +0100 netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails When netlink unicast fails to deliver the message to userspace, we should also check if the NFQA_CFG_F_FAIL_OPEN flag is set so we reinject the packet back to the stack. I think the user expects no packet drops when this flag is set due to queueing to userspace errors, no matter if related to the internal queue or when sending the netlink message to userspace. The userspace application will still get the ENOBUFS error via recvmsg() so the user still knows that, with the current configuration that is in place, the userspace application is not consuming the messages at the pace that the kernel needs. Reported-by: "Yigal Reiss (yreiss)" Signed-off-by: Pablo Neira Ayuso Tested-by: "Yigal Reiss (yreiss)" net/netfilter/nfnetlink_queue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 54d83fc74aa9ec72794373cb47432c5f7fb1a309 Author: Florian Westphal Date: Tue Mar 22 18:02:52 2016 +0100 netfilter: x_tables: fix unconditional helper Ben Hawkes says: In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset. Problem is that mark_source_chains should not have been called -- the rule doesn't have a next entry, so its supposed to return an absolute verdict of either ACCEPT or DROP. However, the function conditional() doesn't work as the name implies. It only checks that the rule is using wildcard address matching. However, an unconditional rule must also not be using any matches (no -m args). The underflow validator only checked the addresses, therefore passing the 'unconditional absolute verdict' test, while mark_source_chains also tested for presence of matches, and thus proceeeded to the next (not-existent) rule. Unify this so that all the callers have same idea of 'unconditional rule'. Reported-by: Ben Hawkes Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 18 +++++++++--------- net/ipv4/netfilter/ip_tables.c | 23 +++++++++++------------ net/ipv6/netfilter/ip6_tables.c | 23 +++++++++++------------ 3 files changed, 31 insertions(+), 33 deletions(-) commit 6e94e0cfb0887e4013b3b930fa6ab1fe6bb6ba91 Author: Florian Westphal Date: Tue Mar 22 18:02:50 2016 +0100 netfilter: x_tables: make sure e->next_offset covers remaining blob size Otherwise this function may read data beyond the ruleset blob. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 6 ++++-- net/ipv4/netfilter/ip_tables.c | 6 ++++-- net/ipv6/netfilter/ip6_tables.c | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) commit bdf533de6968e9686df777dc178486f600c6e617 Author: Florian Westphal Date: Tue Mar 22 18:02:49 2016 +0100 netfilter: x_tables: validate e->target_offset early We should check that e->target_offset is sane before mark_source_chains gets called since it will fetch the target entry for loop detection. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 17 ++++++++--------- net/ipv4/netfilter/ip_tables.c | 17 ++++++++--------- net/ipv6/netfilter/ip6_tables.c | 17 ++++++++--------- 3 files changed, 24 insertions(+), 27 deletions(-) commit 99b7248e2ad57ca93ada10c6598affb267ffc99a Author: Arnd Bergmann Date: Fri Mar 18 14:33:45 2016 +0100 openvswitch: call only into reachable nf-nat code The openvswitch code has gained support for calling into the nf-nat-ipv4/ipv6 modules, however those can be loadable modules in a configuration in which openvswitch is built-in, leading to link errors: net/built-in.o: In function `__ovs_ct_lookup': :(.text+0x2cc2c8): undefined reference to `nf_nat_icmp_reply_translation' :(.text+0x2cc66c): undefined reference to `nf_nat_icmpv6_reply_translation' The dependency on (!NF_NAT || NF_NAT) prevents similar issues, but NF_NAT is set to 'y' if any of the symbols selecting it are built-in, but the link error happens when any of them are modular. A second issue is that even if CONFIG_NF_NAT_IPV6 is built-in, CONFIG_NF_NAT_IPV4 might be completely disabled. This is unlikely to be useful in practice, but the driver currently only handles IPv6 being optional. This patch improves the Kconfig dependency so that openvswitch cannot be built-in if either of the two other symbols are set to 'm', and it replaces the incorrect #ifdef in ovs_ct_nat_execute() with two "if (IS_ENABLED())" checks that should catch all corner cases also make the code more readable. The same #ifdef exists ovs_ct_nat_to_attr(), where it does not cause a link error, but for consistency I'm changing it the same way. Signed-off-by: Arnd Bergmann Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/Kconfig | 4 +++- net/openvswitch/conntrack.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) commit 5745b0be05a0f8ccbc92a36b69f3a6bc58e91954 Author: Jarno Rajahalme Date: Mon Mar 21 11:15:19 2016 -0700 openvswitch: Fix checking for new expected connections. OVS should call into CT NAT for packets of new expected connections only when the conntrack state is persisted with the 'commit' option to the OVS CT action. The test for this condition is doubly wrong, as the CT status field is ANDed with the bit number (IPS_EXPECTED_BIT) rather than the mask (IPS_EXPECTED), and due to the wrong assumption that the expected bit would apply only for the first (i.e., 'new') packet of a connection, while in fact the expected bit remains on for the lifetime of an expected connection. The 'ctinfo' value IP_CT_RELATED derived from the ct status can be used instead, as it is only ever applicable to the 'new' packets of the expected connection. Fixes: 05752523e565 ('openvswitch: Interface with NAT.') Reported-by: Dan Carpenter Signed-off-by: Jarno Rajahalme Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 596cf3fe5854fe2b1703b0466ed6bf9cfb83c91e Author: Vishwanath Pai Date: Wed Mar 16 21:49:00 2016 +0100 netfilter: ipset: fix race condition in ipset save, swap and delete This fix adds a new reference counter (ref_netlink) for the struct ip_set. The other reference counter (ref) can be swapped out by ip_set_swap and we need a separate counter to keep track of references for netlink events like dump. Using the same ref counter for dump causes a race condition which can be demonstrated by the following script: ipset create hash_ip1 hash:ip family inet hashsize 1024 maxelem 500000 \ counters ipset create hash_ip2 hash:ip family inet hashsize 300000 maxelem 500000 \ counters ipset create hash_ip3 hash:ip family inet hashsize 1024 maxelem 500000 \ counters ipset save & ipset swap hash_ip3 hash_ip2 ipset destroy hash_ip3 /* will crash the machine */ Swap will exchange the values of ref so destroy will see ref = 0 instead of ref = 1. With this fix in place swap will not succeed because ipset save still has ref_netlink on the set (ip_set_swap doesn't swap ref_netlink). Both delete and swap will error out if ref_netlink != 0 on the set. Note: The changes to *_head functions is because previously we would increment ref whenever we called these functions, we don't do that anymore. Reviewed-by: Joshua Hunt Signed-off-by: Vishwanath Pai Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/ipset/ip_set.h | 4 ++++ net/netfilter/ipset/ip_set_bitmap_gen.h | 2 +- net/netfilter/ipset/ip_set_core.c | 33 ++++++++++++++++++++++++++++----- net/netfilter/ipset/ip_set_hash_gen.h | 2 +- net/netfilter/ipset/ip_set_list_set.c | 2 +- 5 files changed, 35 insertions(+), 8 deletions(-) commit 104ece975746d94b8276cd7f38d6b5c056d700b5 Author: Michel Dänzer Date: Mon Mar 28 12:53:02 2016 +0900 drm/amdgpu: Don't move pinned BOs The purpose of pinning is to prevent a buffer from moving. Reviewed-by: Christian König Tested-by: Rex Zhu Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ++++++ 2 files changed, 10 insertions(+) commit e1a575ada8d2a3c3f107fdd12ac9215f983a7c80 Author: Michel Dänzer Date: Mon Mar 28 16:39:14 2016 +0900 drm/radeon: Don't move pinned BOs The purpose of pinning is to prevent a buffer from moving. Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_object.c | 4 ++++ drivers/gpu/drm/radeon/radeon_ttm.c | 6 ++++++ 2 files changed, 10 insertions(+) commit 0e3e7999703e7df93a9deee8ba89b604c5fd662d Author: Charles Keepax Date: Mon Mar 28 13:47:42 2016 +0100 net: macb: Only call GPIO functions if there is a valid GPIO GPIOlib will print warning messages if we call GPIO functions without a valid GPIO. Change the code to avoid doing so. Signed-off-by: Charles Keepax Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 9832ce4c0bb90e4dcedf4280947341b1eb6728e6 Author: Lisheng Date: Mon Mar 28 18:40:57 2016 +0800 net: hns: set-coalesce-usecs returns errno by dsaf.ko It may fail to set coalesce usecs to HW, and Ethtool needs to know if it is successful to cfg the parameter or not. So it needs return the errno by dsaf.ko. Signed-off-by: Lisheng Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 6 +++--- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) commit 43adc067c5a070a5ef97d0c25e33df19c4481484 Author: Lisheng Date: Mon Mar 28 18:40:56 2016 +0800 net: hns: fixed the setting and getting overtime bug The overtime setting and getting REGs in HNS V2 is defferent from HNS V1. It needs to be distinguished between them if getting or setting the REGs. Signed-off-by: Lisheng Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 60 +++---- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 196 ++++++++++------------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 23 +-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 1 + 4 files changed, 126 insertions(+), 154 deletions(-) commit ac71b46efd2838c02ec193987c8f61c3ba33b495 Author: Haishuang Yan Date: Mon Mar 28 18:08:59 2016 +0800 openvswitch: Use proper buffer size in nla_memcpy For the input parameter count, it's better to use the size of destination buffer size, as nla_memcpy would take into account the length of the source netlink attribute when a data is copied from an attribute. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e5585dc870af947fab2af96a88c2d8b4270247c Author: Alex Deucher Date: Mon Mar 28 10:21:20 2016 -0400 drm/radeon: add a dpm quirk for all R7 370 parts Higher mclk values are not stable due to a bug somewhere. Limit them for now. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 4 ++++ 1 file changed, 4 insertions(+) commit a64663d9870364bd2a2df62bf0d3a9fbe5ea62a8 Author: Alex Deucher Date: Mon Mar 28 10:16:40 2016 -0400 drm/radeon: add another R7 370 quirk bug: https://bugzilla.kernel.org/show_bug.cgi?id=115291 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 1 + 1 file changed, 1 insertion(+) commit 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 Author: Irina Tirdea Date: Thu Mar 24 11:09:45 2016 +0200 iio: fix config watermark initial value config structure is set to 0 when updating the buffers, so by default config->watermark will be 0. When computing the minimum between config->watermark and the buffer->watermark or insert_buffer-watermark, this will always be 0 regardless of the value set by the user for the buffer. Set as initial value for config->watermark the maximum allowed value so that the minimum value will always be set from one of the buffers. Signed-off-by: Irina Tirdea Fixes: f0566c0c405d ("iio: Set device watermark based on watermark of all attached buffers") Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-buffer.c | 1 + 1 file changed, 1 insertion(+) commit e6cee90075c0ff261ff7eef8ad892429f028e194 Author: Ben Zhang Date: Fri Mar 25 16:10:39 2016 -0700 ASoC: nau8825: Fix jack detection across suspend Jack plug status is rechecked at resume to handle plug/unplug in S3 when the chip has no power. Suspend/resume callbacks are moved from the i2c dev_pm_ops to snd_soc_codec_driver. soc_resume_deferred is a delayed work which may trigger nau8825_set_bias_level. The bias change races against dev_pm_ops, causing jack detection issues. soc_resume_deferred ensures bias change and snd_soc_codec_driver suspend/resume are sequenced correctly. Signed-off-by: Ben Zhang Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 126 +++++++++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 55 deletions(-) commit 4f329d9fbab630af44db2f787eb79ca52e6ba22e Author: Jeeja KP Date: Mon Mar 28 22:11:31 2016 +0530 ASoC: Intel: Skylake: Fix DSP resource de-allocation In PRE PMD of widget handler DSP resources are allocated after the creation of DSP pipe and modules and in POST PMD DSP resources are destroyed. If there is any failure in pipe or module creation in PRE PMD, pcm trigger fails and finally POST PMD gets called and DSP resources are freed, without getting allocated. Fixes the DSP resource de-allocation by allocating the resource before creation of pipe and module in PRE PMD and in POST PMD, free the resources. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d643678b9a4e432a574b2ec601216afd720c69b6 Author: Jeeja KP Date: Mon Mar 28 22:11:30 2016 +0530 ASoC: Intel: Skylake: Fix for unloading module only when it is loaded Module needs to be unloaded only when it is loaded successfully. To fix this, first correct the module state sequence and set module state to LOADED if module is loaded successfully. When unloading the module check if module state is not in UNINIT, then unload it. Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 5 ++++- sound/soc/intel/skylake/skl-topology.h | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) commit 3b672623079bb3e5685b8549e514f2dfaa564406 Author: Krzysztof Kozlowski Date: Mon Mar 28 13:09:56 2016 +0900 regulator: s2mps11: Fix invalid selector mask and voltages for buck9 The buck9 regulator of S2MPS11 PMIC had incorrect vsel_mask (0xff instead of 0x1f) thus reading entire register as buck9's voltage. This effectively caused regulator core to interpret values as higher voltages than they were and then to set real voltage much lower than intended. The buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card). On Odroid XU3/XU4 the lower voltage caused SD card detection errors on Odroid XU3/XU4: mmc1: card never left busy state mmc1: error -110 whilst initialising SD card During driver probe the regulator core was checking whether initial voltage matches the constraints. With incorrect vsel_mask of 0xff and default value of 0x50, the core interpreted this as 5 V which is outside of constraints (3-3.775 V). Then the regulator core was adjusting the voltage to match the constraints. With incorrect vsel_mask this new voltage mapped to a vere low voltage in the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Mark Brown Cc: drivers/regulator/s2mps11.c | 28 ++++++++++++++++++++++------ include/linux/mfd/samsung/s2mps11.h | 2 ++ 2 files changed, 24 insertions(+), 6 deletions(-) commit b74fccad751d2664bda9dd3c90646bb61295e774 Author: Matt Ranostay Date: Fri Mar 25 20:42:58 2016 -0700 iio: health: max30100: correct FIFO check condition Correct issue that the last entry in FIFO was being read twice due to an incorrect decrement of entry count variable before condition check. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/health/max30100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7072198f2178b68eabf25b439f17cfd8e070e9f Author: Richard Weinberger Date: Fri Mar 25 23:40:55 2016 +0100 iio: imu: Fix inv_mpu6050 dependencies Not all archs have io memory. Instead of selecting I2C_MUX (and bypassing the HAS_IOMEM dependency) depend directly on it. Fixes the following kconfig warning: warning: (MEDIA_SUBDRV_AUTOSELECT && VIDEO_CX231XX && INV_MPU6050_I2C) selects I2C_MUX which has unmet direct dependencies (I2C && HAS_IOMEM) And this build error: ERROR: "devm_ioremap_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! ERROR: "of_address_to_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald Signed-off-by: Richard Weinberger Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8a665d2f2f837664e214863f2cbf7ec17f34ae56 Author: Krzysztof Kozlowski Date: Fri Mar 4 10:05:26 2016 +0900 iio: adc: Fix build error of missing devm_ioremap_resource on UM The devres.o gets linked if HAS_IOMEM is present so on ARCH=um allyesconfig (COMPILE_TEST) failed with: drivers/built-in.o: In function `at91_adc_probe': at91-sama5d2_adc.c:(.text+0x48f548): undefined reference to `devm_ioremap_resource' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6b94fb14fcff3d9be13aae271f2345ab3f656b0c Author: Takashi Sakamoto Date: Mon Mar 28 08:29:32 2016 +0900 ALSA: dice: fix memory leak when unplugging When sound card is going to be released, dice private data is also released. Then all of data should be released. However, stream data is not released. This causes memory leak when unplugging dice unit. This commit fixes the bug. Fixes: 4bdc495c87b3('ALSA: dice: handle several PCM substreams when any isochronous streams are available') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 06b898ec84139b9d5957ec0e275fa0a6a1825df3 Author: Douglas Anderson Date: Mon Mar 7 14:00:53 2016 -0800 drm/rockchip: dw_hdmi: Don't call platform_set_drvdata() The Rockchip dw_hdmi driver just called platform_set_drvdata() to get your hopes up that maybe, somehow, you'd be able to retrieve the 'struct rockchip_hdmi' from a pointer to the 'struct device'. You can't. When we call dw_hdmi_bind() the main driver calls dev_set_drvdata(), which clobbers our setting. Let's just remove the platform_set_drvdata() to avoid dashing people's hopes. Signed-off-by: Douglas Anderson drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 -- 1 file changed, 2 deletions(-) commit 328b51c0f5a07f3ee891ff012eb7f454be9d17c0 Author: Douglas Anderson Date: Mon Mar 7 14:00:52 2016 -0800 drm/rockchip: vop: Fix vop crtc cleanup This fixes a few problems in the vop crtc cleanup (handling error paths and cleanup upon exit): * The vop_create_crtc() error path had an unsafe version of the iterator used for iterating over all planes (though it was destroying planes in the iterator so should have used the safe version) * vop_destroy_crtc() - wasn't calling vop_plane_destroy(), which made slub_debug unhappy, at least if we ended up running this due to a deferred probe. * In vop_create_crtc() if we were missing the "port" device tree node we would fail but not return an error (found by code inspection). Fix these problems. Signed-off-by: Douglas Anderson drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 948cf42700b15fc65ec4cc3ac52a8bbeb84b87ef Author: Douglas Anderson Date: Mon Mar 7 14:00:50 2016 -0800 drm/rockchip: dw_hdmi: Call drm_encoder_cleanup() in error path The drm_encoder_cleanup() was missing both from the error path of dw_hdmi_rockchip_bind(). This caused a crash when slub_debug was enabled and we ended up deferring probe of HDMI at boot. This call isn't needed from unbind() because if dw_hdmi_bind() returns no error then it takes over the job of freeing the encoder (in dw_hdmi_unbind). Signed-off-by: Douglas Anderson drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3ed6c64911f2335b271c21363b7834072fc03303 Author: Tomeu Vizoso Date: Tue Mar 22 16:08:04 2016 +0100 drm/rockchip: vop: Disable planes when disabling CRTC When a VOP is re-enabled, it will start scanning right away the framebuffers that were configured from the last time, even if those have been destroyed already. To prevent the VOP from trying to access freed memory, disable all its windows when the CRTC is being disabled, then each window will get a valid framebuffer address before it's enabled again. Signed-off-by: Tomeu Vizoso Link: http://lkml.kernel.org/g/CAAObsKAv+05ih5U+=4kic_NsjGMhfxYheHR8xXXmacZs+p5SHw@mail.gmail.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eac5ad8861639754a3976bfa1581a73e772624c6 Author: Tomeu Vizoso Date: Fri Mar 18 12:22:02 2016 +0100 drm/rockchip: vop: Don't reject empty modesets So that when DRM_IOCTL_MODE_SETCRTC is called without a FB nor mode, the CRTC gets disabled. Signed-off-by: Tomeu Vizoso Link: http://lkml.kernel.org/g/CAAObsKAv+05ih5U+=4kic_NsjGMhfxYheHR8xXXmacZs+p5SHw@mail.gmail.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 --- 1 file changed, 3 deletions(-) commit f135046e519dc54a701110fa93a6d61c4989ed96 Author: John Keeping Date: Fri Mar 11 17:21:17 2016 +0000 drm/rockchip: cancel pending vblanks on close When closing the DRM device while a vblank is pending, we access file_priv after it has been free'd, which gives: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at __list_add+0x5c/0xe8 LR is at send_vblank_event+0x54/0x1f0 ... [] (__list_add) from [] (send_vblank_event+0x54/0x1f0) [] (send_vblank_event) from [] (drm_send_vblank_event+0x70/0x78) [] (drm_send_vblank_event) from [] (drm_crtc_send_vblank_event+0x30/0x34) [] (drm_crtc_send_vblank_event) from [] (vop_isr+0x224/0x28c) [] (vop_isr) from [] (handle_irq_event_percpu+0x12c/0x3e4) This can be triggered somewhat reliably with: modetest -M rockchip -v -s ... Add a preclose hook to the driver so that we can discard any pending vblank events when the device is closed. Signed-off-by: John Keeping drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+) commit 92915da647be831ddbaa7e03e7528d921ec7f8aa Author: John Keeping Date: Fri Mar 4 11:04:03 2016 +0000 drm/rockchip: vop: fix crtc size in plane check If the geometry of a crtc is changing in an atomic update then we must validate the plane size against the new state of the crtc and not the current size, otherwise if the crtc size is increasing the plane will be cropped at the previous size and will not fill the screen. Signed-off-by: John Keeping drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d7be81a5916bdb1d904803958e5991a16f7ae4b2 Author: Lino Sanfilippo Date: Sun Mar 27 12:22:02 2016 +0200 ravb: fix software timestamping In ravb_start_xmit dont call skb_tx_timestamp only when hardware timestamping is requested: in the latter case software timestamps are suppressed and thus the call of skb_tx_timestamp does not have any effect. Instead call skb_tx_timestamp unconditionally in ravb_start_xmit, since the function checks itself if software timestamping is required or should be skipped due to hardware timestamping. Signed-off-by: Lino Sanfilippo Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79c134239df989167acd277364b83ff9e91e70c4 Author: Rasmus Villemoes Date: Sat Mar 26 22:24:09 2016 +0100 net: sxgbe: fix error paths in sxgbe_platform_probe() We need to use post-decrement to ensure that irq_dispose_mapping is also called on priv->rxq[0]->irq_no; moreover, if one of the above for loops failed already at i==0 (so we reach one of these labels with that value of i), we'll enter an essentially infinite loop of out-of-bounds accesses. Signed-off-by: Rasmus Villemoes Reviewed-by: Francois Romieu Signed-off-by: David S. Miller drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66391b383b70920629df403f2881ea48805e6659 Author: Cosmin-Gabriel Samoila Date: Sat Mar 26 02:49:50 2016 +0200 Drivers: isdn: hisax: isac.c: Fix assignment and check into one expression. Fix variable assignment inside if statement. It is error-prone and hard to read. Signed-off-by: Cosmin-Gabriel Samoila Signed-off-by: David S. Miller drivers/isdn/hisax/isac.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 995096a0a438396a570104e9c240a2a26623a5a1 Author: Quentin Armitage Date: Sun Mar 27 17:06:11 2016 +0100 Fix returned tc and hoplimit values for route with IPv6 encapsulation For a route with IPv6 encapsulation, the traffic class and hop limit values are interchanged when returned to userspace by the kernel. For example, see below. ># ip route add 192.168.0.1 dev eth0.2 encap ip6 dst 0x50 tc 0x50 hoplimit 100 table 1000 ># ip route show table 1000 192.168.0.1 encap ip6 id 0 src :: dst fe83::1 hoplimit 80 tc 100 dev eth0.2 scope link Signed-off-by: Quentin Armitage Signed-off-by: David S. Miller net/ipv4/ip_tunnel_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a69f0e281d9eb08eb277be051f920ea863e258e2 Author: Diego Viola Date: Sun Mar 27 20:58:15 2016 -0300 drivers/net/usb/plusb.c: Fix typo Signed-off-by: Diego Viola Signed-off-by: David S. Miller drivers/net/usb/plusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c2e2266a5bd2d1cef258e6e54dca1d99946379f Author: Guenter Roeck Date: Sat Mar 26 12:28:05 2016 -0700 hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated arm:pxa_defconfig can result in the following crash if the max1111 driver is not instantiated. Unhandled fault: page domain fault (0x01b) at 0x00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: : 1b [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680407c #10 Hardware name: SHARP Akita Workqueue: events sharpsl_charge_toggle task: c390a000 ti: c391e000 task.ti: c391e000 PC is at max1111_read_channel+0x20/0x30 LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c pc : [] lr : [] psr: 20000013 ... [] (max1111_read_channel) from [] (sharpsl_pm_pxa_read_max1111+0x2c/0x3c) [] (sharpsl_pm_pxa_read_max1111) from [] (spitzpm_read_devdata+0x5c/0xc4) [] (spitzpm_read_devdata) from [] (sharpsl_check_battery_temp+0x78/0x110) [] (sharpsl_check_battery_temp) from [] (sharpsl_charge_toggle+0x48/0x110) [] (sharpsl_charge_toggle) from [] (process_one_work+0x14c/0x48c) [] (process_one_work) from [] (worker_thread+0x3c/0x5d4) [] (worker_thread) from [] (kthread+0xd0/0xec) [] (kthread) from [] (ret_from_fork+0x14/0x24) This can occur because the SPI controller driver (SPI_PXA2XX) is built as module and thus not necessarily loaded. While building SPI_PXA2XX into the kernel would make the problem disappear, it appears prudent to ensure that the driver is instantiated before accessing its data structures. Cc: Arnd Bergmann Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck drivers/hwmon/max1111.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dcf5341f0150bc4c5bf37786e1198d2ff8fc2c38 Author: Hans de Goede Date: Wed Mar 9 20:38:59 2016 +0100 ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator 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. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-q8-common.dtsi | 2 -- 1 file changed, 2 deletions(-) commit 3ca4a238106dedc285193ee47f494a6584b6fd2f Author: Lokesh Vutla Date: Sat Mar 26 23:08:55 2016 -0600 ARM: OMAP2+: hwmod: Fix updating of sysconfig register Commit 127500ccb766f ("ARM: OMAP2+: Only write the sysconfig on idle when necessary") talks about verification of sysconfig cache value before updating it, only during idle path. But the patch is adding the verification in the enable path. So, adding the check in a proper place as per the commit description. Not keeping this check during enable path as there is a chance of losing context and it is safe to do on idle as the context of the register will never be lost while the device is active. Signed-off-by: Lokesh Vutla Acked-by: Tero Kristo Cc: Jon Hunter Cc: # 3.12+ Fixes: commit 127500ccb766 "ARM: OMAP2+: Only write the sysconfig on idle when necessary" [paul@pwsan.com: appears to have been caused by my own mismerge of the originally posted patch] Signed-off-by: Paul Walmsley arch/arm/mach-omap2/omap_hwmod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f55532a0c0b8bb6148f4e07853b876ef73bc69ca Author: Linus Torvalds Date: Sat Mar 26 16:03:24 2016 -0700 Linux 4.6-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5a38f6e4668b3110a66cd96ce2096184bf66def Merge: 698f415 5ee61e9 Author: Linus Torvalds Date: Sat Mar 26 15:53:16 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: "There is quite a bit here, including some overdue refactoring and cleanup on the mon_client and osd_client code from Ilya, scattered writeback support for CephFS and a pile of bug fixes from Zheng, and a few random cleanups and fixes from others" [ I already decided not to pull this because of it having been rebased recently, but ended up changing my mind after all. Next time I'll really hold people to it. Oh well. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (34 commits) libceph: use KMEM_CACHE macro ceph: use kmem_cache_zalloc rbd: use KMEM_CACHE macro ceph: use lookup request to revalidate dentry ceph: kill ceph_get_dentry_parent_inode() ceph: fix security xattr deadlock ceph: don't request vxattrs from MDS ceph: fix mounting same fs multiple times ceph: remove unnecessary NULL check ceph: avoid updating directory inode's i_size accidentally ceph: fix race during filling readdir cache libceph: use sizeof_footer() more ceph: kill ceph_empty_snapc ceph: fix a wrong comparison ceph: replace CURRENT_TIME by current_fs_time() ceph: scattered page writeback libceph: add helper that duplicates last extent operation libceph: enable large, variable-sized OSD requests libceph: osdc->req_mempool should be backed by a slab pool libceph: make r_request msg_size calculation clearer ... commit 3d43bcfef5f0548845a425365011c499875491b0 Author: Theodore Ts'o Date: Sat Mar 26 16:15:42 2016 -0400 ext4 crypto: use dget_parent() in ext4_d_revalidate() This avoids potential problems caused by a race where the inode gets renamed out from its parent directory and the parent directory is deleted while ext4_d_revalidate() is running. Fixes: 28b4c263961c Reported-by: Al Viro Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/crypto.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c0a37d48788475d0a2cf4fbfaa28559a9de612fc Author: Miklos Szeredi Date: Sat Mar 26 16:14:42 2016 -0400 ext4: use file_dentry() EXT4 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. Reported-by: Daniel Axtens Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Fixes: ff978b09f973 ("ext4 crypto: move context consistency check to ext4_file_open()") Signed-off-by: Miklos Szeredi Signed-off-by: Theodore Ts'o Cc: David Howells Cc: Al Viro Cc: # v4.5 fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dd78d8c9a7bd4bc341f5864db32d4331b8eae4c Author: Miklos Szeredi Date: Sat Mar 26 16:14:41 2016 -0400 ext4: use dget_parent() in ext4_file_open() In f_op->open() lock on parent is not held, so there's no guarantee that parent dentry won't go away at any time. Even after this patch there's no guarantee that 'dir' will stay the parent of 'inode', but at least it won't be freed while being used. Fixes: ff978b09f973 ("ext4 crypto: move context consistency check to ext4_file_open()") Signed-off-by: Miklos Szeredi Signed-off-by: Theodore Ts'o Cc: # v4.5 fs/ext4/file.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit be62a1a8fd116f5cd9e53726601f970e16e17558 Author: Miklos Szeredi Date: Sat Mar 26 16:14:39 2016 -0400 nfs: use file_dentry() NFS 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. Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Signed-off-by: Miklos Szeredi Tested-by: Goldwyn Rodrigues Acked-by: Trond Myklebust Signed-off-by: Theodore Ts'o Cc: # v4.2 Cc: David Howells Cc: Al Viro fs/nfs/dir.c | 6 +++--- fs/nfs/inode.c | 2 +- fs/nfs/nfs4file.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit d101a125954eae1d397adda94ca6319485a50493 Author: Miklos Szeredi Date: Sat Mar 26 16:14:37 2016 -0400 fs: add file_dentry() This series fixes bugs in nfs and ext4 due to 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay"). Regular files opened on overlayfs will result in the file being opened on the underlying filesystem, while f_path points to the overlayfs mount/dentry. This confuses filesystems which get the dentry from struct file and assume it's theirs. Add a new helper, file_dentry() [*], to get the filesystem's own dentry from the file. This checks file->f_path.dentry->d_flags against DCACHE_OP_REAL, and returns file->f_path.dentry if DCACHE_OP_REAL is not set (this is the common, non-overlayfs case). In the uncommon case it will call into overlayfs's ->d_real() to get the underlying dentry, matching file_inode(file). The reason we need to check against the inode is that if the file is copied up while being open, d_real() would return the upper dentry, while the open file comes from the lower dentry. [*] If possible, it's better simply to use file_inode() instead. Signed-off-by: Miklos Szeredi Signed-off-by: Theodore Ts'o Tested-by: Goldwyn Rodrigues Reviewed-by: Trond Myklebust Cc: # v4.2 Cc: David Howells Cc: Al Viro Cc: Daniel Axtens fs/dcache.c | 5 ++++- fs/overlayfs/super.c | 33 +++++++++++++++++++++++++++++++++ include/linux/dcache.h | 10 ++++++++++ include/linux/fs.h | 10 ++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) commit c9af28fdd44922a6c10c9f8315718408af98e315 Author: Theodore Ts'o Date: Sat Mar 26 16:14:34 2016 -0400 ext4 crypto: don't let data integrity writebacks fail with ENOMEM We don't want the writeback triggered from the journal commit (in data=writeback mode) to cause the journal to abort due to generic_writepages() returning an ENOMEM error. In addition, if fsync() fails with ENOMEM, most applications will probably not do the right thing. So if we are doing a data integrity sync, and ext4_encrypt() returns ENOMEM, we will submit any queued I/O to date, and then retry the allocation using GFP_NOFAIL. Google-Bug-Id: 27641567 Signed-off-by: Theodore Ts'o fs/ext4/crypto.c | 37 +++++++++++++++++++++---------------- fs/ext4/ext4.h | 6 ++++-- fs/ext4/page-io.c | 14 +++++++++++++- fs/ext4/readpage.c | 2 +- 4 files changed, 39 insertions(+), 20 deletions(-) commit 698f415cf5756e320623bdb015a600945743377c Merge: b4cec5f 4599649 Author: Linus Torvalds Date: Sat Mar 26 12:59:04 2016 -0700 Merge tag 'ofs-pull-tag-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs filesystem from Mike Marshall. This finally merges the long-pending orangefs filesystem, which has been much cleaned up with input from Al Viro over the last six months. From the documentation file: "OrangeFS is an LGPL userspace scale-out parallel storage system. It is ideal for large storage problems faced by HPC, BigData, Streaming Video, Genomics, Bioinformatics. Orangefs, originally called PVFS, was first developed in 1993 by Walt Ligon and Eric Blumer as a parallel file system for Parallel Virtual Machine (PVM) as part of a NASA grant to study the I/O patterns of parallel programs. Orangefs features include: - Distributes file data among multiple file servers - Supports simultaneous access by multiple clients - Stores file data and metadata on servers using local file system and access methods - Userspace implementation is easy to install and maintain - Direct MPI support - Stateless" see Documentation/filesystems/orangefs.txt for more in-depth details. * tag 'ofs-pull-tag-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: (174 commits) orangefs: fix orangefs_superblock locking orangefs: fix do_readv_writev() handling of error halfway through orangefs: have ->kill_sb() evict the VFS side of things first orangefs: sanitize ->llseek() orangefs-bufmap.h: trim unused junk orangefs: saner calling conventions for getting a slot orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointer orangefs: get rid of readdir_handle_s ornagefs: ensure that truncate has an up to date inode size orangefs: move code which sets i_link to orangefs_inode_getattr orangefs: remove needless wrapper around GFP_KERNEL orangefs: remove wrapper around mutex_lock(&inode->i_mutex) orangefs: refactor inode type or link_target change detection orangefs: use new getattr for revalidate and remove old getattr orangefs: use new getattr in inode getattr and permission orangefs: use new orangefs_inode_getattr to get size in write and llseek orangefs: use new orangefs_inode_getattr to create new inodes orangefs: rename orangefs_inode_getattr to orangefs_inode_old_getattr orangefs: remove inode->i_lock wrapper orangefs: put register_chrdev immediately before register_filesystem ... commit b4cec5f66849872d2e9573bc95c2016cb8e530ec Merge: 895a106 4f1b50c Author: Linus Torvalds Date: Sat Mar 26 11:37:42 2016 -0700 Merge tag 'ntb-4.6' of git://github.com/jonmason/ntb Pull NTB bug fixes from Jon Mason: "NTB bug fixes for tasklet from spinning forever, link errors, translation window setup, NULL ptr dereference, and ntb-perf errors. Also, a modification to the driver API that makes _addr functions optional" * tag 'ntb-4.6' of git://github.com/jonmason/ntb: NTB: Remove _addr functions from ntb_hw_amd NTB: Make _addr functions optional in the API NTB: Fix incorrect clean up routine in ntb_perf NTB: Fix incorrect return check in ntb_perf ntb: fix possible NULL dereference ntb: add missing setup of translation window ntb: stop link work when we do not have memory ntb: stop tasklet from spinning forever during shutdown. ntb: perf test: fix address space confusion commit 895a1067d5b83065afbad3bb02c3c464b71f1b3f Merge: 02fc59a c6986be Author: Linus Torvalds Date: Sat Mar 26 11:31:01 2016 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "The only new stuff which missed the first pull request is an update to the UFS driver. The rest is an assortment of bug fixes and minor tweaks which appeared recently (some are fixes for recent code and some are stuff spotted recently by the checkers or the new gcc-6 compiler [most of Arnd's stuff])" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits) scsi_common: do not clobber fixed sense information scsi: ufs: select CONFIG_NLS scsi: fc: use get/put_unaligned64 for wwn access fnic: move printk()s outside of the critical code section. qla2xxx: avoid maybe_uninitialized warning megaraid_sas: add missing curly braces in ioctl handler lpfc: fix misleading indentation scsi_transport_sas: add 'scsi_target_id' sysfs attribute scsi_dh_alua: uninitialized variable in alua_check_vpd() scsi: ufs-qcom: add printouts of testbus debug registers scsi: ufs-qcom: enable/disable the device ref clock scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup scsi: ufs: add device quirk delay before putting UFS rails in LPM scsi: ufs: fix leakage during link off state scsi: ufs: tune UniPro parameters to optimize hibern8 exit time scsi: ufs: handle non spec compliant bkops behaviour by device scsi: ufs: add retry for query descriptors scsi: ufs: add error recovery after DL NAC error scsi: ufs: make error handling bit faster scsi: ufs: disable vccq if it's not needed by UFS device ... commit 02fc59a0d28fcc839266d56fbfc4ca34d8dbb2ae Author: Linus Torvalds Date: Sat Mar 26 10:13:05 2016 -0700 f2fs/crypto: fix xts_tweak initialization Commit 0b81d07790726 ("fs crypto: move per-file encryption from f2fs tree to fs/crypto") moved the f2fs crypto files to fs/crypto/ and renamed the symbol prefixes from "f2fs_" to "fscrypt_" (and from "F2FS_" to just "FS" for preprocessor symbols). Because of the symbol renaming, it's a bit hard to see it as a file move: use git show -M30 0b81d07790726 to lower the rename detection to just 30% similarity and make git show the files as renamed (the header file won't be shown as a rename even then - since all it contains is symbol definitions, it looks almost completely different). Even with the renames showing as renames, the diffs are not all that easy to read, since so much is just the renames. But Eric Biggers noticed that it's not just all renames: the initialization of the xts_tweak had been broken too, using the inode number rather than the page offset. That's not right - it makes the xfs_tweak the same for all pages of each inode. It _might_ make sense to make the xfs_tweak contain both the offset _and_ the inode number, but not just the inode number. Reported-by: Eric Biggers Cc: Jaegeuk Kim Signed-off-by: Linus Torvalds fs/crypto/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f1b50c3e3082b31c94cee2b897bd9f5d0f3e7c8 Author: Allen Hubbe Date: Mon Mar 21 04:53:14 2016 -0400 NTB: Remove _addr functions from ntb_hw_amd Kernel zero day testing warned about address space confusion. A virtual iomem address was used where a physical address is expected. The offending functions implement an optional part of the api, so they are removed. They can be added later, after testing. Fixes: a1b3695820aa490e58915d720a1438069813008b Signed-off-by: Allen Hubbe Acked-by: Xiangliang Yu Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit 45996492e5c85aa0ac93a95d1b2d1ed56851c865 Author: Al Viro Date: Fri Mar 25 19:56:34 2016 -0400 orangefs: fix orangefs_superblock locking * switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb * remove from the list _before_ orangefs_unmount() - request_mutex in the latter will make sure that nothing observed in the loop in ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end of loop * on removal, keep the forward pointer and zero the back one. That way we can drop and regain the spinlock in the loop body (again, ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the rest of the list. Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 41 +++++++++++++++++++++++------------------ fs/orangefs/orangefs-kernel.h | 34 +--------------------------------- fs/orangefs/super.c | 30 +++++++++++++++++++++++------- 3 files changed, 47 insertions(+), 58 deletions(-) commit 6d4c1a30b32a377083900f39c42bcacb633f99a1 Author: Al Viro Date: Tue Feb 16 20:15:43 2016 -0500 orangefs: fix do_readv_writev() handling of error halfway through Error should only be returned if nothing had been read/written. Otherwise we need to report a short read/write instead. Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 524b1d3095159adeee0305508eefc836a197b681 Author: Al Viro Date: Tue Feb 16 21:08:29 2016 -0500 orangefs: have ->kill_sb() evict the VFS side of things first Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 177f8fc491e230c2e7a3ac7d5626dd6f3d94e9f2 Author: Al Viro Date: Tue Feb 16 20:25:19 2016 -0500 orangefs: sanitize ->llseek() a) open files can't have NULL inodes b) it's SEEK_END, not ORANGEFS_SEEK_END; no need to get cute. c) make_bad_inode() on lseek()? Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/file.c | 12 +++--------- fs/orangefs/orangefs-kernel.h | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) commit 7df240d771862c31f869d6b9024c1942c1f01521 Author: Al Viro Date: Tue Feb 16 20:12:04 2016 -0500 orangefs-bufmap.h: trim unused junk Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/orangefs-bufmap.h | 9 --------- 1 file changed, 9 deletions(-) commit b8a99a8f9f0aebf2a75bb0d9280bff7e7ac9b57e Author: Al Viro Date: Tue Feb 16 20:10:26 2016 -0500 orangefs: saner calling conventions for getting a slot just have it return the slot number or -E... - the caller checks the sign anyway Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/dir.c | 6 +++--- fs/orangefs/file.c | 10 +++++----- fs/orangefs/orangefs-bufmap.c | 24 ++++++------------------ fs/orangefs/orangefs-bufmap.h | 4 ++-- 4 files changed, 16 insertions(+), 28 deletions(-) commit bf6bf606e545cb31c29499b354c13b2621acd649 Author: Al Viro Date: Tue Feb 16 20:06:19 2016 -0500 orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointer it's always __orangefs_bufmap Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/file.c | 18 ++++++------------ fs/orangefs/orangefs-bufmap.c | 13 ++++++------- fs/orangefs/orangefs-bufmap.h | 6 ++---- 3 files changed, 14 insertions(+), 23 deletions(-) commit 9f5e2f7f1b4bf7d0b19d88edd9425510fadbb9e4 Author: Al Viro Date: Tue Feb 16 19:54:13 2016 -0500 orangefs: get rid of readdir_handle_s no point, really - we couldn't keep those across the calls of getdents(); it would be too easy to DoS, having all slots exhausted. Signed-off-by: Al Viro Signed-off-by: Mike Marshall fs/orangefs/dir.c | 93 ++++++++++++++++++------------------------------------- 1 file changed, 30 insertions(+), 63 deletions(-) commit a21211672c9a1d730a39aa65d4a5b3414700adfb Author: Srinivas Pandruvada Date: Wed Mar 23 21:07:39 2016 -0700 ACPI / processor: Request native thermal interrupt handling via _OSC There are several reports of freeze on enabling HWP (Hardware PStates) feature on Skylake-based systems by the Intel P-states driver. The root cause is identified as the HWP interrupts causing BIOS code to freeze. HWP interrupts use the thermal LVT which can be handled by Linux natively, but on the affected Skylake-based systems SMM will respond to it by default. This is a problem for several reasons: - On the affected systems the SMM thermal LVT handler is broken (it will crash when invoked) and a BIOS update is necessary to fix it. - With thermal interrupt handled in SMM we lose all of the reporting features of the arch/x86/kernel/cpu/mcheck/therm_throt driver. - Some thermal drivers like x86-package-temp depend on the thermal threshold interrupts signaled via the thermal LVT. - The HWP interrupts are useful for debugging and tuning performance (if the kernel can handle them). The native handling of thermal interrupts needs to be enabled because of that. This requires some way to tell SMM that the OS can handle thermal interrupts. That can be done by using _OSC/_PDC in processor scope very early during ACPI initialization. The meaning of _OSC/_PDC bit 12 in processor scope is whether or not the OS supports native handling of interrupts for Collaborative Processor Performance Control (CPPC) notifications. Since on HWP-capable systems CPPC is a firmware interface to HWP, setting this bit effectively tells the firmware that the OS will handle thermal interrupts natively going forward. For details on _OSC/_PDC refer to: http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html To implement the _OSC/_PDC handshake as described, introduce a new function, acpi_early_processor_osc(), that walks the ACPI namespace looking for ACPI processor objects and invokes _OSC for them with bit 12 in the capabilities buffer set and terminates the namespace walk on the first success. Also modify intel_thermal_interrupt() to clear HWP status bits in the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents them from firing continuously). Signed-off-by: Srinivas Pandruvada [ rjw: Subject & changelog, function rename ] Signed-off-by: Rafael J. Wysocki arch/x86/kernel/cpu/mcheck/therm_throt.c | 3 ++ drivers/acpi/acpi_processor.c | 52 ++++++++++++++++++++++++++++++++ drivers/acpi/bus.c | 3 ++ drivers/acpi/internal.h | 6 ++++ 4 files changed, 64 insertions(+) commit 606c61a0579669c292dc5f5e1cf898edecfc0d53 Merge: 15dbc13 0fda278 Author: Linus Torvalds Date: Fri Mar 25 16:59:11 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fourth patch-bomb from Andrew Morton: "A lot more stuff than expected, sorry. A bunch of ocfs2 reviewing was finished off. - mhocko's oom-reaper out-of-memory-handler changes - ocfs2 fixes and features - KASAN feature work - various fixes" * emailed patches from Andrew Morton : (42 commits) thp: fix typo in khugepaged_scan_pmd() MAINTAINERS: fill entries for KASAN mm/filemap: generic_file_read_iter(): check for zero reads unconditionally kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2 mm, kasan: stackdepot implementation. Enable stackdepot for SLAB arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections mm, kasan: add GFP flags to KASAN API mm, kasan: SLAB support kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right() include/linux/oom.h: remove undefined oom_kills_count()/note_oom_kill() mm/page_alloc: prevent merging between isolated and other pageblocks drivers/memstick/host/r592.c: avoid gcc-6 warning ocfs2: extend enough credits for freeing one truncate record while replaying truncate records ocfs2: extend transaction for ocfs2_remove_rightmost_path() and ocfs2_update_edge_lengths() before to avoid inconsistency between inode and et ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert ocfs2: solve a problem of crossing the boundary in updating backups ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list ocfs2/dlm: fix race between convert and recovery ocfs2: fix a deadlock issue in ocfs2_dio_end_io_write() ... commit 15dbc136dff62ebefb03353cfb7d308d49b275f3 Merge: dad44de 8e653b6 Author: Linus Torvalds Date: Fri Mar 25 16:55:37 2016 -0700 Merge tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixlet from Rafael Wysocki: "One of commits in my previous pull request changed the permissions of drivers/power/avs/rockchip-io-domain.c to executable by mistake" * tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Fix permissions of drivers/power/avs/rockchip-io-domain.c commit dad44decc242a7ad185f1001541b0b7d49e2f58e Merge: c155c74 2d5ae5c Author: Linus Torvalds Date: Fri Mar 25 16:48:45 2016 -0700 Merge tag 'please-pull-preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 update from Tony Luck: "Wire up new system calls p{read,write}v2 for ia64" * tag 'please-pull-preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: [IA64] Enable preadv2 and pwritev2 syscalls for ia64 commit c155c7492c9ab81f3d358a10eb4f29376ae53d85 Merge: 1701f68 d314e9e Author: Linus Torvalds Date: Fri Mar 25 16:39:05 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: "Second round of updates for the input subsystem. The BYD PS/2 protocol driver now uses absolute reporting mode and should behave more like other touchpads; Synaptics driver needed to extend one of its quirks to a newer firmware version, and a few USB drivers got tightened up checks for the contents of their descriptors" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: sur40 - fix DMA on stack Input: ati_remote2 - fix crashes on detecting device with invalid descriptor Input: synaptics - handle spurious release of trackstick buttons, again Input: synaptics-rmi4 - remove check of Non-NULL array Input: byd - enable absolute mode Input: ims-pcu - sanity check against missing interfaces Input: melfas_mip4 - add hw_version sysfs attribute commit 0fda2788b03c1868e2f20b3b7995b8cc2adf4715 Author: Kirill A. Shutemov Date: Fri Mar 25 14:22:20 2016 -0700 thp: fix typo in khugepaged_scan_pmd() !PageLRU should lead to SCAN_PAGE_LRU, not SCAN_SCAN_ABORT result. Signed-off-by: Kirill A. Shutemov Cc: Ebru Akagunduz Cc: Rik van Riel Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ba1d91df93b33ea2c29390881f0ba13574f1a01 Author: Andrey Ryabinin Date: Fri Mar 25 14:22:17 2016 -0700 MAINTAINERS: fill entries for KASAN Signed-off-by: Andrey Ryabinin Cc: Alexander Potapenko Acked-by: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e7080a439a6f507abbc860847c33efc39b5c1c6d Author: Nicolai Stange Date: Fri Mar 25 14:22:14 2016 -0700 mm/filemap: generic_file_read_iter(): check for zero reads unconditionally If - generic_file_read_iter() gets called with a zero read length, - the read offset is at a page boundary, - IOCB_DIRECT is not set - and the page in question hasn't made it into the page cache yet, then do_generic_file_read() will trigger a readahead with a req_size hint of zero. Since roundup_pow_of_two(0) is undefined, UBSAN reports UBSAN: Undefined behaviour in include/linux/log2.h:63:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 3 PID: 1017 Comm: sa1 Tainted: G L 4.5.0-next-20160318+ #14 [...] Call Trace: [...] [] ondemand_readahead+0x3aa/0x3d0 [] ? ondemand_readahead+0x3aa/0x3d0 [] ? find_get_entry+0x2d/0x210 [] page_cache_sync_readahead+0x63/0xa0 [] do_generic_file_read+0x80d/0xf90 [] generic_file_read_iter+0x185/0x420 [...] [] __vfs_read+0x256/0x3d0 [...] when get_init_ra_size() gets called from ondemand_readahead(). The net effect is that the initial readahead size is arch dependent for requested read lengths of zero: for example, since 1UL << (sizeof(unsigned long) * 8) evaluates to 1 on x86 while its result is 0 on ARMv7, the initial readahead size becomes 4 on the former and 0 on the latter. What's more, whether or not the file access timestamp is updated for zero length reads is decided differently for the two cases of IOCB_DIRECT being set or cleared: in the first case, generic_file_read_iter() explicitly skips updating that timestamp while in the latter case, it is always updated through the call to do_generic_file_read(). According to POSIX, zero length reads "do not modify the last data access timestamp" and thus, the IOCB_DIRECT behaviour is POSIXly correct. Let generic_file_read_iter() unconditionally check the requested read length at its entry and return immediately with success if it is zero. Signed-off-by: Nicolai Stange Cc: Al Viro Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9dcadd381b1d199074937019d612346c061de415 Author: Alexander Potapenko Date: Fri Mar 25 14:22:11 2016 -0700 kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2 Signed-off-by: Alexander Potapenko Acked-by: Andrey Ryabinin Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 2 ++ 1 file changed, 2 insertions(+) commit cd11016e5f5212c13c0cec7384a525edc93b4921 Author: Alexander Potapenko Date: Fri Mar 25 14:22:08 2016 -0700 mm, kasan: stackdepot implementation. Enable stackdepot for SLAB Implement the stack depot and provide CONFIG_STACKDEPOT. Stack depot will allow KASAN store allocation/deallocation stack traces for memory chunks. The stack traces are stored in a hash table and referenced by handles which reside in the kasan_alloc_meta and kasan_free_meta structures in the allocated memory chunks. IRQ stack traces are cut below the IRQ entry point to avoid unnecessary duplication. Right now stackdepot support is only enabled in SLAB allocator. Once KASAN features in SLAB are on par with those in SLUB we can switch SLUB to stackdepot as well, thus removing the dependency on SLUB stack bookkeeping, which wastes a lot of memory. This patch is based on the "mm: kasan: stack depots" patch originally prepared by Dmitry Chernenkov. Joonsoo has said that he plans to reuse the stackdepot code for the mm/page_owner.c debugging facility. [akpm@linux-foundation.org: s/depot_stack_handle/depot_stack_handle_t] [aryabinin@virtuozzo.com: comment style fixes] Signed-off-by: Alexander Potapenko Signed-off-by: Andrey Ryabinin Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/Makefile | 1 + include/linux/stackdepot.h | 32 +++++ lib/Kconfig | 4 + lib/Kconfig.kasan | 1 + lib/Makefile | 3 + lib/stackdepot.c | 284 +++++++++++++++++++++++++++++++++++++++++++++ mm/kasan/kasan.c | 55 ++++++++- mm/kasan/kasan.h | 11 +- mm/kasan/report.c | 12 +- 9 files changed, 391 insertions(+), 12 deletions(-) commit be7635e7287e0e8013af3c89a6354a9e0182594c Author: Alexander Potapenko Date: Fri Mar 25 14:22:05 2016 -0700 arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections KASAN needs to know whether the allocation happens in an IRQ handler. This lets us strip everything below the IRQ entry point to reduce the number of unique stack traces needed to be stored. Move the definition of __irq_entry to so that the users don't need to pull in . Also introduce the __softirq_entry macro which is similar to __irq_entry, but puts the corresponding functions to the .softirqentry.text section. Signed-off-by: Alexander Potapenko Acked-by: Steven Rostedt Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/exception.h | 2 +- arch/arm/kernel/vmlinux.lds.S | 1 + arch/arm64/include/asm/exception.h | 2 +- arch/arm64/kernel/vmlinux.lds.S | 1 + arch/blackfin/kernel/vmlinux.lds.S | 1 + arch/c6x/kernel/vmlinux.lds.S | 1 + arch/metag/kernel/vmlinux.lds.S | 1 + arch/microblaze/kernel/vmlinux.lds.S | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/nios2/kernel/vmlinux.lds.S | 1 + arch/openrisc/kernel/vmlinux.lds.S | 1 + arch/parisc/kernel/vmlinux.lds.S | 1 + arch/powerpc/kernel/vmlinux.lds.S | 1 + arch/s390/kernel/vmlinux.lds.S | 1 + arch/sh/kernel/vmlinux.lds.S | 1 + arch/sparc/kernel/vmlinux.lds.S | 1 + arch/tile/kernel/vmlinux.lds.S | 1 + arch/x86/kernel/vmlinux.lds.S | 1 + include/asm-generic/vmlinux.lds.h | 12 +++++++++++- include/linux/ftrace.h | 11 ----------- include/linux/interrupt.h | 20 ++++++++++++++++++++ kernel/softirq.c | 2 +- kernel/trace/trace_functions_graph.c | 1 + 23 files changed, 51 insertions(+), 15 deletions(-) commit 505f5dcb1c419e55a9621a01f83eb5745d8d7398 Author: Alexander Potapenko Date: Fri Mar 25 14:22:02 2016 -0700 mm, kasan: add GFP flags to KASAN API Add GFP flags to KASAN hooks for future patches to use. This patch is based on the "mm: kasan: unified support for SLUB and SLAB allocators" patch originally prepared by Dmitry Chernenkov. Signed-off-by: Alexander Potapenko Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 19 +++++++++++-------- include/linux/slab.h | 4 ++-- mm/kasan/kasan.c | 15 ++++++++------- mm/mempool.c | 16 ++++++++-------- mm/slab.c | 15 ++++++++------- mm/slab.h | 2 +- mm/slab_common.c | 4 ++-- mm/slub.c | 15 ++++++++------- 8 files changed, 48 insertions(+), 42 deletions(-) commit 7ed2f9e663854db313f177a511145630e398b402 Author: Alexander Potapenko Date: Fri Mar 25 14:21:59 2016 -0700 mm, kasan: SLAB support Add KASAN hooks to SLAB allocator. This patch is based on the "mm: kasan: unified support for SLUB and SLAB allocators" patch originally prepared by Dmitry Chernenkov. Signed-off-by: Alexander Potapenko Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kasan.txt | 5 +-- include/linux/kasan.h | 12 ++++++ include/linux/slab.h | 6 +++ include/linux/slab_def.h | 14 +++++++ include/linux/slub_def.h | 11 +++++ lib/Kconfig.kasan | 4 +- mm/Makefile | 1 + mm/kasan/kasan.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++ mm/kasan/kasan.h | 34 ++++++++++++++++ mm/kasan/report.c | 54 ++++++++++++++++++++----- mm/slab.c | 43 +++++++++++++++++--- mm/slab_common.c | 2 +- 12 files changed, 266 insertions(+), 22 deletions(-) commit e6e8379c876de16c6b78f83b15d5ac32c79cb440 Author: Alexander Potapenko Date: Fri Mar 25 14:21:56 2016 -0700 kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right() This patchset implements SLAB support for KASAN Unlike SLUB, SLAB doesn't store allocation/deallocation stacks for heap objects, therefore we reimplement this feature in mm/kasan/stackdepot.c. The intention is to ultimately switch SLUB to use this implementation as well, which will save a lot of memory (right now SLUB bloats each object by 256 bytes to store the allocation/deallocation stacks). Also neither SLUB nor SLAB delay the reuse of freed memory chunks, which is necessary for better detection of use-after-free errors. We introduce memory quarantine (mm/kasan/quarantine.c), which allows delayed reuse of deallocated memory. This patch (of 7): Rename kmalloc_large_oob_right() to kmalloc_pagealloc_oob_right(), as the test only checks the page allocator functionality. Also reimplement kmalloc_large_oob_right() so that the test allocates a large enough chunk of memory that still does not trigger the page allocator fallback. Signed-off-by: Alexander Potapenko Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit aaf4fb712b8311d8b950e89937479d61e9c25ba8 Author: Tetsuo Handa Date: Fri Mar 25 14:21:53 2016 -0700 include/linux/oom.h: remove undefined oom_kills_count()/note_oom_kill() A leftover from commit c32b3cbe0d06 ("oom, PM: make OOM detection in the freezer path raceless"). Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 2 -- 1 file changed, 2 deletions(-) commit d9dddbf556674bf125ecd925b24e43a5cf2a568a Author: Vlastimil Babka Date: Fri Mar 25 14:21:50 2016 -0700 mm/page_alloc: prevent merging between isolated and other pageblocks Hanjun Guo has reported that a CMA stress test causes broken accounting of CMA and free pages: > Before the test, I got: > -bash-4.3# cat /proc/meminfo | grep Cma > CmaTotal: 204800 kB > CmaFree: 195044 kB > > > After running the test: > -bash-4.3# cat /proc/meminfo | grep Cma > CmaTotal: 204800 kB > CmaFree: 6602584 kB > > So the freed CMA memory is more than total.. > > Also the the MemFree is more than mem total: > > -bash-4.3# cat /proc/meminfo > MemTotal: 16342016 kB > MemFree: 22367268 kB > MemAvailable: 22370528 kB Laura Abbott has confirmed the issue and suspected the freepage accounting rewrite around 3.18/4.0 by Joonsoo Kim. Joonsoo had a theory that this is caused by unexpected merging between MIGRATE_ISOLATE and MIGRATE_CMA pageblocks: > CMA isolates MAX_ORDER aligned blocks, but, during the process, > partialy isolated block exists. If MAX_ORDER is 11 and > pageblock_order is 9, two pageblocks make up MAX_ORDER > aligned block and I can think following scenario because pageblock > (un)isolation would be done one by one. > > (each character means one pageblock. 'C', 'I' means MIGRATE_CMA, > MIGRATE_ISOLATE, respectively. > > CC -> IC -> II (Isolation) > II -> CI -> CC (Un-isolation) > > If some pages are freed at this intermediate state such as IC or CI, > that page could be merged to the other page that is resident on > different type of pageblock and it will cause wrong freepage count. This was supposed to be prevented by CMA operating on MAX_ORDER blocks, but since it doesn't hold the zone->lock between pageblocks, a race window does exist. It's also likely that unexpected merging can occur between MIGRATE_ISOLATE and non-CMA pageblocks. This should be prevented in __free_one_page() since commit 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock"). However, we only check the migratetype of the pageblock where buddy merging has been initiated, not the migratetype of the buddy pageblock (or group of pageblocks) which can be MIGRATE_ISOLATE. Joonsoo has suggested checking for buddy migratetype as part of page_is_buddy(), but that would add extra checks in allocator hotpath and bloat-o-meter has shown significant code bloat (the function is inline). This patch reduces the bloat at some expense of more complicated code. The buddy-merging while-loop in __free_one_page() is initially bounded to pageblock_border and without any migratetype checks. The checks are placed outside, bumping the max_order if merging is allowed, and returning to the while-loop with a statement which can't be possibly considered harmful. This fixes the accounting bug and also removes the arguably weird state in the original commit 3c605096d315 where buddies could be left unmerged. Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock") Link: https://lkml.org/lkml/2016/3/2/280 Signed-off-by: Vlastimil Babka Reported-by: Hanjun Guo Tested-by: Hanjun Guo Acked-by: Joonsoo Kim Debugged-by: Laura Abbott Debugged-by: Joonsoo Kim Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: Johannes Weiner Cc: Minchan Kim Cc: Yasuaki Ishimatsu Cc: Zhang Yanfei Cc: Michal Nazarewicz Cc: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: [3.18+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) commit f419a08fb329e235df0cb8e329cff770e02d171a Author: Arnd Bergmann Date: Fri Mar 25 14:21:47 2016 -0700 drivers/memstick/host/r592.c: avoid gcc-6 warning The r592 driver relies on behavior of the DMA mapping API that is normally observed but not guaranteed by the API. Instead it uses a runtime check to fail transfers if the API ever behaves When CONFIG_NEED_SG_DMA_LENGTH is not set, one of the checks turns into a comparison of a variable with itself, which gcc-6.0 now warns about: drivers/memstick/host/r592.c: In function 'r592_transfer_fifo_dma': drivers/memstick/host/r592.c:302:31: error: self-comparison always evaluates to false [-Werror=tautological-compare] (sg_dma_len(&dev->req->sg) < dev->req->sg.length)) { ^ The check itself is not a problem, so this patch just rephrases the condition in a way that gcc does not consider an indication of a mistake. We already know that dev->req->sg.length was initially R592_LFIFO_SIZE, so we can compare it to that constant again. Signed-off-by: Arnd Bergmann Cc: Maxim Levitsky Cc: Quentin Lambert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/memstick/host/r592.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 102c2595aa193f598c0f4b1bf2037d168c80e551 Author: Xue jiufei Date: Fri Mar 25 14:21:44 2016 -0700 ocfs2: extend enough credits for freeing one truncate record while replaying truncate records Now function ocfs2_replay_truncate_records() first modifies tl_used, then calls ocfs2_extend_trans() to extend transactions for gd and alloc inode used for freeing clusters. jbd2_journal_restart() may be called and it may happen that tl_used in truncate log is decreased but the clusters are not freed, which means these clusters are lost. So we should avoid extending transactions in these two operations. Signed-off-by: joyce.xue Reviewed-by: Mark Fasheh Acked-by: Joseph Qi Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 1721598985dc3b92bc3ff45ad0c287bd1814417a Author: Xue jiufei Date: Fri Mar 25 14:21:41 2016 -0700 ocfs2: extend transaction for ocfs2_remove_rightmost_path() and ocfs2_update_edge_lengths() before to avoid inconsistency between inode and et I found that jbd2_journal_restart() is called in some places without keeping things consistently before. However, jbd2_journal_restart() may commit the handle's transaction and restart another one. If the first transaction is committed successfully while another not, it may cause filesystem inconsistency or read only. This is an effort to fix this kind of problems. This patch (of 3): The following functions will be called while truncating an extent: ocfs2_remove_btree_range -> ocfs2_start_trans -> ocfs2_remove_extent -> ocfs2_truncate_rec -> ocfs2_extend_rotate_transaction -> jbd2_journal_restart if jbd2_journal_extend fail -> ocfs2_rotate_tree_left -> ocfs2_remove_rightmost_path -> ocfs2_extend_rotate_transaction -> ocfs2_unlink_subtree -> ocfs2_update_edge_lengths -> ocfs2_extend_trans -> jbd2_journal_restart if jbd2_journal_extend fail -> ocfs2_et_update_clusters -> ocfs2_commit_trans jbd2_journal_restart() may be called and it may happened that the buffers dirtied in ocfs2_truncate_rec() are committed while buffers dirtied in ocfs2_et_update_clusters() are not, the total clusters on extent tree and i_clusters in ocfs2_dinode is inconsistency. So the clusters got from ocfs2_dinode is incorrect, and it also cause read-only problem when call ocfs2_commit_truncate() with the error message: "Inode %llu has empty extent block at %llu". We should extend enough credits for function ocfs2_remove_rightmost_path and ocfs2_update_edge_lengths to avoid this inconsistency. Signed-off-by: joyce.xue Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 82 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 28 deletions(-) commit e5054c9aefd26ac2401f4b17eda82fab71796dca Author: xuejiufei Date: Fri Mar 25 14:21:38 2016 -0700 ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert We have found a bug when two nodes doing umount one after another. 1) Node 1 migrate a lockres that has 3 locks in grant queue such as N2(PR)<->N3(NL)<->N4(PR) to N2. After migration, lvb of the lock N3(NL) and N4(PR) are empty on node 2 because migration target do not copy lvb to these two lock. 2) Node 3 want to convert to PR, it can be granted in __dlmconvert_master(), and the order of these locks is unchanged. The lvb of the lock N3(PR) on node 2 is copyed from lockres in function dlm_update_lvb() while the lvb of lock N4(PR) is still empty. 3) Node 2 want to leave domain, it will migrate this lockres to node 3. Then node 2 will trigger the BUG in dlm_prepare_lvb_for_migration() when adding the lock N4(PR) to mres with the following message because the lvb of mres is already copied from lock N3(PR), but the lvb of lock N4(PR) is empty. "Mismatched lvb in lock cookie=%u:%llu, name=%.*s, node=%u" [akpm@linux-foundation.org: tweak comment] Signed-off-by: xuejiufei Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmconvert.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 584dca3440732afa84fbca07567bb66e1453936a Author: jiangyiwen Date: Fri Mar 25 14:21:35 2016 -0700 ocfs2: solve a problem of crossing the boundary in updating backups In update_backups() there exists a problem of crossing the boundary as follows: we assume that lun will be resized to 1TB(cluster_size is 32kb), it will include 0~33554431 cluster, in update_backups func, it will backup super block in location of 1TB which is the 33554432th cluster, so the phenomenon of crossing the boundary happens. Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Xue jiufei Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35ddf78e41852cbbd216948425a091ab9815678f Author: jiangyiwen Date: Fri Mar 25 14:21:32 2016 -0700 ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local This patch fixes a deadlock, as follows: Node 1 Node 2 Node 3 1)volume a and b are only mount vol a only mount vol b mounted 2) start to mount b start to mount a 3) check hb of Node 3 check hb of Node 2 in vol a, qs_holds++ in vol b, qs_holds++ 4) -------------------- all nodes' network down -------------------- 5) progress of mount b the same situation as failed, and then call Node 2 ocfs2_dismount_volume. but the process is hung, since there is a work in ocfs2_wq cannot beo completed. This work is about vol a, because ocfs2_wq is global wq. BTW, this work which is scheduled in ocfs2_wq is ocfs2_orphan_scan_work, and the context in this work needs to take inode lock of orphan_dir, because lockres owner are Node 1 and all nodes' nework has been down at the same time, so it can't get the inode lock. 6) Why can't this node be fenced when network disconnected? Because the process of mount is hung what caused qs_holds is not equal 0. Because all works in the ocfs2_wq are relative to the super block. The solution is to change the ocfs2_wq from global to local. In other words, move it into struct ocfs2_super. Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Xue jiufei Cc: Mark Fasheh Cc: Joel Becker Cc: Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 4 ++-- fs/ocfs2/journal.c | 8 ++++---- fs/ocfs2/localalloc.c | 4 ++-- fs/ocfs2/ocfs2.h | 8 ++++++++ fs/ocfs2/quota_global.c | 2 +- fs/ocfs2/super.c | 37 +++++++++++++++---------------------- fs/ocfs2/super.h | 2 -- 7 files changed, 32 insertions(+), 33 deletions(-) commit be12b299a83fc807bbaccd2bcb8ec50cbb0cb55c Author: Joseph Qi Date: Fri Mar 25 14:21:29 2016 -0700 ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list When master handles convert request, it queues ast first and then returns status. This may happen that the ast is sent before the request status because the above two messages are sent by two threads. And right after the ast is sent, if master down, it may trigger BUG in dlm_move_lockres_to_recovery_list in the requested node because ast handler moves it to grant list without clear lock->convert_pending. So remove BUG_ON statement and check if the ast is processed in dlmconvert_remote. Signed-off-by: Joseph Qi Reported-by: Yiwen Jiang Cc: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Cc: Tariq Saeed Cc: Junxiao Bi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmconvert.c | 13 +++++++++++++ fs/ocfs2/dlm/dlmrecovery.c | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) commit ac7cf246dfdbec3d8fed296c7bf30e16f5099dac Author: Joseph Qi Date: Fri Mar 25 14:21:26 2016 -0700 ocfs2/dlm: fix race between convert and recovery There is a race window between dlmconvert_remote and dlm_move_lockres_to_recovery_list, which will cause a lock with OCFS2_LOCK_BUSY in grant list, thus system hangs. dlmconvert_remote { spin_lock(&res->spinlock); list_move_tail(&lock->list, &res->converting); lock->convert_pending = 1; spin_unlock(&res->spinlock); status = dlm_send_remote_convert_request(); >>>>>> race window, master has queued ast and return DLM_NORMAL, and then down before sending ast. this node detects master down and calls dlm_move_lockres_to_recovery_list, which will revert the lock to grant list. Then OCFS2_LOCK_BUSY won't be cleared as new master won't send ast any more because it thinks already be authorized. spin_lock(&res->spinlock); lock->convert_pending = 0; if (status != DLM_NORMAL) dlm_revert_pending_convert(res, lock); spin_unlock(&res->spinlock); } In this case, check if res->state has DLM_LOCK_RES_RECOVERING bit set (res is still in recovering) or res master changed (new master has finished recovery), reset the status to DLM_RECOVERING, then it will retry convert. Signed-off-by: Joseph Qi Reported-by: Yiwen Jiang Reviewed-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Cc: Tariq Saeed Cc: Junxiao Bi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmconvert.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 28888681b4f641ce9a96478ce4683577cd3abbff Author: Ryan Ding Date: Fri Mar 25 14:21:23 2016 -0700 ocfs2: fix a deadlock issue in ocfs2_dio_end_io_write() The code should call ocfs2_free_alloc_context() to free meta_ac & data_ac before calling ocfs2_run_deallocs(). Because ocfs2_run_deallocs() will acquire the system inode's i_mutex hold by meta_ac. So try to release the lock before ocfs2_run_deallocs(). Fixes: af1310367f41 ("ocfs2: fix sparse file & data ordering issue in direct io.") Signed-off-by: Ryan Ding Acked-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ce170828e24959c69e7a40364731edc0535c550f Author: Ryan Ding Date: Fri Mar 25 14:21:20 2016 -0700 ocfs2: fix disk file size and memory file size mismatch When doing append direct write in an already allocated cluster, and fast path in ocfs2_dio_get_block() is triggered, function ocfs2_dio_end_io_write() will be skipped as there is no context allocated. As a result, the disk file size will not be changed as it should be. The solution is to skip fast path when we are about to change file size. Fixes: af1310367f41 ("ocfs2: fix sparse file & data ordering issue in direct io.") Signed-off-by: Ryan Ding Acked-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit a86a72a4a4e0ec109a98e2737948864ed6794bf7 Author: Ryan Ding Date: Fri Mar 25 14:21:18 2016 -0700 ocfs2: take ip_alloc_sem in ocfs2_dio_get_block & ocfs2_dio_end_io_write Take ip_alloc_sem to prevent concurrent access to extent tree, which may cause the extent tree in an unstable state. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit e63890f38ade9497b5609ddeb7f52df0fe55ea15 Author: Ryan Ding Date: Fri Mar 25 14:21:15 2016 -0700 ocfs2: fix ip_unaligned_aio deadlock with dio work queue In the current implementation of unaligned aio+dio, lock order behave as follow: in user process context: -> call io_submit() -> get i_mutex <== window1 -> get ip_unaligned_aio -> submit direct io to block device -> release i_mutex -> io_submit() return in dio work queue context(the work queue is created in __blockdev_direct_IO): -> release ip_unaligned_aio <== window2 -> get i_mutex -> clear unwritten flag & change i_size -> release i_mutex There is a limitation to the thread number of dio work queue. 256 at default. If all 256 thread are in the above 'window2' stage, and there is a user process in the 'window1' stage, the system will became deadlock. Since the user process hold i_mutex to wait ip_unaligned_aio lock, while there is a direct bio hold ip_unaligned_aio mutex who is waiting for a dio work queue thread to be schedule. But all the dio work queue thread is waiting for i_mutex lock in 'window2'. This case only happened in a test which send a large number(more than 256) of aio at one io_submit() call. My design is to remove ip_unaligned_aio lock. Change it to a sync io instead. Just like ip_unaligned_aio lock, serialize the unaligned aio dio. [akpm@linux-foundation.org: remove OCFS2_IOCB_UNALIGNED_IO, per Junxiao Bi] Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 6 ------ fs/ocfs2/aops.h | 8 -------- fs/ocfs2/file.c | 27 +++++++++------------------ fs/ocfs2/inode.h | 3 --- fs/ocfs2/super.c | 1 - 5 files changed, 9 insertions(+), 36 deletions(-) commit f1f973ffce96a47c2b3f142e91eccef5bf22f699 Author: Ryan Ding Date: Fri Mar 25 14:21:12 2016 -0700 ocfs2: code clean up for direct io Clean up ocfs2_file_write_iter & ocfs2_prepare_inode_for_write: * remove append dio check: it will be checked in ocfs2_direct_IO() * remove file hole check: file hole is supported for now * remove inline data check: it will be checked in ocfs2_direct_IO() * remove the full_coherence check when append dio: we will get the inode_lock in ocfs2_dio_get_block, there is no need to fall back to buffer io to ensure the coherence semantics. Now the drop dio procedure is gone. :) [akpm@linux-foundation.org: remove unused label] Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/file.c | 138 +++---------------------------------------------- fs/ocfs2/ocfs2_trace.h | 16 ++---- 2 files changed, 10 insertions(+), 144 deletions(-) commit c15471f79506830f80eca0e7fe09b8213953ab5f Author: Ryan Ding Date: Fri Mar 25 14:21:09 2016 -0700 ocfs2: fix sparse file & data ordering issue in direct io There are mainly three issues in the direct io code path after commit 24c40b329e03 ("ocfs2: implement ocfs2_direct_IO_write"): * Does not support sparse file. * Does not support data ordering. eg: when write to a file hole, it will alloc extent first. If system crashed before io finished, data will corrupt. * Potential risk when doing aio+dio. The -EIOCBQUEUED return value is likely to be ignored by ocfs2_direct_IO_write(). To resolve above problems, re-design direct io code with following ideas: * Use buffer io to fill in holes. And this will make better performance also. * Clear unwritten after direct write finished. So we can make sure meta data changes after data write to disk. (Unwritten extent is invisible to user, from user's view, meta data is not changed when allocate an unwritten extent.) * Clear ocfs2_direct_IO_write(). Do all ending work in end_io. This patch has passed fs,dio,ltp-aiodio.part1,ltp-aiodio.part2,ltp-aiodio.part4 test cases of ltp. For performance improvement, see following test result: ocfs2 cluster size 1MB, ocfs2 volume is mounted on /mnt/. The original way: + rm /mnt/test.img -f + dd if=/dev/zero of=/mnt/test.img bs=4K count=1048576 oflag=direct 1048576+0 records in 1048576+0 records out 4294967296 bytes (4.3 GB) copied, 1707.83 s, 2.5 MB/s + rm /mnt/test.img -f + dd if=/dev/zero of=/mnt/test.img bs=256K count=16384 oflag=direct 16384+0 records in 16384+0 records out 4294967296 bytes (4.3 GB) copied, 582.705 s, 7.4 MB/s After this patch: + rm /mnt/test.img -f + dd if=/dev/zero of=/mnt/test.img bs=4K count=1048576 oflag=direct 1048576+0 records in 1048576+0 records out 4294967296 bytes (4.3 GB) copied, 64.6412 s, 66.4 MB/s + rm /mnt/test.img -f + dd if=/dev/zero of=/mnt/test.img bs=256K count=16384 oflag=direct 16384+0 records in 16384+0 records out 4294967296 bytes (4.3 GB) copied, 34.7611 s, 124 MB/s Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 863 +++++++++++++++++++++++--------------------------------- 1 file changed, 346 insertions(+), 517 deletions(-) commit 4506cfb6f8cad594ac73e0df2b2961ca10dbd25e Author: Ryan Ding Date: Fri Mar 25 14:21:06 2016 -0700 ocfs2: record UNWRITTEN extents when populate write desc To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. There is still one issue in the direct write procedure. phase 1: alloc extent with UNWRITTEN flag phase 2: submit direct data to disk, add zero page to page cache phase 3: clear UNWRITTEN flag when data has been written to disk When there are 2 direct write A(0~3KB),B(4~7KB) writing to the same cluster 0~7KB (cluster size 8KB). Write request A arrive phase 2 first, it will zero the region (4~7KB). Before request A enter to phase 3, request B arrive phase 2, it will zero region (0~3KB). This is just like request B steps request A. To resolve this issue, we should let request B knows this cluster is already under zero, to prevent it from steps the previous write request. This patch will add function ocfs2_unwritten_check() to do this job. It will record all clusters that are under direct write(it will be recorded in the 'ip_unwritten_list' member of inode info), and prevent the later direct write writing to the same cluster to do the zero work again. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- fs/ocfs2/inode.c | 3 ++ fs/ocfs2/inode.h | 3 ++ fs/ocfs2/super.c | 1 + 4 files changed, 106 insertions(+), 5 deletions(-) commit 2de6a3c73180ef4071b45185756be51a6c767924 Author: Ryan Ding Date: Fri Mar 25 14:21:03 2016 -0700 ocfs2: return the physical address in ocfs2_write_cluster To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. Direct io needs to get the physical address from write_begin, to map the user page. This patch is to change the arg 'phys' of ocfs2_write_cluster to a pointer, so it can be retrieved to write_begin. And we can retrieve it to the direct io procedure. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 46e625565950c5f31a193c4bbcfdef3fdc7235bf Author: Ryan Ding Date: Fri Mar 25 14:21:01 2016 -0700 ocfs2: do not change i_size in write_end for direct io To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. Append direct io do not change i_size in get block phase. It only move to orphan when starting write. After data is written to disk, it will delete itself from orphan and update i_size. So skip i_size change section in write_begin for direct io. And when there is no extents alloc, no meta data changes needed for direct io (since write_begin start trans for 2 reason: alloc extents & change i_size. Now none of them needed). So we can skip start trans procedure. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 79 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 33 deletions(-) commit 65c4db8c8282cd239f0ba3226cfe59cc9768193c Author: Ryan Ding Date: Fri Mar 25 14:20:58 2016 -0700 ocfs2: test target page before change it To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. Direct io data will not appear in buffer. The w_target_page member will not be filled by direct io. So avoid to use it when it's NULL. Unlinke buffer io and mmap, direct io will call write_begin with more than 1 page a time. So the target_index is not sufficient to describe the actual data. change it to a range start at target_index, end in end_index. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit b46637d59f1160dee5d8e03498e667ab36c2be04 Author: Ryan Ding Date: Fri Mar 25 14:20:55 2016 -0700 ocfs2: use c_new to indicate newly allocated extents To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. There is a problem in ocfs2's direct io implement: if system crashed after extents allocated, and before data return, we will get a extent with dirty data on disk. This problem violate the journal=order semantics, which means meta changes take effect after data written to disk. To resolve this issue, direct write can use the UNWRITTEN flag to describe a extent during direct data writeback. The direct write procedure should act in the following order: phase 1: alloc extent with UNWRITTEN flag phase 2: submit direct data to disk, add zero page to page cache phase 3: clear UNWRITTEN flag when data has been written to disk This patch is to change the 'c_unwritten' member of ocfs2_write_cluster_desc to 'c_clear_unwritten'. Means whether to clear the unwritten flag. It do not care if a extent is allocated or not. And use 'c_new' to specify a newly allocated extent. So the direct io procedure can use c_clear_unwritten to control the UNWRITTEN bit on extent. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit c1ad1e3ca3064b1f0ab5a5185b4732ab9ad8fa24 Author: Ryan Ding Date: Fri Mar 25 14:20:52 2016 -0700 ocfs2: add ocfs2_write_type_t type to identify the caller of write Patchset: fix ocfs2 direct io code patch to support sparse file and data ordering semantics The idea is to use buffer io(more precisely use the interface ocfs2_write_begin_nolock & ocfs2_write_end_nolock) to do the zero work beyond block size. And clear UNWRITTEN flag until direct io data has been written to disk, which can prevent data corruption when system crashed during direct write. And we will also archive a better performance: eg. dd direct write new file with block size 4KB: before this patchset: 2.5 MB/s after this patchset: 66.4 MB/s This patch (of 8): To support direct io in ocfs2_write_begin_nolock & ocfs2_write_end_nolock. Remove unused args filp & flags. Add new arg type. The type is one of buffer/direct/mmap. Indicate 3 way to perform write. buffer/mmap type has implemented. direct type will be implemented later. Signed-off-by: Ryan Ding Reviewed-by: Junxiao Bi Cc: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 20 ++++++++++++-------- fs/ocfs2/aops.h | 11 ++++++++--- fs/ocfs2/mmap.c | 4 ++-- 3 files changed, 22 insertions(+), 13 deletions(-) commit 9e13f1f9de1cb143fbae6f1170f26c8544b64cff Author: Junxiao Bi Date: Fri Mar 25 14:20:50 2016 -0700 ocfs2: o2hb: fix double free bug This is a regression issue and caused the following kernel panic when do ocfs2 multiple test. BUG: unable to handle kernel paging request at 00000002000800c0 IP: [] kmem_cache_alloc+0x78/0x160 PGD 7bbe5067 PUD 0 Oops: 0000 [#1] SMP Modules linked in: ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi xen_kbdfront xen_netfront xen_fbfront xen_blkfront CPU: 2 PID: 4044 Comm: mpirun Not tainted 4.5.0-rc5-next-20160225 #1 Hardware name: Xen HVM domU, BIOS 4.3.1OVM 05/14/2014 task: ffff88007a521a80 ti: ffff88007aed0000 task.ti: ffff88007aed0000 RIP: 0010:[] [] kmem_cache_alloc+0x78/0x160 RSP: 0018:ffff88007aed3a48 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000001991 RDX: 0000000000001990 RSI: 00000000024000c0 RDI: 000000000001b330 RBP: ffff88007aed3a98 R08: ffff88007d29b330 R09: 00000002000800c0 R10: 0000000c51376d87 R11: ffff8800792cac38 R12: ffff88007cc30f00 R13: 00000000024000c0 R14: ffffffff811b053f R15: ffff88007aed3ce7 FS: 0000000000000000(0000) GS:ffff88007d280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000002000800c0 CR3: 000000007aeb2000 CR4: 00000000000406e0 Call Trace: __d_alloc+0x2f/0x1a0 d_alloc+0x17/0x80 lookup_dcache+0x8a/0xc0 path_openat+0x3c3/0x1210 do_filp_open+0x80/0xe0 do_sys_open+0x110/0x200 SyS_open+0x19/0x20 do_syscall_64+0x72/0x230 entry_SYSCALL64_slow_path+0x25/0x25 Code: 05 e6 77 e7 7e 4d 8b 08 49 8b 40 10 4d 85 c9 0f 84 dd 00 00 00 48 85 c0 0f 84 d4 00 00 00 49 63 44 24 20 49 8b 3c 24 48 8d 4a 01 <49> 8b 1c 01 4c 89 c8 65 48 0f c7 0f 0f 94 c0 3c 01 75 b6 49 63 RIP kmem_cache_alloc+0x78/0x160 CR2: 00000002000800c0 ---[ end trace 823969e602e4aaac ]--- Fixes: a4a1dfa4bb8b("ocfs2/cluster: fix memory leak in o2hb_region_release") Signed-off-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8b4ead11e9d258ccc9a8aea28cc0ac747b044ef Author: Andrew Morton Date: Fri Mar 25 14:20:47 2016 -0700 drivers/input: eliminate INPUT_COMPAT_TEST macro INPUT_COMPAT_TEST became much simpler after commit f4056b52845283 ("input: redefine INPUT_COMPAT_TEST as in_compat_syscall()") so we can cleanly eliminate it altogether. Acked-by: Dmitry Torokhov Cc: Andy Lutomirski Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/input/input-compat.c | 6 +++--- drivers/input/input-compat.h | 4 +--- drivers/input/input.c | 2 +- drivers/input/misc/uinput.c | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) commit bb29902a7515208846114b3b36a4281a9bbf766a Author: Tetsuo Handa Date: Fri Mar 25 14:20:44 2016 -0700 oom, oom_reaper: protect oom_reaper_list using simpler way "oom, oom_reaper: disable oom_reaper for oom_kill_allocating_task" tried to protect oom_reaper_list using MMF_OOM_KILLED flag. But we can do it by simply checking tsk->oom_reaper_list != NULL. Signed-off-by: Tetsuo Handa Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 2 -- mm/oom_kill.c | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) commit e26796066fdf929cbba22dabb801808f986acdb9 Author: Michal Hocko Date: Fri Mar 25 14:20:41 2016 -0700 oom: make oom_reaper freezable After "oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space" oom_reaper will call exit_oom_victim on the target task after it is done. This might however race with the PM freezer: CPU0 CPU1 CPU2 freeze_processes try_to_freeze_tasks # Allocation request out_of_memory oom_killer_disable wake_oom_reaper(P1) __oom_reap_task exit_oom_victim(P1) wait_event(oom_victims==0) [...] do_exit(P1) perform IO/interfere with the freezer which breaks the oom_killer_disable semantic. We no longer have a guarantee that the oom victim won't interfere with the freezer because it might be anywhere on the way to do_exit while the freezer thinks the task has already terminated. It might trigger IO or touch devices which are frozen already. In order to close this race, make the oom_reaper thread freezable. This will work because a) already running oom_reaper will block freezer to enter the quiescent state b) wake_oom_reaper will not wake up the reaper after it has been frozen c) the only way to call exit_oom_victim after try_to_freeze_tasks is from the oom victim's context when we know the further interference shouldn't be possible Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: David Rientjes Cc: Mel Gorman Cc: Oleg Nesterov Cc: Hugh Dickins Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) commit 29c696e1c6eceb5db6b21f0c89495fcfcd40c0eb Author: Vladimir Davydov Date: Fri Mar 25 14:20:39 2016 -0700 oom: make oom_reaper_list single linked Entries are only added/removed from oom_reaper_list at head so we can use a single linked list and hence save a word in task_struct. Signed-off-by: Vladimir Davydov Signed-off-by: Michal Hocko Cc: Tetsuo Handa Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 2 +- mm/oom_kill.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) commit 855b018325737f7691f9b7d86339df40aa4e47c3 Author: Michal Hocko Date: Fri Mar 25 14:20:36 2016 -0700 oom, oom_reaper: disable oom_reaper for oom_kill_allocating_task Tetsuo has reported that oom_kill_allocating_task=1 will cause oom_reaper_list corruption because oom_kill_process doesn't follow standard OOM exclusion (aka ignores TIF_MEMDIE) and allows to enqueue the same task multiple times - e.g. by sacrificing the same child multiple times. This patch fixes the issue by introducing a new MMF_OOM_KILLED mm flag which is set in oom_kill_process atomically and oom reaper is disabled if the flag was already set. Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Cc: David Rientjes Cc: Mel Gorman Cc: Oleg Nesterov Cc: Hugh Dickins Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 2 ++ mm/oom_kill.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 03049269de433cb5fe2859be9ae4469ceb1163ed Author: Michal Hocko Date: Fri Mar 25 14:20:33 2016 -0700 mm, oom_reaper: implement OOM victims queuing wake_oom_reaper has allowed only 1 oom victim to be queued. The main reason for that was the simplicity as other solutions would require some way of queuing. The current approach is racy and that was deemed sufficient as the oom_reaper is considered a best effort approach to help with oom handling when the OOM victim cannot terminate in a reasonable time. The race could lead to missing an oom victim which can get stuck out_of_memory wake_oom_reaper cmpxchg // OK oom_reaper oom_reap_task __oom_reap_task oom_victim terminates atomic_inc_not_zero // fail out_of_memory wake_oom_reaper cmpxchg // fails task_to_reap = NULL This race requires 2 OOM invocations in a short time period which is not very likely but certainly not impossible. E.g. the original victim might have not released a lot of memory for some reason. The situation would improve considerably if wake_oom_reaper used a more robust queuing. This is what this patch implements. This means adding oom_reaper_list list_head into task_struct (eat a hole before embeded thread_struct for that purpose) and a oom_reaper_lock spinlock for queuing synchronization. wake_oom_reaper will then add the task on the queue and oom_reaper will dequeue it. Signed-off-by: Michal Hocko Cc: Vladimir Davydov Cc: Andrea Argangeli Cc: David Rientjes Cc: Hugh Dickins Cc: Johannes Weiner Cc: Mel Gorman Cc: Oleg Nesterov Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 3 +++ mm/oom_kill.c | 36 +++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) commit bc448e897b6d24aae32701763b8a1fe15d29fa26 Author: Michal Hocko Date: Fri Mar 25 14:20:30 2016 -0700 mm, oom_reaper: report success/failure Inform about the successful/failed oom_reaper attempts and dump all the held locks to tell us more who is blocking the progress. [akpm@linux-foundation.org: fix CONFIG_MMU=n build] Signed-off-by: Michal Hocko Cc: Andrea Argangeli Cc: David Rientjes Cc: Hugh Dickins Cc: Johannes Weiner Cc: Mel Gorman Cc: Oleg Nesterov Cc: Rik van Riel Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 36324a990cf578b57828c04cd85ac62cd25cf5a4 Author: Michal Hocko Date: Fri Mar 25 14:20:27 2016 -0700 oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space When oom_reaper manages to unmap all the eligible vmas there shouldn't be much of the freable memory held by the oom victim left anymore so it makes sense to clear the TIF_MEMDIE flag for the victim and allow the OOM killer to select another task. The lack of TIF_MEMDIE also means that the victim cannot access memory reserves anymore but that shouldn't be a problem because it would get the access again if it needs to allocate and hits the OOM killer again due to the fatal_signal_pending resp. PF_EXITING check. We can safely hide the task from the OOM killer because it is clearly not a good candidate anymore as everyhing reclaimable has been torn down already. This patch will allow to cap the time an OOM victim can keep TIF_MEMDIE and thus hold off further global OOM killer actions granted the oom reaper is able to take mmap_sem for the associated mm struct. This is not guaranteed now but further steps should make sure that mmap_sem for write should be blocked killable which will help to reduce such a lock contention. This is not done by this patch. Note that exit_oom_victim might be called on a remote task from __oom_reap_task now so we have to check and clear the flag atomically otherwise we might race and underflow oom_victims or wake up waiters too early. Signed-off-by: Michal Hocko Suggested-by: Johannes Weiner Suggested-by: Tetsuo Handa Cc: Andrea Argangeli Cc: David Rientjes Cc: Hugh Dickins Cc: Mel Gorman Cc: Oleg Nesterov Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 2 +- kernel/exit.c | 2 +- mm/oom_kill.c | 73 +++++++++++++++++++++++++++++++++++------------------ 3 files changed, 50 insertions(+), 27 deletions(-) commit aac453635549699c13a84ea1456d5b0e574ef855 Author: Michal Hocko Date: Fri Mar 25 14:20:24 2016 -0700 mm, oom: introduce oom reaper This patch (of 5): This is based on the idea from Mel Gorman discussed during LSFMM 2015 and independently brought up by Oleg Nesterov. The OOM killer currently allows to kill only a single task in a good hope that the task will terminate in a reasonable time and frees up its memory. Such a task (oom victim) will get an access to memory reserves via mark_oom_victim to allow a forward progress should there be a need for additional memory during exit path. It has been shown (e.g. by Tetsuo Handa) that it is not that hard to construct workloads which break the core assumption mentioned above and the OOM victim might take unbounded amount of time to exit because it might be blocked in the uninterruptible state waiting for an event (e.g. lock) which is blocked by another task looping in the page allocator. This patch reduces the probability of such a lockup by introducing a specialized kernel thread (oom_reaper) which tries to reclaim additional memory by preemptively reaping the anonymous or swapped out memory owned by the oom victim under an assumption that such a memory won't be needed when its owner is killed and kicked from the userspace anyway. There is one notable exception to this, though, if the OOM victim was in the process of coredumping the result would be incomplete. This is considered a reasonable constrain because the overall system health is more important than debugability of a particular application. A kernel thread has been chosen because we need a reliable way of invocation so workqueue context is not appropriate because all the workers might be busy (e.g. allocating memory). Kswapd which sounds like another good fit is not appropriate as well because it might get blocked on locks during reclaim as well. oom_reaper has to take mmap_sem on the target task for reading so the solution is not 100% because the semaphore might be held or blocked for write but the probability is reduced considerably wrt. basically any lock blocking forward progress as described above. In order to prevent from blocking on the lock without any forward progress we are using only a trylock and retry 10 times with a short sleep in between. Users of mmap_sem which need it for write should be carefully reviewed to use _killable waiting as much as possible and reduce allocations requests done with the lock held to absolute minimum to reduce the risk even further. The API between oom killer and oom reaper is quite trivial. wake_oom_reaper updates mm_to_reap with cmpxchg to guarantee only NULL->mm transition and oom_reaper clear this atomically once it is done with the work. This means that only a single mm_struct can be reaped at the time. As the operation is potentially disruptive we are trying to limit it to the ncessary minimum and the reaper blocks any updates while it operates on an mm. mm_struct is pinned by mm_count to allow parallel exit_mmap and a race is detected by atomic_inc_not_zero(mm_users). Signed-off-by: Michal Hocko Suggested-by: Oleg Nesterov Suggested-by: Mel Gorman Acked-by: Mel Gorman Acked-by: David Rientjes Cc: Mel Gorman Cc: Tetsuo Handa Cc: Oleg Nesterov Cc: Hugh Dickins Cc: Andrea Argangeli Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 + mm/internal.h | 5 ++ mm/memory.c | 17 +++--- mm/oom_kill.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 162 insertions(+), 13 deletions(-) commit 69b27baf00fa9b7b14b3263c105390d1683425b2 Author: Andrew Morton Date: Fri Mar 25 14:20:21 2016 -0700 sched: add schedule_timeout_idle() This will be needed in the patch "mm, oom: introduce oom reaper". Acked-by: Michal Hocko Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched.h | 1 + kernel/time/timer.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 2d5ae5c2c7025b3bac264545f88b4d958fbdccc8 Author: Tony Luck Date: Fri Mar 25 14:37:32 2016 -0700 [IA64] Enable preadv2 and pwritev2 syscalls for ia64 New system calls added in: f17d8b35452cab31a70d224964cd583fb2845449 vfs: vfs: Define new syscalls preadv2,pwritev2 Signed-off-by: Tony Luck arch/ia64/include/asm/unistd.h | 2 +- arch/ia64/include/uapi/asm/unistd.h | 2 ++ arch/ia64/kernel/entry.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 8e653b654497350f9cb3d6c2088207bc503f2c7c Author: Rafael J. Wysocki Date: Fri Mar 25 22:33:10 2016 +0100 Fix permissions of drivers/power/avs/rockchip-io-domain.c The permissions of this file were modified by commit (f447671b9e4f PM / AVS: rockchip-io: add io selectors and supplies for rk3399) by mistake, so fix them. Signed-off-by: Rafael J. Wysocki drivers/power/avs/rockchip-io-domain.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 96c22a3293512ba684e73a981196430f524689da Author: Octavian Purdila Date: Wed Mar 23 14:14:48 2016 +0200 configfs: fix CONFIGFS_BIN_ATTR_[RW]O definitions The type should be struct configfs_bin_attribute and not struct configfs_attribute. Signed-off-by: Octavian Purdila Signed-off-by: Christoph Hellwig include/linux/configfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ee61e95b6b33c82f6fa1382585faed66aa01245 Author: Geliang Tang Date: Sun Mar 13 15:18:39 2016 +0800 libceph: use KMEM_CACHE macro Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 99ec269779f1fde25356e14299419551cdb54443 Author: Geliang Tang Date: Sun Mar 13 15:26:29 2016 +0800 ceph: use kmem_cache_zalloc Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO. Signed-off-by: Geliang Tang Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 2 +- fs/ceph/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 03d9440676163e965cb77d03c102b461d8ccb482 Author: Geliang Tang Date: Sun Mar 13 15:17:32 2016 +0800 rbd: use KMEM_CACHE macro Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 200fd27c8fa2ba8bb4529033967b69a7cbfa2c2e Author: Yan, Zheng Date: Thu Mar 17 14:41:59 2016 +0800 ceph: use lookup request to revalidate dentry If dentry has no lease, ceph_d_revalidate() previously return 0. This causes VFS to invalidate the dentry and create a new dentry for later lookup. Invalidating a dentry also detach any underneath mount points. So mount point inside cephfs can disapear mystically (even the mount point is not modified by other hosts). The fix is using lookup request to revalidate dentry without lease. This can partly solve the mount points disapear issue (as long as the mount point is not modified by other hosts) Signed-off-by: Yan, Zheng fs/ceph/dir.c | 34 ++++++++++++++++++++++++++++++++++ fs/ceph/inode.c | 1 + 2 files changed, 35 insertions(+) commit 641235d8f823574961d225bdbfaef299842aa38c Author: Yan, Zheng Date: Wed Mar 16 16:40:23 2016 +0800 ceph: kill ceph_get_dentry_parent_inode() use vfs helper dget_parent() instead Signed-off-by: Yan, Zheng fs/ceph/dir.c | 24 +++++------------------- fs/ceph/super.h | 1 - 2 files changed, 5 insertions(+), 20 deletions(-) commit 315f24088048a51eed341c53be66ea477a3c7d16 Author: Yan, Zheng Date: Mon Mar 7 10:34:50 2016 +0800 ceph: fix security xattr deadlock When security is enabled, security module can call filesystem's getxattr/setxattr callbacks during d_instantiate(). For cephfs, d_instantiate() is usually called by MDS' dispatch thread, while handling MDS reply. If the MDS reply does not include xattrs and corresponding caps, getxattr/setxattr need to send a new request to MDS and waits for the reply. This makes MDS' dispatch sleep, nobody handles later MDS replies. The fix is make sure lookup/atomic_open reply include xattrs and corresponding caps. So getxattr can be handled by cached xattrs. This requires some modification to both MDS and request message. (Client tells MDS what caps it wants; MDS encodes proper caps in the reply) Smack security module may call setxattr during d_instantiate(). Unlike getxattr, we can't force MDS to issue CEPH_CAP_XATTR_EXCL to us. So just make setxattr return error when called by MDS' dispatch thread. Signed-off-by: Yan, Zheng fs/ceph/dir.c | 9 ++++-- fs/ceph/export.c | 13 +++++++++ fs/ceph/file.c | 7 +++++ fs/ceph/inode.c | 18 +++++++++--- fs/ceph/mds_client.c | 2 ++ fs/ceph/super.h | 16 ++++++++++- fs/ceph/xattr.c | 68 ++++++++++++++++++++++++++++++++++++++++++-- include/linux/ceph/ceph_fs.h | 3 +- 8 files changed, 125 insertions(+), 11 deletions(-) commit 29dccfa5af388916e48a3edc5ac9dc8cc996d9b4 Author: Yan, Zheng Date: Sat Mar 12 13:32:16 2016 +0800 ceph: don't request vxattrs from MDS It's uselese because MDS reply does not carry any vxattr. Signed-off-by: Yan, Zheng fs/ceph/xattr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 132ca7e1de1e3217af06bce2beb3aa13c3edc7f6 Author: Yan, Zheng Date: Sat Mar 12 13:20:48 2016 +0800 ceph: fix mounting same fs multiple times Now __ceph_open_session() only accepts closed client. An opened client will tigger BUG_ON(). Signed-off-by: Yan, Zheng fs/ceph/super.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 4531126753aaf936e2674d28245400c6559ef0ee Author: Yan, Zheng Date: Thu Mar 10 11:29:34 2016 +0800 ceph: remove unnecessary NULL check If page->mapping is NULL, releasepage() callback does not get called. Remove the unnecessary NULL check to make static code analysis tool happy Signed-off-by: Yan, Zheng fs/ceph/addr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3d714c33632ef6bfdfaacc74ae6ba297b4c5820 Author: Yan, Zheng Date: Fri Feb 26 17:16:32 2016 +0800 ceph: avoid updating directory inode's i_size accidentally Directory inode's i_size is used by readdir cache. Signed-off-by: Yan, Zheng fs/ceph/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit af5e5eb574776cdf1b756a27cc437bff257e22fe Author: Yan, Zheng Date: Fri Feb 26 16:27:13 2016 +0800 ceph: fix race during filling readdir cache Readdir cache uses page cache to save dentry pointers. When adding dentry pointers to middle of a page, we need to make sure the page already exists. Otherwise the beginning part of the page will be invalid pointers. Signed-off-by: Yan, Zheng fs/ceph/inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 89f081730c49a1d3b46359aa0054e6b3b80f47e4 Author: Ilya Dryomov Date: Sat Feb 20 15:56:07 2016 +0100 libceph: use sizeof_footer() more Don't open-code sizeof_footer() in read_partial_message() and ceph_msg_revoke(). Also, after switching to sizeof_footer(), it's now possible to use con_out_kvec_add() in prepare_write_message_footer(). Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/messenger.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 34b759b4a22b0acb82423389a24699357798cf3c Author: Ilya Dryomov Date: Tue Feb 16 15:00:24 2016 +0100 ceph: kill ceph_empty_snapc ceph_empty_snapc->num_snaps == 0 at all times. Passing such a snapc to ceph_osdc_alloc_request() (possibly through ceph_osdc_new_request()) is equivalent to passing NULL, as ceph_osdc_alloc_request() uses it only for sizing the request message. Further, in all four cases the subsequent ceph_osdc_build_request() is passed NULL for snapc, meaning that 0 is encoded for seq and num_snaps and making ceph_empty_snapc entirely useless. The two cases where it actually mattered were removed in commits 860560904962 ("ceph: avoid sending unnessesary FLUSHSNAP message") and 23078637e054 ("ceph: fix queuing inode to mdsdir's snaprealm"). Signed-off-by: Ilya Dryomov Reviewed-by: Yan, Zheng fs/ceph/addr.c | 13 +++++-------- fs/ceph/snap.c | 16 ---------------- fs/ceph/super.c | 8 +------- fs/ceph/super.h | 3 --- 4 files changed, 6 insertions(+), 34 deletions(-) commit ce4355932a9412e0519e70fb1d03d88e39cd621a Author: Anton Protopopov Date: Wed Feb 10 12:38:03 2016 -0500 ceph: fix a wrong comparison A negative value rc compared to the positive value ENOENT in the finish_read() function. Signed-off-by: Anton Protopopov Signed-off-by: Yan, Zheng fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bbd47140cf0d3f1cef882cc553778f417087606 Author: Deepa Dinamani Date: Tue Feb 2 22:07:48 2016 -0800 ceph: replace CURRENT_TIME by current_fs_time() CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. Signed-off-by: Deepa Dinamani Signed-off-by: Yan, Zheng fs/ceph/file.c | 4 ++-- fs/ceph/inode.c | 2 +- fs/ceph/mds_client.c | 2 +- fs/ceph/xattr.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit 5b64640cf65be4a029728c390e9b97afce2a493d Author: Yan, Zheng Date: Thu Jan 7 16:00:17 2016 +0800 ceph: scattered page writeback This patch makes ceph_writepages_start() try using single OSD request to write all dirty pages within a strip unit. When a nonconsecutive dirty page is found, ceph_writepages_start() tries starting a new write operation to existing OSD request. If it succeeds, it uses the new operation to writeback the dirty page. Signed-off-by: Yan, Zheng fs/ceph/addr.c | 305 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 196 insertions(+), 109 deletions(-) commit 2c63f49a724a10bb71cc0fd34f8e5acce78525d5 Author: Yan, Zheng Date: Thu Jan 7 17:32:54 2016 +0800 libceph: add helper that duplicates last extent operation This helper duplicates last extent operation in OSD request, then adjusts the new extent operation's offset and length. The helper is for scatterd page writeback, which adds nonconsecutive dirty pages to single OSD request. Signed-off-by: Yan, Zheng Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 2 ++ net/ceph/osd_client.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 3f1af42ad0fad8a12242233dd0d9fc42f5e83415 Author: Ilya Dryomov Date: Tue Feb 9 17:50:15 2016 +0100 libceph: enable large, variable-sized OSD requests Turn r_ops into a flexible array member to enable large, consisting of up to 16 ops, OSD requests. The use case is scattered writeback in cephfs and, as far as the kernel client is concerned, 16 is just a made up number. r_ops had size 3 for copyup+hint+write, but copyup is really a special case - it can only happen once. ceph_osd_request_cache is therefore stuffed with num_ops=2 requests, anything bigger than that is allocated with kmalloc(). req_mempool is backed by ceph_osd_request_cache, which means either num_ops=1 or num_ops=2 for use_mempool=true - all existing users (ceph_writepages_start(), ceph_osdc_writepages()) are fine with that. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 -- include/linux/ceph/osd_client.h | 6 ++++-- net/ceph/osd_client.c | 43 +++++++++++++++++++++++++++-------------- 3 files changed, 32 insertions(+), 19 deletions(-) commit 9e767adbd3961760af5d56efe45fa8217cce7db6 Author: Ilya Dryomov Date: Tue Feb 9 17:25:31 2016 +0100 libceph: osdc->req_mempool should be backed by a slab pool ceph_osd_request_cache was introduced a long time ago. Also, osd_req is about to get a flexible array member, which ceph_osd_request_cache is going to be aware of. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae458f5a171badcce60bba9024dbdc5488e5e387 Author: Ilya Dryomov Date: Thu Feb 11 13:09:15 2016 +0100 libceph: make r_request msg_size calculation clearer Although msg_size is calculated correctly, the terms are grouped in a misleading way - snaps appears to not have room for a u32 length. Move calculation closer to its use and regroup terms. No functional change. Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 7665d85b7307fa0218881bc2009de067c42dc52e Author: Yan, Zheng Date: Thu Jan 7 16:48:57 2016 +0800 libceph: move r_reply_op_{len,result} into struct ceph_osd_req_op This avoids defining large array of r_reply_op_{len,result} in in struct ceph_osd_request. Signed-off-by: Yan, Zheng Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- include/linux/ceph/osd_client.h | 5 +++-- net/ceph/osd_client.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit de2aa102ea464a54dba14b9588e0bc188bd94707 Author: Ilya Dryomov Date: Mon Feb 8 13:39:46 2016 +0100 libceph: rename ceph_osd_req_op::payload_len to indata_len Follow userspace nomenclature on this - the next commit adds outdata_len. Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 2 +- net/ceph/osd_client.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit a587d71b0a4b222762e9c3a2352f076532685d9f Author: Yan, Zheng Date: Wed Jan 27 09:30:29 2016 +0800 ceph: remove useless BUG_ON ceph_osdc_start_request() never return -EOLDSNAP Signed-off-by: Yan, Zheng fs/ceph/file.c | 2 -- 1 file changed, 2 deletions(-) commit 133e91566ced3e7154db9b68bb3ceb3b30f6900f Author: Yan, Zheng Date: Mon Jan 25 10:44:33 2016 +0800 ceph: don't enable rbytes mount option by default When rbytes mount option is enabled, directory size is recursive size. Recursive size is not updated instantly. This can cause directory size to change between successive stat(1) Signed-off-by: Yan, Zheng fs/ceph/super.c | 4 ++-- fs/ceph/super.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit d1eee0c0e13a1eccde3418a12babf9d77860eee9 Author: Yan, Zheng Date: Fri Jan 22 18:30:12 2016 +0800 ceph: encode ctime in cap message Signed-off-by: Yan, Zheng fs/ceph/caps.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b5d91704f53efc5a2a93e88e323877e6889b0f5b Author: Ilya Dryomov Date: Sat Jan 23 15:57:51 2016 +0100 libceph: behave in mon_fault() if cur_mon < 0 This can happen if __close_session() in ceph_monc_stop() races with a connection reset. We need to ignore such faults, otherwise it's likely we would take !hunting, call __schedule_delayed() and end up with delayed_work() executing on invalid memory, among other things. The (two!) con->private tests are useless, as nothing ever clears con->private. Nuke them. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit bee3a37c470e4febcb05556ceafcb70929268edd Author: Ilya Dryomov Date: Fri Jan 22 18:42:17 2016 +0100 libceph: reschedule tick in mon_fault() Doing __schedule_delayed() in the hunting branch is pointless, as the tick will have already been scheduled by then. What we need to do instead is *reschedule* it in the !hunting branch, after reopen_session() changes hunt_mult, which affects the delay. This helps with spacing out connection attempts and avoiding things like two back-to-back attempts followed by a longer period of waiting around. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1752b50ca240a7f722f57e81ba04496eb15c466f Author: Ilya Dryomov Date: Thu Jan 21 16:33:25 2016 +0100 libceph: introduce and switch to reopen_session() hunting is now set in __open_session() and cleared in finish_hunting(), instead of all around. The "session lost" message is printed not only on connection resets, but also on keepalive timeouts. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 168b9090c739c4b5556023a3f08789b349ca7339 Author: Ilya Dryomov Date: Thu Jan 21 16:33:19 2016 +0100 libceph: monc hunt rate is 3s with backoff up to 30s Unless we are in the process of setting up a client (i.e. connecting to the monitor cluster for the first time), apply a backoff: every time we want to reopen a session, increase our timeout by a multiple (currently 2); when we complete the connection, reduce that multipler by 50%. Mirrors ceph.git commit 794c86fd289bd62a35ed14368fa096c46736e9a2. Signed-off-by: Ilya Dryomov include/linux/ceph/libceph.h | 3 +++ include/linux/ceph/mon_client.h | 3 +++ net/ceph/mon_client.c | 25 ++++++++++++++++--------- 3 files changed, 22 insertions(+), 9 deletions(-) commit 58d81b1294f02262a141687cd62529c1ec8e6484 Author: Ilya Dryomov Date: Thu Jan 21 16:33:15 2016 +0100 libceph: monc ping rate is 10s Split ping interval and ping timeout: ping interval is 10s; keepalive timeout is 30s. Make monc_ping_timeout a constant while at it - it's not actually exported as a mount option (and the rest of tick-related settings won't be either), so it's got no place in ceph_options. Signed-off-by: Ilya Dryomov include/linux/ceph/libceph.h | 5 +++-- net/ceph/ceph_common.c | 1 - net/ceph/mon_client.c | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) commit 0e04dc26cc594d31ee6b1382b452b6bc83b57937 Author: Ilya Dryomov Date: Wed Jan 20 17:50:31 2016 +0100 libceph: pick a different monitor when reconnecting Don't try to reconnect to the same monitor when we fail to establish a session within a timeout or it's lost. For that, pick_new_mon() needs to see the old value of cur_mon, so don't clear it in __close_session() - all calls to __close_session() but one are followed by __open_session() anyway. __open_session() is only called when a new session needs to be established, so the "already open?" branch, which is now in the way, is simply dropped. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 85 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 28 deletions(-) commit 82dcabad750a36a2b749889bc89c5a3188775b2e Author: Ilya Dryomov Date: Tue Jan 19 16:19:06 2016 +0100 libceph: revamp subs code, switch to SUBSCRIBE2 protocol It is currently hard-coded in the mon_client that mdsmap and monmap subs are continuous, while osdmap sub is always "onetime". To better handle full clusters/pools in the osd_client, we need to be able to issue continuous osdmap subs. Revamp subs code to allow us to specify for each sub whether it should be continuous or not. Although not strictly required for the above, switch to SUBSCRIBE2 protocol while at it, eliminating the ambiguity between a request for "every map since X" and a request for "just the latest" when we don't have a map yet (i.e. have epoch 0). SUBSCRIBE2 feature bit is now required - it's been supported since pre-argonaut (2010). Move "got mdsmap" call to the end of ceph_mdsc_handle_map() - calling in before we validate the epoch and successfully install the new map can mess up mon_client sub state. Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 3 +- fs/ceph/super.c | 2 +- include/linux/ceph/ceph_features.h | 2 + include/linux/ceph/ceph_fs.h | 4 +- include/linux/ceph/mon_client.h | 28 +++-- net/ceph/debugfs.c | 17 +-- net/ceph/mon_client.c | 210 +++++++++++++++++++++++-------------- net/ceph/osd_client.c | 3 +- 8 files changed, 174 insertions(+), 95 deletions(-) commit 0f9af169a1db62c33d87e4cfda46493907bd5537 Author: Ilya Dryomov Date: Fri Jan 8 21:17:22 2016 +0300 libceph: decouple hunting and subs management Coupling hunting state with subscribe state is not a good idea. Clear hunting when we complete the authentication handshake. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 02ac956c42c6284220f427568d5de3ea64aca41c Author: Ilya Dryomov Date: Wed Jan 6 12:56:21 2016 +0300 libceph: move debugfs initialization into __ceph_open_session() Our debugfs dir name is a concatenation of cluster fsid and client unique ID ("global_id"). It used to be the case that we learned global_id first, nowadays we always learn fsid first - the monmap is sent before any auth replies are. ceph_debugfs_client_init() call in ceph_monc_handle_map() is therefore never executed and can be removed. Its counterpart in handle_auth_reply() doesn't really belong there either: having to do monc->client and unlocking early to work around lockdep is a testament to that. Move it into __ceph_open_session(), where it can be called unconditionally. Signed-off-by: Ilya Dryomov net/ceph/ceph_common.c | 3 +++ net/ceph/mon_client.c | 52 +------------------------------------------------- 2 files changed, 4 insertions(+), 51 deletions(-) commit 1701f680407c6cc05121566cef5293d33881fe71 Author: Linus Torvalds Date: Fri Mar 25 09:02:13 2016 -0700 Revert "ppdev: use new parport device model" This reverts commit e7223f18603374d235d8bb0398532323e5f318b9. It causes problems when a ppdev tries to register before the parport driver has been registered with the device model. That will trigger the BUG_ON(!drv->bus->p); at drivers/base/driver.c:153. The call chain is kernel_init -> kernel_init_freeable -> do_one_initcall -> ppdev_init -> __parport_register_driver -> driver_register *BOOM* Reported-by: kernel test robot Reported-by: Ross Zwisler Reported-by: Petr Mladek Cc: Sudip Mukherjee Cc: Greg Kroah-Hartman Signed-off-by: Linus Torvalds drivers/char/ppdev.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit 3b3b3bd97788e1f574c71f865d8465b00a6b8708 Merge: f98c213 384fbb9 Author: Linus Torvalds Date: Fri Mar 25 08:52:25 2016 -0700 Merge tag 'firewire-update2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire leftover from Stefan Richter: "Occurrences of timeval were supposed to be eliminated last round, now remove a last forgotten one" * tag 'firewire-update2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: nosy: Replace timeval with timespec64 commit f98c2135f8e73f1cfba640dfb80beb0dad75f278 Merge: 11caf57 4604202 Author: Linus Torvalds Date: Fri Mar 25 08:48:31 2016 -0700 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Just a couple of dma-buf related fixes and some amdgpu fixes, along with a regression fix for radeon off but default feature, but makes my 30" monitor happy again" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: drm/radeon/mst: cleanup code indentation drm/radeon/mst: fix regression in lane/link handling. drm/amdgpu: add invalidate_page callback for userptrs drm/amdgpu: Revert "remove the userptr rmn->lock" drm/amdgpu: clean up path handling for powerplay drm/amd/powerplay: fix memory leak of tdp_table dma-buf/fence: fix fence_is_later v2 dma-buf: Update docs for SYNC ioctl drm: remove excess description dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() drm/atmel-hlcdc: use helper to get crtc state drm/atomic: use helper to get crtc state commit 9ba723b081a2d1be81fb6f60f912bd94fa744965 Author: Cyrille Pitchen Date: Fri Mar 25 10:37:34 2016 +0100 net: macb: remove BUG_ON() and reset the queue to handle RX errors This patch removes two BUG_ON() used to notify about RX queue corruptions on macb (not gem) hardware without actually handling the error. The new code skips corrupted frames but still processes faultless frames. Then it resets the RX queue before restarting the reception from a clean state. This patch is a rework of an older patch proposed by Neil Armstrong: http://patchwork.ozlabs.org/patch/371525/ Signed-off-by: Cyrille Pitchen Acked-by: Neil Armstrong Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 59 ++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 10 deletions(-) commit ed6069be7204541c1da532ad8bbf892e34513552 Author: Boris Ostrovsky Date: Thu Mar 17 09:03:24 2016 -0400 xen/apic: Provide Xen-specific version of cpu_present_to_apicid APIC op Currently Xen uses default_cpu_present_to_apicid() which will always report BAD_APICID for PV guests since x86_bios_cpu_apic_id is initialised to that value and is never updated. With commit 1f12e32f4cd5 ("x86/topology: Create logical package id"), this op is now called by smp_init_package_map() when deciding whether to call topology_update_package_map() which sets cpu_data(cpu).logical_proc_id. The latter (as topology_logical_package_id(cpu)) may be used, for example, by cpu_to_rapl_pmu() as an array index. Since uninitialized logical_package_id is set to -1, the index will become 64K which is obviously problematic. While RAPL code (and any other users of logical_package_id) should be careful in their assumptions about id's validity, Xen's cpu_present_to_apicid op should still provide value consistent with its own xen_apic_read(APIC_ID). Signed-off-by: Boris Ostrovsky Signed-off-by: Konrad Rzeszutek Wilk arch/x86/xen/apic.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d31fecd1af991e39cbe27a59f290cdcefb7ba6ae Author: Manish Chopra Date: Fri Mar 25 07:14:09 2016 -0400 qlge: Update version to 1.00.00.35 Just updating version as many fixes got accumulated over 1.00.00.34 Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cef191d05871fbc8bb3b812880e1997e855a3b9 Author: Jaedon Shin Date: Fri Mar 25 12:46:54 2016 +0900 net: phy: bcm7xxx: Add entries for Broadcom BCM7346 and BCM7362 Add PHY entries for the Broadcom BCM7346 and BCM7362 chips, these are 40nm generation Ethernet PHY. Fixes: 815717d1473e ("net: phy: bcm7xxx: Remove wildcard entries") Signed-off-by: Jaedon Shin Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 4 ++++ include/linux/brcmphy.h | 2 ++ 2 files changed, 6 insertions(+) commit 322cea2f41adb62c975f46a3242f4e3b43226fa1 Author: Daniel Borkmann Date: Fri Mar 25 00:30:25 2016 +0100 bpf: add missing map_flags to bpf_map_show_fdinfo Add map_flags attribute to bpf_map_show_fdinfo(), so that tools like tc can check for them when loading objects from a pinned entry, e.g. if user intent wrt allocation (BPF_F_NO_PREALLOC) is different to the pinned object, it can bail out. Follow-up to 6c9059817432 ("bpf: pre-allocate hash map elements"), so that tc can still support this with v4.6. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 543e3a8da5a4c453e992d5351ef405d5e32f27d7 Author: Bjorn Helgaas Date: Thu Mar 24 21:56:21 2016 -0500 netpoll: Fix extra refcount release in netpoll_cleanup() netpoll_setup() does a dev_hold() on np->dev, the netpoll device. If it fails, it correctly does a dev_put() but leaves np->dev set. If we call netpoll_cleanup() after the failure, np->dev is still set so we do another dev_put(), which decrements the refcount an extra time. It's questionable to call netpoll_cleanup() after netpoll_setup() fails, but it can be difficult to find the problem, and we can easily avoid it in this case. The extra decrements can lead to hangs like this: unregister_netdevice: waiting for bond0 to become free. Usage count = -3 Set and clear np->dev at the points where we dev_hold() and dev_put() the device. Signed-off-by: Bjorn Helgaas Signed-off-by: David S. Miller net/core/netpoll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f971f2263deaa4a441e377b385c11aee0f3b3f9a Author: Alex Deucher Date: Fri Mar 25 10:31:04 2016 -0400 drm/radeon: add a dpm quirk for sapphire Dual-X R7 370 2G D5 bug: https://bugs.freedesktop.org/show_bug.cgi?id=94692 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/si_dpm.c | 1 + 1 file changed, 1 insertion(+) commit 4a8d224c32238bcee05aa554512ea0256b62f1f9 Author: Borislav Petkov Date: Fri Mar 25 12:27:42 2016 +0100 drm/amd: Beef up ACP Kconfig menu text The current "text" needs a user to use a crystal ball in order to find out what this ACP thing is. Use the text from a8fe58cec351 ("drm/amd: add ACP driver support") to make it a bit more understandable to the rest of the world. Signed-off-by: Borislav Petkov Cc: Alex Deucher Cc: Chunming Zhou Cc: Jammy Zhou Cc: Maruthi Bayyavarapu Cc: Murali Krishna Vemuri Signed-off-by: Alex Deucher drivers/gpu/drm/amd/acp/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d Author: Huang Rui Date: Fri Mar 25 11:18:25 2016 +0800 perf/x86: Move events_sysfs_show() outside CPU_SUP_INTEL randconfig builds can sometimes disable CONFIG_CPU_SUP_INTEL while enabling the AMD power reporting PMU driver, resulting in this build failure: arch/x86/kernel/cpu/perf_event.h:663:31: error: 'events_sysfs_show' undeclared here (not in a function) To fix it, move events_sysfs_show() outside of #ifdef CONFIG_CPU_SUP_INTEL. Reported-by: Randy Dunlap Reported-by: build test robot Signed-off-by: Huang Rui Cc: Borislav Petkov Cc: Borislav Petkov Cc: Fengguang Wu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sherry Hurwitz Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: acme@kernel.org Cc: kbuild-all@01.org Cc: linux-next@vger.kernel.org Cc: spg_linux_kernel@amd.com Link: http://lkml.kernel.org/r/1458875905-4278-1-git-send-email-ray.huang@amd.com Signed-off-by: Ingo Molnar arch/x86/events/perf_event.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8059476971589a888e86480665f4c31f7edf3f79 Merge: 05f5ece 6a1a77b Author: Ingo Molnar Date: Fri Mar 25 09:41:57 2016 +0100 Merge tag 'perf-urgent-for-mingo-20160324' 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 detached tarball building due to missing 'perf bench memcpy' headers (Arnaldo Carvalho de Melo) - Fix tarpkg build test error output redirection (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 11caf57f6a4b8e380001548b8af0a3ae3f7b4354 Merge: 3d66c6b a1cbaad Author: Linus Torvalds Date: Thu Mar 24 23:13:48 2016 -0700 Merge tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "There are only three patches this time, most other changes to files in include/asm-generic tend to go through the tree of whoever depends on the change. Two patches are cleanups for stuff that is no longer needed, the main change is to adapt the generic version of BUG_ON() for CONFIG_BUG=n to make it behave consistently with BUG(). This avoids undefined behavior along with a number of warnings about that undefined behavior in randconfig builds when we keep going on after hitting a BUG_ON()" * tag 'asm-generic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: remove old nonatomic-io wrapper files asm-generic: default BUG_ON(x) to if(x)BUG() asm-generic: page.h: Remove useless get_user_page and free_user_page commit 4604202ca8d2a5e33b4bca0812b5d92975ed1bd8 Merge: 17efca9 1135035 Author: Dave Airlie Date: Fri Mar 25 16:02:06 2016 +1000 Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next some amd fixes * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/radeon/mst: cleanup code indentation drm/radeon/mst: fix regression in lane/link handling. drm/amdgpu: add invalidate_page callback for userptrs drm/amdgpu: Revert "remove the userptr rmn->lock" drm/amdgpu: clean up path handling for powerplay drm/amd/powerplay: fix memory leak of tdp_table commit 3d66c6ba3f978fa88d62b83ad35e9adc31c8ea9e Merge: 8407ef4 ee0140d Author: Linus Torvalds Date: Thu Mar 24 22:59:58 2016 -0700 Merge tag 'pm+acpi-4.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management and ACPI updates from Rafael Wysocki: "The second batch of power management and ACPI updates for v4.6. Included are fixups on top of the previous PM/ACPI pull request and other material that didn't make into it but still should go into 4.6. Among other things, there's a fix for an intel_pstate driver issue uncovered by recent cpufreq changes, a workaround for a boot hang on Skylake-H related to the handling of deep C-states by the platform and a PCI/ACPI fix for the handling of IO port resources on non-x86 architectures plus some new device IDs and similar. Specifics: - Fix for an intel_pstate driver issue related to the handling of MSR updates uncovered by the recent cpufreq rework (Rafael Wysocki). - cpufreq core cleanups related to starting governors and frequency synchronization during resume from system suspend and a locking fix for cpufreq_quick_get() (Rafael Wysocki, Richard Cochran). - acpi-cpufreq and powernv cpufreq driver updates (Jisheng Zhang, Michael Neuling, Richard Cochran, Shilpasri Bhat). - intel_idle driver update preventing some Skylake-H systems from hanging during initialization by disabling deep C-states mishandled by the platform in the problematic configurations (Len Brown). - Intel Xeon Phi Processor x200 support for intel_idle (Dasaratharaman Chandramouli). - cpuidle menu governor updates to make it always honor PM QoS latency constraints (and prevent C1 from being used as the fallback C-state on x86 when they are set below its exit latency) and to restore the previous behavior to fall back to C1 if the next timer event is set far enough in the future that was changed in 4.4 which led to an energy consumption regression (Rik van Riel, Rafael Wysocki). - New device ID for a future AMD UART controller in the ACPI driver for AMD SoCs (Wang Hongcheng). - Rockchip rk3399 support for the rockchip-io-domain adaptive voltage scaling (AVS) driver (David Wu). - ACPI PCI resources management fix for the handling of IO space resources on architectures where the IO space is memory mapped (IA64 and ARM64) broken by the introduction of common ACPI resources parsing for PCI host bridges in 4.4 (Lorenzo Pieralisi). - Fix for the ACPI backend of the generic device properties API to make it parse non-device (data node only) children of an ACPI device correctly (Irina Tirdea). - Fixes for the handling of global suspend flags (introduced in 4.4) during hibernation and resume from it (Lukas Wunner). - Support for obtaining configuration information from Device Trees in the PM clocks framework (Jon Hunter). - ACPI _DSM helper code and devfreq framework cleanups (Colin Ian King, Geert Uytterhoeven)" * tag 'pm+acpi-4.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits) PM / AVS: rockchip-io: add io selectors and supplies for rk3399 intel_idle: Support for Intel Xeon Phi Processor x200 Product Family intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled ACPI / PM: Runtime resume devices when waking from hibernate PM / sleep: Clear pm_suspend_global_flags upon hibernate cpufreq: governor: Always schedule work on the CPU running update cpufreq: Always update current frequency before startig governor cpufreq: Introduce cpufreq_update_current_freq() cpufreq: Introduce cpufreq_start_governor() cpufreq: powernv: Add sysfs attributes to show throttle stats cpufreq: acpi-cpufreq: make Intel/AMD MSR access, io port access static PCI: ACPI: IA64: fix IO port generic range check ACPI / util: cast data to u64 before shifting to fix sign extension cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path cpuidle: menu: Fall back to polling if next timer event is near cpufreq: acpi-cpufreq: Clean up hot plug notifier callback intel_pstate: Do not call wrmsrl_on_cpu() with disabled interrupts cpufreq: Make cpufreq_quick_get() safe to call ACPI / property: fix data node parsing in acpi_get_next_subnode() ACPI / APD: Add device HID for future AMD UART controller ... commit 8407ef4685895759f111190d091394ef974f52fb Merge: b4ae78e ee08774 Author: Linus Torvalds Date: Thu Mar 24 22:49:08 2016 -0700 Merge tag 'rtc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull more RTC updates from Alexandre Belloni: "A second pull request for v4.6 with a few fixesi before -rc1. The new features for abx80x actually make the RTC behave correctly. Drivers: - abx80x: handle both XT and RC oscillators, XT failure bit and autocalibration - m41t80: avoid out of range year values - rv8803: workaround an i2c HW issue" * tag 'rtc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: abx80x: handle the oscillator failure bit rtc: abx80x: handle autocalibration rtc: rv8803: workaround i2c HW issue rtc: mcp795: add devicetree support rtc: asm9260: remove incorrect __init/__exit annotations rtc: m41t80: avoid out of range year values rtc: s3c: Don't print an error on probe deferral rtc: rv3029: stop mentioning rv3029c2 commit b4ae78edf77f1751a2a0ae08a8398b35a763d6f6 Merge: 1d02369 968ce1b Author: Linus Torvalds Date: Thu Mar 24 22:45:32 2016 -0700 Merge tag 'hwmon-for-linus-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull more hwmon updates from Guenter Roeck: "Update hwmon mailing list and web page" * tag 'hwmon-for-linus-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: MAINTAINERS: Update mailing list and web page for hwmon subsystem commit 1d02369dba2cd9db110f0f35d9a777ee691e498b Merge: 8f40842 d783e0b Author: Linus Torvalds Date: Thu Mar 24 20:00:44 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Final round of fixes for this merge window - some of this has come up after the initial pull request, and some of it was put in a post-merge branch before the merge window. This contains: - Fix for a bad check for an error on dma mapping in the mtip32xx driver, from Alexey Khoroshilov. - A set of fixes for lightnvm, from Javier, Matias, and Wenwei. - An NVMe completion record corruption fix from Marta, ensuring that we read things in the right order. - Two writeback fixes from Tejun, marked for stable@ as well. - A blk-mq sw queue iterator fix from Thomas, fixing an oops for sparse CPU maps. They hit this in the hot plug/unplug rework" * 'for-linus' of git://git.kernel.dk/linux-block: nvme: avoid cqe corruption when update at the same time as read writeback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode writeback, cgroup: fix premature wb_put() in locked_inode_to_wb_and_lock_list() blk-mq: Use proper cpumask iterator mtip32xx: fix checks for dma mapping errors lightnvm: do not load L2P table if not supported lightnvm: do not reserve lun on l2p loading nvme: lightnvm: return ppa completion status lightnvm: add a bitmap of luns lightnvm: specify target's logical address area null_blk: add lightnvm null_blk device to the nullb_list commit 8f40842e4260f73792c156aded004197a19135ee Merge: 8887566 6871c1b Author: Linus Torvalds Date: Thu Mar 24 19:57:15 2016 -0700 Merge tag 'for-linus-20160324' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "NAND: - Add sunxi_nand randomizer support - begin refactoring NAND ecclayout structs - fix pxa3xx_nand dmaengine usage - brcmnand: fix support for v7.1 controller - add Qualcomm NAND controller driver SPI NOR: - add new ls1021a, ls2080a support to Freescale QuadSPI - add new flash ID entries - support bottom-block protection for Winbond flash - support Status Register Write Protect - remove broken QPI support for Micron SPI flash JFFS2: - improve post-mount CRC scan efficiency General: - refactor bcm63xxpart parser, to later extend for NAND - add writebuf size parameter to mtdram Other minor code quality improvements" * tag 'for-linus-20160324' of git://git.infradead.org/linux-mtd: (72 commits) mtd: nand: remove kerneldoc for removed function parameter mtd: nand: Qualcomm NAND controller driver dt/bindings: qcom_nandc: Add DT bindings mtd: nand: don't select chip in nand_chip's block_bad op mtd: spi-nor: support lock/unlock for a few Winbond chips mtd: spi-nor: add TB (Top/Bottom) protect support mtd: spi-nor: add SPI_NOR_HAS_LOCK flag mtd: spi-nor: use BIT() for flash_info flags mtd: spi-nor: disallow further writes to SR if WP# is low mtd: spi-nor: make lock/unlock bounds checks more obvious and robust mtd: spi-nor: silently drop lock/unlock for already locked/unlocked region mtd: spi-nor: wait for SR_WIP to clear on initial unlock mtd: nand: simplify nand_bch_init() usage mtd: mtdswap: remove useless if (!mtd->ecclayout) test mtd: create an mtd_oobavail() helper and make use of it mtd: kill the ecclayout->oobavail field mtd: nand: check status before reporting timeout mtd: bcm63xxpart: give width specifier an 'int', not 'size_t' mtd: mtdram: Add parameter for setting writebuf size mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd' ... commit 88875667ebbcb95da3f93a4cf657d5dad7db9673 Merge: 8b306a2 c27cb97 Author: Linus Torvalds Date: Thu Mar 24 19:55:41 2016 -0700 Merge tag 'upstream-4.6-rc1' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS updates from Richard Weinberger: "This contains cleanups and a maintainer update for UBI and UBIFS" * tag 'upstream-4.6-rc1' of git://git.infradead.org/linux-ubifs: ubifs: Remove unused header MAINTAINERS: Update UBIFS entry mtd: ubi: Add logging functions ubi_msg, ubi_warn and ubi_err ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn commit 8b306a2e7c8b23d65682fd70d861e2ba2ae10926 Merge: 70c5eb8 ac503e4 Author: Linus Torvalds Date: Thu Mar 24 19:50:32 2016 -0700 Merge tag 'nfsd-4.6-1' of git://linux-nfs.org/~bfields/linux Pull more nfsd updates from Bruce Fields: "Apologies for the previous request, which omitted the top 8 commits from my for-next branch (including the SCSI layout commits). Thanks to Trond for spotting my error!" This actually includes the new layout types, so here's that part of the pull message repeated: "Support for a new pnfs layout type from Christoph Hellwig. The new layout type is a variant of the block layout which uses SCSI features to offer improved fencing and device identification. Note this pull request also includes the client side of SCSI layout, with Trond's permission" * tag 'nfsd-4.6-1' of git://linux-nfs.org/~bfields/linux: nfsd: use short read as well as i_size to set eof nfsd: better layoutupdate bounds-checking nfsd: block and scsi layout drivers need to depend on CONFIG_BLOCK nfsd: add SCSI layout support nfsd: move some blocklayout code nfsd: add a new config option for the block layout driver nfs/blocklayout: add SCSI layout support nfs4.h: add SCSI layout definitions commit 70c5eb84738cba88e08526fa14e06418cb2bd473 Merge: 3a1ef0e 6ef41e2 Author: Linus Torvalds Date: Thu Mar 24 19:42:50 2016 -0700 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild misc updates from Michal Marek: "The non-critical part of kbuild for v4.6-rc1: - coccinelle cleanup and a new patch - make tags rule for kprobe helpers - make rpm fix to avoid spurious grub2 entries - make rpm support for %postun script (Fedora only at the moment)" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild/mkspec: clean boot loader configuration on rpm removal kbuild/mkspec: fix grub2 installkernel issue Coccinelle: Add api/setup_timer.cocci coccinelle: bugon: reduce rule applicability Coccinelle: pm_runtime: reduce rule applicability Coccinelle: array_size: reduce rule applicability Coccinelle: reduce rule applicability scripts/tags.sh: add regex to map kprobe helpers scripts/coccinelle: modernize & commit 3a1ef0e03eee4c5ac30d19bb1b88e57924295810 Merge: 2162b80 6b87b70 Author: Linus Torvalds Date: Thu Mar 24 19:39:28 2016 -0700 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: "Just two kconfig commits this time: - kconfig Makefile fix for make 3.80 - Fix calculating symbols so that KCONFIG_ALLCONFIG=... does not disable CONFIG_MODULES silently" * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: unbreak allmodconfig KCONFIG_ALLCONFIG=... scripts/kconfig: allow building with make 3.80 again commit 2162b80fcadf5b0afff08b540bd141f8a5ff5ed1 Merge: 976fb3f ea8daa7 Author: Linus Torvalds Date: Thu Mar 24 19:26:47 2016 -0700 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild updates from Michal Marek: - make dtbs_install fix - Error handling fix fixdep and link-vmlinux.sh - __UNIQUE_ID fix for clang - Fix for if_changed_* to suppress the "is up to date." message - The kernel is built with -Werror=incompatible-pointer-types * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Add option to turn incompatible pointer check into error kbuild: suppress annoying "... is up to date." message kbuild: fixdep: Check fstat(2) return value scripts/link-vmlinux.sh: force error on kallsyms failure Kbuild: provide a __UNIQUE_ID for clang dtbsinstall: don't move target directory out of the way commit 976fb3f7b92e91aeccb87de60128a1e65edd676f Merge: 9d85460 119a0a3 Author: Linus Torvalds Date: Thu Mar 24 19:16:20 2016 -0700 Merge branch 'parisc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "This patchset adds stack usage debug info for parisc and metag (on both the stack grows upwards), switches to the new generic realative extable search and sort routines, drops the long time ago removed syscalls alloc_hugepages and free_hugepages and wires up the new preadv2 and pwritev2 syscalls" * 'parisc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up preadv2 and pwritev2 syscalls parisc: Use generic extable search and sort routines parisc: Panic immediately when panic_on_oops parisc,metag: Implement CONFIG_DEBUG_STACK_USAGE option parisc: Drop alloc_hugepages and free_hugepages syscalls commit 9d854607f9005c593dca9672b708f28e6ef96fe4 Merge: 8a20a04b 691b1e2 Author: Linus Torvalds Date: Thu Mar 24 19:13:59 2016 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull second set of arm64 updates from Catalin Marinas: - KASLR bug fixes: use callee-saved register, boot-time I-cache maintenance - inv_entry asm macro fix (EL0 check typo) - pr_notice("Virtual kernel memory layout...") splitting - Clean-ups: use p?d_set_huge consistently, allow preemption around copy_to_user_page, remove unused __local_flush_icache_all() * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: allow preemption in copy_to_user_page arm64: consistently use p?d_set_huge arm64: kaslr: use callee saved register to preserve SCTLR across C call arm64: Split pr_notice("Virtual kernel memory layout...") into multiple pr_cont() arm64: drop unused __local_flush_icache_all() arm64: fix KASLR boot-time I-cache maintenance arm64/kernel: fix incorrect EL0 check in inv_entry macro commit 8a20a04bda46625f8dc7e6bb8c2e4f5a480965fd Merge: 732b84e 6fe35ab Author: Linus Torvalds Date: Thu Mar 24 19:01:38 2016 -0700 Merge tag 'armsoc-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull more ARM DT changes from Arnd Bergmann: "Here are some final updates for ARM SoC specific dts files: - The i.MX changes were sent relatively late, and had a dependency on the clk tree, so I delayed that a bit. Support for the new i.MX6qp SoC and a couple of new boards is added in this branch. - Uniphier renames a few files to match the final product names that were decided by the company, kudos to the kernel developer(s) for getting support upstream before the product release. Also two boards are added. The patches were posted early enough and nice overall, but we forgot to apply them and decided to give it some more time in linux-next - at91 has two small bug fixes" * tag 'armsoc-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits) ARM: dts: at91: sama5d4 Xplained: don't disable hsmci regulator ARM: dts: at91: sama5d3 Xplained: don't disable hsmci regulator ARM: dts: uniphier: add pinmux node for I2C ch4 ARM: dts: uniphier: add @{address} to EEPROM node ARM: dts: uniphier: add PH1-Pro4 Sanji board support ARM: dts: uniphier: add PH1-Pro4 Ace board support ARM: dts: uniphier: enable I2C channel 2 of ProXstream2 Gentil board ARM: dts: uniphier: add EEPROM node for ProXstream2 Gentil board ARM: dts: uniphier: add reference clock nodes ARM: dts: uniphier: rework UniPhier System Bus nodes ARM: dts: uniphier: factor out ranges property of support card arm64: dts: uniphier: rename PH1-LD10 to PH1-LD20 ARM: dts: imx53-qsb: Fix gpio button polarity ARM: dts: vfxxx: Add DAC node for Vybrid SoC ARM: dts: imx6q: add missing links between ipu2 and mipi dsi ARM: dts: imx: Add support for Advantech/GE B850v3 ARM: dts: imx: Add support for Advantech/GE B650v3 ARM: dts: imx: Add support for Advantech/GE B450v3 ARM: dts: imx: Add support for Advantech/GE Bx50v3 ARM: dts: imx: Add Advantech BA-16 Qseven module ... commit 732b84eece43bca56d2b4b28f5d2109cd30a6a32 Merge: e46b4e2 8cad489 Author: Linus Torvalds Date: Thu Mar 24 18:56:51 2016 -0700 Merge tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux Pull h8300 updates from Yoshinori Sato: "Various h8300 fixes" * tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux: h8300: switch EARLYCON h8300: dts: Rename the serial port clock to fck commit ee087744247c421c83abea7f01217bfd39b8f5a9 Author: Mylène Josserand Date: Mon Mar 21 18:06:10 2016 +0100 rtc: abx80x: handle the oscillator failure bit Handle the Oscillator Failure ('OF') bit from Oscillator Status register (0x1D). This bit is cleared on set_time function and is read each time the date/time is read, but only in case of XT Oscillator selection. In RC mode, this bit is always set. Signed-off-by: Mylène Josserand Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 59a8383adb75459c9d6766656bccc05950b783ea Author: Mylène Josserand Date: Mon Mar 21 18:06:09 2016 +0100 rtc: abx80x: handle autocalibration The autocalibration is separated in two bits to set in Oscillator Control register (0x1c) : - OSEL bit to select the oscillator type (XT or RC). - ACAL bit to select the autocalibration type. These functionnalities are exported in sysfs entries : "oscillator" and "autocalibration". Respectively, the values are "xtal" for XT oscillator and "rc" for RC oscillator and 0 to disable the autocalibration cycle, 512 for a 512 seconds autocalibration cycle and 1024 for a cycle of 1024 seconds. Examples : Set to XT Oscillator echo xtal > /sys/class/rtc/rtc0/device/oscillator Activate an autocalibration every 512 seconds echo 512 > /sys/class/rtc/rtc0/device/autocalibration Signed-off-by: Mylène Josserand Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 219 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) commit 85062c9b990b1dc8bbb8971ee7d3044a999cf25f Author: Alexandre Belloni Date: Mon Mar 21 15:58:38 2016 +0100 rtc: rv8803: workaround i2c HW issue The rv8803 has a 60µs window where it will not answer on the i2c bus. It also means there will be no ack for the communication. Make sure communication is tried multiple times when this happens (the i2c subsystem mandates -ENXIO is that case but the number of retries is host specific). The critical parts are the probe function and the alarm callback so make sure we handle the failure there. Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 232cad8413a0bfbd25f11cc19fd13dfd85e1d8ad Merge: 389f239 ce63f89 Author: Chris Mason Date: Thu Mar 24 17:36:13 2016 -0700 Merge branch 'misc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 commit ee0140dc8ffc89bdc7b74a858089d5a75a654b4a Merge: 3513ac7 f5eda99 4a798f5 4a2e7aa bf4703f Author: Rafael J. Wysocki Date: Fri Mar 25 00:59:41 2016 +0100 Merge branches 'acpi-soc', 'acpi-misc', 'acpi-pci' and 'device-properties' * acpi-soc: ACPI / APD: Add device HID for future AMD UART controller * acpi-misc: ACPI / util: cast data to u64 before shifting to fix sign extension * acpi-pci: PCI: ACPI: IA64: fix IO port generic range check * device-properties: ACPI / property: fix data node parsing in acpi_get_next_subnode() commit 3513ac743df4a8522270bde4a20d75a42874487e Merge: 33068b6 f447671 02113ba 027b693 fbda4b3 Author: Rafael J. Wysocki Date: Fri Mar 25 00:58:18 2016 +0100 Merge branches 'pm-avs', 'pm-clk', 'pm-devfreq' and 'pm-sleep' * pm-avs: PM / AVS: rockchip-io: add io selectors and supplies for rk3399 * pm-clk: PM / clk: Add support for obtaining clocks from device-tree * pm-devfreq: PM / devfreq: Spelling s/frequnecy/frequency/ * pm-sleep: ACPI / PM: Runtime resume devices when waking from hibernate PM / sleep: Clear pm_suspend_global_flags upon hibernate commit 33068b61f8c041e67b554ddcb44c25ca748d38f6 Merge: 277edba 539a4c4 f70ce48 Author: Rafael J. Wysocki Date: Fri Mar 25 00:57:22 2016 +0100 Merge branches 'pm-cpufreq' and 'pm-cpuidle' * pm-cpufreq: cpufreq: governor: Always schedule work on the CPU running update cpufreq: Always update current frequency before startig governor cpufreq: Introduce cpufreq_update_current_freq() cpufreq: Introduce cpufreq_start_governor() cpufreq: powernv: Add sysfs attributes to show throttle stats cpufreq: acpi-cpufreq: make Intel/AMD MSR access, io port access static cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path cpufreq: acpi-cpufreq: Clean up hot plug notifier callback intel_pstate: Do not call wrmsrl_on_cpu() with disabled interrupts cpufreq: Make cpufreq_quick_get() safe to call * pm-cpuidle: intel_idle: Support for Intel Xeon Phi Processor x200 Product Family intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled cpuidle: menu: Fall back to polling if next timer event is near cpuidle: menu: use high confidence factors only when considering polling commit 968ce1b1f45a7d76b5471b19bd035dbecc72f32d Author: Guenter Roeck Date: Tue Mar 22 15:11:03 2016 -0700 MAINTAINERS: Update mailing list and web page for hwmon subsystem The old web page for the hwmon subsystem is no longer operational, and the mailing list has become unreliable. Move both to kernel.org. Reviewed-by: Jean Delvare Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck MAINTAINERS | 96 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) commit 7dd399130efb5a454daf24075b7563d197114e39 Author: Petri Gynther Date: Thu Mar 24 11:27:21 2016 -0700 net: bcmgenet: fix skb_len in bcmgenet_xmit_single() skb_len needs to be skb_headlen(skb) in bcmgenet_xmit_single(). Fragmented skbs can have only Ethernet + IP + TCP headers (14+20+20=54 bytes) in the linear buffer, followed by the rest in fragments. Bumping skb_len to ETH_ZLEN would be incorrect for this case, as it would introduce garbage between TCP header and the fragment data. This also works with regular/non-fragmented small packets < ETH_ZLEN bytes. Successfully tested this on GENETv3 with 42-byte ARP frames. For testing, I used: ethtool -K eth0 tx-checksum-ipv4 off ethtool -K eth0 tx-checksum-ipv6 off echo 0 > /proc/sys/net/ipv4/tcp_timestamps Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Petri Gynther Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55868120a3e5420bf5aa26a816c07d691579c9e6 Author: Petri Gynther Date: Thu Mar 24 11:27:20 2016 -0700 net: bcmgenet: fix dev->stats.tx_bytes accounting 1. Add bytes_compl local variable to __bcmgenet_tx_reclaim() to collect transmitted bytes. dev->stats updates can then be moved outside the while-loop. bytes_compl is also needed for future BQL support. 2. When bcmgenet device uses Tx checksum offload, each transmitted skb gets an extra 64-byte header prepended to it. Before this header is prepended to the skb, we need to save the skb "wire" length in GENET_CB(skb)->bytes_sent, so that proper Tx bytes accounting can be done in __bcmgenet_tx_reclaim(). 3. skb->len covers the entire length of skb, whether it is linear or fragmented. Thus, when we clean the fragments, do not increase transmitted bytes. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Petri Gynther Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 14 ++++++++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) commit 3e347660488818070bff7533f8561928e09e1d65 Author: Nicolas Dichtel Date: Thu Mar 24 16:50:00 2016 +0100 switchdev: fix typo in comments/doc Two minor typo. Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 2 +- net/switchdev/switchdev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ba5049945421b8d2f3e2af786a15d13b82316503 Author: Cyrille Pitchen Date: Thu Mar 24 15:40:04 2016 +0100 net: macb: replace macb_writel() call by queue_writel() to update queue ISR macb_interrupt() should not use macb_writel(bp, ISR, ) but only queue_writel(queue, ISR, ). There is one IRQ and one set of {ISR, IER, IDR, IMR} [1] registers per queue on gem hardware, though only queue0 is actually used for now to receive frames: other queues can already be used to transmit frames. The queue_readl() and queue_writel() helper macros are designed to access the relevant IRQ registers. [1] ISR: Interrupt Status Register IER: Interrupt Enable Register IDR: Interrupt Disable Register IMR: Interrupt Mask Register Signed-off-by: Cyrille Pitchen Fixes: bfbb92c44670 ("net: macb: Handle the RXUBR interrupt on all devices") Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7629d9c1a28bbaac601091e5bb78273d95835caf Merge: 071d36b c1203fe Author: David S. Miller Date: Thu Mar 24 14:33:08 2016 -0400 Merge branch 'hns-fixes' Yisen Zhuang says: ==================== net: hns: fix some bugs in HNS driver Here are some bug fixed patches for HNS driver. They are: >from Kejian, fix for the warning of passing zero to 'PTR_ERR' >from qianqian, four fixes for inappropriate operation in hns driver >from Sheng, one fix for optimization of irq proccess in hns driver, and one fix for hilink status for hns driver. For more details, please see individual patches. ==================== Signed-off-by: David S. Miller commit c1203fe7bb34e2fe7d281882bcce8b6f107df038 Author: Sheng Li Date: Thu Mar 24 19:08:06 2016 +0800 net: hns: bug fix about getting hilink status for HNS v2 The hilink status reg in HNS V2 is different from HNS v1. In HNS V2, It distinguishes differnt lane status according to the bit-field of the reg. As is shown below: [0:0] ---> lane0 [1:1] ---> lane1 ... But the current driver reads the reg to get the hilink status ONLY concidering HNS V1 situation. Here is a patch to support both of them. Signed-off-by: Sheng Li Signed-off-by: Daode Huang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 40 ++++++++++++---------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 2 ++ 2 files changed, 24 insertions(+), 18 deletions(-) commit daa8cfd9da728b9e35c49311b23127a8859a5f3b Author: Kejian Yan Date: Thu Mar 24 19:08:05 2016 +0800 net: hns: fix warning of passing zero to 'PTR_ERR' There is a misuse of PTR as shown below: ae_node = (void *)of_parse_phandle(dev->of_node, "ae-handle", 0); if (IS_ERR_OR_NULL(ae_node)) { ret = PTR_ERR(ae_node); dev_err(dev, "not find ae-handle\n"); goto out_read_prop_fail; } if the ae_node is NULL, PTR_ERR(ae_node) means it returns success. And the return value should be -ENODEV. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b34aa412c1213912608742b4d016f616b23d9e2 Author: Sheng Li Date: Thu Mar 24 19:08:04 2016 +0800 net: hns: optimizate irq proccess for HNS V2 In hns V1, common_poll should check and clean fbd pkts, because it can not pend irq to clean them if there is no new pkt comes in. But hns V2 hw fixes this bug, and will pend irq itself to do this. So, for hns V2, we set ring_data->fini_process to NULL. Signed-off-by: Sheng Li Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1c3bae6e475fed5c570ac16fef2afe743c477886 Author: Qianqian Xie Date: Thu Mar 24 19:08:03 2016 +0800 net: hns: remove useless variable assignment and comment The variable head in hns_nic_tx_fini_pro has read a value, but it is obviously no use. The patch will fix it. And the comment is nothing to do with the routine, so it has to be removed Signed-off-by: Qianqian Xie Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 055a94177dfa0bcbf2c4be475fef56bc80c9a233 Author: Qianqian Xie Date: Thu Mar 24 19:08:02 2016 +0800 net: hns: bug fix for return values The return values in the first two functions mdiobus_write() are ignored. The patch will fix it. Signed-off-by: Qianqian Xie Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d71397bd2021f8ef68ae34d8bea431cc903fcdd Author: Qianqian Xie Date: Thu Mar 24 19:08:01 2016 +0800 net: hns: optimizate fmt of snprintf() It misses string format in function snprintf(), as below: snprintf(buff, ETH_GSTRING_LEN, g_gmac_stats_string[i].desc); It needs to add "%s" to fix it as below: snprintf(buff, ETH_GSTRING_LEN, "%s", g_gmac_stats_string[i].desc); Signed-off-by: Qianqian Xie Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 526131262223e9315bfd41213f5a76e792f184ff Author: Qianqian Xie Date: Thu Mar 24 19:08:00 2016 +0800 net: hns: fix a bug for cycle index The cycle index should be varied while the variable j is a fixed value. The patch will fix this bug. Signed-off-by: Qianqian Xie Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 071d36bf21bcc837be00cea55bcef8d129e7f609 Author: subashab@codeaurora.org Date: Wed Mar 23 22:39:50 2016 -0600 xfrm: Fix crash observed during device unregistration and decryption A crash is observed when a decrypted packet is processed in receive path. get_rps_cpus() tries to dereference the skb->dev fields but it appears that the device is freed from the poison pattern. [] get_rps_cpu+0x94/0x2f0 [] netif_rx_internal+0x140/0x1cc [] netif_rx+0x74/0x94 [] xfrm_input+0x754/0x7d0 [] xfrm_input_resume+0x10/0x1c [] esp_input_done+0x20/0x30 [] process_one_work+0x244/0x3fc [] worker_thread+0x2f8/0x418 [] kthread+0xe0/0xec -013|get_rps_cpu( | dev = 0xFFFFFFC08B688000, | skb = 0xFFFFFFC0C76AAC00 -> ( | dev = 0xFFFFFFC08B688000 -> ( | name = "...................................................... | name_hlist = (next = 0xAAAAAAAAAAAAAAAA, pprev = 0xAAAAAAAAAAA Following are the sequence of events observed - - Encrypted packet in receive path from netdevice is queued - Encrypted packet queued for decryption (asynchronous) - Netdevice brought down and freed - Packet is decrypted and returned through callback in esp_input_done - Packet is queued again for process in network stack using netif_rx Since the device appears to have been freed, the dereference of skb->dev in get_rps_cpus() leads to an unhandled page fault exception. Fix this by holding on to device reference when queueing packets asynchronously and releasing the reference on call back return. v2: Make the change generic to xfrm as mentioned by Steffen and update the title to xfrm Suggested-by: Herbert Xu Signed-off-by: Jerome Stanislaus Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller net/xfrm/xfrm_input.c | 3 +++ 1 file changed, 3 insertions(+) commit e46b4e2b46e173889b19999b8bd033d5e8b3acf0 Merge: faea72d 7e6867b Author: Linus Torvalds Date: Thu Mar 24 10:52:25 2016 -0700 Merge tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "Nothing major this round. Mostly small clean ups and fixes. Some visible changes: - A new flag was added to distinguish traces done in NMI context. - Preempt tracer now shows functions where preemption is disabled but interrupts are still enabled. Other notes: - Updates were done to function tracing to allow better performance with perf. - Infrastructure code has been added to allow for a new histogram feature for recording live trace event histograms that can be configured by simple user commands. The feature itself was just finished, but needs a round in linux-next before being pulled. This only includes some infrastructure changes that will be needed" * tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (22 commits) tracing: Record and show NMI state tracing: Fix trace_printk() to print when not using bprintk() tracing: Remove redundant reset per-CPU buff in irqsoff tracer x86: ftrace: Fix the misleading comment for arch/x86/kernel/ftrace.c tracing: Fix crash from reading trace_pipe with sendfile tracing: Have preempt(irqs)off trace preempt disabled functions tracing: Fix return while holding a lock in register_tracer() ftrace: Use kasprintf() in ftrace_profile_tracefs() ftrace: Update dynamic ftrace calls only if necessary ftrace: Make ftrace_hash_rec_enable return update bool tracing: Fix typoes in code comment and printk in trace_nop.c tracing, writeback: Replace cgroup path to cgroup ino tracing: Use flags instead of bool in trigger structure tracing: Add an unreg_all() callback to trigger commands tracing: Add needs_rec flag to event triggers tracing: Add a per-event-trigger 'paused' field tracing: Add get_syscall_name() tracing: Add event record param to trigger_ops.func() tracing: Make event trigger functions available tracing: Make ftrace_event_field checking functions available ... commit faea72dd0f155a9d349e191d74830716c702651d Merge: 5b1e167 81ad427 Author: Linus Torvalds Date: Thu Mar 24 10:45:59 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - Fix a regression where bogus trip points on some Lenovo laptops start to screw up thermal control after commit 81ad4276b505 ("Thermal: initialize thermal zone device correctly"). On these Lenovo laptops, a bogus passive trip point is reported, which is 0 degree Celsius. Without commit 81ad4276b505, thermal zone fails to set cooling devices to proper cooling state, which is a bug. But with commit 81ad4276b505 applied, the processors are always throttled on these Lenovo laptops because the current temperature is always higher than the passive trip point. Fix things to ignore such bogus trip points. (Zhang Rui) - Introduce Mediatek thermal driver. (Sascha Hauer) - Introduce devm_ versions of OF thermal sensor register API. (Laxman Dewangan) - Changes in Kconfigs to allow compile test on UM arch. (Krzysztof Kozlowski) - Introduce Skylake support in intel_pch_thermal driver. (Srinivas Pandruvada) - Several small fixes on Rockchip, TI-SoC, Tegra, RCar, and Exynos thermal drivers. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (26 commits) Thermal: Ignore invalid trip points thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros thermal: intel_pch_thermal: Enable Skylake PCH thermal thermal: doc: Add details of devm_thermal_zone_of_sensor_{register,unregister} thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register thermal: doc: Add details of thermal_zone_of_sensor_{register,unregister} thermal: exynos: Defer probe if vtmu is present but not registered thermal: exynos: Use devm_regulator_get_optional() for vtmu thermal: exynos: List vtmu-supply as optional property in DT binding thermal: exynos: Print a message about exceeded number of supported trip-points thermal: exynos: Document number of supported trip-points thermal: exynos: Document compatible for Exynos5433 TMU thermal: mtk: allow compile testing on UM thermal: tegra_soctherm: fix sign bit of temperature thermal: Fix build error of missing devm_ioremap_resource on UM thermal: ti-soc-thermal: clean up the error handling a bit thermal: rcar: Use ARCH_RENESAS thermal: rcar_thermal: don't open code of_device_get_match_data() thermal: db8500_cpufreq_cooling: Compile with COMPILE_TEST thermal: rockchip: fix the tsadc sequence output on rk3228/rk3399 ... commit 5b1e167d8de86d698114a0a8de61e9d1365d3e8a Merge: 8b97be0 a6ab1e8 Author: Linus Torvalds Date: Thu Mar 24 10:41:00 2016 -0700 Merge tag 'nfsd-4.6' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Various bugfixes, a RDMA update from Chuck Lever, and support for a new pnfs layout type from Christoph Hellwig. The new layout type is a variant of the block layout which uses SCSI features to offer improved fencing and device identification. (Also: note this pull request also includes the client side of SCSI layout, with Trond's permission.)" * tag 'nfsd-4.6' of git://linux-nfs.org/~bfields/linux: sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race nfsd: recover: fix memory leak nfsd: fix deadlock secinfo+readdir compound nfsd4: resfh unused in nfsd4_secinfo svcrdma: Use new CQ API for RPC-over-RDMA server send CQs svcrdma: Use new CQ API for RPC-over-RDMA server receive CQs svcrdma: Remove close_out exit path svcrdma: Hook up the logic to return ERR_CHUNK svcrdma: Use correct XID in error replies svcrdma: Make RDMA_ERROR messages work rpcrdma: Add RPCRDMA_HDRLEN_ERR svcrdma: svc_rdma_post_recv() should close connection on error svcrdma: Close connection when a send error occurs nfsd: Lower NFSv4.1 callback message size limit svcrdma: Do not send Write chunk XDR pad with inline content svcrdma: Do not write xdr_buf::tail in a Write chunk svcrdma: Find client-provided write and reply chunks once per reply nfsd: Update NFS server comments related to RDMA support nfsd: Fix a memory leak when meeting unsupported state_protect_how4 nfsd4: fix bad bounds checking commit 8b97be054572fc769619184dcc174e280a5c851c Merge: 44d1b6d 8bb7e27 Author: Linus Torvalds Date: Thu Mar 24 10:36:16 2016 -0700 Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some fixes that poped up due to the big staging tree merge, as well as the removal of a staging driver that now is covered by a "real" driver. All of these have been in linux-next for a few days with no reported issues" * tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: delete STE RMI4 hackish driver staging: android: ion_test: fix check of platform_device_register_simple() error code staging: wilc1000: fix a couple of memory leaks staging: fsl-mc: fix incorrect type passed to dev_err macros staging: fsl-mc: fix incorrect type passed to dev_dbg macros staging: wilc1000: fixed kernel panic when firmware is not started staging: comedi: ni_mio_common: fix the ni_write[blw]() functions staging: most: hdm-dim2: Remove possible dereference error staging: lustre: checking for NULL instead of IS_ERR staging: lustre: really make lustre dependent on LNet staging: refresh TODO for rtl8712 staging: refresh TODO for rtl8723au commit 44d1b6dd3aa1651e1a9467a055a72c81eb96b8e3 Merge: 0f0fbec b7c8b4a Author: Linus Torvalds Date: Thu Mar 24 10:32:42 2016 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix to the pistachio clocksource driver using the proper signedness in the error print format" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/pistachio: Correct output format of PTR_ERR() commit 0f0fbec9c3ce4ed4517cc184f71e695725098fc5 Merge: 3fa2fe2 9a7c4ab Author: Linus Torvalds Date: Thu Mar 24 10:29:44 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 small set of fixes for the usual ARM/SOC irqchip drivers - A set of fixes for mbigen to handle multiple devices in a hardware module proper - A cleanup for the mbigen config option which was pointlessly user configurable. - A cleanup for tegra replacing open coded functionality by the proper core function The config cleanup touches arch/arm64/Kconfig.platforms to select the irq chip for the related platform" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mbigen: Make CONFIG_HISILICON_IRQ_MBIGEN a hidden option ARM64: Kconfig: Select mbigen interrupt controller on Hisilicon platform irqchip/mbigen: Handle multiple device nodes in a mbigen module irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module irqchip/tegra: Switch to use irq_domain_free_irqs_common commit 3fa2fe2ce09c5a16be69c5319eb3347271a99735 Merge: d88f48e 05f5ece Author: Linus Torvalds Date: Thu Mar 24 10:02:14 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: "This tree contains various perf fixes on the kernel side, plus three hw/event-enablement late additions: - Intel Memory Bandwidth Monitoring events and handling - the AMD Accumulated Power Mechanism reporting facility - more IOMMU events ... and a final round of perf tooling updates/fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits) perf llvm: Use strerror_r instead of the thread unsafe strerror one perf llvm: Use realpath to canonicalize paths perf tools: Unexport some methods unused outside strbuf.c perf probe: No need to use formatting strbuf method perf help: Use asprintf instead of adhoc equivalents perf tools: Remove unused perf_pathdup, xstrdup functions perf tools: Do not include stringify.h from the kernel sources tools include: Copy linux/stringify.h from the kernel tools lib traceevent: Remove redundant CPU output perf tools: Remove needless 'extern' from function prototypes perf tools: Simplify die() mechanism perf tools: Remove unused DIE_IF macro perf script: Remove lots of unused arguments perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve perf machine: Rename perf_event__preprocess_sample to machine__resolve perf tools: Add cpumode to struct perf_sample perf tests: Forward the perf_sample in the dwarf unwind test perf tools: Remove misplaced __maybe_unused perf list: Fix documentation of :ppp perf bench numa: Fix assertion for nodes bitfield ... commit 6fe35ab77de9f38e9319c8def0597709759f99fd Merge: 413b321 b02acd4 Author: Arnd Bergmann Date: Thu Mar 24 17:50:24 2016 +0100 Merge tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/dt2 Merge "First fixes batch for AT91 on 4.6 - DT only fixes" from Nicolas Ferre: - prevent the boards from having glitches when inserting/removing SD card on sama5d3/d4 Xplained. The regulators should be kept on. * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sama5d4 Xplained: don't disable hsmci regulator ARM: dts: at91: sama5d3 Xplained: don't disable hsmci regulator ARM: dts: at91: sama5d2 Xplained: add leds node ARM: dts: at91: sama5d2 Xplained: add user push button ARM: dts: at91: sama5d2 Xplained: set pin muxing for usb gadget and usb host ARM: dts: at91: sama5d2: add nand0 and nfc0 nodes ARM: dts: at91: sama5d2: add dma properties to UART nodes ARM: dts: at91: sama5d2 Xplained: Correct the macb irq pinctrl node commit d88f48e12821ab4b2244124d50ac094568f48db5 Merge: be53f58 9da7766 Author: Linus Torvalds Date: Thu Mar 24 09:47:32 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: - fix hotplug bugs - fix irq live lock - fix various topology handling bugs - fix APIC ACK ordering - fix PV iopl handling - fix speling - fix/tweak memcpy_mcsafe() return value - fix fbcon bug - remove stray prototypes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/msr: Remove unused native_read_tscp() x86/apic: Remove declaration of unused hw_nmi_is_cpu_stuck x86/oprofile/nmi: Add missing hotplug FROZEN handling x86/hpet: Use proper mask to modify hotplug action x86/apic/uv: Fix the hotplug notifier x86/apb/timer: Use proper mask to modify hotplug action x86/topology: Use total_cpus not nr_cpu_ids for logical packages x86/topology: Fix Intel HT disable x86/topology: Fix logical package mapping x86/irq: Cure live lock in fixup_irqs() x86/tsc: Prevent NULL pointer deref in calibrate_delay_is_known() x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() x86/iopl: Fix iopl capability check on Xen PV x86/iopl/64: Properly context-switch IOPL on Xen PV selftests/x86: Add an iopl test x86/mm, x86/mce: Fix return type/value for memcpy_mcsafe() x86/video: Don't assume all FB devices are PCI devices arch/x86/irq: Purge useless handler declarations from hw_irq.h x86: Fix misspellings in comments commit 8cad489261c564d4ee1db4de4ac365af56807d8a Author: Yoshinori Sato Date: Sat Nov 21 21:42:58 2015 +0900 h8300: switch EARLYCON earlyprintk is architecture specific option. earlycon is generic and small footprint. Signed-off-by: Yoshinori Sato arch/h8300/configs/h8300h-sim_defconfig | 2 +- arch/h8300/kernel/setup.c | 7 ---- arch/h8300/kernel/sim-console.c | 67 +++++---------------------------- 3 files changed, 10 insertions(+), 66 deletions(-) commit d85816167bf50e4ec4a9e477a2eddfe59ed83bdf Author: Geert Uytterhoeven Date: Fri Jan 29 10:36:25 2016 +0100 h8300: dts: Rename the serial port clock to fck The clock is really the device functional clock, not the interface clock. Rename it. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart arch/h8300/boot/dts/edosk2674.dts | 6 +++--- arch/h8300/boot/dts/h8300h_sim.dts | 4 ++-- arch/h8300/boot/dts/h8s_sim.dts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit be53f58fa0fcd97c62a84f2eb98cff528f8b2443 Merge: 19d6f04 73e6aaf Author: Linus Torvalds Date: Thu Mar 24 09:42:50 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: "Misc fixes: a cgroup fix, a fair-scheduler migration accounting fix, a cputime fix and two cpuacct cleanups" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cpuacct: Simplify the cpuacct code sched/cpuacct: Rename parameter in cpuusage_write() for readability sched/fair: Add comments to explain select_idle_sibling() sched/fair: Fix fairness issue on migration sched/cgroup: Fix/cleanup cgroup teardown/init sched/cputime: Fix steal time accounting vs. CPU hotplug commit 19d6f04cd374b886b98d7b070ebf287c93bff7ac Merge: aca04ce f75d486 Author: Linus Torvalds Date: Thu Mar 24 09:36:18 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: "Documentation updates and a bitops ordering fix" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: bitops: Do not default to __clear_bit() for __clear_bit_unlock() documentation: Clarify compiler store-fusion example documentation: Transitivity is not cumulativity documentation: Add alternative release-acquire outcome documentation: Distinguish between local and global transitivity documentation: Subsequent writes ordered by rcu_dereference() documentation: Remove obsolete reference to RCU-protected indexes documentation: Fix memory-barriers.txt section references documentation: Fix control dependency and identical stores commit 691b1e2ebf727167a2e3cdcd1ea0851dee10247b Author: Mark Rutland Date: Tue Mar 22 10:11:28 2016 +0000 arm64: mm: allow preemption in copy_to_user_page Currently we disable preemption in copy_to_user_page; a behaviour that we inherited from the 32-bit arm code. This was necessary for older cores without broadcast data cache maintenance, and ensured that cache lines were dirtied and cleaned by the same CPU. On these systems dirty cache line migration was not possible, so this was sufficient to guarantee coherency. On contemporary systems, cache coherence protocols permit (dirty) cache lines to migrate between CPUs as a result of speculation, prefetching, and other behaviours. To account for this, in ARMv8 data cache maintenance operations are broadcast and affect all data caches in the domain associated with the VA (i.e. ISH for kernel and user mappings). In __switch_to we ensure that tasks can be safely migrated in the middle of a maintenance sequence, using a dsb(ish) to ensure prior explicit memory accesses are observed and cache maintenance operations are completed before a task can be run on another CPU. Given the above, it is not necessary to disable preemption in copy_to_user_page. This patch removes the preempt_{disable,enable} calls, permitting preemption. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/mm/flush.c | 4 ---- 1 file changed, 4 deletions(-) commit c661cb1c537e2364bfdabb298fb934fd77445e98 Author: Mark Rutland Date: Tue Mar 22 10:11:45 2016 +0000 arm64: consistently use p?d_set_huge Commit 324420bf91f60582 ("arm64: add support for ioremap() block mappings") added new p?d_set_huge functions which do the hard work to generate and set a correct block entry. These differ from open-coded huge page creation in the early page table code by explicitly setting the P?D_TYPE_SECT bits (which are implicitly retained by mk_sect_prot() for any valid prot), but are otherwise identical (and cannot fail on arm64). For simplicity and consistency, make use of these in the initial page table creation code. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d5e5743797adc26e09db262e7a4b6b81d8c0f45c Author: Ard Biesheuvel Date: Mon Mar 21 18:35:11 2016 +0100 arm64: kaslr: use callee saved register to preserve SCTLR across C call The KASLR code incorrectly expects the contents of x18 to be preserved across a call into C code, and uses it to stash the contents of SCTLR_EL1 before enabling the MMU. If the MMU needs to be disabled again to create the randomized kernel mapping, x18 is written back to SCTLR_EL1, which is likely to crash the system if x18 has been clobbered by kasan_early_init() or kaslr_early_init(). So use x22 instead, which is not in use so far in head.S Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a1a77baa7d81c8217ed10ba17a84c5f100343d9 Author: Arnaldo Carvalho de Melo Date: Thu Mar 24 11:48:23 2016 -0300 perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers A change on kernel files included by the 'perf bench memcpy' code grew some new include deps, breaking the detached tarball build: $ make -C tools/perf build-test make: Entering directory '/home/acme/git/linux/tools/perf' - tarpkg: ./tests/perf-targz-src-pkg . tests/make:302: recipe for target 'tarpkg' failed make[1]: *** [tarpkg] Error 2 Makefile:102: recipe for target 'build-test' failed make: *** [build-test] Error 2 make: Leaving directory '/home/acme/git/linux/tools/perf' $ cat tools/perf/tarpkg ./tests/perf-targz-src-pkg . PERF_VERSION = 4.5.g05f5ec PERF_VERSION = 4.5.g05f5ec In file included from bench/mem-memcpy-x86-64-asm.S:9:0: bench/../../../arch/x86/lib/memcpy_64.S:5:29: fatal error: asm/cpufeatures.h: No such file or directory compilation terminated. mv: cannot stat ‘bench/.mem-memcpy-x86-64-asm.o.tmp’: No such file or directory make[5]: *** [bench/mem-memcpy-x86-64-asm.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [bench] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [perf-in.o] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [all] Error 2 $ Add arch/*/include/asm/*features.h to tools/perf/MANIFEST so that we can continue to use detached tarballs to build perf. Now it builds ok, doing it manually: $ make help | grep perf perf-tar-src-pkg - Build perf-4.5.0.tar source tarball perf-targz-src-pkg - Build perf-4.5.0.tar.gz source tarball perf-tarbz2-src-pkg - Build perf-4.5.0.tar.bz2 source tarball perf-tarxz-src-pkg - Build perf-4.5.0.tar.xz source tarball $ ls -la perf-4.5.0.tar ls: cannot access perf-4.5.0.tar: No such file or directory $ make perf-tar-src-pkg TAR PERF_VERSION = 4.5.g32c25b $ ls -la perf-4.5.0.tar -rw-rw-r--. 1 acme acme 6318080 Mar 24 11:52 perf-4.5.0.tar $ mv perf-4.5.0.tar /tmp $ cd /tmp $ tar xf perf-4.5.0.tar $ cd perf-4.5.0/tools/perf $ make > /dev/null PERF_VERSION = 4.5.g32c25b $ ls -la perf -rwxrwxr-x. 1 acme acme 14046416 Mar 24 11:53 perf $ ./perf --version perf version 4.5.g32c25b $ perf bench Usage: perf bench [] [] # List of all available benchmark collections: sched: Scheduler and IPC benchmarks mem: Memory access benchmarks numa: NUMA scheduling and MM benchmarks futex: Futex stressing benchmarks all: All benchmarks $ perf bench mem # List of available benchmarks for collection 'mem': memcpy: Benchmark for memcpy() functions memset: Benchmark for memset() functions all: Run all memory access benchmarks $ perf bench mem memcpy # Running 'mem/memcpy' benchmark: # function 'default' (Default memcpy() provided by glibc) # Copying 1MB bytes ... 15.024038 GB/sec # function 'x86-64-unrolled' (unrolled memcpy() in arch/x86/lib/memcpy_64.S) # Copying 1MB bytes ... 17.438616 GB/sec # function 'x86-64-movsq' (movsq-based memcpy() in arch/x86/lib/memcpy_64.S) # Copying 1MB bytes ... 25.040064 GB/sec # function 'x86-64-movsb' (movsb-based memcpy() in arch/x86/lib/memcpy_64.S) # Copying 1MB bytes ... 25.040064 GB/sec $ Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Hitoshi Mitake Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2c2sncwffuabw58fj1pw86gu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/MANIFEST | 1 + 1 file changed, 1 insertion(+) commit cde88355f2cd7082f5a208901f99b80f4823872c Author: Arnaldo Carvalho de Melo Date: Thu Mar 24 11:22:43 2016 -0300 perf tests: Fix tarpkg build test error output redirection So we need to trow away just stdout, leaving stderr to be caught by the build tests infrastructure, so that we can see what went wrong when the tarpkg build test fails: $ make -C tools/perf build-test make: Entering directory '/home/acme/git/linux/tools/perf' - tarpkg: ./tests/perf-targz-src-pkg . tests/make:302: recipe for target 'tarpkg' failed make[1]: *** [tarpkg] Error 2 Makefile:102: recipe for target 'build-test' failed make: *** [build-test] Error 2 make: Leaving directory '/home/acme/git/linux/tools/perf' $ cat tools/perf/tarpkg ./tests/perf-targz-src-pkg . PERF_VERSION = 4.5.g05f5ec PERF_VERSION = 4.5.g05f5ec In file included from bench/mem-memcpy-x86-64-asm.S:9:0: bench/../../../arch/x86/lib/memcpy_64.S:5:29: fatal error: asm/cpufeatures.h: No such file or directory compilation terminated. mv: cannot stat ‘bench/.mem-memcpy-x86-64-asm.o.tmp’: No such file or directory make[5]: *** [bench/mem-memcpy-x86-64-asm.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [bench] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [perf-in.o] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [all] Error 2 $ So the test flow is: 1. Run: 'make -C tools/perf build-test' 2. One of its tests failed, in this case, the 'tarpkg' one 3. Look at what went wrong, by looking at the output of that test, in tools/perf/tarpkg Admittedly, this should be shortcircuited to showing what went wrong directly from the 'make build-test' step, but lets first fix this tarpkg one and the problem it spotted, which should be fixed by adding some extra file to the tools/perf/MANIFEST so that detached tarballs continue being self contained and build successfully. Cc: Adrian Hunter Cc: Borislav Petkov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ynld6egoxolmftcddpnd7oh6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-targz-src-pkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 972e6a993f278b416a8ee3ec65475724fc36feb2 Author: Alan Stern Date: Wed Mar 23 12:17:09 2016 -0400 HID: usbhid: fix inconsistent reset/resume/reset-resume behavior The usbhid driver has inconsistently duplicated code in its post-reset, resume, and reset-resume pathways. reset-resume doesn't check HID_STARTED before trying to restart the I/O queues. resume fails to clear the HID_SUSPENDED flag if HID_STARTED isn't set. resume calls usbhid_restart_queues() with usbhid->lock held and the others call it without holding the lock. The first item in particular causes a problem following a reset-resume if the driver hasn't started up its I/O. URB submission fails because usbhid->urbin is NULL, and this triggers an unending reset-retry loop. This patch fixes the problem by creating a new subroutine, hid_restart_io(), to carry out all the common activities. It also adds some checks that were missing in the original code: After a reset, there's no need to clear any halted endpoints. After a resume, if a reset is pending there's no need to restart any I/O until the reset is finished. After a resume, if the interrupt-IN endpoint is halted there's no need to submit the input URB until the halt has been cleared. Signed-off-by: Alan Stern Reported-by: Daniel Fraga Tested-by: Daniel Fraga CC: Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 73 ++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit f70ce488c2894cd41ea8489975906adccf82131c Merge: 0c313cb 281baf7 Author: Rafael J. Wysocki Date: Thu Mar 24 13:52:09 2016 +0100 Merge branch 'cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux into pm-cpuidle Pull intel_idle patches for 4.6 from Len Brown. * 'cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: intel_idle: Support for Intel Xeon Phi Processor x200 Product Family intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled commit 05f5ece76a88a2cd4859bc93f90379733dd8b4a3 Merge: 7b0fd56 7626714 Author: Ingo Molnar Date: Thu Mar 24 08:30:25 2016 +0100 Merge tag 'perf-core-for-mingo-20160323' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes: User visible fixes: - Fix documentation of :ppp modifier in 'perf list' (Andi Kleen) - Fix silly nodes bitfield bits/bytes length assertion in 'perf bench numa' (Jakub Jelen) - Remove redundant CPU output in libtraceevent (Steven Rostedt) - Remove 'core_id' check in topology 'perf test' (Sukadev Bhattiprolu) Infrastructure changes/fixes: - Record text offset in dso to calculate objdump address, to use with modules in addition to vDSO symbol address calculations (Wang Nan) - Move utilities.mak from perf to tools/scripts/ (Arnaldo Carvalho de Melo) - Add cpumode to the perf_sample struct, this way we don't need to pass the union event to the machine and thread resolving routines, shortening function signatures and allowing the future introduction of a way to use tracepoint events instead of the unavailable HW cycles counter on powerpc guests in perf kvm by just hooking on perf_evsel__parse_sample, at the end (Arnaldo Carvalho de Melo) - Remove/unexport die() related infrastructure, that at some point will finally be removed (Arnaldo Carvalho de Melo) - Adopt linux/stringify.h from the kernel sources, not to touch this kernel header from tools/ (Arnaldo Carvalho de Melo) - Stop using strbuf for things we can instead trivially use libc's asprintf() (Arnaldo Carvalho de Melo) - Ditch tools/lib/util/abspath.c, its only exported function was used at just one place and can be replaced by libc's realpath() (Arnaldo Carvalho de Melo) - Use strerror_r() in the llvm infrastructure, tread safe, its what is used elsewhere in tools/perf/ (Arnaldo Carvalho de Melo) Cleanups: - Removed misplaced or needless __maybe_unused/export (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit aca04ce5dbda50758b813b1e3d710098991cfa9a Merge: 5a010c7 6579a02 Author: Linus Torvalds Date: Wed Mar 23 23:25:14 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking bugfixes from David Miller: "Several bug fixes rolling in, some for changes introduced in this merge window, and some for problems that have existed for some time: 1) Fix prepare_to_wait() handling in AF_VSOCK, from Claudio Imbrenda. 2) The new DST_CACHE should be a silent config option, from Dave Jones. 3) inet_current_timestamp() unintentionally truncates timestamps to 16-bit, from Deepa Dinamani. 4) Missing reference to netns in ppp, from Guillaume Nault. 5) Free memory reference in hv_netvsc driver, from Haiyang Zhang. 6) Missing kernel doc documentation for function arguments in various spots around the networking, from Luis de Bethencourt. 7) UDP stopped receiving broadcast packets properly, due to overzealous multicast checks, fix from Paolo Abeni" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits) net: ping: make ping_v6_sendmsg static hv_netvsc: Fix the order of num_sc_offered decrement net: Fix typos and whitespace. hv_netvsc: Fix the array sizes to be max supported channels hv_netvsc: Fix accessing freed memory in netvsc_change_mtu() ppp: take reference on channels netns net: Reset encap_level to avoid resetting features on inner IP headers net: mediatek: fix checking for NULL instead of IS_ERR() in .probe net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY at803x: fix reset handling AF_VSOCK: Shrink the area influenced by prepare_to_wait Revert "vsock: Fix blocking ops call in prepare_to_wait" macb: fix PHY reset ipv4: initialize flowi4_flags before calling fib_lookup() fsl/fman: Workaround for Errata A-007273 ipv4: fix broadcast packets reception net: hns: bug fix about the overflow of mss net: hns: adds limitation for debug port mtu net: hns: fix the bug about mtu setting net: hns: fixes a bug of RSS ... commit 6579a023a881e0592ce9a98fdfcbcc0a2a096aa7 Author: Haishuang Yan Date: Wed Mar 23 17:59:51 2016 +0800 net: ping: make ping_v6_sendmsg static As ping_v6_sendmsg is used only in this file, making it static The body of "pingv6_prot" and "pingv6_protosw" were moved at the middle of the file, to avoid having to declare some static prototypes. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/ping.h | 1 - net/ipv6/ping.c | 59 +++++++++++++++++++++++++++--------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) commit 3f735131d9c2523eb54a6c5099fa8c60a4292d48 Author: Haiyang Zhang Date: Wed Mar 23 14:54:48 2016 -0700 hv_netvsc: Fix the order of num_sc_offered decrement Reorder the code in netvsc_sc_open(), so num_sc_offered is only decremented after vmbus_open() is called. This avoid pontential race of removing device before all channels are setup. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d314e9e80c5ea561b73584b73806c2ae9e30f503 Author: Oliver Neukum Date: Wed Mar 23 14:36:56 2016 -0700 Input: sur40 - fix DMA on stack During the initialisation the driver uses a buffer on the stack for DMA. That violates the cache coherency rules. The fix is to allocate the buffer with kmalloc(). Signed-off-by: Oliver Neukum Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sur40.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d Author: Vladis Dronov Date: Wed Mar 23 11:53:46 2016 -0700 Input: ati_remote2 - fix crashes on detecting device with invalid descriptor The ati_remote2 driver expects at least two interfaces with one endpoint each. If given malicious descriptor that specify one interface or no endpoints, it will crash in the probe function. Ensure there is at least two interfaces and one endpoint for each interface before using it. The full disclosure: http://seclists.org/bugtraq/2016/Mar/90 Reported-by: Ralf Spenneberg Signed-off-by: Vladis Dronov Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/misc/ati_remote2.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 5a010c73cdb760c9bdf37b28824b6566789cc005 Merge: b615d3d fffcad8 Author: Linus Torvalds Date: Wed Mar 23 17:20:59 2016 -0700 Merge tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Significant refactoring of Dell laptop drivers, modularizing the smbios code. Multiple new platforms added for ideapad, asus, dell, and alienware using existing quirks. A few fixes and cleanups. hp-wmi: - Remove GPS rfkill support via pre-2009 interface - fix unregister order in hp_wmi_rfkill_setup() once again ideapad-laptop: - Add ideapad Y700 (15) to the no_hw_rfkill DMI list fujitsu-laptop: - Support radio toggle button intel-hid: - allocate correct amount of memory for private struct platform/x86: - Make intel_scu_ipc explicitly non-modular intel_pmc_ipc: - Avoid pending IPC1 command during legacy suspend - Fix GCR register base address and length asus-nb-wmi: - add wapf=4 quirk for ASUS X75VD intel_telemetry_pltdrv: - Change verbosity control bits dell-rbtn: - Add a comment about the XPS 13 9350 dell-wmi, dell-laptop: - depends DMI dell-wmi: - support Dell Inspiron M5110 - properly process Dell Instant Launch hotkey - enable receiving WMI events on Dell Vostro V131 - Support new hotkeys on the XPS 13 9350 (Skylake) - Clean up hotkey table size check - Stop storing pointers to DMI tables dell-laptop: - move dell_smi_error() to dell-smbios - use dell_smbios_find_token() instead of find_token_location() - use dell_smbios_find_token() instead of find_token_id() - extract SMBIOS-related code to a separate module dell-smbios: - rename dell_smi_error() to dell_smbios_error() - make da_tokens static - remove find_token_{id,location}() - implement new function for finding DMI table 0xDA tokens - make the SMBIOS buffer static - return the SMBIOS buffer from dell_smbios_get_buffer() - don't return an SMBIOS buffer from dell_smbios_send_request() - don't pass an SMBIOS buffer to dell_smbios_send_request() - rename dell_send_request() to dell_smbios_send_request() - rename release_buffer() to dell_smbios_release_buffer() - rename clear_buffer() to dell_smbios_clear_buffer() - rename get_buffer() to dell_smbios_get_buffer() dell-led: - use dell_smbios_send_request() for performing SMBIOS calls - use dell_smbios_find_token() for finding mic DMI tokens toshiba_acpi: - Add a module parameter to disable hotkeys registration - Add sysfs entries for the Cooling Method feature - Add support for cooling method feature Documentation/ABI: - Update sysfs-driver-toshiba_acpi file thinkpad_acpi: - Remove ambiguous logging for "Unsupported brightness interface" alienware-wmi: - whitespace improvements - Add support for two new systems: ASM200 and ASM201. - Add support for deep sleep control. - Add initial support for alienware graphics amplifier. - Add support for new platform: X51-R3 - Clean up whitespace for ASM100 platform" * tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (47 commits) hp-wmi: Remove GPS rfkill support via pre-2009 interface hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again dell-wmi: support Dell Inspiron M5110 dell-wmi: properly process Dell Instant Launch hotkey dell-wmi: enable receiving WMI events on Dell Vostro V131 dell-smbios: rename dell_smi_error() to dell_smbios_error() dell-laptop: move dell_smi_error() to dell-smbios ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list fujitsu-laptop: Support radio toggle button intel-hid: allocate correct amount of memory for private struct platform/x86: Make intel_scu_ipc explicitly non-modular intel_pmc_ipc: Avoid pending IPC1 command during legacy suspend intel_pmc_ipc: Fix GCR register base address and length asus-nb-wmi: add wapf=4 quirk for ASUS X75VD intel_telemetry_pltdrv: Change verbosity control bits dell-rbtn: Add a comment about the XPS 13 9350 dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake) dell-wmi: Clean up hotkey table size check dell-wmi, dell-laptop: depends DMI dell-wmi: Stop storing pointers to DMI tables ... commit b615d3d406ead1157c6b846c417b71a3b6600776 Merge: ed7d6bc 922201d Author: Linus Torvalds Date: Wed Mar 23 17:14:09 2016 -0700 Merge tag 'pwm/for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "No new drivers this time around, but a handful of cleanups and fixes" * tag 'pwm/for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: omap-dmtimer: Add debug message for effective period and duty cycle pwm: omap-dmtimer: Round load and match values rather than truncate pwm: omap-dmtimer: Add sanity checking for load and match values pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations pwm: brcmstb: Fix check of devm_ioremap_resource() return code pwm: rcar: Depend on ARCH_RENESAS instead of ARCH_SHMOBILE pwm: lpc18xx-sct: Test clock rate to avoid division by 0 pwm: img: Test clock rate to avoid division by 0 commit ed7d6bc23b6dd8f5272431ce930c84d1e537be49 Merge: c130423 2994a75 Author: Linus Torvalds Date: Wed Mar 23 15:57:39 2016 -0700 Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull more SCSI target updates from Nicholas Bellinger: "This series contains cxgb4 driver prerequisites for supporting iscsi segmentation offload (ISO), that will be utilized for a number of future v4.7 developments in iscsi-target for supporting generic hw offloads" * 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: cxgb4: update Kconfig and Makefile cxgb4: add iSCSI DDP page pod manager cxgb4, iw_cxgb4: move delayed ack macro definitions cxgb4: move VLAN_NONE macro definition cxgb4: update struct cxgb4_lld_info definition cxgb4: add definitions for iSCSI target ULD cxgb4, cxgb4i: move struct cpl_rx_data_ddp definition cxgb4, iw_cxgb4, cxgb4i: remove duplicate definitions cxgb4, iw_cxgb4: move definitions to common header file cxgb4: large receive offload support cxgb4: allocate resources for CXGB4_ULD_ISCSIT cxgb4: add new ULD type CXGB4_ULD_ISCSIT commit 17efca93c8728445522dedafc033b3384a26a39d Merge: 568d7c7 b47bcb9 Author: Dave Airlie Date: Thu Mar 24 08:41:59 2016 +1000 Merge tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel into drm-next Bunch of small fixupes all over. Plus a dma-buf patch that Sumit asked me to cherry-pick since that's the only one he had in his tree. There's a sparse issue outstanding in the color mgr stuff, but Lionel is still working on something that actually appeases sparse. * tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel: dma-buf/fence: fix fence_is_later v2 dma-buf: Update docs for SYNC ioctl drm: remove excess description dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() drm/atmel-hlcdc: use helper to get crtc state drm/atomic: use helper to get crtc state commit 0a69509f24ebf3e701bf1df6e2673ca16bdbe5c9 Author: Rob Clark Date: Wed Mar 23 10:09:00 2016 -0400 drm/msm: fix typo in the !COMMON_CLK case Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4016260ba47a43ec67d4bf3610be37fcb2e416d7 Author: Rob Clark Date: Wed Mar 23 07:10:17 2016 -0400 drm/msm: fix bug after preclose removal commit 53190c7194d9a8337fe419134e44c30eb63ebd08 Author: Daniel Vetter AuthorDate: Mon Jan 25 22:16:49 2016 +0100 Commit: Daniel Vetter CommitDate: Mon Feb 8 09:55:50 2016 +0100 drm/msm: Nuke preclose hooks Left around the unused (and null) preclose fxn ptr, and things predictibly explode when you try to call that. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 3 --- drivers/gpu/drm/msm/msm_kms.h | 1 - 2 files changed, 4 deletions(-) commit fecd86aac5a7621635b61e7491f0ed73610d76fa Author: Martin Brandenburg Date: Wed Mar 23 17:06:25 2016 -0400 ornagefs: ensure that truncate has an up to date inode size Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e8da254c415475d3df67966a198523bfe3ac0576 Author: Martin Brandenburg Date: Fri Mar 18 14:20:15 2016 -0400 orangefs: move code which sets i_link to orangefs_inode_getattr Everything else setting inode->i_ values is in there. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 2 -- fs/orangefs/orangefs-utils.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 05d31c5cb34cbdf05f9326b276be03756abb4b70 Author: Martin Brandenburg Date: Fri Mar 18 13:36:45 2016 -0400 orangefs: remove needless wrapper around GFP_KERNEL Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-kernel.h | 3 --- fs/orangefs/super.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) commit 93d53a488571fb8f8ceaba09352dcf4dfa1fc4e0 Author: Martin Brandenburg Date: Thu Mar 17 16:33:08 2016 -0400 orangefs: remove wrapper around mutex_lock(&inode->i_mutex) Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-kernel.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 266626339b688e650f4197fb8e54532581e18cae Author: Martin Brandenburg Date: Thu Mar 17 16:01:52 2016 -0400 orangefs: refactor inode type or link_target change detection Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-utils.c | 77 +++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 41 deletions(-) commit 5859d77e56e470ba16960befcd948c97a6f62102 Author: Martin Brandenburg Date: Thu Mar 17 15:15:16 2016 -0400 orangefs: use new getattr for revalidate and remove old getattr Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dcache.c | 3 +- fs/orangefs/orangefs-kernel.h | 4 +- fs/orangefs/orangefs-utils.c | 367 ++++++------------------------------------ 3 files changed, 49 insertions(+), 325 deletions(-) commit 8f24928d195fc32a6ba53c2329c5bbcaa59119bc Author: Martin Brandenburg Date: Tue Mar 15 12:36:29 2016 -0400 orangefs: use new getattr in inode getattr and permission Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit e2f7f0d798497f7e2f9296f706ff3263ede0b044 Author: Martin Brandenburg Date: Tue Mar 15 12:33:20 2016 -0400 orangefs: use new orangefs_inode_getattr to get size in write and llseek Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/file.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 075cca50b6d3ba70ee08cc14535e1c0ba073f871 Author: Martin Brandenburg Date: Tue Mar 15 11:36:18 2016 -0400 orangefs: use new orangefs_inode_getattr to create new inodes Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3c9cf98d7b4f27e4303ea6e67db7f0c343a575b6 Author: Martin Brandenburg Date: Tue Mar 15 11:28:20 2016 -0400 orangefs: rename orangefs_inode_getattr to orangefs_inode_old_getattr This is motivated by orangefs_inode_old_getattr's habit of writing over live inodes. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dcache.c | 2 +- fs/orangefs/file.c | 7 +-- fs/orangefs/inode.c | 9 ++-- fs/orangefs/orangefs-kernel.h | 4 +- fs/orangefs/orangefs-utils.c | 121 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 133 insertions(+), 10 deletions(-) commit d57521a653e7ac2e8edaabfff202caf87c61f08a Author: Martin Brandenburg Date: Mon Mar 14 16:59:38 2016 -0400 orangefs: remove inode->i_lock wrapper Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-kernel.h | 3 --- fs/orangefs/orangefs-utils.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) commit f447671b9e4fa4b0c9faf39455269d62d94218ae Author: David Wu Date: Wed Mar 16 02:45:26 2016 +0800 PM / AVS: rockchip-io: add io selectors and supplies for rk3399 This adds the necessary data for handling io voltage domains on the rk3399. As interesting tidbit, the rk3399 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki .../bindings/power/rockchip-io-domain.txt | 11 ++++ drivers/power/avs/rockchip-io-domain.c | 58 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 76267147f233f347dbd8f4f8c05492e5ea0a7dce Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 17:42:21 2016 -0300 perf llvm: Use strerror_r instead of the thread unsafe strerror one Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5njrq9dltckgm624omw9ljgu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/llvm-utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 78478269d2c9be315164d15c14e6e222a06d2f40 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 17:34:29 2016 -0300 perf llvm: Use realpath to canonicalize paths To kill the last user of make_nonrelative_path(), that gets ditched, one more panicking function killed. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-3hu56rvyh4q5gxogovb6ko8a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 - tools/perf/util/abspath.c | 37 ------------------------------------- tools/perf/util/cache.h | 1 - tools/perf/util/llvm-utils.c | 17 ++++++++++++----- 4 files changed, 12 insertions(+), 44 deletions(-) commit 5ec8a1753bc29efa7e4b1391d691c9c719b30257 Author: Calvin Owens Date: Fri Mar 18 12:45:42 2016 -0700 mpt3sas: Don't overreach ioc->reply_post[] during initialization In _base_make_ioc_operational(), we walk ioc->reply_queue_list and pull a pointer out of successive elements of ioc->reply_post[] for each entry in that list if RDPQ is enabled. Since the code pulls the pointer for the next iteration at the bottom of the loop, it triggers the a KASAN dump on the final iteration: BUG: KASAN: slab-out-of-bounds in _base_make_ioc_operational+0x47b7/0x47e0 [mpt3sas] at addr ffff880754816ab0 Read of size 8 by task modprobe/305 Call Trace: [] dump_stack+0x4d/0x6c [] print_trailer+0xf9/0x150 [] object_err+0x34/0x40 [] kasan_report_error+0x221/0x530 [] __asan_report_load8_noabort+0x43/0x50 [] _base_make_ioc_operational+0x47b7/0x47e0 [mpt3sas] [] mpt3sas_base_attach+0x1991/0x2120 [mpt3sas] [] _scsih_probe+0xeb3/0x16b0 [mpt3sas] [] local_pci_probe+0xc7/0x170 [] pci_device_probe+0x20f/0x290 [] really_probe+0x17d/0x600 [] __driver_attach+0x153/0x190 [] bus_for_each_dev+0x11c/0x1a0 [] driver_attach+0x3d/0x50 [] bus_add_driver+0x44a/0x5f0 [] driver_register+0x18c/0x3b0 [] __pci_register_driver+0x156/0x200 [] _mpt3sas_init+0x135/0x1000 [mpt3sas] [] do_one_initcall+0x113/0x2b0 [] do_init_module+0x1d0/0x4d8 [] load_module+0x6729/0x8dc0 [] SYSC_init_module+0x183/0x1a0 [] SyS_init_module+0xe/0x10 [] entry_SYSCALL_64_fastpath+0x12/0x6a Fix this by pulling the value at the beginning of the loop. Signed-off-by: Calvin Owens Reviewed-by: Johannes Thumshirn Reviewed-by: Jens Axboe Acked-by: Chaitra Basappa Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 281baf7a702693deaa45c98ef0c5161006b48257 Author: Dasaratharaman Chandramouli Date: Thu Sep 4 17:22:54 2014 -0700 intel_idle: Support for Intel Xeon Phi Processor x200 Product Family Enables "Intel(R) Xeon Phi(TM) Processor x200 Product Family" support, formerly code-named KNL. It is based on modified Intel Atom Silvermont microarchitecture. Signed-off-by: Dasaratharaman Chandramouli [micah.barany@intel.com: adjusted values of residency and latency] Signed-off-by: Micah Barany [hubert.chrzaniuk@intel.com: removed deprecated CPUIDLE_FLAG_TIME_VALID flag] Signed-off-by: Hubert Chrzaniuk Signed-off-by: Pawel Karczewski Signed-off-by: Len Brown drivers/idle/intel_idle.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d70e28f57e14a481977436695b0c9ba165472431 Author: Len Brown Date: Sun Mar 13 00:33:48 2016 -0500 intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled Some SKL-H configurations require "intel_idle.max_cstate=7" to boot. While that is an effective workaround, it disables C10. This patch detects the problematic configuration, and disables C8 and C9, keeping C10 enabled. Note that enabling SGX in BIOS SETUP can also prevent this issue, if the system BIOS provides that option. https://bugzilla.kernel.org/show_bug.cgi?id=109081 "Freezes with Intel i7 6700HQ (Skylake), unless intel_idle.max_cstate=7" Signed-off-by: Len Brown Cc: stable@vger.kernel.org drivers/idle/intel_idle.c | 108 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 86 insertions(+), 22 deletions(-) commit 0741208a7cd4fc651316f1f861ad9e83495765fc Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 16:56:56 2016 -0300 perf tools: Unexport some methods unused outside strbuf.c Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-nq1wvtky4mpu0nupjyar7sbw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/strbuf.c | 9 ++++++++- tools/perf/util/strbuf.h | 7 +------ 2 files changed, 9 insertions(+), 7 deletions(-) commit ac503e4a309a3993a069750f95c2815ee5db5aa5 Author: Benjamin Coddington Date: Tue Mar 22 10:28:36 2016 -0400 nfsd: use short read as well as i_size to set eof Use the result of a local read to determine when to set the eof flag. This allows us to return the location of the end of the file atomically at the time of the read. Signed-off-by: Benjamin Coddington [bfields: add some documentation] Signed-off-by: J. Bruce Fields fs/nfsd/nfs3proc.c | 7 ++++--- fs/nfsd/nfs4xdr.c | 11 +++++++---- fs/nfsd/vfs.h | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) commit 88fd633cdfa19060a6575b1d53c55c14b11e4fe8 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 16:44:49 2016 -0300 perf probe: No need to use formatting strbuf method We have addch() for chars, add() for fixed size data, and addstr() for variable length strings, use them. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-0ap02fn2xtvpduj2j6b2o1j4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dwarf-aux.c | 10 +++++----- tools/perf/util/probe-event.c | 2 +- tools/perf/util/probe-finder.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit a610f5cbb2a7e26b7f2df2f5df255e34007d6bfd Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 15:44:09 2016 -0300 perf help: Use asprintf instead of adhoc equivalents That doesn't chekcs malloc return and that, when using strbuf, if it can't grow, just explodes away via die(). Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-vr8qsjbwub7e892hpa9msz95@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 69 +++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) commit 5e82b4b2a0015ed0a659b22ef2ee3409a3c39e54 Author: Bjorn Helgaas Date: Wed Mar 23 13:47:23 2016 -0500 net: Fix typos and whitespace. Fix typos. Capitalize CPU, NAPI, RCU consistently. Align structure indentation. No functional change intended; only comment and whitespace changes. Signed-off-by: Bjorn Helgaas Signed-off-by: David S. Miller include/linux/netdevice.h | 215 +++++++++++++++++++++++----------------------- 1 file changed, 106 insertions(+), 109 deletions(-) commit 9efc2f7dcd06e04d7b6a3032ae65bfd628b1aebe Author: Haiyang Zhang Date: Wed Mar 23 09:43:10 2016 -0700 hv_netvsc: Fix the array sizes to be max supported channels The VRSS_CHANNEL_MAX is the max number of channels supported by Hyper-V hosts. We use it for the related array sizes instead of using NR_CPUS, which may be set to several thousands. This patch reduces possible memory allocation failures. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 7 ++++--- drivers/net/hyperv/rndis_filter.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit d212b4633c3a99561939f2d423eacf3263850bcd Author: Haiyang Zhang Date: Wed Mar 23 09:43:09 2016 -0700 hv_netvsc: Fix accessing freed memory in netvsc_change_mtu() struct netvsc_device is freed in rndis_filter_device_remove(). So we save the nvdev->num_chn into a temp variable for later usage. (Please also include this patch into stable branch.) Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 Author: Guillaume Nault Date: Wed Mar 23 16:38:55 2016 +0100 ppp: take reference on channels netns Let channels hold a reference on their network namespace. Some channel types, like ppp_async and ppp_synctty, can have their userspace controller running in a different namespace. Therefore they can't rely on them to preclude their netns from being removed from under them. ================================================================== BUG: KASAN: use-after-free in ppp_unregister_channel+0x372/0x3a0 at addr ffff880064e217e0 Read of size 8 by task syz-executor/11581 ============================================================================= BUG net_namespace (Not tainted): kasan: bad access detected ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in copy_net_ns+0x6b/0x1a0 age=92569 cpu=3 pid=6906 [< none >] ___slab_alloc+0x4c7/0x500 kernel/mm/slub.c:2440 [< none >] __slab_alloc+0x4c/0x90 kernel/mm/slub.c:2469 [< inline >] slab_alloc_node kernel/mm/slub.c:2532 [< inline >] slab_alloc kernel/mm/slub.c:2574 [< none >] kmem_cache_alloc+0x23a/0x2b0 kernel/mm/slub.c:2579 [< inline >] kmem_cache_zalloc kernel/include/linux/slab.h:597 [< inline >] net_alloc kernel/net/core/net_namespace.c:325 [< none >] copy_net_ns+0x6b/0x1a0 kernel/net/core/net_namespace.c:360 [< none >] create_new_namespaces+0x2f6/0x610 kernel/kernel/nsproxy.c:95 [< none >] copy_namespaces+0x297/0x320 kernel/kernel/nsproxy.c:150 [< none >] copy_process.part.35+0x1bf4/0x5760 kernel/kernel/fork.c:1451 [< inline >] copy_process kernel/kernel/fork.c:1274 [< none >] _do_fork+0x1bc/0xcb0 kernel/kernel/fork.c:1723 [< inline >] SYSC_clone kernel/kernel/fork.c:1832 [< none >] SyS_clone+0x37/0x50 kernel/kernel/fork.c:1826 [< none >] entry_SYSCALL_64_fastpath+0x16/0x7a kernel/arch/x86/entry/entry_64.S:185 INFO: Freed in net_drop_ns+0x67/0x80 age=575 cpu=2 pid=2631 [< none >] __slab_free+0x1fc/0x320 kernel/mm/slub.c:2650 [< inline >] slab_free kernel/mm/slub.c:2805 [< none >] kmem_cache_free+0x2a0/0x330 kernel/mm/slub.c:2814 [< inline >] net_free kernel/net/core/net_namespace.c:341 [< none >] net_drop_ns+0x67/0x80 kernel/net/core/net_namespace.c:348 [< none >] cleanup_net+0x4e5/0x600 kernel/net/core/net_namespace.c:448 [< none >] process_one_work+0x794/0x1440 kernel/kernel/workqueue.c:2036 [< none >] worker_thread+0xdb/0xfc0 kernel/kernel/workqueue.c:2170 [< none >] kthread+0x23f/0x2d0 kernel/drivers/block/aoe/aoecmd.c:1303 [< none >] ret_from_fork+0x3f/0x70 kernel/arch/x86/entry/entry_64.S:468 INFO: Slab 0xffffea0001938800 objects=3 used=0 fp=0xffff880064e20000 flags=0x5fffc0000004080 INFO: Object 0xffff880064e20000 @offset=0 fp=0xffff880064e24200 CPU: 1 PID: 11581 Comm: syz-executor Tainted: G B 4.4.0+ Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014 00000000ffffffff ffff8800662c7790 ffffffff8292049d ffff88003e36a300 ffff880064e20000 ffff880064e20000 ffff8800662c77c0 ffffffff816f2054 ffff88003e36a300 ffffea0001938800 ffff880064e20000 0000000000000000 Call Trace: [< inline >] __dump_stack kernel/lib/dump_stack.c:15 [] dump_stack+0x6f/0xa2 kernel/lib/dump_stack.c:50 [] print_trailer+0xf4/0x150 kernel/mm/slub.c:654 [] object_err+0x2f/0x40 kernel/mm/slub.c:661 [< inline >] print_address_description kernel/mm/kasan/report.c:138 [] kasan_report_error+0x215/0x530 kernel/mm/kasan/report.c:236 [< inline >] kasan_report kernel/mm/kasan/report.c:259 [] __asan_report_load8_noabort+0x3e/0x40 kernel/mm/kasan/report.c:280 [< inline >] ? ppp_pernet kernel/include/linux/compiler.h:218 [] ? ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392 [< inline >] ppp_pernet kernel/include/linux/compiler.h:218 [] ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392 [< inline >] ? ppp_pernet kernel/drivers/net/ppp/ppp_generic.c:293 [] ? ppp_unregister_channel+0xe6/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392 [] ppp_asynctty_close+0xa3/0x130 kernel/drivers/net/ppp/ppp_async.c:241 [] ? async_lcp_peek+0x5b0/0x5b0 kernel/drivers/net/ppp/ppp_async.c:1000 [] tty_ldisc_close.isra.1+0x99/0xe0 kernel/drivers/tty/tty_ldisc.c:478 [] tty_ldisc_kill+0x40/0x170 kernel/drivers/tty/tty_ldisc.c:744 [] tty_ldisc_release+0x1b3/0x260 kernel/drivers/tty/tty_ldisc.c:772 [] tty_release+0xac1/0x13e0 kernel/drivers/tty/tty_io.c:1901 [] ? release_tty+0x320/0x320 kernel/drivers/tty/tty_io.c:1688 [] __fput+0x236/0x780 kernel/fs/file_table.c:208 [] ____fput+0x15/0x20 kernel/fs/file_table.c:244 [] task_work_run+0x16b/0x200 kernel/kernel/task_work.c:115 [< inline >] exit_task_work kernel/include/linux/task_work.h:21 [] do_exit+0x8b5/0x2c60 kernel/kernel/exit.c:750 [] ? debug_check_no_locks_freed+0x290/0x290 kernel/kernel/locking/lockdep.c:4123 [] ? mm_update_next_owner+0x6f0/0x6f0 kernel/kernel/exit.c:357 [] ? __dequeue_signal+0x136/0x470 kernel/kernel/signal.c:550 [] ? recalc_sigpending_tsk+0x13b/0x180 kernel/kernel/signal.c:145 [] do_group_exit+0x108/0x330 kernel/kernel/exit.c:880 [] get_signal+0x5e4/0x14f0 kernel/kernel/signal.c:2307 [< inline >] ? kretprobe_table_lock kernel/kernel/kprobes.c:1113 [] ? kprobe_flush_task+0xb5/0x450 kernel/kernel/kprobes.c:1158 [] do_signal+0x83/0x1c90 kernel/arch/x86/kernel/signal.c:712 [] ? recycle_rp_inst+0x310/0x310 kernel/include/linux/list.h:655 [] ? setup_sigcontext+0x780/0x780 kernel/arch/x86/kernel/signal.c:165 [] ? finish_task_switch+0x424/0x5f0 kernel/kernel/sched/core.c:2692 [< inline >] ? finish_lock_switch kernel/kernel/sched/sched.h:1099 [] ? finish_task_switch+0x120/0x5f0 kernel/kernel/sched/core.c:2678 [< inline >] ? context_switch kernel/kernel/sched/core.c:2807 [] ? __schedule+0x919/0x1bd0 kernel/kernel/sched/core.c:3283 [] exit_to_usermode_loop+0xf1/0x1a0 kernel/arch/x86/entry/common.c:247 [< inline >] prepare_exit_to_usermode kernel/arch/x86/entry/common.c:282 [] syscall_return_slowpath+0x19f/0x210 kernel/arch/x86/entry/common.c:344 [] int_ret_from_sys_call+0x25/0x9f kernel/arch/x86/entry/entry_64.S:281 Memory state around the buggy address: ffff880064e21680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880064e21700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff880064e21780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff880064e21800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880064e21880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functionality v2") Reported-by: Baozeng Ding Signed-off-by: Guillaume Nault Reviewed-by: Cyrill Gorcunov Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf47a8aede9febee21cbd21d40a9c47244773a6c Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 15:25:02 2016 -0300 perf tools: Remove unused perf_pathdup, xstrdup functions Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-s87zi5d03m6rz622y1z6rlsa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cache.h | 3 --- tools/perf/util/path.c | 30 ------------------------------ tools/perf/util/util.h | 1 - tools/perf/util/wrapper.c | 12 ------------ 4 files changed, 46 deletions(-) commit 531d2410635ce290bee215f4bf9ec8ca98cf7302 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 15:16:55 2016 -0300 perf tools: Do not include stringify.h from the kernel sources Use instead the copy just made to tools/include/linux/. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-q736w12nwy98x5ox2hamp5ow@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/header.c | 4 +--- tools/perf/builtin-report.c | 1 + tools/perf/builtin-top.c | 1 + tools/perf/util/util.h | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) commit 5197f3499c470ccc4b247db66ff883e597e3adda Author: Alexander Duyck Date: Tue Mar 22 16:18:07 2016 -0700 net: Reset encap_level to avoid resetting features on inner IP headers This patch corrects an oversight in which we were allowing the encap_level value to pass from the outer headers to the inner headers. As a result we were incorrectly identifying UDP or GRE tunnels as also making use of ipip or sit when the second header actually represented a tunnel encapsulated in either a UDP or GRE tunnel which already had the features masked. Fixes: 76443456227097179c1482 ("net: Move GSO csum into SKB_GSO_CB") Reported-by: Tom Herbert Signed-off-by: Alexander Duyck Acked-by: Tom Herbert Signed-off-by: David S. Miller net/ipv4/gre_offload.c | 1 + net/ipv4/udp_offload.c | 1 + 2 files changed, 2 insertions(+) commit 737ef7d32cb41d19f0e1fd4d9ad0916f42d2f448 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 15:14:27 2016 -0300 tools include: Copy linux/stringify.h from the kernel There is code in tools/ that is directly including this file from the kernel, and this is verboten for a while, copy it so that the next csets can fix this situation. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-e0r3nks2uai020ndghvxv5qw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/stringify.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4f3c887688a2b0c01b241afcfedbb4e5e4a8e022 Author: Steven Rostedt Date: Wed Mar 23 10:16:28 2016 -0400 tools lib traceevent: Remove redundant CPU output Commit a6745330789f ("tools lib traceevent: Split pevent_print_event() into specific functionality functions") broke apart the function pevent_print_event() into three functions. The first function prints the comm, pid and CPU, the second prints the timestamp. But that commit added the printing of the CPU in the timestamp function, which now causes pevent_print_event() to duplicate the CPU output. Remove the redundant printing of the record's CPU from the timestamp function. Signed-off-by: Steven Rostedt Cc: Namhyung Kim Fixes: a6745330789f ("tools lib traceevent: Split pevent_print_event() into specific functionality functions") Link: http://lkml.kernel.org/r/20160323101628.459375d2@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3938bad44ed2fea41328e4be2ae04a8e94540813 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 15:06:35 2016 -0300 perf tools: Remove needless 'extern' from function prototypes Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-w246stf7ponfamclsai6b9zo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/bench.h | 22 ++++++------ tools/perf/bench/mem-memcpy-arch.h | 2 +- tools/perf/bench/mem-memset-arch.h | 2 +- tools/perf/builtin.h | 64 ++++++++++++++++----------------- tools/perf/util/cache.h | 22 ++++++------ tools/perf/util/callchain.h | 4 +-- tools/perf/util/cgroup.h | 4 +-- tools/perf/util/cloexec.h | 2 +- tools/perf/util/dwarf-aux.h | 72 ++++++++++++++++++-------------------- tools/perf/util/genelf.h | 8 ++--- tools/perf/util/jit.h | 12 +++---- tools/perf/util/llvm-utils.h | 7 ++-- tools/perf/util/parse-events.h | 21 ++++++----- tools/perf/util/probe-event.h | 57 ++++++++++++++---------------- tools/perf/util/probe-finder.h | 24 ++++++------- tools/perf/util/quote.h | 2 +- tools/perf/util/strbuf.h | 16 ++++----- tools/perf/util/svghelper.h | 51 +++++++++++++-------------- tools/perf/util/symbol.h | 4 +-- tools/perf/util/util.h | 18 +++++----- 20 files changed, 197 insertions(+), 217 deletions(-) commit 621e49f6d80a731dd3073569571c4579352cfb1c Author: Vladimir Zapolskiy Date: Wed Mar 23 01:06:04 2016 +0200 net: mediatek: fix checking for NULL instead of IS_ERR() in .probe devm_ioremap_resource() returns ERR_PTR() value on error, it never returns NULL, fix it and propagate the returned error upwards. Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Matthias Brugger Acked-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 9eb13f65c305ec6687d7666abce14e6c047fa872 Author: Sebastian Frias Date: Wed Mar 23 11:49:09 2016 +0100 net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY This removes the dependency on GPIOLIB for non faulty PHYs. Indeed, without this patch, if GPIOLIB is not selected devm_gpiod_get_optional() will return -ENOSYS and the driver probe call will fail, regardless of the actual PHY hardware. Out of the 3 PHYs supported by this driver (AT8030, AT8031, AT8035), only AT8030 presents the issues that commit 13a56b449325 ("net: phy: at803x: Add support for hardware reset") attempts to work-around by using a 'reset' GPIO line. Hence, only AT8030 should depend on GPIOLIB operating properly. Fixes: 13a56b449325 ("net: phy: at803x: Add support for hardware reset") Signed-off-by: Sebastian Frias Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 4 ++++ 1 file changed, 4 insertions(+) commit d57019d1858a6f9b3ca05d76d793466ae428cfa3 Author: Sergei Shtylyov Date: Wed Mar 23 00:44:40 2016 +0300 at803x: fix reset handling The driver of course "knows" that the chip's reset signal is active low, so it drives the GPIO to 0 to reset the PHY and to 1 otherwise; however all this will only work iff the GPIO is specified as active-high in the device tree! I think both the driver and the device trees (if there are any -- I was unable to find them) need to be fixed in this case... Fixes: 13a56b449325 ("net: phy: at803x: Add support for hardware reset") Signed-off-by: Sergei Shtylyov Acked-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fffcad87d4e7c5f6f6f6e5fc9d337bd6f197f80f Author: Maciej S. Szmigiero Date: Sun Mar 6 23:40:19 2016 +0100 hp-wmi: Remove GPS rfkill support via pre-2009 interface GPS rfkill support via pre-2009 WMI interface uses hp_wmi_get_sw_state() and hp_wmi_get_hw_state() to query its current hard and soft block state, respectively. In hp_wmi_get_sw_state() a mask is calculated which bit should be checked in an int value returned by firmware to get current block state: 0x200 << (r * 8) which with r being 3 for GPS results in overflow and mask of zero. The same goes for hp_wmi_get_hw_state(). This effectively means that GPS rfkill on this WMI interface is considered always both hard and soft blocked. Unfortunately, later when rfkill subsystem calls hp_wmi_set_block() to sync this block to hardware firmware at least on my old nc6400 gets confused and sets both hard and soft blocks on WiFi and BT. This happens for example on hp-wmi module load. Since due to overflow described above it is dubious that this ever worked correctly and HP laptops with modems having GPS support seem to all have been released well past year 2009 let's just remove GPS rfkill support via pre-2009 WMI interface. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Darren Hart drivers/platform/x86/hp-wmi.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) commit c7805e5459f5cac2d99e901e276908c205c3fd3a Author: Maciej S. Szmigiero Date: Sun Mar 6 23:38:36 2016 +0100 hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again rfkill registration order in hp_wmi_rfkill_setup() is: 1) WiFi, 2) BT, 3) WWAN, 5) GPS. Unregistration when cleaning up on error return should happen in reverse order. This means that: If BT rfkill fails to be allocated we possibly need to first unregister WiFi rfkill before destroying it. The same goes with (WWAN, BT) and (GPS, WWAN) pairs. Also, if WWAN rfkill fails to register we need to (possibly) unregister BT not the GPS one. And if GPS rfkill fails to register we need to unregister WWAN not the BT one. We never need to unregister GPS rfkill here since if GPS rfkill registration succeeds this function returns without error so no cleanup is necessary. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Darren Hart drivers/platform/x86/hp-wmi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit aaf3a5e77566ad186a85d28a0afd26b8dd0afd11 Author: Michał Kępień Date: Fri Mar 4 14:09:10 2016 +0100 dell-wmi: support Dell Inspiron M5110 Similarly to Dell Vostro V131, Dell Inspiron M5110 also requires an SMBIOS request to be issued in order for WMI events to be generated and does not raise an i8042 interrupt when the Dell Instant Launch hotkey is pressed. However, the event code for that hotkey on this machine is 0xe029, so add it to the legacy keymap. Signed-off-by: Michał Kępień Tested-by: Darek Stojaczyk Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 13f5059ac5a6b8a824f8657e2fcf084ebecef896 Author: Michał Kępień Date: Fri Mar 4 14:09:09 2016 +0100 dell-wmi: properly process Dell Instant Launch hotkey On models on which an SMBIOS request needs to be issued in order for WMI events to be generated, pressing the Dell Instant Launch hotkey does not raise an i8042 interrupt - only a WMI event is generated (0xe025 on Dell Vostro V131). As that WMI event is the only way the kernel will be notified about pressing the Dell Instant Launch hotkey on such machines, the relevant keymap entry has to be changed to a KE_KEY one. However, the same WMI event should still be ignored on machines which do not require an SMBIOS request for enabling WMI, so filter it conditionally in dell_wmi_process_key(). Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e09c4d5b15438bd86ff8bfb05d70f17915bb5979 Author: Michał Kępień Date: Fri Mar 4 14:09:08 2016 +0100 dell-wmi: enable receiving WMI events on Dell Vostro V131 On some laptop models (e.g. Dell Vostro V131), WMI events are not generated until a specific SMBIOS request is issued to register an event listener [1]. As there seems to be no ACPI method or SMBIOS request to determine without possible side effects whether a given machine needs to issue this SMBIOS request in order to receive WMI events, DMI matching is used to whitelist the models which need it. [1] https://lists.us.dell.com/pipermail/libsmbios-devel/2015-July/000612.html Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/dell-wmi.c | 66 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 0db2180fce6ada548f03c4f456ba2113753cdba9 Author: Michał Kępień Date: Fri Mar 4 14:09:07 2016 +0100 dell-smbios: rename dell_smi_error() to dell_smbios_error() As dell_smi_error() is exported by dell-smbios, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_error(). Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 16 ++++++++-------- drivers/platform/x86/dell-smbios.c | 4 ++-- drivers/platform/x86/dell-smbios.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit e8edf53b198f5656d5ae99685bc6c1f616662b3d Author: Michał Kępień Date: Fri Mar 4 14:09:06 2016 +0100 dell-laptop: move dell_smi_error() to dell-smbios The dell_smi_error() method could be used by modules other than dell-laptop for convenient translation of SMBIOS request errors into errno values. Thus, move it to dell-smbios. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 14 -------------- drivers/platform/x86/dell-smbios.c | 16 ++++++++++++++++ drivers/platform/x86/dell-smbios.h | 2 ++ 3 files changed, 18 insertions(+), 14 deletions(-) commit 4db9675d927a71faa66e5ab128d2390d6329750b Author: John Dahlstrom Date: Sat Feb 27 00:09:58 2016 -0600 ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list Some Lenovo ideapad models lack a physical rfkill switch. On Lenovo models ideapad Y700 Touch-15ISK and ideapad Y700-15ISK, ideapad-laptop would wrongly report all radios as blocked by hardware which caused wireless network connections to fail. Add these models without an rfkill switch to the no_hw_rfkill list. Signed-off-by: John Dahlstrom Cc: # 3.17.x-: 4fa9dab: ideapad_laptop: Lenovo G50-30 fix rfkill reports wireless blocked Cc: Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b5df36cf474cc84028bee05f153a925d8243215f Author: Michał Kępień Date: Wed Feb 24 14:23:32 2016 +0100 fujitsu-laptop: Support radio toggle button Lifebook E734/E744/E754 has a radio toggle button which uses code 0x420. Map it to KEY_RFKILL. Signed-off-by: Michał Kępień Acked-by: Jonathan Woithe Signed-off-by: Darren Hart drivers/platform/x86/fujitsu-laptop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e8b69a51b4e72a168e8b3bc5fcac39a7de339864 Author: Wolfram Sang Date: Sun Feb 21 15:22:27 2016 +0100 intel-hid: allocate correct amount of memory for private struct We want the size of the struct, not of a pointer to it. To be future proof, just dereference the pointer to get the desired type. Signed-off-by: Wolfram Sang Signed-off-by: Darren Hart drivers/platform/x86/intel-hid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f52ab44fb748537e4e757d5cdb0a79ab847630c7 Author: Paul Gortmaker Date: Sun Feb 14 15:00:52 2016 -0500 platform/x86: Make intel_scu_ipc explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/platform/x86/Kconfig:config INTEL_SCU_IPC drivers/platform/x86/Kconfig: bool "Intel SCU IPC 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 priority as builtin_pci_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. 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 is already contained at the top of the file in the comments. Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Darren Hart drivers/platform/x86/intel_scu_ipc.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) commit 1f1ae997fd47d058522f32b91059111dbc4a2b54 Author: Qipeng Zha Date: Thu Feb 18 02:03:38 2016 +0800 intel_pmc_ipc: Avoid pending IPC1 command during legacy suspend During legacy suspend flow, IPC1 commands are being requested from opregion driver. But the PMC_IPC1 command will timeout as example: [ 281.444600] ipc_debug##: ipc_send_command: cmd=0x201ff, [ 281.444648] wbuf[0]=0x4ea6 [ 281.444668] wbuf[1]=0x0 [ 281.444674] wbuf[2]=0x0 [ 281.444676] wbuf[3]=0x0 [ 284.446467] pmc-ipc-plat INT34D2:00: IPC timed out, TS=0x4, CMD=0x200ff This is because before the opregion driver could send IPC1 commands, the PMC_IPC irq is already suspended. Which makes the IPC command to timeout. Solution: register pmc_ipc irq as IRQF_NO_SUSPEND Signed-off-by: Ananth Krishna R Signed-off-by: Bharath K Veera Signed-off-by: Qipeng Zha Acked-by: Andy Shevchenko Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a2f25d5e73f4f1ae985801a05ed37bbe0ea11f3 Author: Qipeng Zha Date: Thu Feb 18 02:03:37 2016 +0800 intel_pmc_ipc: Fix GCR register base address and length GCR register (pmc_cfg register) is at offset 0x1008, and remapping of 0x4 bytes is enough. Signed-off-by: Francois-Nicolas Muller Signed-off-by: Qipeng Zha Acked-by: Andy Shevchenko Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4670768779876c0a9071c026ddabe1ab8e6c7805 Author: Oleksandr Natalenko Date: Wed Feb 17 13:35:46 2016 +0200 asus-nb-wmi: add wapf=4 quirk for ASUS X75VD Wi-Fi on ASUS X75VD laptop does not work unless asus_nb_wmi module is loaded with wapf=4 option. Add quirk for this. Signed-off-by: Oleksandr Natalenko Signed-off-by: Darren Hart drivers/platform/x86/asus-nb-wmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 479f3b62d6d05cf74427f61fbd92b1a54c8645aa Author: Souvik Kumar Chakravarty Date: Wed Feb 17 12:05:22 2016 +0530 intel_telemetry_pltdrv: Change verbosity control bits Due to a recent fix in the firmware, the Punit verbosity control bits now adhere to the correct pattern. Hence remove the workaround and do a read-modify-write of the register. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart drivers/platform/x86/intel_telemetry_pltdrv.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 4d340c6b9cc7e6e5f6ad4fc27e837863015cdf5b Author: Andy Lutomirski Date: Mon Feb 15 08:32:37 2016 -0800 dell-rbtn: Add a comment about the XPS 13 9350 On the XPS 13 9350, the dell-rbtn mechanism has a new device id, and the DSDT turns it off if a new enough _OSI is supported. Add a comment about why we don't bother supporting it. Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-rbtn.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a464afb9581f6a9eabce8a4aa0c70cb71e6bf4d9 Author: Andy Lutomirski Date: Mon Feb 15 08:32:36 2016 -0800 dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake) The XPS 13 9350 sends WMI keypress events that aren't enumerated in the DMI table. Add a table listing them. To avoid breaking things that worked before, these un-enumerated hotkeys won't be used if the DMI table maps them to something else. FWIW, it appears that the DMI table may be a legacy thing and we might want to rethink how we handle events in general. As an example, a whole lot of things map to KEY_PROG3 via the DMI table. This doesn't send keypress events for any of the new events. They appear to all be handled by other means (keyboard illumination is handled automatically and rfkill is handled by intel-hid). Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 71 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 7 deletions(-) commit b13de7019c1b67f0c1b987fc9fe82fcc371ba1d2 Author: Andy Lutomirski Date: Mon Feb 15 08:32:35 2016 -0800 dell-wmi: Clean up hotkey table size check Checking the table for a minimum size of 7 bytes makes no sense: any valid hotkey table has a size that's a multiple of 4. Clean this up: replace the hardcoded header length with a sizeof and change the check to ignore an empty hotkey table. The only behavior change is that a 7-byte table (which is nonsensical) will now be treated as absent instead of as valid but empty. Reported-by: Jean Delvare Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit a570af4850043260b87fb1b8aa27a4484e648878 Author: Andy Lutomirski Date: Mon Feb 15 08:32:34 2016 -0800 dell-wmi, dell-laptop: depends DMI dell-wmi and dell-laptop will compile but won't work right if DMI isn't selected. Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár [arnd: Use depends instead of selects to avoid recursive dependencies] Signed-off-by: Arnd Bergmann Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 18b6f80f5095036bd2204c54c89a5a0f5a785e3d Author: Andy Lutomirski Date: Mon Feb 15 08:32:33 2016 -0800 dell-wmi: Stop storing pointers to DMI tables The dmi_walk function maps the DMI table, walks it, and unmaps it. This means that the dell_bios_hotkey_table that find_hk_type stores points to unmapped memory by the time it gets read. I've been able to trigger crashes caused by the stale pointer a couple of times, but never on a stock kernel. Fix it by generating the keymap in the dmi_walk callback instead of storing a pointer. Signed-off-by: Andy Lutomirski Acked-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 74 +++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 28 deletions(-) commit 0c41a08e131d753af48ae6f052aed8d530b9c976 Author: Michał Kępień Date: Fri Jan 22 15:27:28 2016 +0100 dell-led: use dell_smbios_send_request() for performing SMBIOS calls Instead of using the WMI wrapper, dell-led can take advantage of dell_smbios_send_request() for performing the SMBIOS calls required to change the state of the microphone LED. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Acked-by: Jacek Anaszewski Signed-off-by: Darren Hart drivers/leds/dell-led.c | 65 +++++-------------------------------------------- 1 file changed, 6 insertions(+), 59 deletions(-) commit cf0d7ea335966744f2a4fc6f882165b7dba54c15 Author: Michał Kępień Date: Fri Jan 22 15:27:27 2016 +0100 dell-led: use dell_smbios_find_token() for finding mic DMI tokens With the advent of dell_smbios_find_token(), dell-led does not need to perform any DMI walking on its own, but it can rather ask dell-smbios to look up the DMI tokens it needs for changing the state of the microphone LED. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Acked-by: Jacek Anaszewski Signed-off-by: Darren Hart drivers/leds/Kconfig | 1 + drivers/leds/dell-led.c | 63 +++++++------------------------------------------ 2 files changed, 10 insertions(+), 54 deletions(-) commit b7bca2d7ff1a232466fa5447ec27e62bf02b310f Author: Michał Kępień Date: Fri Jan 22 15:27:26 2016 +0100 dell-smbios: make da_tokens static As dell-laptop has been changed to use dell_smbios_find_token() instead of directly accessing members of the da_tokens table, the latter can be marked static. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-smbios.c | 3 +-- drivers/platform/x86/dell-smbios.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit 73511ff30c6dc5347ede4c2a2fa5ab22fae3f152 Author: Michał Kępień Date: Fri Jan 22 15:27:25 2016 +0100 dell-smbios: remove find_token_{id,location}() As dell-laptop has been changed to use dell_smbios_find_token() instead of find_token_id() and find_token_location(), these functions can be safely removed. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-smbios.c | 25 ------------------------- drivers/platform/x86/dell-smbios.h | 3 --- 2 files changed, 28 deletions(-) commit f951d6e6faedcead91419b785f73a620d8ed191a Author: Michał Kępień Date: Fri Jan 22 15:27:24 2016 +0100 dell-laptop: use dell_smbios_find_token() instead of find_token_location() Replace all uses of find_token_location() with dell_smbios_find_token() to avoid directly accessing the da_tokens table. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 63c4029bdfc220ec3a1fa9135f5db3bdcd93b502 Author: Michał Kępień Date: Fri Jan 22 15:27:23 2016 +0100 dell-laptop: use dell_smbios_find_token() instead of find_token_id() Replace all uses of find_token_id() with dell_smbios_find_token() to avoid directly accessing the da_tokens table. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 96f7ef90cc373f805a38f2a3e96a8b1948706954 Author: Michał Kępień Date: Fri Jan 22 15:27:22 2016 +0100 dell-smbios: implement new function for finding DMI table 0xDA tokens Ultimately, the da_tokens table should not be exported from dell-smbios. Currently, in some cases, dell-laptop accesses that table's members directly, so implement a new function, dell_smbios_find_token(), which returns a pointer to an entry inside the da_tokens table with the given token ID (or NULL if it is not found). Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-smbios.c | 13 +++++++++++++ drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 15 insertions(+) commit 92ebd0d1a80930c52eb091d497d4527c4fe556ca Author: Michał Kępień Date: Fri Jan 22 15:27:21 2016 +0100 dell-smbios: make the SMBIOS buffer static As dell-laptop has been changed to always retrieve a pointer to the SMBIOS buffer using dell_smbios_get_buffer(), the SMBIOS buffer can be marked static. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-smbios.c | 3 +-- drivers/platform/x86/dell-smbios.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit bc2104c27aad0c988d23c6abcd46f3313618bdbb Author: Michał Kępień Date: Fri Jan 22 15:27:20 2016 +0100 dell-smbios: return the SMBIOS buffer from dell_smbios_get_buffer() Ultimately, the SMBIOS buffer should not be exported from dell-smbios. Currently, dell-laptop accesses it directly using a global variable, so make dell_smbios_get_buffer() return a pointer to the SMBIOS buffer and replace all uses of the global variable with local variables. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 49 +++++++++++++++++++++++++------------- drivers/platform/x86/dell-smbios.c | 3 ++- drivers/platform/x86/dell-smbios.h | 2 +- 3 files changed, 35 insertions(+), 19 deletions(-) commit c42831c8a9db32a5a0e2c6c31042014039f11739 Author: Michał Kępień Date: Fri Jan 22 15:27:19 2016 +0100 dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request() An SMBIOS buffer pointer does not need to be returned by dell_smbios_send_request(), because SMBIOS call results are stored in the buffer exported by the module. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-smbios.c | 5 +---- drivers/platform/x86/dell-smbios.h | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) commit 17070f242aa989c33b227e61ea060f768a77f2dc Author: Michał Kępień Date: Fri Jan 22 15:27:18 2016 +0100 dell-smbios: don't pass an SMBIOS buffer to dell_smbios_send_request() Passing an SMBIOS buffer pointer to dell_smbios_send_request() is redundant as it should always operate on the SMBIOS buffer exported from the module. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 42 +++++++++++++++++++------------------- drivers/platform/x86/dell-smbios.c | 3 +-- drivers/platform/x86/dell-smbios.h | 3 +-- 3 files changed, 23 insertions(+), 25 deletions(-) commit 2f262136159fedceb45b42336ae53f20bc0ff714 Author: Michał Kępień Date: Fri Jan 22 15:27:17 2016 +0100 dell-smbios: rename dell_send_request() to dell_smbios_send_request() As dell_send_request() is exported from the module, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_send_request(). Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 42 +++++++++++++++++++------------------- drivers/platform/x86/dell-smbios.c | 6 +++--- drivers/platform/x86/dell-smbios.h | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) commit cb16176380cca991dba162952941ad04ae760d0e Author: Michał Kępień Date: Fri Jan 22 15:27:16 2016 +0100 dell-smbios: rename release_buffer() to dell_smbios_release_buffer() As release_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 28 ++++++++++++++-------------- drivers/platform/x86/dell-smbios.c | 4 ++-- drivers/platform/x86/dell-smbios.h | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) commit b6aa7e1817a35b93550283707dc93c98d41813eb Author: Michał Kępień Date: Fri Jan 22 15:27:15 2016 +0100 dell-smbios: rename clear_buffer() to dell_smbios_clear_buffer() As clear_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 12 ++++++------ drivers/platform/x86/dell-smbios.c | 6 +++--- drivers/platform/x86/dell-smbios.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit ee83c475415edd48b0739bee230b75454b82199e Author: Michał Kępień Date: Fri Jan 22 15:27:14 2016 +0100 dell-smbios: rename get_buffer() to dell_smbios_get_buffer() As get_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár Signed-off-by: Darren Hart drivers/platform/x86/dell-laptop.c | 26 +++++++++++++------------- drivers/platform/x86/dell-smbios.c | 4 ++-- drivers/platform/x86/dell-smbios.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) commit 2f9f26bd8614740b3c3b950394d945a99492a28e Author: Michał Kępień Date: Fri Jan 22 15:27:13 2016 +0100 dell-laptop: extract SMBIOS-related code to a separate module Extract SMBIOS-related code from dell-laptop to a new kernel module, dell-smbios. The static specifier is removed from exported symbols, otherwise code is just moved around. Signed-off-by: Michał Kępień Reviewed-by: Pali Rohár [dvhart: Include linux/io.h in dell-smbios.c as caught by lkp] Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 12 ++- drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-laptop.c | 163 +------------------------------ drivers/platform/x86/dell-smbios.c | 194 +++++++++++++++++++++++++++++++++++++ drivers/platform/x86/dell-smbios.h | 50 ++++++++++ 5 files changed, 257 insertions(+), 163 deletions(-) commit 7faa6a37fa106cb0cad6203e8fc2aea646cb253a Author: Azael Avalos Date: Mon Jan 25 12:52:18 2016 -0700 toshiba_acpi: Add a module parameter to disable hotkeys registration Some laptop models have working hotkeys without the need of the driver to activate them. This patch adds a module parameter to tell the driver not to register the hotkeys. The new parameter is useful in DE less installations or where the DE does not handle the hotkeys (see bug 99501). Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 33f857a441f05b68a55e1f6b3ecf1ea82d6633a4 Author: Azael Avalos Date: Mon Jan 25 11:29:53 2016 -0700 Documentation/ABI: Update sysfs-driver-toshiba_acpi file This patch updates the documentation file adding the Cooling Method entry. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart Documentation/ABI/testing/sysfs-driver-toshiba_acpi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b1009b919b4061293f4a5e68210ccbc6d3f33a99 Author: Azael Avalos Date: Mon Jan 25 11:29:11 2016 -0700 toshiba_acpi: Add sysfs entries for the Cooling Method feature This patch adds the sysfs entry Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 763ff32f19442b952406d4ac1ec1fb19733d23be Author: Azael Avalos Date: Mon Jan 25 11:29:10 2016 -0700 toshiba_acpi: Add support for cooling method feature This patch adds support to query and set the "Cooling Method" feature, which basically changes how the system fan behaves, depending on the supported cooling methods. Depending on the laptop model, these are the (so far...) available cooling methods: - Maximum Performance - Performance - Battery Optimized Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 15c75626f0999cce8357c8bf8578247134032acb Author: Eric Curtin Date: Sat Jan 30 16:55:59 2016 +0000 thinkpad_acpi: Remove ambiguous logging for "Unsupported brightness interface" "Unsupported brightness interface" message gets logged on machines that are well supported. Signed-off-by: Eric Curtin Acked-by: Henrique de Moraes Holschuh Signed-off-by: Darren Hart drivers/platform/x86/thinkpad_acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 922201d129c8f9d0c3207dca90ea6ffd8e2242f0 Author: David Rivshin Date: Fri Jan 29 23:26:54 2016 -0500 pwm: omap-dmtimer: Add debug message for effective period and duty cycle After going through the math and constraints checking to compute load and match values, it is helpful to know what the resultant period and duty cycle are. Signed-off-by: David Rivshin Acked-by: Neil Armstrong Signed-off-by: Thierry Reding drivers/pwm/pwm-omap-dmtimer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7b0883f33809ff0aeca9848193c31629a752bb77 Author: David Rivshin Date: Fri Jan 29 23:26:53 2016 -0500 pwm: omap-dmtimer: Round load and match values rather than truncate When converting period and duty_cycle from nanoseconds to fclk cycles, the error introduced by the integer division can be appreciable, especially in the case of slow fclk or short period. Use DIV_ROUND_CLOSEST_ULL() so that the error is kept to +/- 0.5 clock cycles. Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin Acked-by: Neil Armstrong Signed-off-by: Thierry Reding drivers/pwm/pwm-omap-dmtimer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit cd378881426379a62a7fe67f34b8cbe738302022 Author: David Rivshin Date: Fri Jan 29 23:26:52 2016 -0500 pwm: omap-dmtimer: Add sanity checking for load and match values Add sanity checking to ensure that we do not program load or match values that are out of range if a user requests period or duty_cycle values which are not achievable. The match value cannot be less than the load value (but can be equal), and neither can be 0xffffffff. This means that there must be at least one fclk cycle between load and match, and another between match and overflow. Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin Acked-by: Neil Armstrong [thierry.reding@gmail.com: minor coding style cleanups] Signed-off-by: Thierry Reding drivers/pwm/pwm-omap-dmtimer.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit f8caa792261c0edded20eba2b8fcc899a1b91819 Author: David Rivshin Date: Fri Jan 29 23:26:51 2016 -0500 pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations Fix the calculation of load_value and match_value. Currently they are slightly too low, which produces a noticeably wrong PWM rate with sufficiently short periods (i.e. when 1/period approaches clk_rate/2). Example: clk_rate=32768Hz, period=122070ns, duty_cycle=61035ns (8192Hz/50% PWM) Correct values: load = 0xfffffffc, match = 0xfffffffd Current values: load = 0xfffffffa, match = 0xfffffffc effective PWM: period=183105ns, duty_cycle=91553ns (5461Hz/50% PWM) Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin Acked-by: Neil Armstrong Tested-by: Adam Ford Signed-off-by: Thierry Reding drivers/pwm/pwm-omap-dmtimer.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit c5857e3f94ab2719dfac649a146cb5dd6f21fcf3 Author: Vladimir Zapolskiy Date: Sun Mar 6 03:21:46 2016 +0200 pwm: brcmstb: Fix check of devm_ioremap_resource() return code The change fixes potential oops while accessing iomem on invalid address if devm_ioremap_resource() fails due to some reason. The devm_ioremap_resource() function returns ERR_PTR() and never returns NULL, which makes useless a following check for NULL. Signed-off-by: Vladimir Zapolskiy Fixes: 3a9f5957020f ("pwm: Add Broadcom BCM7038 PWM controller support") Acked-by: Florian Fainelli Signed-off-by: Thierry Reding drivers/pwm/pwm-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03d99531aed486f9e7020da3810102df1b91cd34 Author: Simon Horman Date: Thu Feb 25 10:03:23 2016 +0900 pwm: rcar: Depend on ARCH_RENESAS instead of ARCH_SHMOBILE This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e47b5981a30e856c9c4aba785890528486d1594 Author: Wolfram Sang Date: Wed Mar 2 23:57:09 2016 +0100 pwm: lpc18xx-sct: Test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate(), so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang Acked-by: Joachim Eastwood Signed-off-by: Thierry Reding drivers/pwm/pwm-lpc18xx-sct.c | 5 +++++ 1 file changed, 5 insertions(+) commit bea307c16a3a297f87c7ab9a54de686da2afbad5 Author: Wolfram Sang Date: Wed Mar 2 23:33:34 2016 +0100 pwm: img: Test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate(), so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang Signed-off-by: Thierry Reding drivers/pwm/pwm-img.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2acd846485549655582ee379ceb966206f91e6f8 Author: Arnd Bergmann Date: Thu Mar 17 11:03:50 2016 +0100 rtlwifi: fix gcc-6 indentation warning The rtl8821ae_dm_txpower_tracking_callback_thermalmeter function contains a call to RT_TRACE() that is indented in a misleading way, as pointed out by a gcc-6 warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c: In function 'rtl8821ae_dm_txpower_tracking_callback_thermalmeter': drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2491:4: error: statement is indented as if it were guarded by... RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, ^~~~~~~~ drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2488:3: note: ...this 'for' clause, but it is not for (p = RF90_PATH_A; p < MAX_PATH_NUM_8821A; p++) ^~~ It is clear from the context that the call was not meant to be part of the loop and only the indentation is wrong, so this removes the extra tabs. Signed-off-by: Arnd Bergmann Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c58d900cc96a5106e2feaed8d3d7361669a91396 Author: Arnd Bergmann Date: Thu Mar 17 10:20:20 2016 +0100 bcma: fix building without OF_IRQ The bcma driver core can be built with or without DT support, but it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which can happen on platforms that do not support IRQ domains. ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined! ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined! ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined! This adds another compile-time check for OF_IRQ, but also gets rid of now unneeded #ifdef checks: Using the simpler IS_ENABLED() check for OF_IRQ also covers the case of not having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS was added to allow building on architectures without OF_ADDRESS, but that has been addressed already in b1d06b60e90c ("of: Provide static inline function for of_translate_address if needed"). Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/bcma/main.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 372f7d6ac11235a69b2cb356cdc8bf67bd68f4c4 Author: Jia-Ju Bai Date: Fri Mar 11 22:44:37 2016 +0530 b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init The memory allocated by kzalloc in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init is not freed. This patch fixes the bug by adding kfree in b43_ssb_remove, b43_bcma_remove and error handling code of b43_bcma_probe. Thanks Michael for his suggestion. Signed-off-by: Jia-Ju Bai Acked-by: Michael Büsch Signed-off-by: Sudip Mukherjee Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e476343860f8a4249106c4cae3d9a71fa1611fab Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 12:32:31 2016 -0300 perf tools: Simplify die() mechanism This should die altogether, but for now lets remove a bit of this stuff, as it is not used at all. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ade3n99xscldhg5mx2vzd8p3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/usage.c | 8 +------- tools/perf/util/util.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) commit 236f71eb94eb3dc5161bcd9310805ae6bd444ce0 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 12:28:59 2016 -0300 perf tools: Remove unused DIE_IF macro Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-elxg25jd4dhwod4wqbko87qh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 7 ------- 1 file changed, 7 deletions(-) commit 119a0a3c13ef5ffe78dc0c1a55c5da9e377b2976 Author: Helge Deller Date: Wed Mar 23 16:22:42 2016 +0100 parisc: Wire up preadv2 and pwritev2 syscalls Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/unistd.h | 4 +++- arch/parisc/kernel/syscall_table.S | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit a3dff304ca50cbfbe3f0e76ee49c439990932ed5 Author: Arnaldo Carvalho de Melo Date: Wed Mar 23 11:55:24 2016 -0300 perf script: Remove lots of unused arguments Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit c2740a87ca989ca42b0c078e021654e247a08311 Author: Arnaldo Carvalho de Melo Date: Tue Mar 22 18:44:46 2016 -0300 perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Since none of the perf_event fields are used anymore, just the perf_sample ones, and since this resolves to (map, symbol) from data structures within struct thread, rename it to thread__resolve and make the argument ordering similar to the one in machine__resolve(). Cc: Adrian Hunter Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Ravi Bangoria Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2b33hs9bp550tezzlhl4kejh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 4 ++-- tools/perf/util/db-export.c | 2 +- tools/perf/util/event.c | 6 ++---- tools/perf/util/event.h | 6 ++---- 4 files changed, 7 insertions(+), 11 deletions(-) commit bb3eb56622d1b5932a7708d0af5f3b00f12817b6 Author: Arnaldo Carvalho de Melo Date: Tue Mar 22 18:39:09 2016 -0300 perf machine: Rename perf_event__preprocess_sample to machine__resolve Since we only deal with fields in the passed struct perf_sample move this method to struct machine, that is where the perf_sample fields will be resolved to a struct addr_location, i.e. thread, map, symbol, etc. Cc: Adrian Hunter Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Ravi Bangoria Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-a1ww2lbm2vbuqsv4p7ilubu9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-mem.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-timechart.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/tests/hists_cumulate.c | 8 +------- tools/perf/tests/hists_filter.c | 8 +------- tools/perf/tests/hists_link.c | 19 +++---------------- tools/perf/tests/hists_output.c | 8 +------- tools/perf/util/event.c | 6 ++---- tools/perf/util/event.h | 6 ++---- 13 files changed, 17 insertions(+), 52 deletions(-) commit 473398a21d28c089555117a8db4ea04e371dd03c Author: Arnaldo Carvalho de Melo Date: Tue Mar 22 18:23:43 2016 -0300 perf tools: Add cpumode to struct perf_sample To avoid parsing event->header.misc in many locations. This will also allow setting perf.sample.{ip,cpumode} in a single place, from tracepoint fields, as needed by 'perf kvm' with PPC guests, where the guest hardware counters is not available at the host. Cc: Adrian Hunter Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Ravi Bangoria Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-qp3yradhyt6q3wl895b1aat0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 5 +---- tools/perf/builtin-script.c | 7 +++---- tools/perf/builtin-top.c | 5 +---- tools/perf/builtin-trace.c | 9 ++++----- tools/perf/tests/code-reading.c | 5 +---- tools/perf/tests/hists_common.c | 6 ++++-- tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + tools/perf/util/build-id.c | 3 +-- tools/perf/util/event.c | 15 ++++++--------- tools/perf/util/event.h | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/machine.c | 14 ++++++-------- tools/perf/util/session.c | 5 ++--- 16 files changed, 35 insertions(+), 45 deletions(-) commit eb9f03231b7a27999abe22d3c5f71700338630c6 Author: Arnaldo Carvalho de Melo Date: Tue Mar 22 19:00:43 2016 -0300 perf tests: Forward the perf_sample in the dwarf unwind test It _will_ be used, no sense in receiving it and nor fowarding it along. Cc: Adrian Hunter Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Ravi Bangoria Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ht8v5et209wuoh5o6nh9pzyq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/dwarf-unwind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8f8eb84f4834b5232faf57559adbc80dbcf85da Author: Arnaldo Carvalho de Melo Date: Tue Mar 22 13:09:37 2016 -0300 perf tools: Remove misplaced __maybe_unused All over the tree. Cc: David Ahern cc: Jiri Olsa Cc: Namhyung Kim Cc: Ravi Bangoria Link: http://lkml.kernel.org/n/tip-8nzhnokxyp8y4v7gf0j00oyb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/bench.h | 2 +- tools/perf/builtin-inject.c | 3 +-- tools/perf/builtin-script.c | 2 +- tools/perf/ui/gtk/hists.c | 2 +- tools/perf/util/annotate.h | 2 +- tools/perf/util/auxtrace.h | 2 +- tools/perf/util/data-convert-bt.c | 2 +- tools/perf/util/dso.h | 2 +- tools/perf/util/header.h | 2 +- tools/perf/util/hist.c | 2 +- tools/perf/util/hist.h | 3 +-- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/machine.h | 2 +- tools/perf/util/sort.c | 2 +- tools/perf/util/stat-shadow.c | 18 ++++++++---------- 15 files changed, 22 insertions(+), 26 deletions(-) commit 0de798584bdedfdad19db21e3c7aec84f252f4f3 Author: Helge Deller Date: Wed Mar 23 16:00:46 2016 +0100 parisc: Use generic extable search and sort routines Switch to the generic extable search and sort routines which were introduced with commit a272858 from Ard Biesheuvel. This saves quite some memory in the vmlinux binary with the 64bit kernel. Signed-off-by: Helge Deller arch/parisc/Kconfig | 1 + arch/parisc/include/asm/assembly.h | 2 +- arch/parisc/include/asm/uaccess.h | 7 ++++--- arch/parisc/mm/fault.c | 9 ++------- scripts/sortextable.c | 1 + 5 files changed, 9 insertions(+), 11 deletions(-) commit c95a23da2ea5328ba467ea1a57e2915b1fb19376 Author: Aaro Koskinen Date: Wed Mar 9 22:08:43 2016 +0200 parisc: Panic immediately when panic_on_oops PA-RISC 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 Acked-by: Helge Deller Signed-off-by: Helge Deller arch/parisc/kernel/traps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6c31da3464b4d28825d1827ee41a3a217b2dcf0e Author: Helge Deller Date: Sat Mar 19 17:54:10 2016 +0100 parisc,metag: Implement CONFIG_DEBUG_STACK_USAGE option On parisc and metag the stack grows upwards, so for those we need to scan the stack downwards in order to calculate how much stack a process has used. Tested on a 64bit parisc kernel. Signed-off-by: Helge Deller include/linux/sched.h | 8 ++++++++ lib/Kconfig.debug | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit 56649be9e67c17b4030fcc91ed6e1accc8e6918d Author: Helge Deller Date: Sun Mar 20 12:20:31 2016 +0100 parisc: Drop alloc_hugepages and free_hugepages syscalls The system calls alloc_hugepages() and free_hugepages() were introduced in Linux 2.5.36 and removed again in 2.5.54. They were never implemented on parisc, so let's drop them now. Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/unistd.h | 4 ++-- arch/parisc/kernel/sys_parisc.c | 10 ---------- arch/parisc/kernel/syscall_table.S | 4 ++-- 3 files changed, 4 insertions(+), 14 deletions(-) commit 83a9efb5b8170b7cffef4f62656656e1d8ad2ccd Author: Bobi Mihalca Date: Wed Mar 23 13:32:33 2016 +0200 ALSA: hda - Apply fix for white noise on Asus N550JV, too Apply the new fixup that is used for ASUS N750JV to another similar model, N500JV, too, for reducing the headphone noise. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115181 Signed-off-by: Bobi Mihalca Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d4dc5840f93bcb002fa311693349deae7702bc5 Author: Bobi Mihalca Date: Wed Mar 23 13:26:11 2016 +0200 ALSA: hda - Fix white noise on Asus N750JV headphone For reducing the noise from the headphone output on ASUS N750JV, call the existing fixup, alc_fixup_auto_mute_via_amp(), additionally. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115181 Signed-off-by: Bobi Mihalca Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 70cf2cbd685e218c3ffd105d9fb6cf0f8d767481 Author: Bobi Mihalca Date: Wed Mar 23 13:23:55 2016 +0200 ALSA: hda - Asus N750JV external subwoofer fixup ASUS N750JV needs the same fixup as N550 for enabling its subwoofer. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115181 Signed-off-by: Bobi Mihalca Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 9f9f8b863ad130ec0c25f378bdbad64ba71291de Author: Mark Brown Date: Wed Mar 23 12:13:12 2016 +0000 regmap: mmio: Fix value endianness selection Currently when selecting value endianness we check the register endiannes, not the value endianness. Reported-by: Alexander Stein Tested-by: Alexander Stein Signed-off-by: Mark Brown drivers/base/regmap/regmap-mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3525e0aac91c4de5d20b1f22a6c6e2b39db3cc96 Author: Akinobu Mita Date: Tue Mar 22 01:00:21 2016 +0900 spi: omap2-mcspi: fix dma transfer for vmalloced buffer Currently omap2-mcspi cannot handle dma transfer for vmalloced buffer. I hit this problem when using mtdblock on spi-nor. This lets the SPI core handle the page mapping for dma transfer buffer. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 62 ++++++++++++------------------------------- 1 file changed, 17 insertions(+), 45 deletions(-) commit c130423620331a104492bbbcc49f25125e26a21a Merge: 988faa73 dfe97ad Author: Linus Torvalds Date: Wed Mar 23 06:12:39 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: API: - Fix kzalloc error path crash in ecryptfs added by skcipher conversion. Note the subject of the commit is screwed up and the correct subject is actually in the body. Drivers: - A number of fixes to the marvell cesa hashing code. - Remove bogus nested irqsave that clobbers the saved flags in ccp" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: marvell/cesa - forward devm_ioremap_resource() error code crypto: marvell/cesa - initialize hash states crypto: marvell/cesa - fix memory leak crypto: ccp - fix lock acquisition code eCryptfs: Use skcipher and shash commit 988faa7312b490c8a9e7fcdca434c6bf3f3af97b Merge: 33c1f63 aace66b Author: Linus Torvalds Date: Wed Mar 23 06:09:15 2016 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull more mailbox updates from Jassi Brar: "Device tree bindings and driver for TI's Message-Manager controller. Due to some last minute cosmetic changes, the driver was not included in the first pull request, otherwise the driver has been reviewed twice" * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Introduce TI message manager driver Documentation: dt: mailbox: Add TI Message Manager commit 33c1f638a0feda92ffcb507c302482a5e6158a87 Merge: a24e3d4 4d3ac66 Author: Linus Torvalds Date: Wed Mar 23 06:06:45 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: "The clk changes for this release cycle are mostly dominated by new device support in terms of LoC, but there has been some cleanup in the core as well as the usual minor clk additions to various drivers. Core: - parent tracking has been simplified - CLK_IS_ROOT is now a no-op flag, cleaning up drivers has started - of_clk_init() doesn't consider disabled DT nodes anymore - clk_unregister() had an error path bug squashed - of_clk_get_parent_count() has been fixed to only return unsigned ints - HAVE_MACH_CLKDEV is removed now that the last arch user (ARM) is gone New Drivers: - NXP LPC18xx creg - QCOM IPQ4019 GCC - TI dm814x ADPLL - i.MX6QP Updates: - Cyngus audio clks found on Broadcom iProc devices - Non-critical fixes for BCM2385 PLLs - Samsung exynos5433 updates for clk id errors, HDMI support, suspend/resume simplifications - USB, CAN, LVDS, and FCP clks on shmobile devices - sunxi got support for more clks on new SoCs and went through a minor refactoring/rewrite to use a simpler factor clk construct - rockchip added some more clk ids and added suport for fraction dividers - QCOM GDSCs in msm8996 - A new devm helper to make adding custom actions simpler (acked by Greg)" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (197 commits) clk: bcm2835: fix check of error code returned by devm_ioremap_resource() clk: renesas: div6: use RENESAS for #define clk: renesas: Rename header file renesas.h clk: max77{686,802}: Remove CLK_IS_ROOT clk: versatile: Remove CLK_IS_ROOT clk: sunxi: Remove use of variable length array clk: fixed-rate: Remove CLK_IS_ROOT clk: qcom: Remove CLK_IS_ROOT doc: dt: add documentation for lpc1850-creg-clk driver clk: add lpc18xx creg clk driver clk: lpc32xx: fix compilation warning clk: xgene: Add missing parenthesis when clearing divider value clk: mb86s7x: Remove CLK_IS_ROOT clk: x86: Remove clkdev.h and clk.h includes clk: x86: Remove CLK_IS_ROOT clk: mvebu: Remove CLK_IS_ROOT clk: renesas: move drivers to renesas directory clk: si5{14,351,70}: Remove CLK_IS_ROOT clk: scpi: Remove CLK_IS_ROOT clk: s2mps11: Remove CLK_IS_ROOT ... commit e54358915d0a00399c11c2c23ae1be674cba188a Author: Nicolai Stange Date: Sun Mar 20 23:23:46 2016 +0100 PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument Despite what the DocBook comment to pkcs7_validate_trust() says, the *_trusted argument is never set to false. pkcs7_validate_trust() only positively sets *_trusted upon encountering a trusted PKCS#7 SignedInfo block. This is quite unfortunate since its callers, system_verify_data() for example, depend on pkcs7_validate_trust() clearing *_trusted on non-trust. Indeed, UBSAN splats when attempting to load the uninitialized local variable 'trusted' from system_verify_data() in pkcs7_validate_trust(): UBSAN: Undefined behaviour in crypto/asymmetric_keys/pkcs7_trust.c:194:14 load of value 82 is not a valid value for type '_Bool' [...] Call Trace: [] dump_stack+0xbc/0x117 [] ? _atomic_dec_and_lock+0x169/0x169 [] ubsan_epilogue+0xd/0x4e [] __ubsan_handle_load_invalid_value+0x111/0x158 [] ? val_to_string.constprop.12+0xcf/0xcf [] ? x509_request_asymmetric_key+0x114/0x370 [] ? kfree+0x220/0x370 [] ? public_key_verify_signature_2+0x32/0x50 [] pkcs7_validate_trust+0x524/0x5f0 [] system_verify_data+0xca/0x170 [] ? top_trace_array+0x9b/0x9b [] ? __vfs_read+0x279/0x3d0 [] mod_verify_sig+0x1ff/0x290 [...] The implication is that pkcs7_validate_trust() effectively grants trust when it really shouldn't have. Fix this by explicitly setting *_trusted to false at the very beginning of pkcs7_validate_trust(). Cc: Signed-off-by: Nicolai Stange Signed-off-by: Herbert Xu crypto/asymmetric_keys/pkcs7_trust.c | 2 ++ 1 file changed, 2 insertions(+) commit 9da77666d6975219281fd400eb9608a047337414 Author: Prarit Bhargava Date: Tue Mar 22 19:06:08 2016 -0400 x86/msr: Remove unused native_read_tscp() After e76b027 ("x86,vdso: Use LSL unconditionally for vgetcpu") native_read_tscp() is unused in the kernel. The function can be removed like native_read_tsc() was. Signed-off-by: Prarit Bhargava Acked-by: Andy Lutomirski Cc: Borislav Petkov Link: http://lkml.kernel.org/r/1458687968-9106-1-git-send-email-prarit@redhat.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr.h | 8 -------- 1 file changed, 8 deletions(-) commit f09e3f4fe42caad0c0f59c1489d2b3f512c070b5 Author: Yaowei Bai Date: Wed Mar 23 09:40:09 2016 +0800 x86/apic: Remove declaration of unused hw_nmi_is_cpu_stuck Commit 10f9014912 ("x86: Cleanup hw_nmi.c cruft") removed unused code in the hw_nmi.c file because of the redesign of the hardlockup watchdog but left declaration of hw_nmi_is_cpu_stuck in linux/nmi.h, so remvoe it. Signed-off-by: Yaowei Bai Link: http://lkml.kernel.org/r/1458697210-3027-1-git-send-email-baiyaowei@cmss.chinamobile.com Signed-off-by: Thomas Gleixner include/linux/nmi.h | 1 - 1 file changed, 1 deletion(-) commit b7c8b4aac6ea6746b1c49fda0a0563a07203dd26 Author: Vladimir Zapolskiy Date: Tue Mar 22 01:42:07 2016 +0200 clocksource/drivers/pistachio: Correct output format of PTR_ERR() Use signed integer output in the pr_err() string format, here PTR_ERR() value is negative and it should be reported in human readable way. Signed-off-by: Vladimir Zapolskiy Cc: Jisheng Zhang Cc: Ezequiel Garcia Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/1458603727-4446-1-git-send-email-vz@mleia.com Signed-off-by: Thomas Gleixner drivers/clocksource/time-pistachio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a7c4abd41c0d553f4fb9845bdd4328155426ac7 Author: MaJun Date: Wed Mar 23 17:06:33 2016 +0800 irqchip/mbigen: Make CONFIG_HISILICON_IRQ_MBIGEN a hidden option This config is selected by CONFIG_ARCH_HISI, so there is no point to have it user configurable. While at it move the config option to the proper place in the alphabetically sorted option list. Requested-by: Thomas Gleixner Signed-off-by: Ma Jun Cc: mark.rutland@arm.com Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Catalin.Marinas@arm.com Cc: guohanjun@huawei.com Cc: Will.Deacon@arm.com Cc: huxinwei@huawei.com Cc: lizefan@huawei.com Cc: dingtianhong@huawei.com Cc: zhaojunhua@hisilicon.com Cc: liguozhu@hisilicon.com Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1458723993-21044-3-git-send-email-majun258@huawei.com Signed-off-by: Thomas Gleixner drivers/irqchip/Kconfig | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit dd17a3c40d46adea7215cad3f8fa0afb7c616290 Author: MaJun Date: Wed Mar 23 17:06:32 2016 +0800 ARM64: Kconfig: Select mbigen interrupt controller on Hisilicon platform As a interrupt controller used on some of hisilicon SOCs(660,1610 etc.), mbigen driver should be enabled when CONFIG_ARCH_HISI is enabled. Signed-off-by: Ma Jun Cc: mark.rutland@arm.com Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Catalin.Marinas@arm.com Cc: guohanjun@huawei.com Cc: Will.Deacon@arm.com Cc: huxinwei@huawei.com Cc: lizefan@huawei.com Cc: dingtianhong@huawei.com Cc: zhaojunhua@hisilicon.com Cc: liguozhu@hisilicon.com Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1458723993-21044-2-git-send-email-majun258@huawei.com Signed-off-by: Thomas Gleixner arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 91d2178e26fdc806f33063f9df5904a48e3b6aeb Author: Takashi Sakamoto Date: Wed Mar 23 08:03:59 2016 +0900 ALSA: timer: fix gparams ioctl compatibility for different architectures 'struct snd_timer_gparams' includes some members with 'unsigned long', therefore its size differs depending on data models of architecture. As a result, x86/x32 applications fail to execute ioctl(2) with SNDRV_TIMER_GPARAMS command on x86_64 machine. This commit fixes this bug by adding a pair of structure and ioctl command for the compatibility. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/timer.c | 20 +++++++++++++------- sound/core/timer_compat.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 8 deletions(-) commit 8bb7e27bbb9d0db7ca0e83d40810fb752381cdd5 Author: Linus Walleij Date: Fri Mar 18 10:12:15 2016 +0100 staging: delete STE RMI4 hackish driver As of commit 62d5bdf972ebcfc99f72f734ae979713e4ca6450 "Merge branch 'synaptics-rmi4' into next" the input subsystem has a proper RMI4 infrastructure and touchscreen driver. The ST Ux500 platform has been converted to use the new driver and its devicetree bindings. Delete this ancient hack. Cc: Andrew Duggan Cc: Christopher Heiny Signed-off-by: Linus Walleij Acked-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/ste_rmi4/Kconfig | 9 - drivers/staging/ste_rmi4/Makefile | 4 - drivers/staging/ste_rmi4/TODO | 7 - drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1137 ------------------------- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h | 46 - 7 files changed, 1206 deletions(-) commit ccbc2a9e7878ff09bcaed4893c2a2d3adbb797e2 Author: Vladimir Zapolskiy Date: Wed Mar 23 00:38:43 2016 +0200 staging: android: ion_test: fix check of platform_device_register_simple() error code On error platform_device_register_simple() returns ERR_PTR() value, check for NULL always fails. The change corrects the check itself and propagates the returned error upwards. Fixes: 81fb0b901397 ("staging: android: ion_test: unregister the platform device") Cc: stable Signed-off-by: Vladimir Zapolskiy Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f54e994c2900ac5f0d4e12faf430d96e29f389c2 Author: Colin Ian King Date: Mon Mar 21 22:42:11 2016 +0000 staging: wilc1000: fix a couple of memory leaks The ENOMEM error return paths are not free'ing allocated memory resulting in a memory leak of allocated structures. Perform the required kfree to fix the memory leaks. Issue discovered with static analysis using CoverityScan Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2e11590171683c6b12193fe4b0ede1e6201b7f45 Author: Cihangir Akturk Date: Mon Mar 14 18:14:07 2016 +0200 staging: fsl-mc: fix incorrect type passed to dev_err macros dev_err macros expect const struct device ** as its second argument, but here the argument we are passing is of typ struct device **. This patch fixes this error. Fixes: 454b0ec8bf99 ("Staging: fsl-mc: Replace pr_err with dev_err") Cc: Bhumika Goyal Reported-by: Guenter Roeck Signed-off-by: Cihangir Akturk Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/mc-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e79e344a3d2fce5f75a80f028d41b2b9a88a34dc Author: Cihangir Akturk Date: Mon Mar 14 18:14:06 2016 +0200 staging: fsl-mc: fix incorrect type passed to dev_dbg macros dev_dbg macros expect const struct device ** as its second argument but here the argument we are passing is of type struct device ** this patch fixes this error. Fixes: de71daf5c839 ("Staging: fsl-mc: Replace pr_debug with dev_dbg") Cc: Bhumika Goyal Reported-by: Guenter Roeck Signed-off-by: Cihangir Akturk Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/mc-sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8827bd88efcb7e5976585b9b35a551d7c56f8efb Author: Leo Kim Date: Fri Mar 18 21:23:16 2016 +0900 staging: wilc1000: fixed kernel panic when firmware is not started This patch fixed the problems caused by if firmware is not started. That is why, in nl80211 put current TX power in interface info. If firmware is not started, this function(get_tx_power) does not work. Signed-off-by: Leo Kim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bd3a3cd6c27b117fb9a43a38c8072c95332beecc Author: H Hartley Sweeten Date: Tue Mar 22 10:04:48 2016 -0700 staging: comedi: ni_mio_common: fix the ni_write[blw]() functions Memory mapped io (dev->mmio) should not also be writing to the ioport (dev->iobase) registers. Add the missing 'else' to these functions. Fixes: 0953ee4acca0 ("staging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)") Cc: # 3.17+ Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 982177677a835c7084f50206769bf58906d87d76 Author: Amitoj Kaur Chawla Date: Sat Mar 19 00:47:41 2016 +0530 staging: most: hdm-dim2: Remove possible dereference error Commit 3eced21a5afb ("staging: most: hdm-dim2: Replace request_irq with devm_request_irq") introduced the following static checker warning: drivers/staging/most/hdm-dim2/dim2_hdm.c:841 dim2_probe() error: 'dev->netinfo_task' dereferencing possible ERR_PTR() Remove the bug introduced by the commit due to change in control flow by returning PTR_ERR immediately rather than returning at the end of the function since we do not need to free anything. Fixes: 3eced21a5afb Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3092c34a4ae6129d97c550d5191cf3e31d14b3ff Author: Dan Carpenter Date: Fri Mar 18 08:42:47 2016 +0300 staging: lustre: checking for NULL instead of IS_ERR lustre_cfg_new() returns error pointers on error, it never returns NULL. Signed-off-by: Dan Carpenter Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cc089e41d8e45752d85f42aefe66fabcd02bc57 Author: Arnd Bergmann Date: Mon Mar 14 23:51:09 2016 +0100 staging: lustre: really make lustre dependent on LNet A patch intended to add a dependency on LNET for lustre didn't actually do that and instead allowed configurations that contain lustre with lnet but without IPv4 support that subsequently fail to link: warning: (LUSTRE_FS) selects LNET which has unmet direct dependencies (STAGING && INET && m && MODULES) ERROR: "kernel_sendmsg" [drivers/staging/lustre/lnet/lnet/lnet.ko] undefined! ERROR: "sock_create_lite" [drivers/staging/lustre/lnet/lnet/lnet.ko] undefined! ERROR: "sock_release" [drivers/staging/lustre/lnet/lnet/lnet.ko] undefined! ERROR: "release_sock" [drivers/staging/lustre/lnet/klnds/socklnd/ksocklnd.ko] undefined! ERROR: "kernel_sendmsg" [drivers/staging/lustre/lnet/klnds/socklnd/ksocklnd.ko] undefined! ERROR: "tcp_sendpage" [drivers/staging/lustre/lnet/klnds/socklnd/ksocklnd.ko] undefined! This adds the one-line change that was evidently missing from the commit, doing what was intended there to have a correct set of dependencies. Signed-off-by: Arnd Bergmann Fixes: b08bb6bb5af5 ("staging: lustre: make lustre dependent on LNet") Acked-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 586add48d4a627424ff996277fc47e4ee8c69126 Author: Xose Vazquez Perez Date: Mon Mar 14 15:50:07 2016 +0100 staging: refresh TODO for rtl8712 People should not waste time and energy working on this staging driver. At least four drivers were written for this hardware: https://marc.info/?l=linux-wireless&m=138358275410975 And there is a replacement using the kernel wireless stack at: https://github.com/chunkeey/rtl8192su Also a fullmac/cfg80211 driver(r92su) is available. Cc: Larry Finger Cc: Florian Schilhabel Cc: Christian Lamparter Cc: Joshua Roys Cc: Greg Kroah-Hartman Cc: Linux Driver Project Developer List Cc: Linux Wireless Signed-off-by: Xose Vazquez Perez Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/TODO | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bb61000dfe58a1f49188a18214707a0852e8f60a Author: Xose Vazquez Perez Date: Fri Mar 18 18:15:24 2016 +0100 staging: refresh TODO for rtl8723au People should not waste time and energy working on this staging driver. A replacement(rtl8xxxu) using the kernel wireless stack already was merged in the 4.3 kernel. Cc: Larry Finger Cc: Kalle Valo Cc: Greg Kroah-Hartman Signed-off-by: Xose Vazquez Perez Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/TODO | 3 +++ 1 file changed, 3 insertions(+) commit fbda4b38fa3995aa0777fe9cbbdcb223c6292083 Author: Lukas Wunner Date: Wed Mar 23 00:11:20 2016 +0100 ACPI / PM: Runtime resume devices when waking from hibernate Commit 58a1fbbb2ee8 ("PM / PCI / ACPI: Kick devices that might have been reset by firmware") added a runtime resume for devices that were runtime suspended when the system entered suspend-to-RAM. Briefly, the motivation was to ensure that devices did not remain in a reset-power-on state after resume, potentially preventing deep SoC-wide low-power states from being entered on idle. Currently we're not doing the same when leaving suspend-to-disk and this asymmetry is a problem if drivers rely on the automatic resume triggered by pm_complete_with_resume_check(). Fix it. Fixes: 58a1fbbb2ee8 (PM / PCI / ACPI: Kick devices that might have been reset by firmware) Signed-off-by: Lukas Wunner Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 1 + 1 file changed, 1 insertion(+) commit 276142730c39c9839465a36a90e5674a8c34e839 Author: Lukas Wunner Date: Wed Mar 23 00:11:20 2016 +0100 PM / sleep: Clear pm_suspend_global_flags upon hibernate When suspending to RAM, waking up and later suspending to disk, we gratuitously runtime resume devices after the thaw phase. This does not occur if we always suspend to RAM or always to disk. pm_complete_with_resume_check(), which gets called from pci_pm_complete() among others, schedules a runtime resume if PM_SUSPEND_FLAG_FW_RESUME is set. The flag is set during a suspend-to-RAM cycle. It is cleared at the beginning of the suspend-to-RAM cycle but not afterwards and it is not cleared during a suspend-to-disk cycle at all. Fix it. Fixes: ef25ba047601 (PM / sleep: Add flags to indicate platform firmware involvement) Signed-off-by: Lukas Wunner Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki kernel/power/hibernate.c | 1 + 1 file changed, 1 insertion(+) commit a24e3d414e59ac76566dedcad1ed1d319a93ec14 Merge: b91d9c6 8fe9752 Author: Linus Torvalds Date: Tue Mar 22 17:09:14 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge third patch-bomb from Andrew Morton: - more ocfs2 changes - a few hotfixes - Andy's compat cleanups - misc fixes to fatfs, ptrace, coredump, cpumask, creds, eventfd, panic, ipmi, kgdb, profile, kfifo, ubsan, etc. - many rapidio updates: fixes, new drivers. - kcov: kernel code coverage feature. Like gcov, but not "prohibitively expensive". - extable code consolidation for various archs * emailed patches from Andrew Morton : (81 commits) ia64/extable: use generic search and sort routines x86/extable: use generic search and sort routines s390/extable: use generic search and sort routines alpha/extable: use generic search and sort routines kernel/...: convert pr_warning to pr_warn drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings drivers: dma-coherent: use MEMREMAP_WC for DMA_MEMORY_MAP memremap: add MEMREMAP_WC flag memremap: don't modify flags kernel/signal.c: add compile-time check for __ARCH_SI_PREAMBLE_SIZE mm/mprotect.c: don't imply PROT_EXEC on non-exec fs ipc/sem: make semctl setting sempid consistent ubsan: fix tree-wide -Wmaybe-uninitialized false positives kfifo: fix sparse complaints scripts/gdb: account for changes in module data structure scripts/gdb: add cmdline reader command scripts/gdb: add version command kernel: add kcov code coverage profile: hide unused functions when !CONFIG_PROC_FS hpwdt: use nmi_panic() when kernel panics in NMI handler ... commit b91d9c6716319dcd9e6ffcfc9defaf79e705daab Merge: b8ba452 a6adb10 Author: Linus Torvalds Date: Tue Mar 22 16:28:22 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: "Second round of KVM changes for 4.6: - build fixes for PPC KVM - miscellaneous bugfixes for ARM KVM - cleanup of memory barrier and removal of redundant barriers - x86 fixes: page tracking oops, support for old buggy KVM nested on 4.5 - support for protection keys in guests - lockdep fix - another conversion to simple wait queues and raw spinlocks, backported from PREEMPT_RT" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (27 commits) KVM: page_track: fix access to NULL slot KVM: PPC: do not compile in vfio.o unconditionally kvm, rt: change async pagefault code locking for PREEMPT_RT KVM/PPC: update the comment of memory barrier in the kvmppc_prepare_to_enter() KVM/x86: update the comment of memory barrier in the vcpu_enter_guest() KVM: Replace smp_mb() with smp_load_acquire() in the kvm_flush_remote_tlbs() KVM/x86: Call smp_wmb() before increasing tlbs_dirty KVM: Replace smp_mb() with smp_mb_after_atomic() in the kvm_make_all_cpus_request() KVM/x86: Replace smp_mb() with smp_store_mb/release() in the walk_shadow_page_lockless_begin/end() KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page() KVM, pkeys: expose CPUID/CR4 to guest KVM, pkeys: add pkeys support for permission_fault KVM, pkeys: introduce pkru_mask to cache conditions KVM, pkeys: save/restore PKRU when guest/host switches x86: pkey: introduce write_pkru() for KVM KVM, pkeys: add pkeys support for xsave state KVM, pkeys: disable pkeys for guests in non-paging mode KVM: x86: remove magic number with enum cpuid_leafs KVM: MMU: return page fault error code from permission_fault KVM: fix spin_lock_init order on x86 ... commit b8ba4526832fcccba7f46e55ce9a8b79902bdcec Merge: 01cde15 520a07b Author: Linus Torvalds Date: Tue Mar 22 15:48:44 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: "Round two of 4.6 merge window patches. This is a monster pull request. I held off on the hfi1 driver updates (the hfi1 driver is intimately tied to the qib driver and the new rdmavt software library that was created to help both of them) in my first pull request. The hfi1/qib/rdmavt update is probably 90% of this pull request. The hfi1 driver is being left in staging so that it can be fixed up in regards to the API that Al and yourself didn't like. Intel has agreed to do the work, but in the meantime, this clears out 300+ patches in the backlog queue and brings my tree and their tree closer to sync. This also includes about 10 patches to the core and a few to mlx5 to create an infrastructure for configuring SRIOV ports on IB devices. That series includes one patch to the net core that we sent to netdev@ and Dave Miller with each of the three revisions to the series. We didn't get any response to the patch, so we took that as implicit approval. Finally, this series includes Intel's new iWARP driver for their x722 cards. It's not nearly the beast as the hfi1 driver. It also has a linux-next merge issue, but that has been resolved and it now passes just fine. Summary: - A few minor core fixups needed for the next patch series - The IB SRIOV series. This has bounced around for several versions. Of note is the fact that the first patch in this series effects the net core. It was directed to netdev and DaveM for each iteration of the series (three versions total). Dave did not object, but did not respond either. I've taken this as permission to move forward with the series. - The new Intel X722 iWARP driver - A huge set of updates to the Intel hfi1 driver. Of particular interest here is that we have left the driver in staging since it still has an API that people object to. Intel is working on a fix, but getting these patches in now helps keep me sane as the upstream and Intel's trees were over 300 patches apart" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (362 commits) IB/ipoib: Allow mcast packets from other VFs IB/mlx5: Implement callbacks for manipulating VFs net/mlx5_core: Implement modify HCA vport command net/mlx5_core: Add VF param when querying vport counter IB/ipoib: Add ndo operations for configuring VFs IB/core: Add interfaces to control VF attributes IB/core: Support accessing SA in virtualized environment IB/core: Add subnet prefix to port info IB/mlx5: Fix decision on using MAD_IFC net/core: Add support for configuring VF GUIDs IB/{core, ulp} Support above 32 possible device capability flags IB/core: Replace setting the zero values in ib_uverbs_ex_query_device net/mlx5_core: Introduce offload arithmetic hardware capabilities net/mlx5_core: Refactor device capability function net/mlx5_core: Fix caching ATOMIC endian mode capability ib_srpt: fix a WARN_ON() message i40iw: Replace the obsolete crypto hash interface with shash IB/hfi1: Add SDMA cache eviction algorithm IB/hfi1: Switch to using the pin query function IB/hfi1: Specify mm when releasing pages ... commit 8fe9752ef10343a8edb603cb93abc2bfae34e748 Author: Ard Biesheuvel Date: Tue Mar 22 14:28:20 2016 -0700 ia64/extable: use generic search and sort routines Replace the arch specific versions of search_extable() and sort_extable() with calls to the generic ones, which now support relative exception tables as well. Signed-off-by: Ard Biesheuvel Acked-by: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/include/asm/uaccess.h | 8 ++-- arch/ia64/mm/extable.c | 97 +---------------------------------------- 2 files changed, 4 insertions(+), 101 deletions(-) commit 29934b0fb8ff5afa61832ea56aec65befab30511 Author: Ard Biesheuvel Date: Tue Mar 22 14:28:17 2016 -0700 x86/extable: use generic search and sort routines Replace the arch specific versions of search_extable() and sort_extable() with calls to the generic ones, which now support relative exception tables as well. Signed-off-by: Ard Biesheuvel Acked-by: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess.h | 5 +- arch/x86/mm/extable.c | 108 ----------------------------------------- 2 files changed, 2 insertions(+), 111 deletions(-) commit c352e8b6de9808ec5edc792d54f8785de6626d02 Author: Ard Biesheuvel Date: Tue Mar 22 14:28:14 2016 -0700 s390/extable: use generic search and sort routines Replace the arch specific versions of search_extable() and sort_extable() with calls to the generic ones, which now support relative exception tables as well. Signed-off-by: Ard Biesheuvel Acked-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/uaccess.h | 8 +--- arch/s390/mm/Makefile | 2 +- arch/s390/mm/extable.c | 85 ----------------------------------------- 3 files changed, 2 insertions(+), 93 deletions(-) commit e77986b560741f40ac30755afc57074898da31e8 Author: Ard Biesheuvel Date: Tue Mar 22 14:28:12 2016 -0700 alpha/extable: use generic search and sort routines Replace the arch specific versions of search_extable() and sort_extable() with calls to the generic ones, which now support relative exception tables as well. Signed-off-by: Ard Biesheuvel Acked-by: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/uaccess.h | 10 ++++- arch/alpha/mm/Makefile | 2 +- arch/alpha/mm/extable.c | 92 ---------------------------------------- 3 files changed, 9 insertions(+), 95 deletions(-) commit a395d6a7e3d6e3d1d316376db0c4c8b5d2995930 Author: Joe Perches Date: Tue Mar 22 14:28:09 2016 -0700 kernel/...: convert pr_warning to pr_warn Use the more common logging method with the eventual goal of removing pr_warning altogether. Miscellanea: - Realign arguments - Coalesce formats - Add missing space between a few coalesced formats Signed-off-by: Joe Perches Acked-by: Rafael J. Wysocki [kernel/power/suspend.c] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/irq/manage.c | 4 ++-- kernel/power/suspend.c | 3 +-- kernel/time/tick-sched.c | 8 ++++---- kernel/trace/blktrace.c | 4 ++-- kernel/trace/ftrace.c | 7 +++---- kernel/trace/trace.c | 40 ++++++++++++++++++------------------ kernel/trace/trace_functions_graph.c | 6 +++--- kernel/trace/trace_kprobe.c | 27 ++++++++++-------------- kernel/trace/trace_mmiotrace.c | 2 +- kernel/trace/trace_probe.c | 4 ++-- kernel/trace/trace_stat.c | 3 +-- kernel/trace/trace_uprobe.c | 2 +- kernel/tracepoint.c | 2 +- 13 files changed, 52 insertions(+), 60 deletions(-) commit 20d7a35bc8be06dd1350de0454b0e24cca1d4354 Author: Brian Starkey Date: Tue Mar 22 14:28:06 2016 -0700 drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings Use memset_io() for DMA_MEMORY_IO mappings which are mapped as I/O memory, and regular memset() for DMA_MEMORY_MAP mappings. This fixes the below alignment fault on arm64 for DMA_MEMORY_IO mappings, where memset() uses the DC ZVA instruction which is invalid on device memory. Unhandled fault: alignment fault (0x96000061) at 0xffffff8000380000 Internal error: : 96000061 [#1] PREEMPT SMP Modules linked in: hdlcd(+) clk_scpi CPU: 4 PID: 1355 Comm: systemd-udevd Not tainted 4.4.0-rc1+ #5 Hardware name: ARM Juno development board (r0) (DT) task: ffffffc9763eee00 ti: ffffffc9758c4000 task.ti: ffffffc9758c4000 PC is at __efistub_memset+0x1ac/0x200 LR is at dma_alloc_from_coherent+0xb0/0x120 pc : [] lr : [] pstate: 400001c5 sp : ffffffc9758c79a0 x29: ffffffc9758c79a0 x28: ffffffc000635cd0 x27: 0000000000000124 x26: ffffffc000119ef4 x25: 0000000000010000 x24: 0000000000000140 x23: ffffffc07e9ac3a8 x22: ffffffc9758c7a58 x21: ffffffc9758c7a68 x20: 0000000000000004 x19: ffffffc07e9ac380 x18: 0000000000000001 x17: 0000007fae1bbba8 x16: ffffffc0001b2d1c x15: ffffffffffffffff x14: 0ffffffffffffffe x13: 0000000000000010 x12: ffffff800837ffff x11: ffffff800837ffff x10: 0000000040000000 x9 : 0000000000000000 x8 : ffffff8000380000 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004 x2 : 000000000000ffc0 x1 : 0000000000000000 x0 : ffffff8000380000 Signed-off-by: Brian Starkey Reviewed-by: Catalin Marinas Cc: Dan Williams Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/dma-coherent.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6b03ae0d42bfecf2536f7967d37e471d98c0b3d2 Author: Brian Starkey Date: Tue Mar 22 14:28:03 2016 -0700 drivers: dma-coherent: use MEMREMAP_WC for DMA_MEMORY_MAP When the DMA_MEMORY_MAP flag is used, memory which can be accessed directly should be returned, so use memremap(..., MEMREMAP_WC) to provide a writecombine mapping. Signed-off-by: Brian Starkey Reviewed-by: Catalin Marinas Cc: Dan Williams Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/dma-coherent.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit c907e0eb43a522de60fb651c011c553f87273222 Author: Brian Starkey Date: Tue Mar 22 14:28:00 2016 -0700 memremap: add MEMREMAP_WC flag Add a flag to memremap() for writecombine mappings. Mappings satisfied by this flag will not be cached, however writes may be delayed or combined into more efficient bursts. This is most suitable for buffers written sequentially by the CPU for use by other DMA devices. Signed-off-by: Brian Starkey Reviewed-by: Catalin Marinas Cc: Dan Williams Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/io.h | 1 + kernel/memremap.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit cf61e2a1487d833e4748dead4096584de70bf742 Author: Brian Starkey Date: Tue Mar 22 14:27:57 2016 -0700 memremap: don't modify flags These patches implement a MEMREMAP_WC flag for memremap(), which can be used to obtain writecombine mappings. This is then used for setting up dma_coherent_mem regions which use the DMA_MEMORY_MAP flag. The motivation is to fix an alignment fault on arm64, and the suggestion to implement MEMREMAP_WC for this case was made at [1]. That particular issue is handled in patch 4, which makes sure that the appropriate memset function is used when zeroing allocations mapped as IO memory. This patch (of 4): Don't modify the flags input argument to memremap(). MEMREMAP_WB is already a special case so we can check for it directly instead of clearing flag bits in each mapper. Signed-off-by: Brian Starkey Cc: Catalin Marinas Cc: Dan Williams Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 41b27154874b3a40d6673052d08c8e9fd0c6404f Author: Helge Deller Date: Tue Mar 22 14:27:54 2016 -0700 kernel/signal.c: add compile-time check for __ARCH_SI_PREAMBLE_SIZE The value of __ARCH_SI_PREAMBLE_SIZE defines the size (including padding) of the part of the struct siginfo that is before the union, and it is then used to calculate the needed padding (SI_PAD_SIZE) to make the size of struct siginfo equal to 128 (SI_MAX_SIZE) bytes. Depending on the target architecture and word width it equals to either 3 or 4 times sizeof int. Since the very beginning we had __ARCH_SI_PREAMBLE_SIZE wrong on the parisc architecture for the 64bit kernel build. It's even more frustrating, because it can easily be checked at compile time if the value was defined correctly. This patch adds such a check for the correctness of __ARCH_SI_PREAMBLE_SIZE in the hope that it will prevent existing and future architectures from running into the same problem. I refrained from replacing __ARCH_SI_PREAMBLE_SIZE by offsetof() in copy_siginfo() in include/asm-generic/siginfo.h, because a) it doesn't make any difference and b) it's used in the Documentation/kmemcheck.txt example. I ran this patch through the 0-DAY kernel test infrastructure and only the parisc architecture triggered as expected. That means that this patch should be OK for all major architectures. Signed-off-by: Helge Deller Cc: Stephen Rothwell Cc: Michael Ellerman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+) commit f138556daf62665f19178732ec4daf86c4ca13f4 Author: Piotr Kwapulinski Date: Tue Mar 22 14:27:51 2016 -0700 mm/mprotect.c: don't imply PROT_EXEC on non-exec fs The mprotect(PROT_READ) fails when called by the READ_IMPLIES_EXEC binary on a memory mapped file located on non-exec fs. The mprotect does not check whether fs is _executable_ or not. The PROT_EXEC flag is set automatically even if a memory mapped file is located on non-exec fs. Fix it by checking whether a memory mapped file is located on a non-exec fs. If so the PROT_EXEC is not implied by the PROT_READ. The implementation uses the VM_MAYEXEC flag set properly in mmap. Now it is consistent with mmap. I did the isolated tests (PT_GNU_STACK X/NX, multiple VMAs, X/NX fs). I also patched the official 3.19.0-47-generic Ubuntu 14.04 kernel and it seems to work. Signed-off-by: Piotr Kwapulinski Cc: Mel Gorman Cc: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Benjamin Herrenschmidt Cc: Konstantin Khlebnikov Cc: Dan Williams Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mprotect.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a5f4db877177d2a3d7ae62a7bac3a5a27e083d7f Author: Davidlohr Bueso Date: Tue Mar 22 14:27:48 2016 -0700 ipc/sem: make semctl setting sempid consistent As indicated by bug#112271, Linux sets the sempid value upon semctl, and not only for semop calls. However, within semctl we only do this for SETVAL, leaving SETALL without updating the field, and therefore rather inconsistent behavior when compared to other Unices. There is really no documentation regarding this and therefore users should not make assumptions. With this patch, along with updating semctl.2 manpages, this scenario should become less ambiguous As such, set sempid on SETALL cmd. Also update some in-code documentation, specifying where the sempid is set. Passes ltp and custom testcase where a child (fork) does SETALL to the set. Signed-off-by: Davidlohr Bueso Reported-by: Philip Semanchuk Cc: Michael Kerrisk Cc: PrasannaKumar Muralidharan Cc: Manfred Spraul Cc: Herton R. Krzesinski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit dde5cf39d4d2cce71f2997c37210dd624d0e4bf6 Author: Andrey Ryabinin Date: Tue Mar 22 14:27:45 2016 -0700 ubsan: fix tree-wide -Wmaybe-uninitialized false positives -fsanitize=* options makes GCC less smart than usual and increase number of 'maybe-uninitialized' false-positives. So this patch does two things: * Add -Wno-maybe-uninitialized to CFLAGS_UBSAN which will disable all such warnings for instrumented files. * Remove CONFIG_UBSAN_SANITIZE_ALL from all[yes|mod]config builds. So the all[yes|mod]config build goes without -fsanitize=* and still with -Wmaybe-uninitialized. Signed-off-by: Andrey Ryabinin Reported-by: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.ubsan | 5 +++++ scripts/Makefile.ubsan | 4 ++++ 2 files changed, 9 insertions(+) commit 21b2f44315d735345f02356239a819debdd89462 Author: Stefani Seibold Date: Tue Mar 22 14:27:42 2016 -0700 kfifo: fix sparse complaints This patch fix complaints by the sparse tool when using kfifo_put() with non scalar types like structures (i.e. drivers/iio/industrialio-event.c). Casting a pointer to the value and read this pointer instead of directly casting the value will fix this. The generated code is equal. Signed-off-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kfifo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad4db3b24a93e52a92ad8f9b0273a9416f202c23 Author: Jan Kiszka Date: Tue Mar 22 14:27:39 2016 -0700 scripts/gdb: account for changes in module data structure Commit 7523e4dc5057 ("module: use a structure to encapsulate layout.") factored out the module_layout structure. Adjust the symbol loader and the lsmod command to this. Signed-off-by: Jan Kiszka Reviewed-by: Kieran Bingham Tested-by: Kieran Bingham (qemu-{ARM,x86}) Cc: Rusty Russell Cc: Jiri Kosina Cc: Jason Wessel Cc: [4.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/modules.py | 5 +++-- scripts/gdb/linux/symbols.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 72bf92ec29ac052e950dcb2cc7f8820a2e1f0a02 Author: Kieran Bingham Date: Tue Mar 22 14:27:36 2016 -0700 scripts/gdb: add cmdline reader command lx-cmdline Report the Linux Commandline used in the current kernel [jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning] Signed-off-by: Kieran Bingham Signed-off-by: Jan Kiszka Cc: Jason Wessel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/proc.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2d061d999424efd99e30fa4115c7dced07533223 Author: Kieran Bingham Date: Tue Mar 22 14:27:33 2016 -0700 scripts/gdb: add version command lx-version Report the Linux Version of the current kernel. Add a command to identify the version specified by the banner in the debugged kernel. This lets the user identify the kernel of the running kernel, and will let later scripts compare the banner of the attached kernel against the banner in the vmlinux symbols files to verify that the files are correct. [jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning] Signed-off-by: Kieran Bingham Signed-off-by: Jan Kiszka Cc: Jason Wessel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/proc.py | 28 ++++++++++++++++++++++++++++ scripts/gdb/vmlinux-gdb.py | 1 + 2 files changed, 29 insertions(+) commit 5c9a8750a6409c63a0f01d51a9024861022f6593 Author: Dmitry Vyukov Date: Tue Mar 22 14:27:30 2016 -0700 kernel: add kcov code coverage kcov provides code coverage collection for coverage-guided fuzzing (randomized testing). Coverage-guided fuzzing is a testing technique that uses coverage feedback to determine new interesting inputs to a system. A notable user-space example is AFL (http://lcamtuf.coredump.cx/afl/). However, this technique is not widely used for kernel testing due to missing compiler and kernel support. kcov does not aim to collect as much coverage as possible. It aims to collect more or less stable coverage that is function of syscall inputs. To achieve this goal it does not collect coverage in soft/hard interrupts and instrumentation of some inherently non-deterministic or non-interesting parts of kernel is disbled (e.g. scheduler, locking). Currently there is a single coverage collection mode (tracing), but the API anticipates additional collection modes. Initially I also implemented a second mode which exposes coverage in a fixed-size hash table of counters (what Quentin used in his original patch). I've dropped the second mode for simplicity. This patch adds the necessary support on kernel side. The complimentary compiler support was added in gcc revision 231296. We've used this support to build syzkaller system call fuzzer, which has found 90 kernel bugs in just 2 months: https://github.com/google/syzkaller/wiki/Found-Bugs We've also found 30+ bugs in our internal systems with syzkaller. Another (yet unexplored) direction where kcov coverage would greatly help is more traditional "blob mutation". For example, mounting a random blob as a filesystem, or receiving a random blob over wire. Why not gcov. Typical fuzzing loop looks as follows: (1) reset coverage, (2) execute a bit of code, (3) collect coverage, repeat. A typical coverage can be just a dozen of basic blocks (e.g. an invalid input). In such context gcov becomes prohibitively expensive as reset/collect coverage steps depend on total number of basic blocks/edges in program (in case of kernel it is about 2M). Cost of kcov depends only on number of executed basic blocks/edges. On top of that, kernel requires per-thread coverage because there are always background threads and unrelated processes that also produce coverage. With inlined gcov instrumentation per-thread coverage is not possible. kcov exposes kernel PCs and control flow to user-space which is insecure. But debugfs should not be mapped as user accessible. Based on a patch by Quentin Casasnovas. [akpm@linux-foundation.org: make task_struct.kcov_mode have type `enum kcov_mode'] [akpm@linux-foundation.org: unbreak allmodconfig] [akpm@linux-foundation.org: follow x86 Makefile layout standards] Signed-off-by: Dmitry Vyukov Reviewed-by: Kees Cook Cc: syzkaller Cc: Vegard Nossum Cc: Catalin Marinas Cc: Tavis Ormandy Cc: Will Deacon Cc: Quentin Casasnovas Cc: Kostya Serebryany Cc: Eric Dumazet Cc: Alexander Potapenko Cc: Kees Cook Cc: Bjorn Helgaas Cc: Sasha Levin Cc: David Drysdale Cc: Ard Biesheuvel Cc: Andrey Ryabinin Cc: Kirill A. Shutemov Cc: Jiri Slaby Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kcov.txt | 111 ++++++++++++++ Makefile | 11 +- arch/x86/Kconfig | 1 + arch/x86/boot/Makefile | 7 + arch/x86/boot/compressed/Makefile | 3 + arch/x86/entry/vdso/Makefile | 3 + arch/x86/kernel/Makefile | 6 + arch/x86/kernel/apic/Makefile | 4 + arch/x86/kernel/cpu/Makefile | 4 + arch/x86/lib/Makefile | 3 + arch/x86/mm/Makefile | 3 + arch/x86/realmode/rm/Makefile | 3 + drivers/firmware/efi/libstub/Makefile | 3 + include/linux/kcov.h | 29 ++++ include/linux/sched.h | 11 ++ include/uapi/linux/kcov.h | 10 ++ kernel/Makefile | 12 ++ kernel/exit.c | 2 + kernel/fork.c | 3 + kernel/kcov.c | 273 ++++++++++++++++++++++++++++++++++ kernel/locking/Makefile | 3 + kernel/rcu/Makefile | 4 + kernel/sched/Makefile | 4 + lib/Kconfig.debug | 21 +++ lib/Makefile | 12 ++ mm/Makefile | 15 ++ mm/kasan/Makefile | 1 + scripts/Makefile.lib | 6 + 28 files changed, 567 insertions(+), 1 deletion(-) commit ade356b99a4187578609f2a91c4d2ed88e4e70dc Author: Arnd Bergmann Date: Tue Mar 22 14:27:26 2016 -0700 profile: hide unused functions when !CONFIG_PROC_FS A couple of functions and variables in the profile implementation are used only on SMP systems by the procfs code, but are unused if either procfs is disabled or in uniprocessor kernels. gcc prints a harmless warning about the unused symbols: kernel/profile.c:243:13: error: 'profile_flip_buffers' defined but not used [-Werror=unused-function] static void profile_flip_buffers(void) ^ kernel/profile.c:266:13: error: 'profile_discard_flip_buffers' defined but not used [-Werror=unused-function] static void profile_discard_flip_buffers(void) ^ kernel/profile.c:330:12: error: 'profile_cpu_callback' defined but not used [-Werror=unused-function] static int profile_cpu_callback(struct notifier_block *info, ^ This adds further #ifdef to the file, to annotate exactly in which cases they are used. I have done several thousand ARM randconfig kernels with this patch applied and no longer get any warnings in this file. Signed-off-by: Arnd Bergmann Cc: Vlastimil Babka Cc: Robin Holt Cc: Johannes Weiner Cc: Christoph Lameter Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit abc514c58059ca6f02df41798e828ffd864f1d21 Author: Hidehiro Kawai Date: Tue Mar 22 14:27:24 2016 -0700 hpwdt: use nmi_panic() when kernel panics in NMI handler Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic on NMI") introduced nmi_panic() which prevents concurrent and recursive execution of panic(). It also saves registers for the crash dump on x86 by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers even if looping in NMI context"). hpwdt driver can call panic() from NMI handler, so replace it with nmi_panic(). Also, do some cleanups. Signed-off-by: Hidehiro Kawai Acked-by: Guenter Roeck Cc: Thomas Mingarelli Cc: Wim Van Sebroeck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/watchdog/hpwdt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 73cbf4a1ddfab247f9018550637c28a7d8dd9108 Author: Hidehiro Kawai Date: Tue Mar 22 14:27:21 2016 -0700 ipmi/watchdog: use nmi_panic() when kernel panics in NMI handler Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic on NMI") introduced nmi_panic() which prevents concurrent and recursive execution of panic(). It also saves registers for the crash dump on x86 by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers even if looping in NMI context"). ipmi_watchdog driver can call panic() from NMI handler, so replace it with nmi_panic(). Signed-off-by: Hidehiro Kawai Acked-by: Corey Minyard Acked-by: Guenter Roeck Reviewed-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/ipmi/ipmi_watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebc41f20d77f6ad91f1f2d2af5147dc9bb6b5eea Author: Hidehiro Kawai Date: Tue Mar 22 14:27:17 2016 -0700 panic: change nmi_panic from macro to function Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic on NMI") and commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers even if looping in NMI context") introduced nmi_panic() which prevents concurrent/recursive execution of panic(). It also saves registers for the crash dump on x86. However, there are some cases where NMI handlers still use panic(). This patch set partially replaces them with nmi_panic() in those cases. Even this patchset is applied, some NMI or similar handlers (e.g. MCE handler) continue to use panic(). This is because I can't test them well and actual problems won't happen. For example, the possibility that normal panic and panic on MCE happen simultaneously is very low. This patch (of 3): Convert nmi_panic() to a proper function and export it instead of exporting internal implementation details to modules, for obvious reasons. Signed-off-by: Hidehiro Kawai Acked-by: Borislav Petkov Acked-by: Michal Nazarewicz Cc: Michal Hocko Cc: Rasmus Villemoes Cc: Nicolas Iooss Cc: Javi Merino Cc: Gobinda Charan Maji Cc: "Steven Rostedt (Red Hat)" Cc: Thomas Gleixner Cc: Vitaly Kuznetsov Cc: HATAYAMA Daisuke Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 21 +-------------------- kernel/panic.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) commit a484c3dd9426e1f450c7ed8ad5a2002ea1b309ea Author: Paolo Bonzini Date: Tue Mar 22 14:27:14 2016 -0700 eventfd: document lockless access in eventfd_poll Since commit e22553e2a25e ("eventfd: don't take the spinlock in eventfd_poll", 2015-02-17), eventfd is reading ctx->count outside ctx->wqh.lock. However, things aren't as simple as the read barrier in eventfd_poll would suggest. In fact, the read barrier, besides lacking a comment, is not paired in any obvious manner with another read barrier, and it is pointless because it is sitting between a write (deep in poll_wait) and the read of ctx->count. The read barrier is acting just as a compiler barrier, for which we can use READ_ONCE instead. This is what the code change in this patch does. The documentation change is just as important, however. The question, posed by Andrea Arcangeli, is then why the thing is safe on architectures where spin_unlock does not imply a store-load memory barrier. The answer is that it's safe because writes of ctx->count use the same lock as poll_wait, and hence an acquire barrier implicit in poll_wait provides the necessary synchronization between eventfd_poll and callers of wake_up_locked_poll. This is sort of mentioned in the commit message with respect to eventfd_ctx_read ("eventfd_read is similar, it will do a single decrement with the lock held") but it applies to all other callers too. It's tricky enough that it should be documented in the code. Signed-off-by: Paolo Bonzini Reviewed-by: Andrea Arcangeli Cc: Chris Mason Cc: Davide Libenzi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventfd.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 0335695dfa4df01edff5bb102b9a82a0668ee51e Author: Arnd Bergmann Date: Tue Mar 22 14:27:11 2016 -0700 cred/userns: define current_user_ns() as a function The current_user_ns() macro currently returns &init_user_ns when user namespaces are disabled, and that causes several warnings when building with gcc-6.0 in code that compares the result of the macro to &init_user_ns itself: fs/xfs/xfs_ioctl.c: In function 'xfs_ioctl_setattr_check_projid': fs/xfs/xfs_ioctl.c:1249:22: error: self-comparison always evaluates to true [-Werror=tautological-compare] if (current_user_ns() == &init_user_ns) This is a legitimate warning in principle, but here it isn't really helpful, so I'm reprasing the definition in a way that shuts up the warning. Apparently gcc only warns when comparing identical literals, but it can figure out that the result of an inline function can be identical to a constant expression in order to optimize a condition yet not warn about the fact that the condition is known at compile time. This is exactly what we want here, and it looks reasonable because we generally prefer inline functions over macros anyway. Signed-off-by: Arnd Bergmann Acked-by: Serge Hallyn Cc: David Howells Cc: Yaowei Bai Cc: James Morris Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/capability.h | 2 -- include/linux/cred.h | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) commit e8de370188d098bb49483c287b44925957c3c9b6 Author: Alexandre Bounine Date: Tue Mar 22 14:27:08 2016 -0700 rapidio: add mport char device driver Add mport character device driver to provide user space interface to basic RapidIO subsystem operations. See included Documentation/rapidio/mport_cdev.txt for more details. [akpm@linux-foundation.org: fix printk warning on i386] [dan.carpenter@oracle.com: mport_cdev: fix some error codes] Signed-off-by: Alexandre Bounine Signed-off-by: Dan Carpenter Tested-by: Barry Wood Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Cc: Barry Wood Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/rapidio/mport_cdev.txt | 104 ++ drivers/rapidio/Kconfig | 8 + drivers/rapidio/devices/Makefile | 1 + drivers/rapidio/devices/rio_mport_cdev.c | 2720 ++++++++++++++++++++++++++++++ include/linux/rio_mport_cdev.h | 271 +++ include/uapi/linux/Kbuild | 1 + 6 files changed, 3105 insertions(+) commit 458bdf6e399d7d6f779b97a24645a7a38d1ae07b Author: Alexandre Bounine Date: Tue Mar 22 14:27:05 2016 -0700 rapidio/tsi721_dma: fix hardware error handling Add DMA channel re-initialization after an error to avoid termination of all pending transfer requests. Signed-off-by: Alexandre Bounine Reported-by: Barry Wood Tested-by: Barry Wood Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Cc: Barry Wood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721_dma.c | 82 ++++++++++++++++++++++++++++++++---- 1 file changed, 73 insertions(+), 9 deletions(-) commit e680b672a2b47748ee548229242b543a23b902c1 Author: Alexandre Bounine Date: Tue Mar 22 14:27:02 2016 -0700 rapidio/tsi721_dma: fix synchronization issues Fix synchronization issues found during testing using multiple DMA transfer requests to the same channel: - lost MSI-X interrupt notifications - non-synchronized attempts to start DMA channel HW resulting in error message from the driver - cookie tracking/update race conditions resulting in incorrect DMA transfer status report Signed-off-by: Alexandre Bounine Reported-by: Barry Wood Tested-by: Barry Wood Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Cc: Barry Wood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721_dma.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 83472457505c454592d91807754135d0ad34b125 Author: Alexandre Bounine Date: Tue Mar 22 14:26:59 2016 -0700 rapidio/tsi721_dma: update error reporting from prep_sg callback Switch to returning error-valued pointer instead of simple NULL pointer. This allows to properly identify situation when request queue is full and therefore gives to upper layer an option to retry operation later. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721_dma.c | 37 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 72d8a0d23083ba89fb00a7ad9b07419e34ebe47c Author: Alexandre Bounine Date: Tue Mar 22 14:26:56 2016 -0700 rapidio/tsi721: add filtered debug output Replace "all-or-nothing" debug output with controlled debug output using functional block masks. This allows run time control of debug messages through 'dbg_level' module parameter. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/rapidio/tsi721.txt | 9 ++ drivers/rapidio/devices/tsi721.c | 242 ++++++++++++++++++----------------- drivers/rapidio/devices/tsi721.h | 40 ++++++ drivers/rapidio/devices/tsi721_dma.c | 147 +++++++++++---------- 4 files changed, 249 insertions(+), 189 deletions(-) commit 1679e8dabf753edbf4ed15afa85bf8c4e81f249e Author: Alexandre Bounine Date: Tue Mar 22 14:26:53 2016 -0700 rapidio/tsi721: add outbound windows mapping support Add device-specific callback functions to support outbound windows mapping and release. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 222 +++++++++++++++++++++++++++++++++++++-- drivers/rapidio/devices/tsi721.h | 20 ++++ 2 files changed, 235 insertions(+), 7 deletions(-) commit 93bdaca5018c02ba838f8fe2178fab261e2c1e68 Author: Alexandre Bounine Date: Tue Mar 22 14:26:50 2016 -0700 rapidio: add outbound window support Add RapidIO controller (mport) outbound window configuration operations. This patch is a part of the original patch submitted by Li Yang: https://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/071210.html For some reason the original part was not applied to mainline code tree. The inbound window mapping part has been applied later during tsi721 mport driver submission. Now goes the second part with corresponding HW support. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Li Yang Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/rio.h | 5 +++++ include/linux/rio_drv.h | 4 ++++ 3 files changed, 59 insertions(+) commit 2ece1caf668f183d0606ea9fc85a1083d42b5b3a Author: Alexandre Bounine Date: Tue Mar 22 14:26:47 2016 -0700 rapidio/tsi721: fix locking in OB_MSG processing - Add spinlock protection into outbound message queuing routine. - Change outbound message interrupt handler to avoid deadlock when calling registered callback routine. - Allow infinite retries for outbound messages to avoid retry threshold error signaling in systems with nodes that have slow message receive queue processing. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 42 ++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 9a0b062742e7e039273c0c2ba4b96ad9ec7e7d8f Author: Alexandre Bounine Date: Tue Mar 22 14:26:44 2016 -0700 rapidio: add global inbound port write interfaces Add new Port Write handler registration interfaces that attach PW handlers to local mport device objects. This is different from old interface that attaches PW callback to individual RapidIO device. The new interfaces are intended for use for common event handling (e.g. hot-plug notifications) while the old interface is available for individual device drivers. This patch is based on patch proposed by Andre van Herk but preserves existing per-device interface and adds lock protection for list handling. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/sysdev/fsl_rio.c | 1 + arch/powerpc/sysdev/fsl_rio.h | 1 + arch/powerpc/sysdev/fsl_rmu.c | 16 +++-- drivers/rapidio/devices/tsi721.c | 24 ++----- drivers/rapidio/rio.c | 142 ++++++++++++++++++++++++++++++++------- include/linux/rio.h | 2 + include/linux/rio_drv.h | 9 ++- 7 files changed, 144 insertions(+), 51 deletions(-) commit b6cb95e8eb97e51a1a1b5609b59df859cc6dc2f2 Author: Alexandre Bounine Date: Tue Mar 22 14:26:41 2016 -0700 rapidio: move rio_pw_enable into core code Make rio_pw_enable() routine available to other RapidIO drivers. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-scan.c | 11 ----------- drivers/rapidio/rio.c | 19 +++++++++++++++++++ include/linux/rio.h | 2 ++ include/linux/rio_drv.h | 1 + 4 files changed, 22 insertions(+), 11 deletions(-) commit 5024622f583eb242ed8040d0b9d1e0d2458d1db8 Author: Alexandre Bounine Date: Tue Mar 22 14:26:38 2016 -0700 rapidio: move rio_local_set_device_id function to the common core Make function rio_local_set_device_id() common for all components of RapidIO subsystem. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-scan.c | 13 ------------- drivers/rapidio/rio.c | 14 ++++++++++++++ include/linux/rio_drv.h | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) commit a7b4c636d83034f0e89d58651ef2e9b96564489a Author: Alexandre Bounine Date: Tue Mar 22 14:26:35 2016 -0700 rapidio: add lock protection for doorbell list Add lock protection around doorbell list handling to prevent list corruption on SMP platforms. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio.c | 9 ++++++--- include/linux/rio.h | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) commit b7dfca8bd446721cbc23f4a7cf3c407eb42175dc Author: Alexandre Bounine Date: Tue Mar 22 14:26:32 2016 -0700 rapidio/rionet: add mport removal handling Add handling of a local mport device removal. RIONET driver registers itself as class interface that supports only removal notification, 'add_device' callback is not provided because RIONET network device can be initialized only after enumeration is completed and the existing method (using remote peer addition) satisfies this condition. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/rionet.c | 70 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 26 deletions(-) commit 34ed2ebb65b0aa6a82206686870aaaddc12b2271 Author: Alexandre Bounine Date: Tue Mar 22 14:26:29 2016 -0700 rapidio/rionet: add locking into add/remove device Add spinlock protection when handling list of connected peers and ability to handle new peer device addition after the RIONET device was open. Before his update RIONET was sending JOIN requests only when it have been opened, peer devices added later have been missing from this process. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/rionet.c | 152 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 102 insertions(+), 50 deletions(-) commit dd64f4fe6fe5e3924b36ec4bb4d4202af944a452 Author: Alexandre Bounine Date: Tue Mar 22 14:26:26 2016 -0700 powerpc/fsl_rio: changes to mport registration Change mport object initialization/registration sequence to match reworked version of rio_register_mport() in the core code. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Benjamin Herrenschmidt Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/sysdev/fsl_rio.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 748353cc2d03d0514a3bf6d0752244ce657f197c Author: Alexandre Bounine Date: Tue Mar 22 14:26:23 2016 -0700 rapidio/tsi721: add HW specific mport removal Add hardware-specific device removal support for Tsi721 PCIe-to-RapidIO bridge. To avoid excessive data type conversions, parameters passed to some internal functions have been revised. Dynamic memory allocations of rio_mport and rio_ops have been replaced to reduce references between data structures. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 302 +++++++++++++++++++++-------------- drivers/rapidio/devices/tsi721.h | 4 +- drivers/rapidio/devices/tsi721_dma.c | 28 +++- 3 files changed, 212 insertions(+), 122 deletions(-) commit b77a2030dface6ea6b0d900bd8496ef41a9f3323 Author: Alexandre Bounine Date: Tue Mar 22 14:26:20 2016 -0700 rapidio: add core mport removal support Add common mport removal support functions into the RapidIO subsystem core. Changes to the existing mport registration process have been made to avoid race conditions with active subsystem interfaces immediately after mport device registration: part of initialization code from rio_register_mport() have been moved into separate function rio_mport_initialize() to allow to perform mport registration as the final step of setup process. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio.c | 98 +++++++++++++++++++++++++++++++++++++++++---------- drivers/rapidio/rio.h | 2 +- include/linux/rio.h | 18 ++++++++++ 3 files changed, 98 insertions(+), 20 deletions(-) commit e6b585ca6e81badeb3d42db3cc408174f2826034 Author: Alexandre Bounine Date: Tue Mar 22 14:26:17 2016 -0700 rapidio: move net allocation into core code Make net allocation/release routines available to all components of RapidIO subsystem by moving code from rio-scan enumerator. Make destination ID allocation method private to existing enumerator because other enumeration methods can use their own algorithm. Setup net device object as a parent of all RapidIO devices residing in it and register net as a child of active mport device. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-scan.c | 98 +++++++++++++++++++++++++++++----------------- drivers/rapidio/rio.c | 53 +++++++++++++++++++++++++ drivers/rapidio/rio.h | 3 ++ include/linux/rio.h | 18 ++++----- 4 files changed, 128 insertions(+), 44 deletions(-) commit b74ec56e8ae8759d83448528bde587d00908b4a9 Author: Alexandre Bounine Date: Tue Mar 22 14:26:14 2016 -0700 rapidio: rework common RIO device add/delete routines This patch moves per-net device list handling from rio-scan to common RapidIO core and adds a matching device deletion routine. This makes device object creation/removal available to other implementations of enumeration/discovery process. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-scan.c | 13 ++----------- drivers/rapidio/rio.c | 33 ++++++++++++++++++++++++++++++++- drivers/rapidio/rio.h | 2 ++ 3 files changed, 36 insertions(+), 12 deletions(-) commit f41e2472ba115275438161fd72d40b2448963658 Author: Alexandre Bounine Date: Tue Mar 22 14:26:11 2016 -0700 rapidio/rionet: add shutdown event handling Add shutdown notification handler which terminates active connections with remote RapidIO nodes. This prevents remote nodes from sending packets to the powered off node and eliminates hardware error events on remote nodes. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/rionet.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit e3dd8cd4778ebc75c654f73d8673281078c81ed9 Author: Alexandre Bounine Date: Tue Mar 22 14:26:08 2016 -0700 rapidio/tsi721: add shutdown notification callback Add device driver specific shutdown notification callback. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 15 +++++++++++++++ drivers/rapidio/devices/tsi721.h | 3 +++ drivers/rapidio/devices/tsi721_dma.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 83dc2cbc1136108068637d5c98636647f7b82461 Author: Alexandre Bounine Date: Tue Mar 22 14:26:05 2016 -0700 rapidio: add shutdown notification for RapidIO devices Add bus-specific callback to stop RapidIO devices during a system shutdown. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-driver.c | 12 ++++++++++++ include/linux/rio.h | 2 ++ 2 files changed, 14 insertions(+) commit dbe74afe6a66d1606f5cb39f2ad05c39497542e6 Author: Alexandre Bounine Date: Tue Mar 22 14:26:02 2016 -0700 rapidio/tsi721: add query_mport callback Add device-specific implementation of query_mport callback function. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8b189fdbc5f68f3f43e67004de25f75c1a5b4e51 Author: Alexandre Bounine Date: Tue Mar 22 14:26:00 2016 -0700 rapidio: add query_mport operation Add mport query operation to report master port RapidIO capabilities and run time configuration to upper level drivers. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio.c | 17 +++++++++++++++++ include/linux/rio.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/rio_regs.h | 3 +++ 3 files changed, 69 insertions(+) commit d2a321f37ed49de86058b5daaf50a11d3ee2d61f Author: Alexandre Bounine Date: Tue Mar 22 14:25:57 2016 -0700 rapidio/tsi721_dma: fix pending transaction queue handling Fix pending DMA request queue handling to avoid broken ordering during concurrent request submissions. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.h | 2 +- drivers/rapidio/devices/tsi721_dma.c | 60 +++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 30 deletions(-) commit 9673b883c261b055433527e9249781b43172c103 Author: Alexandre Bounine Date: Tue Mar 22 14:25:54 2016 -0700 rapidio/tsi721: add option to configure direct mapping of IB window Add an option to configure mapping of Inbound Window without RIO-to-PCIe address translation. If a local memory buffer is not properly aligned to meet HW requirements for RapidIO address mapping with address translation, caller can request an inbound window with matching RapidIO address assigned to it. This implementation selects RapidIO base address and size for inbound window that are capable to accommodate the local memory buffer. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 163 ++++++++++++++++++++++++++++++++------- drivers/rapidio/devices/tsi721.h | 9 ++- 2 files changed, 142 insertions(+), 30 deletions(-) commit ba5d141b55ff0c02127cabd344585622bbaa5d02 Author: Alexandre Bounine Date: Tue Mar 22 14:25:51 2016 -0700 rapidio/tsi721: add check for overlapped IB window mappings Add check for attempts to request mapping of inbound RapidIO address space that overlaps with existing active mapping windows. Tsi721 device does not support overlapped inbound windows and SRIO address decoding behavior is not defined in such cases. This patch is applicable to kernel versions starting from v3.7. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 72 ++++++++++++++++++++++++++++------------ drivers/rapidio/devices/tsi721.h | 11 ++++++ 2 files changed, 62 insertions(+), 21 deletions(-) commit 174f1a71cc692ddb4bc30ec93edb6d7eb370b382 Author: Alexandre Bounine Date: Tue Mar 22 14:25:48 2016 -0700 rapidio/tsi721: fix hardcoded MRRS setting Remove use of hardcoded setting for Maximum Read Request Size (MRRS) value and use one set by PCIe bus driver. Using hardcoded value can cause PCIe bus errors on platforms that have tsi721 device on PCIe path that allows only smaller read request sizes. This fix is applicable to kernel versions starting from v3.2. Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/tsi721.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 92444bb366ab6ace213c67e7dfea20fabe14adff Author: Aurelien Jacquiot Date: Tue Mar 22 14:25:45 2016 -0700 rapidio/rionet: add capability to change MTU These patches are the result of extensive collaboration within the RapidIO.org Software Task Group between Texas Instruments, Freescale, Prodrive Technologies, Nokia Networks, BAE and IDT. Additional input was received from other members of RapidIO.org. The objective was to create a character mode driver interface which exposes the capabilities of RapidIO devices directly to applications, in a manner that allows the numerous and varied RapidIO implementations to interoperate. The Software Task Group has also developed fabric management, Remote Memory Access, and sockets applications which make use of these interfaces in user space. Intensive testing with these applications prompted the RapidIO subsystem updates provided within this set of patches. This patch (of 29): Replace default Ethernet-specific routine by the custom one to allow setting of larger MTU supported by RapidIO messaging (max RIO packet size is 4096 bytes). Signed-off-by: Aurelien Jacquiot Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/rionet.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 36915976eca58f2eefa040ba8f9939672564df61 Author: Aurelien Jacquiot Date: Tue Mar 22 14:25:42 2016 -0700 rapidio/rionet: fix deadlock on SMP Fix deadlocking during concurrent receive and transmit operations on SMP platforms caused by the use of incorrect lock: on transmit 'tx_lock' spinlock should be used instead of 'lock' which is used for receive operation. This fix is applicable to kernel versions starting from v2.15. Signed-off-by: Aurelien Jacquiot Signed-off-by: Alexandre Bounine Cc: Matt Porter Cc: Andre van Herk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/rionet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95f27356e4a8982257ecae6bc44c650772d77659 Author: Eric Biggers Date: Tue Mar 22 14:25:39 2016 -0700 cpumask: remove incorrect information from comment Since commit cdfdef75e795 ("cpumask: only allocate nr_cpumask_bits."), this comment above cpumask_size() is no longer relevant. Signed-off-by: Eric Biggers Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpumask.h | 2 -- 1 file changed, 2 deletions(-) commit 378c6520e7d29280f400ef2ceaf155c86f05a71a Author: Jann Horn Date: Tue Mar 22 14:25:36 2016 -0700 fs/coredump: prevent fsuid=0 dumps into user-controlled directories This commit fixes the following security hole affecting systems where all of the following conditions are fulfilled: - The fs.suid_dumpable sysctl is set to 2. - The kernel.core_pattern sysctl's value starts with "/". (Systems where kernel.core_pattern starts with "|/" are not affected.) - Unprivileged user namespace creation is permitted. (This is true on Linux >=3.8, but some distributions disallow it by default using a distro patch.) Under these conditions, if a program executes under secure exec rules, causing it to run with the SUID_DUMP_ROOT flag, then unshares its user namespace, changes its root directory and crashes, the coredump will be written using fsuid=0 and a path derived from kernel.core_pattern - but this path is interpreted relative to the root directory of the process, allowing the attacker to control where a coredump will be written with root privileges. To fix the security issue, always interpret core_pattern for dumps that are written under SUID_DUMP_ROOT relative to the root directory of init. Signed-off-by: Jann Horn Acked-by: Kees Cook Cc: Al Viro Cc: "Eric W. Biederman" Cc: Andy Lutomirski Cc: Oleg Nesterov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/um/drivers/mconsole_kern.c | 2 +- fs/coredump.c | 30 ++++++++++++++++++++++++++---- fs/fhandle.c | 2 +- fs/open.c | 6 ++---- include/linux/fs.h | 2 +- kernel/sysctl_binary.c | 2 +- 6 files changed, 32 insertions(+), 12 deletions(-) commit 1333ab03150478df8d6f5673a91df1e50dc6ab97 Author: Oleg Nesterov Date: Tue Mar 22 14:25:33 2016 -0700 ptrace: change __ptrace_unlink() to clear ->ptrace under ->siglock This test-case (simplified version of generated by syzkaller) #include #include #include void test(void) { for (;;) { if (fork()) { wait(NULL); continue; } ptrace(PTRACE_SEIZE, getppid(), 0, 0); ptrace(PTRACE_INTERRUPT, getppid(), 0, 0); _exit(0); } } int main(void) { int np; for (np = 0; np < 8; ++np) if (!fork()) test(); while (wait(NULL) > 0) ; return 0; } triggers the 2nd WARN_ON_ONCE(!signr) warning in do_jobctl_trap(). The problem is that __ptrace_unlink() clears task->jobctl under siglock but task->ptrace is cleared without this lock held; this fools the "else" branch which assumes that !PT_SEIZED means PT_PTRACED. Note also that most of other PTRACE_SEIZE checks can race with detach from the exiting tracer too. Say, the callers of ptrace_trap_notify() assume that SEIZED can't go away after it was checked. Signed-off-by: Oleg Nesterov Reported-by: Dmitry Vyukov Cc: Tejun Heo Cc: syzkaller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ptrace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38739380683795354b3f0f1a1e80614e311b8617 Author: Maciej S. Szmigiero Date: Tue Mar 22 14:25:30 2016 -0700 fat: add config option to set UTF-8 mount option by default FAT has long supported its own default file name encoding config setting, separate from CONFIG_NLS_DEFAULT. However, if UTF-8 encoded file names are desired FAT character set should not be set to utf8 since this would make file names case sensitive even if case insensitive matching is requested. Instead, "utf8" mount options should be provided to enable UTF-8 file names in FAT file system. Unfortunately, there was no possibility to set the default value of this option so on UTF-8 system "utf8" mount option had to be added manually to most FAT mounts. This patch adds config option to set such default value. Signed-off-by: Maciej S. Szmigiero Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/vfat.txt | 7 ++++--- fs/fat/Kconfig | 18 +++++++++++++++++- fs/fat/inode.c | 4 +++- 3 files changed, 24 insertions(+), 5 deletions(-) commit f970165beeaa4803438e435d68022b3680a1a0b0 Author: Andy Lutomirski Date: Tue Mar 22 14:25:27 2016 -0700 x86/compat: remove is_compat_task() x86's is_compat_task always checked the current syscall type, not the task type. It has no non-arch users any more, so just remove it to avoid confusion. On x86, nothing should really be checking the task ABI. There are legitimate users for the syscall ABI and for the mm ABI. Signed-off-by: Andy Lutomirski Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/compat.h | 3 ++- arch/x86/include/asm/ftrace.h | 2 +- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 7365abbade07f9181cbd013669642f129e9ec635 Author: Andy Lutomirski Date: Tue Mar 22 14:25:24 2016 -0700 drivers/hid/uhid.c: check write() bitness using in_compat_syscall uhid changes the format expected in write() depending on bitness. It should check the syscall bitness directly. Signed-off-by: Andy Lutomirski Cc: David Herrmann Acked-by: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/hid/uhid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4056b52845283d1c1eaf546d7d05d74923029b2 Author: Andy Lutomirski Date: Tue Mar 22 14:25:21 2016 -0700 input: redefine INPUT_COMPAT_TEST as in_compat_syscall() The input compat code should work like all other compat code: for 32-bit syscalls, use the 32-bit ABI and for 64-bit syscalls, use the 64-bit ABI. We have a helper for that (in_compat_syscall()): just use it. Signed-off-by: Andy Lutomirski Cc: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/input/input-compat.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 10f1685fd59d4ded226123550bdaef176b99f65f Author: Andy Lutomirski Date: Tue Mar 22 14:25:19 2016 -0700 drivers/gpu/drm/amd/amdkfd: use in_compat_syscall to check open() caller type amdkfd wants to know syscall type, not task type. Check directly. Unfortunately, amdkfd is making nasty assumptions that a process' bitness is a well-defined constant thing. This isn't the case on x86. I don't know how much this matters, but this patch has no effect on generated code on x86, so amdkfd is equally broken with and without this patch. Signed-off-by: Andy Lutomirski Cc: Oded Gabbay Cc: David Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4f01ed221e2ef5e7efdb0ac89179b4faf4cc3c86 Author: Andy Lutomirski Date: Tue Mar 22 14:25:16 2016 -0700 drivers/firmware/efi/efivars.c: use in_compat_syscall() to check for compat callers This should make no difference on any architecture, as x86's historical is_compat_task behavior really did check whether the calling syscall was a compat syscall. x86's is_compat_task is going away, though. Signed-off-by: Andy Lutomirski Reviewed-by: Matt Fleming Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/firmware/efi/efivars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a25045ff32dfb4d28c650560d5f2a82c1773dd1c Author: Andy Lutomirski Date: Tue Mar 22 14:25:13 2016 -0700 firewire: use in_compat_syscall to check ioctl compatness Firewire was using is_compat_task to check whether it was in a compat ioctl or a non-compat ioctl. Use is_compat_syscall instead so it works properly on all architectures. Signed-off-by: Andy Lutomirski Cc: Clemens Ladisch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/firewire/core-cdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2bf8c47626599c54ab072a29ef1c294d3cce6b0a Author: Andy Lutomirski Date: Tue Mar 22 14:25:10 2016 -0700 net/xfrm_user: use in_compat_syscall to deny compat syscalls The code wants to prevent compat code from receiving messages. Use in_compat_syscall for this. Signed-off-by: Andy Lutomirski Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96c0e0a908ecfa61118d49db85c03e162b7f6e20 Author: Andy Lutomirski Date: Tue Mar 22 14:25:07 2016 -0700 net/sctp: use in_compat_syscall for sctp_getsockopt_connectx3 SCTP unfortunately has a different ABI for SCTP_SOCKOPT_CONNECTX3 for 32-bit and 64-bit callers. Use in_compat_syscall to correctly distinguish them on all architectures. Signed-off-by: Andy Lutomirski Cc: Vlad Yasevich Cc: Neil Horman Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 121cef8f17d80e97838ea2f88715417e675e4403 Author: Andy Lutomirski Date: Tue Mar 22 14:25:04 2016 -0700 ext4: in ext4_dir_llseek, check syscall bitness directly ext4 treats directory offsets differently for 32-bit and 64-bit callers. Check the caller type using in_compat_syscall, not is_compat_task. This changes behavior on SPARC slightly. Signed-off-by: Andy Lutomirski Cc: "Theodore Ts'o" Cc: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d8bedff926b7d31fa68e7f81c2f13fdc29fe157 Author: Andy Lutomirski Date: Tue Mar 22 14:25:01 2016 -0700 staging/lustre: switch from is_compat_task to in_compat_syscall AFAICT, lustre is trying to determine syscall bitness. Use the new accessor. Signed-off-by: Andy Lutomirski Cc: Oleg Drokin Cc: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efbc0fbf34927bd4d3d49b50b370990be82809c2 Author: Andy Lutomirski Date: Tue Mar 22 14:24:58 2016 -0700 auditsc: for seccomp events, log syscall compat state using in_compat_syscall Except on SPARC, this is what the code always did. SPARC compat seccomp was buggy, although the impact of the bug was limited because SPARC 32-bit and 64-bit syscall numbers are the same. Signed-off-by: Andy Lutomirski Cc: Paul Moore Cc: Eric Paris Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/auditsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c465217a930d4bbb7dd35a56bde1eea5bbd14d6 Author: Andy Lutomirski Date: Tue Mar 22 14:24:55 2016 -0700 ptrace: in PEEK_SIGINFO, check syscall bitness, not task bitness Users of the 32-bit ptrace() ABI expect the full 32-bit ABI. siginfo translation should check ptrace() ABI, not caller task ABI. This is an ABI change on SPARC. Let's hope that no one relied on the old buggy ABI. Signed-off-by: Andy Lutomirski Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c38065e021bc76f97fc08997f6d7fc7ea3fb7a7 Author: Andy Lutomirski Date: Tue Mar 22 14:24:52 2016 -0700 seccomp: check in_compat_syscall, not is_compat_task, in strict mode Seccomp wants to know the syscall bitness, not the caller task bitness, when it selects the syscall whitelist. As far as I know, this makes no difference on any architecture, so it's not a security problem. (It generates identical code everywhere except sparc, and, on sparc, the syscall numbering is the same for both ABIs.) Signed-off-by: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 203f79078fea8525d0b0a13f2e13534b7ff3aa97 Author: Andy Lutomirski Date: Tue Mar 22 14:24:49 2016 -0700 sparc/syscall: fix syscall_get_arch Sparc's syscall_get_arch was buggy: it returned the task arch, not the syscall arch. This could confuse seccomp and audit. I don't think this is as bad for seccomp as it looks: sparc's 32-bit and 64-bit syscalls are numbered the same. Signed-off-by: Andy Lutomirski Cc: David S. Miller Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/syscall.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 069923d87e97a26d5f4ee2d53829f2d3cd05294b Author: Andy Lutomirski Date: Tue Mar 22 14:24:46 2016 -0700 sparc/compat: provide an accurate in_compat_syscall implementation On sparc64 compat-enabled kernels, any task can make 32-bit and 64-bit syscalls. is_compat_task returns true in 32-bit tasks, which does not necessarily imply that the current syscall is 32-bit. Provide an in_compat_syscall implementation that checks whether the current syscall is compat. As far as I know, sparc is the only architecture on which is_compat_task checks the compat status of the task and on which the compat status of a syscall can differ from the compat status of the task. On x86, is_compat_task checks the syscall type, not the task type. [akpm@linux-foundation.org: add comment, per Sam] [akpm@linux-foundation.org: update comment, per Andy] Signed-off-by: Andy Lutomirski Acked-by: David S. Miller Cc: Sam Ravnborg Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/compat.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 5180e3e24fd3e8e7ea46fbe21e10f5ea3fb1edaa Author: Andy Lutomirski Date: Tue Mar 22 14:24:43 2016 -0700 compat: add in_compat_syscall to ask whether we're in a compat syscall A lot of code currently abuses is_compat_task to determine this. Signed-off-by: Andy Lutomirski Cc: "David S. Miller" Cc: "H. Peter Anvin" Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: Clemens Ladisch Cc: David Airlie Cc: David Herrmann Cc: David Miller Cc: Dmitry Torokhov Cc: Eric Paris Cc: Herbert Xu Cc: Ingo Molnar Acked-by: Jiri Kosina Cc: Matt Fleming Cc: Neil Horman Cc: Oded Gabbay Cc: Oleg Drokin Cc: Oleg Nesterov Cc: Paul Moore Cc: Sam Ravnborg Cc: Steffen Klassert Cc: Thomas Gleixner Cc: Vlad Yasevich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compat.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b4aa14a63cb3194d8eab355fcee194838ab09121 Author: Tetsuo Handa Date: Tue Mar 22 14:24:39 2016 -0700 kernel/hung_task.c: use timeout diff when timeout is updated When new timeout is written to /proc/sys/kernel/hung_task_timeout_secs, khungtaskd is interrupted and again sleeps for full timeout duration. This means that hang task will not be checked if new timeout is written periodically within old timeout duration and/or checking of hang task will be delayed for up to previous timeout duration. Fix this by remembering last time khungtaskd checked hang task. This change will allow other watchdog tasks (if any) to share khungtaskd by sleeping for minimal timeout diff of all watchdog tasks. Doing more watchdog tasks from khungtaskd will reduce the possibility of printk() collisions by multiple watchdog threads. Signed-off-by: Tetsuo Handa Cc: Oleg Nesterov Cc: Aaron Tomlin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/hung_task.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 3f2b1a04f44933f2d6fe0a9bf9a9c1c452df23f7 Author: Minchan Kim Date: Tue Mar 22 14:24:36 2016 -0700 zram: revive swap_slot_free_notify Commit b430e9d1c6d4 ("remove compressed copy from zram in-memory") applied swap_slot_free_notify call in *end_swap_bio_read* to remove duplicated memory between zram and memory. However, with the introduction of rw_page in zram: 8c7f01025f7b ("zram: implement rw_page operation of zram"), it became void because rw_page doesn't need bio. Memory footprint is really important in embedded platforms which have small memory, for example, 512M) recently because it could start to kill processes if memory footprint exceeds some threshold by LMK or some similar memory management modules. This patch restores the function for rw_page, thereby eliminating this duplication. Signed-off-by: Minchan Kim Cc: Sergey Senozhatsky Cc: karam.lee Cc: Cc: Chan Jeong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_io.c | 93 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 43 deletions(-) commit d750c42ac265c00df3f0963a240a4440fa073603 Author: Gang He Date: Tue Mar 22 14:24:33 2016 -0700 ocfs2: add feature document for online file check This document will describe OCFS2 online file check feature. OCFS2 is often used in high-availaibility systems. However, OCFS2 usually converts the filesystem to read-only when encounters an error. This may not be necessary, since turning the filesystem read-only would affect other running processes as well, decreasing availability. Then, a mount option (errors=continue) is introduced, which would return the -EIO errno to the calling process and terminate furhter processing so that the filesystem is not corrupted further. The filesystem is not converted to read-only, and the problematic file's inode number is reported in the kernel log. The user can try to check/fix this file via online filecheck feature. 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 .../filesystems/ocfs2-online-filecheck.txt | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit d56a8f32e4c662509ce50a37e78fa66c777977d3 Author: Gang He Date: Tue Mar 22 14:24:30 2016 -0700 ocfs2: check/fix inode block for online file check Implement online check or fix inode block during reading a inode block to memory. Signed-off-by: Gang He Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/inode.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++-- fs/ocfs2/ocfs2_trace.h | 2 + 2 files changed, 218 insertions(+), 9 deletions(-) commit a849d46816fe9e11d59aae78ea95c54f640b1904 Author: Gang He Date: Tue Mar 22 14:24:27 2016 -0700 ocfs2: create/remove sysfile for online file check Create online file check sysfile when ocfs2 mount, remove the related sysfile when ocfs2 umount. Signed-off-by: Gang He Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/super.c | 5 +++++ 1 file changed, 5 insertions(+) commit a860f6eb4c6a8bb0ca6860d9472f424bad9af9cf Author: Gang He Date: Tue Mar 22 14:24:24 2016 -0700 ocfs2: sysfile interfaces for online file check Implement online file check sysfile interfaces, e.g. how to create the related sysfile according to device name, how to display/handle file check request from the sysfile. Signed-off-by: Gang He Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/Makefile | 3 +- fs/ocfs2/filecheck.c | 606 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/filecheck.h | 49 +++++ fs/ocfs2/inode.h | 3 + 4 files changed, 660 insertions(+), 1 deletion(-) commit 9dde5e4f3383c3459a67ab63786ca58d645d6b5e Author: Gang He Date: Tue Mar 22 14:24:20 2016 -0700 ocfs2: export ocfs2_kset for online file check When there are errors in the ocfs2 filesystem, they are usually accompanied by the inode number which caused the error. This inode number would be the input to fixing the file. One of these options could be considered: A file in the sys filesytem which would accept inode numbers. This could be used to communication back what has to be fixed or is fixed. You could write: $# echo "" > /sys/fs/ocfs2/devname/filecheck/check or $# echo "" > /sys/fs/ocfs2/devname/filecheck/fix Compare with second version, I re-design filecheck sysfs interfaces, there are three sysfs files (check, fix and set) under filecheck directory (see above), sysfs will accept only one argument . Second, I adjust some code in ocfs2_filecheck_repair_inode_block() function according to upstream feedback, we cannot just add VALID_FL flag back as a inode block fix, then we will not fix this field corruption currently until having a complete solution. Compare with first version, I use strncasecmp instead of double strncmp functions. Second, update the source file contribution vendor. This patch (of 4): Export ocfs2_kset object from ocfs2_stackglue kernel module, then online file check code will create the related sysfiles under ocfs2_kset object. We're exporting this because it's built in ocfs2_stackglue.ko. Signed-off-by: Gang He Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/stackglue.c | 3 ++- fs/ocfs2/stackglue.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 539a4c4247c2697d291a8fb02c485ccd7cf34f05 Author: Rafael J. Wysocki Date: Tue Mar 22 01:17:43 2016 +0100 cpufreq: governor: Always schedule work on the CPU running update Modify dbs_irq_work() to always schedule the process-context work on the current CPU which also ran the dbs_update_util_handler() that the irq_work being handled came from. This causes the entire frequency update handling (involving the "ondemand" or "conservative" governors) to be carried out by the CPU whose frequency is to be updated and reduces the overall amount of inter-CPU noise related to cpufreq. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bbf8fe3ae0845af9192118753c2399efe531832 Author: Rafael J. Wysocki Date: Mon Mar 21 15:47:48 2016 +0100 cpufreq: Always update current frequency before startig governor Make policy->cur match the current frequency returned by the driver's ->get() callback before starting the governor in case they went out of sync in the meantime and drop the piece of code attempting to resync policy->cur with the real frequency of the boot CPU from cpufreq_resume() as it serves no purpose any more (and it's racy and super-ugly anyway). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 999f572983de5e1a4ee9f42daa51b5448f12dd64 Author: Rafael J. Wysocki Date: Mon Mar 21 15:46:25 2016 +0100 cpufreq: Introduce cpufreq_update_current_freq() Move the part of cpufreq_update_policy() that obtains the current frequency from the driver and updates policy->cur if necessary to a separate function, cpufreq_get_current_freq(). That should not introduce functional changes and subsequent change set will need it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 0a300767e5882ad5b687966c80f9620aa0871be5 Author: Rafael J. Wysocki Date: Mon Mar 21 15:45:24 2016 +0100 cpufreq: Introduce cpufreq_start_governor() Starting a governor in cpufreq always follows the same pattern involving two calls to cpufreq_governor(), one with the event argument set to CPUFREQ_GOV_START and one with that argument set to CPUFREQ_GOV_LIMITS. Introduce cpufreq_start_governor() that will carry out those two operations and make all places where governors are started use it. That slightly modifies the behavior of cpufreq_set_policy() which now also will go back to the old governor if the second call to cpufreq_governor() (the one with event equal to CPUFREQ_GOV_LIMITS) fails, but that really is how it should work in the first place. Also cpufreq_resume() will now pring an error message if the CPUFREQ_GOV_LIMITS call to cpufreq_governor() fails, but that makes it follow cpufreq_add_policy_cpu() and cpufreq_offline() in that respect. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 1b0289848d5dcea74a6e5115d6c9892b0dbe9c8f Author: Shilpasri G Bhat Date: Tue Mar 22 18:57:09 2016 +0530 cpufreq: powernv: Add sysfs attributes to show throttle stats Create sysfs attributes to export throttle information in /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory. The newly added sysfs files are as follows: 1)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat 2)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub-turbo_stat 3)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle 4)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap 5)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp 6)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault 7)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent 8)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset Detailed explanation of each attribute is added to Documentation/ABI/testing/sysfs-devices-system-cpu Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-devices-system-cpu | 69 ++++++++++++++++++++ drivers/cpufreq/powernv-cpufreq.c | 74 +++++++++++++++++++++- 2 files changed, 141 insertions(+), 2 deletions(-) commit ac13b9967de7eeb7746f6533673e4dec94933bc9 Author: Jisheng Zhang Date: Tue Mar 22 22:34:30 2016 +0800 cpufreq: acpi-cpufreq: make Intel/AMD MSR access, io port access static These frequency register read/write operations' implementations for the given processor (Intel/AMD MSR access or I/O port access) are only used internally in acpi-cpufreq, so make them static. Signed-off-by: Jisheng Zhang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4a2e7aab4ffce1e0e79b303dc2f9a03aa9f3a332 Author: Lorenzo Pieralisi Date: Mon Mar 21 11:12:55 2016 +0000 PCI: ACPI: IA64: fix IO port generic range check The [0 - 64k] ACPI PCI IO port resource boundary check in: acpi_dev_ioresource_flags() is currently applied blindly in the ACPI resource parsing to all architectures, but only x86 suffers from that IO space limitation. On arches (ie IA64 and ARM64) where IO space is memory mapped, the PCI root bridges IO resource windows are firstly initialized from the _CRS (in acpi_decode_space()) and contain the CPU physical address at which a root bridge decodes IO space in the CPU physical address space with the offset value representing the offset required to translate the PCI bus address into the CPU physical address. The IO resource windows are then parsed and updated in arch code before creating and enumerating PCI buses (eg IA64 add_io_space()) to map in an arch specific way the obtained CPU physical address range to a slice of virtual address space reserved to map PCI IO space, ending up with PCI bridges resource windows containing IO resources like the following on a working IA64 configuration: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [io 0x1000000-0x100ffff window] (bus address [0x0000-0xffff]) pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000fffff window] pci_bus 0000:00: root bus resource [mem 0x80000000-0x8fffffff window] pci_bus 0000:00: root bus resource [mem 0x80004000000-0x800ffffffff window] pci_bus 0000:00: root bus resource [bus 00] This implies that the [0 - 64K] check in acpi_dev_ioresource_flags() leaves platforms with memory mapped IO space (ie IA64) broken (ie kernel can't claim IO resources since the host bridge IO resource is disabled and discarded by ACPI core code, see log on IA64 with missing root bridge IO resource, silently filtered by current [0 - 64k] check in acpi_dev_ioresource_flags()): PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000fffff window] pci_bus 0000:00: root bus resource [mem 0x80000000-0x8fffffff window] pci_bus 0000:00: root bus resource [mem 0x80004000000-0x800ffffffff window] pci_bus 0000:00: root bus resource [bus 00] [...] pci 0000:00:03.0: [1002:515e] type 00 class 0x030000 pci 0000:00:03.0: reg 0x10: [mem 0x80000000-0x87ffffff pref] pci 0000:00:03.0: reg 0x14: [io 0x1000-0x10ff] pci 0000:00:03.0: reg 0x18: [mem 0x88020000-0x8802ffff] pci 0000:00:03.0: reg 0x30: [mem 0x88000000-0x8801ffff pref] pci 0000:00:03.0: supports D1 D2 pci 0000:00:03.0: can't claim BAR 1 [io 0x1000-0x10ff]: no compatible bridge window For this reason, the IO port resources boundaries check in generic ACPI parsing code should be guarded with a CONFIG_X86 guard so that more arches (ie ARM64) can benefit from the generic ACPI resources parsing interface without incurring in unexpected resource filtering, fixing at the same time current breakage on IA64. This patch factors out IO ports boundary [0 - 64k] check in generic ACPI code and makes the IO space check X86 specific to make sure that IO space resources are usable on other arches too. Fixes: 3772aea7d6f3 (ia64/PCI/ACPI: Use common ACPI resource parsing interface for host bridge) Signed-off-by: Lorenzo Pieralisi Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki drivers/acpi/resource.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 7e6867bf831c71fe0e47438831ae3a94d4c7ab3c Author: Peter Zijlstra Date: Fri Mar 18 16:28:04 2016 +0100 tracing: Record and show NMI state The latency tracer format has a nice column to indicate IRQ state, but this is not able to tell us about NMI state. When tracing perf interrupt handlers (which often run in NMI context) it is very useful to see how the events nest. Link: http://lkml.kernel.org/r/20160318153022.105068893@infradead.org Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt kernel/trace/trace.c | 1 + kernel/trace/trace.h | 1 + kernel/trace/trace_output.c | 10 +++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) commit 3debb0a9ddb16526de8b456491b7db60114f7b5e Author: Steven Rostedt (Red Hat) Date: Tue Mar 22 17:30:58 2016 -0400 tracing: Fix trace_printk() to print when not using bprintk() The trace_printk() code will allocate extra buffers if the compile detects that a trace_printk() is used. To do this, the format of the trace_printk() is saved to the __trace_printk_fmt section, and if that section is bigger than zero, the buffers are allocated (along with a message that this has happened). If trace_printk() uses a format that is not a constant, and thus something not guaranteed to be around when the print happens, the compiler optimizes the fmt out, as it is not used, and the __trace_printk_fmt section is not filled. This means the kernel will not allocate the special buffers needed for the trace_printk() and the trace_printk() will not write anything to the tracing buffer. Adding a "__used" to the variable in the __trace_printk_fmt section will keep it around, even though it is set to NULL. This will keep the string from being printed in the debugfs/tracing/printk_formats section as it is not needed. Reported-by: Vlastimil Babka Fixes: 07d777fe8c398 "tracing: Add percpu buffers for trace_printk()" Cc: stable@vger.kernel.org # v3.5+ Signed-off-by: Steven Rostedt include/linux/kernel.h | 6 +++--- kernel/trace/trace_printk.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 9a3492194eca6253ae7ba93c7a402cecad7f1c94 Merge: 9a0384c f7f9b5e Author: David S. Miller Date: Tue Mar 22 16:18:42 2016 -0400 Merge branch 'AF_VSOCK-missed-wakeups' Claudio Imbrenda says: ==================== AF_VSOCK: Shrink the area influenced by prepare_to_wait This patchset applies on net-next. I think I found a problem with the patch submitted by Laura Abbott ( https://lkml.org/lkml/2016/2/4/711 ): we might miss wakeups. Since the condition is not checked between the prepare_to_wait and the schedule(), if a wakeup happens after the condition is checked but before the sleep happens, and we miss it. ( A description of the problem can be found here: http://www.makelinux.net/ldd3/chp-6-sect-2 ). The first patch reverts the previous broken patch, while the second patch properly fixes the sleep-while-waiting issue. ==================== Signed-off-by: David S. Miller commit f7f9b5e7f8eccfd68ffa7b8d74b07c478bb9e7f0 Author: Claudio Imbrenda Date: Tue Mar 22 17:05:52 2016 +0100 AF_VSOCK: Shrink the area influenced by prepare_to_wait When a thread is prepared for waiting by calling prepare_to_wait, sleeping is not allowed until either the wait has taken place or finish_wait has been called. The existing code in af_vsock imposed unnecessary no-sleep assumptions to a broad list of backend functions. This patch shrinks the influence of prepare_to_wait to the area where it is strictly needed, therefore relaxing the no-sleep restriction there. Signed-off-by: Claudio Imbrenda Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 158 +++++++++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 73 deletions(-) commit 6f57e56a1527d58264ae126eff94fdac067744fc Author: Claudio Imbrenda Date: Tue Mar 22 17:05:51 2016 +0100 Revert "vsock: Fix blocking ops call in prepare_to_wait" This reverts commit 5988818008257ca42010d6b43a3e0e48afec9898 ("vsock: Fix blocking ops call in prepare_to_wait") The commit reverted with this patch caused us to potentially miss wakeups. Since the condition is not checked between the prepare_to_wait and the schedule(), if a wakeup happens after the condition is checked but before the sleep happens, we will miss it. ( A description of the problem can be found here: http://www.makelinux.net/ldd3/chp-6-sect-2 ). By reverting the patch, the behaviour is still incorrect (since we shouldn't sleep between the prepare_to_wait and the schedule) but at least it will not miss wakeups. The next patch in the series actually fixes the behaviour. Signed-off-by: Claudio Imbrenda Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 01cde1538e1dff4254e340f606177a870131a01f Merge: 243d506 f35592a Author: Linus Torvalds Date: Tue Mar 22 13:16:21 2016 -0700 Merge tag 'nfs-for-4.6-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - Add support for multiple NFSv4.1 callbacks in flight - Initial patchset for RPC multipath support - Adapt RPC/RDMA to use the new completion queue API Bugfixes and cleanups: - nfs4: nfs4_ff_layout_prepare_ds should return NULL if connection failed - Cleanups to remove nfs_inode_dio_wait and nfs4_file_fsync - Fix RPC/RDMA credit accounting - Properly handle RDMA_ERROR replies - xprtrdma: Do not wait if ib_post_send() fails - xprtrdma: Segment head and tail XDR buffers on page boundaries - xprtrdma cleanups for dprintk, physical_op_map and unused macros" * tag 'nfs-for-4.6-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (35 commits) nfs/blocklayout: make sure making a aligned read request nfs4: nfs4_ff_layout_prepare_ds should return NULL if connection failed nfs: remove nfs_inode_dio_wait nfs: remove nfs4_file_fsync xprtrdma: Use new CQ API for RPC-over-RDMA client send CQs xprtrdma: Use an anonymous union in struct rpcrdma_mw xprtrdma: Use new CQ API for RPC-over-RDMA client receive CQs xprtrdma: Serialize credit accounting again xprtrdma: Properly handle RDMA_ERROR replies rpcrdma: Add RPCRDMA_HDRLEN_ERR xprtrdma: Do not wait if ib_post_send() fails xprtrdma: Segment head and tail XDR buffers on page boundaries xprtrdma: Clean up dprintk format string containing a newline xprtrdma: Clean up physical_op_map() xprtrdma: Clean up unused RPCRDMA_INLINE_PAD_THRESH macro NFS add callback_ops to nfs4_proc_bind_conn_to_session_callback pnfs/NFSv4.1: Add multipath capabilities to pNFS flexfiles servers over NFSv3 SUNRPC: Allow addition of new transports to a struct rpc_clnt NFSv4.1: nfs4_proc_bind_conn_to_session must iterate over all connections SUNRPC: Make NFS swap work with multipath ... commit 9e92f48c34eb2b9af9d12f892e2fe1fce5e8ce35 Author: Theodore Ts'o Date: Tue Mar 22 16:13:15 2016 -0400 ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea() We aren't checking to see if the in-inode extended attribute is corrupted before we try to expand the inode's extra isize fields. This can lead to potential crashes caused by the BUG_ON() check in ext4_xattr_shift_entries(). Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 243d50678583100855862bc084b8b307eea67f68 Merge: 9f15dec 6986c01 Author: Linus Torvalds Date: Tue Mar 22 13:11:15 2016 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "Various fixes and tweaks" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: cleanup unused var in rename2 ovl: rename is_merge to is_lowest ovl: fixed coding style warning ovl: Ensure upper filesystem supports d_type ovl: Warn on copy up if a process has a R/O fd open to the lower file ovl: honor flag MS_SILENT at mount ovl: verify upper dentry before unlink and rename commit 9a0384c020b055a555500906be8ac314c92f3998 Author: Sergei Shtylyov Date: Tue Mar 22 22:27:38 2016 +0300 macb: fix PHY reset The driver calls gpiod_set_value() with GPIOD_OUT_* instead of 0 and 1, as a result the PHY isn't really put back into reset state in macb_remove(). Moreover, the driver assumes that something else has set the GPIO direction to output, so if it has not, the PHY may not be taken out of reset in macb_probe() either... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f15dec81339a76d91daebc53021daf56b8b15b9 Merge: 55fc733 742f992 Author: Linus Torvalds Date: Tue Mar 22 13:05:34 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse update from Miklos Szeredi: "This contains direct I/O fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: return patrial success from fuse_direct_io() fuse: Add reference counting for fuse_io_priv fuse: do not use iocb after it may have been freed commit 1135035d9275ef9aecad23fc715a69ff78904adf Author: Dave Airlie Date: Tue Mar 22 09:38:19 2016 +1000 drm/radeon/mst: cleanup code indentation This was all sorts of ugly from when I hacked it up, just clean it up now and remove the extra indents. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_mst.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit b36f7d26a7fdc0b07b1217368ee09bb8560269f8 Author: Dave Airlie Date: Tue Mar 22 09:38:18 2016 +1000 drm/radeon/mst: fix regression in lane/link handling. The function this used changed in 092c96a8ab9d1bd60ada2ed385cc364ce084180e drm/radeon: fix dp link rate selection (v2) However for MST we should just always train to the max link/rate. Though we probably need to limit this for future hw, in theory radeon won't support it. This fixes my 30" monitor with MST enabled. Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_mst.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 4cfc86f3dae6ca38ed49cdd78f458a03d4d87992 Author: Lance Richardson Date: Tue Mar 22 14:56:57 2016 -0400 ipv4: initialize flowi4_flags before calling fib_lookup() Field fl4.flowi4_flags is not initialized in fib_compute_spec_dst() before calling fib_lookup(), which means fib_table_lookup() is using non-deterministic data at this line: if (!(flp->flowi4_flags & FLOWI_FLAG_SKIP_NH_OIF)) { Fix by initializing the entire fl4 structure, which will prevent similar issues as fields are added in the future by ensuring that all fields are initialized to zero unless explicitly initialized to another value. Fixes: 58189ca7b2741 ("net: Fix vti use case with oif in dst lookups") Suggested-by: David Ahern Signed-off-by: Lance Richardson Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 6e9bdc7271ac8e2af58a2c9a87551d9bd49337a1 Author: Igal Liberman Date: Mon Mar 21 23:08:11 2016 +0200 fsl/fman: Workaround for Errata A-007273 Errata A-007273 (For FMan V3 devices only): FMan soft reset is not finished properly if one of the Ethernet MAC clocks is disabled Workaround: Re-enable all disabled MAC clocks through the DCFG_CCSR_DEVDISR2 register prior to issuing an FMAN soft reset. Re-disable the MAC clocks after the FMAN soft reset is done. Signed-off-by: Igal Liberman Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 104 ++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 16 deletions(-) commit 55fc733c7e1de05a03237d857f4fe6dcec52d8d9 Merge: b852495 e01dc53 Author: Linus Torvalds Date: Tue Mar 22 12:55:17 2016 -0700 Merge tag 'for-linus-4.6-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from David Vrabel: "Features and fixes for 4.6: - Make earlyprintk=xen work for HVM guests - Remove module support for things never built as modules" * tag 'for-linus-4.6-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: drivers/xen: make platform-pci.c explicitly non-modular drivers/xen: make sys-hypervisor.c explicitly non-modular drivers/xen: make xenbus_dev_[front/back]end explicitly non-modular drivers/xen: make [xen-]ballon explicitly non-modular xen: audit usages of module.h ; remove unnecessary instances xen/x86: Drop mode-selecting ifdefs in startup_xen() xen/x86: Zero out .bss for PV guests hvc_xen: make early_printk work with HVM guests hvc_xen: fix xenboot for DomUs hvc_xen: add earlycon support commit ad0ea1989cc4d5905941d0a9e62c63ad6d859cef Author: Paolo Abeni Date: Tue Mar 22 09:19:38 2016 +0100 ipv4: fix broadcast packets reception Currently, ingress ipv4 broadcast datagrams are dropped since, in udp_v4_early_demux(), ip_check_mc_rcu() is invoked even on bcast packets. This patch addresses the issue, invoking ip_check_mc_rcu() only for mcast packets. Fixes: 6e5403093261 ("ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()") Signed-off-by: Paolo Abeni Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/udp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit b852495908cd1b02ad47672a83f622ad4264801b Merge: 5266e5b 886f6f8 Author: Linus Torvalds Date: Tue Mar 22 12:47:40 2016 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Mostly usual driver updates and improvements. The changelog should give an idea. Standing out is the i2c-qup driver with lots of new capabilities and we also have now an i2c-demuxer. I'd especially like to welcome Peter Rosin as the i2c-mux maintainer. He has an interesting series for muxes in the queue and agreed to look after this part of the subsystem. Thank you, Peter, and welcome again! The octeon changes were applied pretty recently before the merge window. I am aware. They are the first (and relatively simple) patches of a larger overhaul to this driver. In case something goes wrong with them, they are easy to fix (or revert). The advantage I see is that they are out of the way, and I can concentrate on the next block of patches. I really would like to apply the overhaul in smaller batches to avoid regressions. And waiting a cycle for the introductory patches seemed too much of a delay for me" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (39 commits) i2c: octeon: Support I2C_M_RECV_LEN i2c: octeon: Cleanup resource allocation code i2c: octeon: Cleanup i2c-octeon driver MAINTAINERS: add Peter Rosin as i2c mux maintainer dt-bindings: i2c: Spelling s/propoerty/property/ i2c: immediately mark ourselves as registered i2c: i801: sort IDs alphabetically MAINTAINERS: Mika and me are designated reviewers for I2C DESIGNWARE i2c: octeon: Cleanup kerneldoc comments i2c: do not use internal data from driver core i2c: cadence: Fix the kernel-doc warnings i2c: imx: remove extra spaces. i2c: rcar: don't open code of_device_get_match_data() i2c: qup: Fix fifo handling after adding V2 support i2c: xiic: Implement power management i2c: piix4: Pre-shift the port number i2c: piix4: Always use the same type for port i2c: piix4: Support alternative port selection register i2c: tegra: don't open code of_device_get_match_data() i2c: riic, sh_mobile, rcar: Use ARCH_RENESAS ... commit 0419f4a953f8e08faef3ec9f5dab1cf697a4d7e1 Merge: db219ba 0b51b1d Author: David S. Miller Date: Tue Mar 22 15:45:59 2016 -0400 Merge branch 'hns-fixes' Yisen Zhuang says: ==================== net: hns: bugs fixed for hns This series includes some bug fixes and updates for hns driver. >from Daode, one fix about mss. >from Kejian, one fix about ping6 issue, one fix about mac address setting, two fix for RSS setting, two fix about mtu setting. >from qianqian, fixed HNS v2 xge statistic reg issue. >from Sheng, one fix about manage packets sending, one fix about GMACs mac setting. For more details, please see individual patches. Thanks a lot! --- change log: Series V2: - fix the comments as below: 1) modifies the wrong charator "whick" to "which" in commit log 2) use the "eth_hdr()" help to get source mac of packets 3) fix the wrong cast 4) use tabs instead of spaces to indent the value Series V1: - first submit ==================== Signed-off-by: David S. Miller commit 0b51b1dc7920bb722ee74dab4bb3b8799779e9b8 Author: Daode Huang Date: Tue Mar 22 16:06:31 2016 +0800 net: hns: bug fix about the overflow of mss When set MTU to the minimum value 68, there are increasing number of error packets occur, which is caused by the overflowed value of mss. This patch fix the bug. Signed-off-by: Daode Huang Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 211b1384030d3b94f962573f9bc5e5726bf79197 Author: Kejian Yan Date: Tue Mar 22 16:06:30 2016 +0800 net: hns: adds limitation for debug port mtu If mtu for debug port is set more than 1500, it may cause that packets are dropped by ppe. So maximum value for debug port should be 1500. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 1 + 2 files changed, 4 insertions(+) commit da3488bbde50c274a327afa67a141c86c065e0fa Author: Kejian Yan Date: Tue Mar 22 16:06:29 2016 +0800 net: hns: fix the bug about mtu setting In chip V1, the maximum mtu value is 9600. But in chip V2, it is 9728. And it is always configurates as 9600 before this patch. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 4 +++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.h | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) commit 717dd807383b074c1ff3852a05ea5d1289827993 Author: Kejian Yan Date: Tue Mar 22 16:06:28 2016 +0800 net: hns: fixes a bug of RSS If trying to get receive flow hash indirection table by ethtool, it needs to call .get_rxnfc to get ring number first. So this patch implements the .get_rxnfc of ethtool. And the data type of rss_indir_table is u32, it has to be multiply by the width of data type when using memcpy. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 6 ++++-- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) commit beecfe9e269574973ea1b37472dc81dd0364d012 Author: Kejian Yan Date: Tue Mar 22 16:06:27 2016 +0800 net: hns: fix return value of the function about rss Both .get_rxfh and .set_rxfh are always return 0, it should return result from hardware when getting or setting rss. And the rss function should return the correct data type. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 24 ++++++----------------- 3 files changed, 8 insertions(+), 20 deletions(-) commit 6f80563c03524c658bb4788fa0973f43108670c4 Author: Qianqian Xie Date: Tue Mar 22 16:06:26 2016 +0800 net: hns: set xge statistic reg as read only As the user manual of HNS V2 describs, XGE_DFX_CTRL_CFG.xge_dfx_ctrl_cfg should be configed as zero if we want xge statistic reg to be read only. But HNS V1 gets the other meanings. It needs to be identified the process and then config it rightly. Signed-off-by: Qianqian Xie Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a52047770f2720c9a3d49e2c95a269ef29463415 Author: Sheng Li Date: Tue Mar 22 16:06:25 2016 +0800 net: hns: fixed the bug about GMACs mac setting When sending a pause frame out from GMACs, the packets' source MAC address does not match the GMACs' MAC address. It causes by the condition before the mac address setting routine for GMACs, the mac address cannot be set into loacal mac table for service ports. It obviously the condition needs to be deleted. Signed-off-by: Sheng Li Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d5679849d134704bd9f9e95d2370eb60abf37ed5 Author: Kejian Yan Date: Tue Mar 22 16:06:24 2016 +0800 net: hns: add uc match for debug ports Debug ports receives lots of packets with dest mac addr does not match local mac addr, because the filter is close, and it does not drop the useless packets. This patch adds ON/OFF switch of filtering the packets whose dest mac addr do not match the local addr in mac table. And the switch is ON in initialization. Signed-off-by: Kejian Yan Signed-off-by: Peng Li Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 28 +++++++++++++++++++++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 8 +++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 4 +++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 2 ++ 5 files changed, 43 insertions(+), 2 deletions(-) commit f8a1a636c2a940d37dba9153bcfe687a802745fb Author: Sheng Li Date: Tue Mar 22 16:06:23 2016 +0800 net: hns: fixed portid bug in sending manage pkt In chip V2, the default value of port id in tx BD is Zero. If it is not configurated to the other value, all management packets will be sent out from port0. So port_id in the tx BD needs to be updated when sending a management packet. In V2 chip, when sending mamagement packets, the driver should config the port id to BD descs. Signed-off-by: Sheng Li Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 1 + drivers/net/ethernet/hisilicon/hns/hns_enet.c | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) commit 0d6b425a3773c3445b0f51b2f333821beaacb619 Author: Kejian Yan Date: Tue Mar 22 16:06:22 2016 +0800 net: hns: bug fix about ping6 The current upstreaming code fails to ping other IPv6 net device, because the enet receives the multicast packets with the src mac addr which is the same as its mac addr. These packets need to be dropped. Signed-off-by: Kejian Yan Signed-off-by: Yisen Zhuang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit db219baf19a7024ec1db71f7c3c2663d49de1818 Author: Luis de Bethencourt Date: Mon Mar 21 17:37:28 2016 +0000 ipv6: remove unused in6_addr struct struct in6_addr isn't used anymore in inet6_connection_sock.h, removing the forward declaration. Fixes: 1b33bc3e9e90 ("ipv6: remove obsolete inet6 functions") Signed-off-by: Luis de Bethencourt Signed-off-by: David S. Miller include/net/inet6_connection_sock.h | 1 - 1 file changed, 1 deletion(-) commit 025c68186e07afaededa84143f1a22f273cd3f67 Author: David Decotigny Date: Mon Mar 21 10:15:35 2016 -0700 netlink: add support for NIC driver ioctls By returning -ENOIOCTLCMD, sock_do_ioctl() falls back to calling dev_ioctl(), which provides support for NIC driver ioctls, which includes ethtool support. This is similar to the way ioctls are handled in udp.c or tcp.c. This removes the requirement that ethtool for example be tied to the support of a specific L3 protocol (ethtool uses an AF_INET socket today). Signed-off-by: David Decotigny Signed-off-by: David S. Miller net/netlink/af_netlink.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5f2d472450c94402627f54b603d271076f3f97c2 Author: David Decotigny Date: Mon Mar 21 10:15:34 2016 -0700 ethtool: minor doc update Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords") Signed-off-by: David Decotigny Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5266e5b12c8b73587130325f7074d2f49ef9e427 Merge: fc739eb 5e47f19 Author: Linus Torvalds Date: Tue Mar 22 12:41:14 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: "The highlights this round include: - Add target_alloc_session() w/ callback helper for doing se_session allocation + tag + se_node_acl lookup. (HCH + nab) - Tree-wide fabric driver conversion to use target_alloc_session() - Convert sbp-target to use percpu_ida tag pre-allocation, and TARGET_SCF_ACK_KREF I/O krefs (Chris Boot + nab) - Convert usb-gadget to use percpu_ida tag pre-allocation, and TARGET_SCF_ACK_KREF I/O krefs (Andrzej Pietrasiewicz + nab) - Convert xen-scsiback to use percpu_ida tag pre-allocation, and TARGET_SCF_ACK_KREF I/O krefs (Juergen Gross + nab) - Convert tcm_fc to use TARGET_SCF_ACK_KREF I/O + TMR krefs - Convert ib_srpt to use percpu_ida tag pre-allocation - Add DebugFS node for qla2xxx target sess list (Quinn) - Rework iser-target connection termination (Jenny + Sagi) - Convert iser-target to new CQ API (HCH) - Add pass-through WRITE_SAME support for IBLOCK (Mike Christie) - Introduce data_bitmap for asynchronous access of data area (Sheng Yang + Andy) - Fix target_release_cmd_kref shutdown comp leak (Himanshu Madhani) Also, there is a separate PULL request coming for cxgb4 NIC driver prerequisites for supporting hw iscsi segmentation offload (ISO), that will be the base for a number of v4.7 developments involving iscsi-target hw offloads" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (36 commits) target: Fix target_release_cmd_kref shutdown comp leak target: Avoid DataIN transfers for non-GOOD SAM status target/user: Report capability of handling out-of-order completions to userspace target/user: Fix size_t format-spec build warning target/user: Don't free expired command when time out target/user: Introduce data_bitmap, replace data_length/data_head/data_tail target/user: Free data ring in unified function target/user: Use iovec[] to describe continuous area target: Remove enum transport_lunflags_table target/iblock: pass WRITE_SAME to device if possible iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc iser-target: Kill struct isert_rdma_wr iser-target: Convert to new CQ API iser-target: Split and properly type the login buffer iser-target: Remove ISER_RECV_DATA_SEG_LEN iser-target: Remove impossible condition from isert_wait_conn iser-target: Remove redundant wait in release_conn iser-target: Rework connection termination iser-target: Separate flows for np listeners and connections cma events iser-target: Add new state ISER_CONN_BOUND to isert_conn ... commit fc739eba99dc8655369a07ead098de9960e48fff Merge: 87cf815 9188269 Author: Linus Torvalds Date: Tue Mar 22 12:26:04 2016 -0700 Merge tag 'pci-v4.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Here are two fixes for v4.6: - You merged a fix for a TI DRA7xx reset issue from another source, so Sekhar removed the "broken" tag from the driver, and - I botched a Kconfig merge and broke hotplug configuration for everybody, so Tero fixed that. Summary: TI DRA7xx host bridge driver: Revert "PCI: dra7xx: Mark driver as broken" (Sekhar Nori) Miscellaneous: Restore inclusion of pci/hotplug Kconfig (Tero Roponen)" * tag 'pci-v4.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI: dra7xx: Mark driver as broken" PCI: Restore inclusion of pci/hotplug Kconfig commit 87cf815b9e78af20bf139aa7536b42be2ce405c5 Merge: b4af7f7 c64c143 Author: Linus Torvalds Date: Tue Mar 22 12:13:53 2016 -0700 Merge tag 'sound-fix-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The previous pull request introduced a few WARN_ON() for Intel HD-audio HDMI. Indeed it caught bugs, and now users get annoyed. So this request came up: a collection of small fixes to paper over the inconsistencies on (mostly) old Intel chipsets. In addition, a trivial USB-audio quirk is included, too" * tag 'sound-fix-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix missing ELD update at unplugging ALSA: usb-audio: add Microsoft HD-5001 to quirks ALSA: hda - Workaround for unbalanced i915 power refcount by concurrent probe ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI ALSA: hda - Fix forgotten HDMI monitor_present update ALSA: hda - Really restrict i915 notifier to HSW+ commit b4af7f773ef79c479cc25ee26063821220150a8a Merge: 968f3e3 70cf769c Author: Linus Torvalds Date: Tue Mar 22 11:57:43 2016 -0700 Merge tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - updates for the Exynos IOMMU driver to make use of default domains and to add support for the SYSMMU v5 - new Mediatek IOMMU driver - support for the ARMv7 short descriptor format in the io-pgtable code - default domain support for the ARM SMMU - couple of other small fixes all over the place * tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (41 commits) iommu/ipmmu-vmsa: Add r8a7795 DT binding iommu/mediatek: Check for NULL instead of IS_ERR() iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags iommu/mediatek: Fix handling of of_count_phandle_with_args result iommu/dma: Fix NEED_SG_DMA_LENGTH dependency iommu/mediatek: Mark PM functions as __maybe_unused iommu/mediatek: Select ARM_DMA_USE_IOMMU iommu/exynos: Use proper readl/writel register interface iommu/exynos: Pointers are nto physical addresses dts: mt8173: Add iommu/smi nodes for mt8173 iommu/mediatek: Add mt8173 IOMMU driver memory: mediatek: Add SMI driver dt-bindings: mediatek: Add smi dts binding dt-bindings: iommu: Add binding for mediatek IOMMU iommu/ipmmu-vmsa: Use ARCH_RENESAS iommu/exynos: Support multiple attach_device calls iommu/exynos: Add Maintainers entry for Exynos SYSMMU driver iommu/exynos: Add support for v5 SYSMMU iommu/exynos: Update device tree documentation iommu/exynos: Add support for SYSMMU controller with bogus version reg ... commit 4b15da44e742871206582f6aa2997b009648f02f Author: J. Bruce Fields Date: Fri Mar 18 11:31:17 2016 -0400 nfsd: better layoutupdate bounds-checking You could add any multiple of 2^32/PNFS_SCSI_RANGE_SIZE to nr_iomaps and still pass this check. You'd probably still fail the following kcalloc, but best to be paranoid since this is from-the-wire data. Signed-off-by: J. Bruce Fields fs/nfsd/blocklayoutxdr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d783e0bd02e700e7a893ef4fa71c69438ac1c276 Author: Marta Rybczynska Date: Tue Mar 22 16:02:06 2016 +0100 nvme: avoid cqe corruption when update at the same time as read Make sure the CQE phase (validity) is read before the rest of the structure. The phase bit is the highest address and the CQE read will happen on most platforms from lower to upper addresses and will be done by multiple non-atomic loads. If the structure is updated by PCI during the reads from the processor, the processor may get a corrupted copy. The addition of the new nvme_cqe_valid function that verifies the validity bit also allows refactoring of the other CQE read sequences. Signed-off-by: Marta Rybczynska Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit a6adb106225f9e2f177d3d883596e011df321965 Author: Paolo Bonzini Date: Tue Mar 22 17:25:42 2016 +0100 KVM: page_track: fix access to NULL slot This happens when doing the reboot test from virt-tests: [ 131.833653] BUG: unable to handle kernel NULL pointer dereference at (null) [ 131.842461] IP: [] kvm_page_track_is_active+0x17/0x60 [kvm] [ 131.850500] PGD 0 [ 131.852763] Oops: 0000 [#1] SMP [ 132.007188] task: ffff880075fbc500 ti: ffff880850a3c000 task.ti: ffff880850a3c000 [ 132.138891] Call Trace: [ 132.141639] [] page_fault_handle_page_track+0x31/0x40 [kvm] [ 132.149732] [] paging64_page_fault+0xff/0x910 [kvm] [ 132.172159] [] kvm_mmu_page_fault+0x64/0x110 [kvm] [ 132.179372] [] handle_exception+0x1b2/0x430 [kvm_intel] [ 132.187072] [] vmx_handle_exit+0x1e1/0xc50 [kvm_intel] ... Cc: Xiao Guangrong Fixes: 3d0c27ad6ee465f174b09ee99fcaf189c57d567a Signed-off-by: Paolo Bonzini arch/x86/kvm/page_track.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0af574be32cddf8d0c2fbb194dcc635e73a83f1e Author: Paolo Bonzini Date: Mon Mar 21 15:05:17 2016 +0100 KVM: PPC: do not compile in vfio.o unconditionally Build on 32-bit PPC fails with the following error: int kvm_vfio_ops_init(void) ^ In file included from arch/powerpc/kvm/../../../virt/kvm/vfio.c:21:0: arch/powerpc/kvm/../../../virt/kvm/vfio.h:8:90: note: previous definition of ‘kvm_vfio_ops_init’ was here arch/powerpc/kvm/../../../virt/kvm/vfio.c:292:6: error: redefinition of ‘kvm_vfio_ops_exit’ void kvm_vfio_ops_exit(void) ^ In file included from arch/powerpc/kvm/../../../virt/kvm/vfio.c:21:0: arch/powerpc/kvm/../../../virt/kvm/vfio.h:12:91: note: previous definition of ‘kvm_vfio_ops_exit’ was here scripts/Makefile.build:258: recipe for target arch/powerpc/kvm/../../../virt/kvm/vfio.o failed make[3]: *** [arch/powerpc/kvm/../../../virt/kvm/vfio.o] Error 1 Check whether CONFIG_KVM_VFIO is set before including vfio.o in the build. Reported-by: Pranith Kumar Tested-by: Pranith Kumar Signed-off-by: Paolo Bonzini arch/powerpc/kvm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9db284f30311b741a5e74eb8e5800ff7b92c4be3 Author: Rik van Riel Date: Mon Mar 21 15:13:27 2016 +0100 kvm, rt: change async pagefault code locking for PREEMPT_RT The async pagefault wake code can run from the idle task in exception context, so everything here needs to be made non-preemptible. Conversion to a simple wait queue and raw spinlock does the trick. Signed-off-by: Rik van Riel Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 489153c746746fc44b1e2fd184248dee8aebbaff Author: Lan Tianyu Date: Sun Mar 13 11:10:30 2016 +0800 KVM/PPC: update the comment of memory barrier in the kvmppc_prepare_to_enter() The barrier also orders the write to mode from any reads to the page tables done and so update the comment. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini arch/powerpc/kvm/powerpc.c | 3 +++ 1 file changed, 3 insertions(+) commit 0f127d12e44c13d2f90e5c613490e70ddb1a5e08 Author: Lan Tianyu Date: Sun Mar 13 11:10:29 2016 +0800 KVM/x86: update the comment of memory barrier in the vcpu_enter_guest() The barrier also orders the write to mode from any reads to the page tables done and so update the comment. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4ae3cb3a2551b41f22284f713e7d5e2b61a85c1d Author: Lan Tianyu Date: Sun Mar 13 11:10:28 2016 +0800 KVM: Replace smp_mb() with smp_load_acquire() in the kvm_flush_remote_tlbs() smp_load_acquire() is enough here and it's cheaper than smp_mb(). Adding a comment about reusing memory barrier of kvm_make_all_cpus_request() here to keep order between modifications to the page tables and reading mode. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 7bfdf2177812c30928bea3fc8bc86b9dea236f65 Author: Lan Tianyu Date: Sun Mar 13 11:10:27 2016 +0800 KVM/x86: Call smp_wmb() before increasing tlbs_dirty Update spte before increasing tlbs_dirty to make sure no tlb flush in lost after spte is zapped. This pairs with the barrier in the kvm_flush_remote_tlbs(). Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini arch/x86/kvm/paging_tmpl.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a30a0509165d9bc5a3107894338e6adf4be7b60f Author: Lan Tianyu Date: Sun Mar 13 11:10:26 2016 +0800 KVM: Replace smp_mb() with smp_mb_after_atomic() in the kvm_make_all_cpus_request() Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36ca7e0a577aa61f648953886958e50398732d63 Author: Lan Tianyu Date: Sun Mar 13 11:10:25 2016 +0800 KVM/x86: Replace smp_mb() with smp_store_mb/release() in the walk_shadow_page_lockless_begin/end() Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9753f529156d03112d1ff6f3758ccd6fa6faf189 Author: Lan Tianyu Date: Sun Mar 13 11:10:24 2016 +0800 KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page() There is already a barrier inside of kvm_flush_remote_tlbs() which can help to make sure everyone sees our modifications to the page tables and see changes to vcpu->mode here. So remove the smp_mb in the kvm_mmu_commit_zap_page() and update the comment. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b9baba861489041b37b54fc7ee0b0006b5327151 Author: Huaitong Han Date: Tue Mar 22 16:51:21 2016 +0800 KVM, pkeys: expose CPUID/CR4 to guest X86_FEATURE_PKU is referred to as "PKU" in the hardware documentation: CPUID.7.0.ECX[3]:PKU. X86_FEATURE_OSPKE is software support for pkeys, enumerated with CPUID.7.0.ECX[4]:OSPKE, and it reflects the setting of CR4.PKE(bit 22). This patch disables CPUID:PKU without ept, because pkeys is not yet implemented for shadow paging. Signed-off-by: Huaitong Han Reviewed-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/cpuid.c | 23 +++++++++++++++++++++-- arch/x86/kvm/cpuid.h | 8 ++++++++ arch/x86/kvm/x86.c | 9 ++++++--- 4 files changed, 37 insertions(+), 6 deletions(-) commit be94f6b71067df47d623fc6c6983a8dee504fb4d Author: Huaitong Han Date: Tue Mar 22 16:51:20 2016 +0800 KVM, pkeys: add pkeys support for permission_fault Protection keys define a new 4-bit protection key field (PKEY) in bits 62:59 of leaf entries of the page tables, the PKEY is an index to PKRU register(16 domains), every domain has 2 bits(write disable bit, access disable bit). Static logic has been produced in update_pkru_bitmask, dynamic logic need read pkey from page table entries, get pkru value, and deduce the correct result. [ Huaitong: Xiao helps to modify many sections. ] Signed-off-by: Huaitong Han Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/kvm_cache_regs.h | 5 +++++ arch/x86/kvm/mmu.h | 33 ++++++++++++++++++++++++++++----- arch/x86/kvm/paging_tmpl.h | 16 ++++++++++++++-- arch/x86/kvm/svm.c | 8 ++++++++ arch/x86/kvm/vmx.c | 8 ++++++++ arch/x86/kvm/x86.c | 7 ++++++- 7 files changed, 72 insertions(+), 8 deletions(-) commit 2d344105f57ca77fc9c5d4377f65d1082f71ac4b Author: Huaitong Han Date: Tue Mar 22 16:51:19 2016 +0800 KVM, pkeys: introduce pkru_mask to cache conditions PKEYS defines a new status bit in the PFEC. PFEC.PK (bit 5), if some conditions is true, the fault is considered as a PKU violation. pkru_mask indicates if we need to check PKRU.ADi and PKRU.WDi, and does cache some conditions for permission_fault. [ Huaitong: Xiao helps to modify many sections. ] Signed-off-by: Huaitong Han Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 8 +++++ arch/x86/kvm/mmu.c | 80 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit 1be0e61c1f255faaeab04a390e00c8b9b9042870 Author: Xiao Guangrong Date: Tue Mar 22 16:51:18 2016 +0800 KVM, pkeys: save/restore PKRU when guest/host switches Currently XSAVE state of host is not restored after VM-exit and PKRU is managed by XSAVE so the PKRU from guest is still controlling the memory access even if the CPU is running the code of host. This is not safe as KVM needs to access the memory of userspace (e,g QEMU) to do some emulation. So we save/restore PKRU when guest/host switches. Signed-off-by: Huaitong Han Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9e90199c25aec31b4509213881511948f6c763c8 Author: Xiao Guangrong Date: Tue Mar 22 16:51:17 2016 +0800 x86: pkey: introduce write_pkru() for KVM KVM will use it to switch pkru between guest and host. CC: Ingo Molnar CC: Dave Hansen Signed-off-by: Xiao Guangrong Signed-off-by: Huaitong Han Signed-off-by: Paolo Bonzini arch/x86/include/asm/pgtable.h | 6 ++++++ arch/x86/include/asm/special_insns.h | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) commit 17a511f878505d31f298de443269b3070c134163 Author: Huaitong Han Date: Tue Mar 22 16:51:16 2016 +0800 KVM, pkeys: add pkeys support for xsave state This patch adds pkeys support for xsave state. Signed-off-by: Huaitong Han Reviewed-by: Xiao Guangrong Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ddba262891494c1337fcbec8910605285012c121 Author: Huaitong Han Date: Tue Mar 22 16:51:15 2016 +0800 KVM, pkeys: disable pkeys for guests in non-paging mode Pkeys is disabled if CPU is in non-paging mode in hardware. However KVM always uses paging mode to emulate guest non-paging, mode with TDP. To emulate this behavior, pkeys needs to be manually disabled when guest switches to non-paging mode. Signed-off-by: Huaitong Han Reviewed-by: Xiao Guangrong Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e0b18ef7189075676ac432954d7920eaa30d8e3e Author: Huaitong Han Date: Tue Mar 22 16:51:14 2016 +0800 KVM: x86: remove magic number with enum cpuid_leafs This patch removes magic number with enum cpuid_leafs. Signed-off-by: Huaitong Han Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit f13577e8aa863cf3b4f17541bc74f8e9b0b40c90 Author: Paolo Bonzini Date: Tue Mar 8 10:08:16 2016 +0100 KVM: MMU: return page fault error code from permission_fault This will help in the implementation of PKRU, where the PK bit of the page fault error code cannot be computed in advance (unlike I/D, R/W and U/S). Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.h | 15 ++++++++++----- arch/x86/kvm/paging_tmpl.h | 5 ++--- 2 files changed, 12 insertions(+), 8 deletions(-) commit 384fbb96f9268eee0b703b39cb07557403bd9aac Author: Tina Ruchandani Date: Sun Mar 20 22:59:11 2016 -0700 firewire: nosy: Replace timeval with timespec64 'struct timeval' uses a 32 bit field for its 'seconds' value which will overflow in year 2038 and beyond. This patch replaces the use of timeval in nosy.c with timespec64 which doesn't suffer from y2038 issue. The code is correct as is - since it is only using the microseconds portion of timeval. However, this patch does the replacement as part of a larger effort to remove all instances of 'struct timeval' from the kernel (that would help identify cases where the code is actually broken). Signed-off-by: Tina Ruchandani Reviewed-by: Arnd Bergmann Signed-off-by: Stefan Richter drivers/firewire/nosy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4ca0d8193f8b6b2c74d05d9bbcbaa99fdd553503 Author: Andi Kleen Date: Mon Mar 21 08:56:33 2016 -0700 perf list: Fix documentation of :ppp Correctly document what is implemented for :ppp on Intel CPUs in recent kernels. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1458575793-12091-2-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9188269a2e8ea5b32affef99d42c5eda91c07fdf Author: Sekhar Nori Date: Fri Mar 4 15:59:19 2016 +0530 Revert "PCI: dra7xx: Mark driver as broken" Revert 5c3b99d05752 ("PCI: dra7xx: Mark driver as broken"). 1c96bee4df19 ("ARM: DRA7: hwmod: Add custom reset handler for PCIeSS") added support to de-assert PCIe reset, so DRA7x PCIe is not broken anymore. Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/host/Kconfig | 1 - 1 file changed, 1 deletion(-) commit c6986be4f9e9c02e63619efd7049ea0cdcf862f6 Merge: b86c75f ba08311 Author: James Bottomley Date: Tue Mar 22 07:33:04 2016 -0400 Merge remote-tracking branch 'mkp-scsi/4.6/scsi-fixes' into misc commit e9ad4ec8379ad1ba6f68b8ca1c26b50b5ae0a327 Author: Paolo Bonzini Date: Mon Mar 21 10:15:25 2016 +0100 KVM: fix spin_lock_init order on x86 Moving the initialization earlier is needed in 4.6 because kvm_arch_init_vm is now using mmu_lock, causing lockdep to complain: [ 284.440294] INFO: trying to register non-static key. [ 284.445259] the code is fine but needs lockdep annotation. [ 284.450736] turning off the locking correctness validator. ... [ 284.528318] [] lock_acquire+0xd3/0x240 [ 284.533733] [] ? kvm_page_track_register_notifier+0x20/0x60 [kvm] [ 284.541467] [] _raw_spin_lock+0x41/0x80 [ 284.546960] [] ? kvm_page_track_register_notifier+0x20/0x60 [kvm] [ 284.554707] [] kvm_page_track_register_notifier+0x20/0x60 [kvm] [ 284.562281] [] kvm_mmu_init_vm+0x20/0x30 [kvm] [ 284.568381] [] kvm_arch_init_vm+0x1ea/0x200 [kvm] [ 284.574740] [] kvm_dev_ioctl+0xbf/0x4d0 [kvm] However, it also helps fixing a preexisting problem, which is why this patch is also good for stable kernels: kvm_create_vm was incrementing current->mm->mm_count but not decrementing it at the out_err label (in case kvm_init_mmu_notifier failed). The new initialization order makes it possible to add the required mmdrop without adding a new error label. Cc: stable@vger.kernel.org Reported-by: Borislav Petkov Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 31217db720186edc7ae3c4354e5fa5848bb28358 Author: Alexey Kardashevskiy Date: Fri Mar 18 13:50:42 2016 +1100 KVM: PPC: Create a virtual-mode only TCE table handlers Upcoming in-kernel VFIO acceleration needs different handling in real and virtual modes which makes it hard to support both modes in the same handler. This creates a copy of kvmppc_rm_h_stuff_tce and kvmppc_rm_h_put_tce in addition to the existing kvmppc_rm_h_put_tce_indirect. This also fixes linker breakage when only PR KVM was selected (leaving HV KVM off): the kvmppc_h_put_tce/kvmppc_h_stuff_tce functions would not compile at all and the linked would fail. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paolo Bonzini arch/powerpc/kvm/book3s_64_vio.c | 52 +++++++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_64_vio_hv.c | 8 ++--- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 +-- 3 files changed, 57 insertions(+), 7 deletions(-) commit ef697a712a6165aea7779c295604b099e8bfae2e Author: Paolo Bonzini Date: Fri Mar 18 16:58:38 2016 +0100 KVM: VMX: fix nested vpid for old KVM guests Old KVM guests invoke single-context invvpid without actually checking whether it is supported. This was fixed by commit 518c8ae ("KVM: VMX: Make sure single type invvpid is supported before issuing invvpid instruction", 2010-08-01) and the patch after, but pre-2.6.36 kernels lack it including RHEL 6. Reported-by: jmontleo@redhat.com Tested-by: jmontleo@redhat.com Cc: stable@vger.kernel.org Fixes: 99b83ac893b84ed1a62ad6d1f2b6cc32026b9e85 Reviewed-by: David Matlack Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f6870ee9e53430f2a318ccf0dd5e66bb46194e43 Author: Paolo Bonzini Date: Fri Mar 18 16:53:42 2016 +0100 KVM: VMX: avoid guest hang on invalid invvpid instruction A guest executing an invalid invvpid instruction would hang because the instruction pointer was not updated. Reported-by: jmontleo@redhat.com Tested-by: jmontleo@redhat.com Cc: stable@vger.kernel.org Fixes: 99b83ac893b84ed1a62ad6d1f2b6cc32026b9e85 Reviewed-by: David Matlack Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) commit 2849eb4f99d54925c543db12917127f88b3c38ff Author: Paolo Bonzini Date: Fri Mar 18 16:53:29 2016 +0100 KVM: VMX: avoid guest hang on invalid invept instruction A guest executing an invalid invept instruction would hang because the instruction pointer was not updated. Cc: stable@vger.kernel.org Fixes: bfd0a56b90005f8c8a004baf407ad90045c2b11e Reviewed-by: David Matlack Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) commit b02acd4e62602a6ab307da84388a16bf60106c48 Author: Ludovic Desroches Date: Fri Mar 11 11:35:10 2016 +0100 ARM: dts: at91: sama5d4 Xplained: don't disable hsmci regulator If enabling the hsmci regulator on card detection, the board can reboot on sd card insertion. Keeping the regulator always enabled fixes this issue. Signed-off-by: Ludovic Desroches Fixes: 8d545f32bd77 ("ARM: at91/dt: sama5d4 xplained: add regulators for v(q)mmc1 supplies") Cc: stable@vger.kernel.org #4.3 and later Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d4_xplained.dts | 1 + 1 file changed, 1 insertion(+) commit ae3fc8ea08e405682f1fa959f94b6e4126afbc1b Author: Ludovic Desroches Date: Fri Mar 11 11:43:39 2016 +0100 ARM: dts: at91: sama5d3 Xplained: don't disable hsmci regulator If enabling the hsmci regulator on card detection, the board can reboot on sd card insertion. Keeping the regulator always enabled fixes this issue. Signed-off-by: Ludovic Desroches Fixes: 1b53e3416dd0 ("ARM: at91/dt: sama5d3 xplained: add fixed regulator for vmmc0") Cc: stable@vger.kernel.org #4.3 and later Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d3_xplained.dts | 1 + 1 file changed, 1 insertion(+) commit ce63f891e1a87ae79c4325dad5f512e8d6a8a78e Author: Jiri Kosina Date: Tue Mar 15 11:28:59 2016 +0100 btrfs: transaction_kthread() is not freezable transaction_kthread() is calling try_to_freeze(), but that's just an expeinsive no-op given the fact that the thread is not marked freezable. After removing this, disk-io.c is now independent on freezer API. Signed-off-by: Jiri Kosina Signed-off-by: David Sterba fs/btrfs/disk-io.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 838fe1887765f4cc679febea60d87d2a06bd300e Author: Jiri Kosina Date: Tue Mar 15 11:28:54 2016 +0100 btrfs: cleaner_kthread() doesn't need explicit freeze cleaner_kthread() is not marked freezable, and therefore calling try_to_freeze() in its context is a pointless no-op. In addition to that, as has been clearly demonstrated by 80ad623edd2d ("Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"), it's perfectly valid / legal for cleaner_kthread() to stay scheduled out in an arbitrary place during suspend (in that particular example that was waiting for reading of extent pages), so there is no need to leave any traces of freezer in this kthread. Fixes: 80ad623edd2d ("Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()") Fixes: 696249132158 ("btrfs: clear PF_NOFREEZE in cleaner_kthread()") Signed-off-by: Jiri Kosina Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f805531daa2ebfb5706422dc2ead1cff9e53e65 Author: Alex Lyakas Date: Thu Mar 10 13:10:15 2016 +0200 btrfs: do not write corrupted metadata blocks to disk csum_dirty_buffer was issuing a warning in case the extent buffer did not look alright, but was still returning success. Let's return error in this case, and also add an additional sanity check on the extent buffer header. The caller up the chain may BUG_ON on this, for example flush_epd_write_bio will, but it is better than to have a silent metadata corruption on disk. Signed-off-by: Alex Lyakas Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/disk-io.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 8bd98f0e6bf792e8fa7c3fed709321ad42ba8d2e Author: Alex Lyakas Date: Thu Mar 10 13:09:46 2016 +0200 btrfs: csum_tree_block: return proper errno value Signed-off-by: Alex Lyakas Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/disk-io.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit a4717218280aac19b3d61b64363ee05fcb95e473 Merge: 643ad15 a6cdf1c Author: Paolo Bonzini Date: Tue Mar 22 09:37:02 2016 +0100 Merge tag 'kvm-arm-for-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Changes for v4.6-rc1 Second round of patches for v4.6-rc1, fixing a small handful of issue: - disable preemption when calling smp_call_function_many - Make kvm_ksym_ref work on VHE systems again after KASRL breakage - Disable compiler instrumentation for hypervisor code that could make KVM/arm64 blow up. commit 2994a75183173defc21f0d26ce23b63232211b88 Author: Varun Prakash Date: Sun Feb 14 23:09:52 2016 +0530 cxgb4: update Kconfig and Makefile update Kconfig and Makefile for enabling iSCSI DDP page pod manager. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/Kconfig | 11 +++++++++++ drivers/net/ethernet/chelsio/cxgb4/Makefile | 1 + 2 files changed, 12 insertions(+) commit 47da7e62b391a74465c942d821bcbf879457a014 Author: Varun Prakash Date: Sun Feb 14 23:09:51 2016 +0530 cxgb4: add iSCSI DDP page pod manager add files for common page pod manager, both iSCSI initiator and target ULDs will use common ppod manager for DDP. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/cxgb4_ppm.c | 464 +++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_ppm.h | 310 +++++++++++++++++ 2 files changed, 774 insertions(+) commit cb6a8ff07068977fa5e952a539f38474dbf9770a Author: Varun Prakash Date: Sun Feb 14 23:08:38 2016 +0530 cxgb4, iw_cxgb4: move delayed ack macro definitions move delayed ack macro definitions to common header file t4_msg.h. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 9 --------- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit a8d9380c6a5d42da55365de89ea8d7654426e62b Author: Varun Prakash Date: Sun Feb 14 23:07:40 2016 +0530 cxgb4: move VLAN_NONE macro definition move VLAN_NONE macro definition from l2t.c to l2t.h Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/l2t.c | 2 -- drivers/net/ethernet/chelsio/cxgb4/l2t.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 7714cb9e1e29311431b92970c87289cad004431a Author: Varun Prakash Date: Sun Feb 14 23:07:39 2016 +0530 cxgb4: update struct cxgb4_lld_info definition add members for iSCSI DDP. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 4 ++++ 3 files changed, 10 insertions(+) commit b96c5cbb200533efff7b83873f43f0994b5b4ce2 Author: Varun Prakash Date: Sun Feb 14 23:07:38 2016 +0530 cxgb4: add definitions for iSCSI target ULD add structure, macro and constant definitions for iSCSI Tx and Rx. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 107 ++++++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 7 ++ 2 files changed, 114 insertions(+) commit 76c144bd8ebd5839e36d30c931586510ae0e736e Author: Varun Prakash Date: Sun Feb 14 23:07:37 2016 +0530 cxgb4, cxgb4i: move struct cpl_rx_data_ddp definition move struct cpl_rx_data_ddp definition to common header file t4_msg.h. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 15 +++++++++++++++ drivers/scsi/cxgbi/cxgb4i/cxgb4i.h | 12 ------------ 2 files changed, 15 insertions(+), 12 deletions(-) commit 40c466358fcc21b508b38e790ac39353048b112f Author: Varun Prakash Date: Sun Feb 14 23:04:09 2016 +0530 cxgb4, iw_cxgb4, cxgb4i: remove duplicate definitions move struct ulptx_idata definition to common header file t4_msg.h. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 9 --------- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 5 +++++ drivers/scsi/cxgbi/cxgb4i/cxgb4i.h | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) commit a84f0e1379d978ed736cd242e196be723fbdd604 Author: Varun Prakash Date: Sun Feb 14 23:04:08 2016 +0530 cxgb4, iw_cxgb4: move definitions to common header file move struct tcp_options, struct cpl_pass_accept_req, enum defining congestion control algorithms and associated macros to common header file t4_msg.h Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 81 ----------------------------- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 81 +++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 81 deletions(-) commit 2337ba422c2742b6fc78cb6d73f1f3342f69c137 Author: Varun Prakash Date: Sun Feb 14 23:02:41 2016 +0530 cxgb4: large receive offload support add large receive offload(LRO) support for upper layer drivers. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 14 ++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 42 ++++++++++++++++++------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 6 ++++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 12 +++++-- 4 files changed, 60 insertions(+), 14 deletions(-) commit f2692d16eb2c931038db68977c5f12949c997bdf Author: Varun Prakash Date: Sun Feb 14 23:02:40 2016 +0530 cxgb4: allocate resources for CXGB4_ULD_ISCSIT allocate rxqs for non T4 adapters, dump rxqs sge qinfo through debugfs. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 11 ++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 34 +++++++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 53 ++++++++++++++++++++-- drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 + 4 files changed, 92 insertions(+), 7 deletions(-) commit 2fddfb81db1e3e001825601e83fdd8f0730354db Author: Varun Prakash Date: Sun Feb 14 23:02:39 2016 +0530 cxgb4: add new ULD type CXGB4_ULD_ISCSIT Chelsio iSCSI target offload driver will register with cxgb4 driver as ULD of type CXGB4_ULD_ISCSIT. Signed-off-by: Varun Prakash Acked-by: Hariprasad Shenai Signed-off-by: Nicholas Bellinger drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + 1 file changed, 1 insertion(+) commit 5e47f1985d7107331c3f64fb3ec83d66fd73577e Author: Himanshu Madhani Date: Mon Mar 14 22:47:37 2016 -0700 target: Fix target_release_cmd_kref shutdown comp leak This patch fixes an active I/O shutdown bug for fabric drivers using target_wait_for_sess_cmds(), where se_cmd descriptor shutdown would result in hung tasks waiting indefinitely for se_cmd->cmd_wait_comp to complete(). To address this bug, drop the incorrect list_del_init() usage in target_wait_for_sess_cmds() and always complete() during se_cmd target_release_cmd_kref() put, in order to let caller invoke the final fabric release callback into se_cmd->se_tfo->release_cmd() code. Reported-by: Himanshu Madhani Tested-by: Himanshu Madhani Signed-off-by: Himanshu Madhani Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 2 -- 1 file changed, 2 deletions(-) commit 3ba9d300c925d89914d15beff2180064ac7ee6f6 Author: Deepa Dinamani Date: Mon Mar 21 18:21:26 2016 -0700 net: ipv4: Fix truncated timestamp returned by inet_current_timestamp() The millisecond timestamps returned by the function is converted to network byte order by making a call to htons(). htons() only returns __be16 while __be32 is required here. This was identified by the sparse warning from the buildbot: net/ipv4/af_inet.c:1405:16: sparse: incorrect type in return expression (different base types) net/ipv4/af_inet.c:1405:16: expected restricted __be32 net/ipv4/af_inet.c:1405:16: got restricted __be16 [usertype] Change the function to use htonl() to return the correct __be32 type instead so that the millisecond value doesn't get truncated. Signed-off-by: Deepa Dinamani Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: James Morris Cc: Patrick McHardy Cc: Arnd Bergmann Fixes: 822c868532ca ("net: ipv4: Convert IP network timestamps to be y2038 safe") Reported-by: Fengguang Wu [0-day test robot] Signed-off-by: David S. Miller net/ipv4/af_inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b246841f4041f85265dec5f769c017fc36a0d33 Author: Dave Jones Date: Mon Mar 21 18:37:22 2016 -0400 Make DST_CACHE a silent config option commit 911362c70d ("net: add dst_cache support") added a new kconfig option that gets selected by other networking options. It seems the intent wasn't to offer this as a user-selectable option given the lack of help text, so this patch converts it to a silent option. Signed-off-by: Dave Jones Signed-off-by: David S. Miller net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62d885fe73e0032004e756b25101ac6c9ebf85dd Author: Benjamin Poirier Date: Mon Mar 21 14:08:28 2016 -0700 net: Add missing kernel-doc for netdev ptype lists .//include/linux/netdevice.h:1826: warning: No description found for parameter 'ptype_all' .//include/linux/netdevice.h:1826: warning: No description found for parameter 'ptype_specific' Introduced by commit 7866a621043f ("dev: add per net_device packet type chains") Cc: Salam Noureddine Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller include/linux/netdevice.h | 2 ++ 1 file changed, 2 insertions(+) commit 6d0e24cd07f7e97015d958299fda535e459d2c99 Author: Luis de Bethencourt Date: Mon Mar 21 20:58:28 2016 +0000 net: add missing descriptions in net_device_priv_flags The flags IFF_XMIT_DST_RELEASE_PERM, IFF_IPVLAN_MASTER and IFF_IPVLAN_SLAVE are missing descriptions for the Documentation. Adding them. Signed-off-by: Luis de Bethencourt Suggested-by: Benjamin Poirier Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++++ 1 file changed, 4 insertions(+) commit 537377d3b766b18b9fca41628d1a9cef690b69fe Author: Benjamin Poirier Date: Mon Mar 21 13:21:40 2016 -0700 igmp: Document sysctl_igmp_max_msf Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 6b226e2f801253edf9d2f2afda538f550ae2b17d Author: Benjamin Poirier Date: Mon Mar 21 13:21:39 2016 -0700 net: Fix indentation of the conf/ documentation block Commit d67ef35fff67 ("clarify documentation for net.ipv4.igmp_max_memberships") mistakenly indented a block of documentation such that it now looks like it belongs to a specific sysctl. Restore that block's original position. Cc: Jeremy Eder Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 968f3e374faf41e5e6049399eb7302777a09a1e8 Merge: e531cdf 389f239 Author: Linus Torvalds Date: Mon Mar 21 18:12:42 2016 -0700 Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "We have a good sized cleanup of our internal read ahead code, and the first series of commits from Chandan to enable PAGE_SIZE > sectorsize Otherwise, it's a normal series of cleanups and fixes, with many thanks to Dave Sterba for doing most of the patch wrangling this time" * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (82 commits) btrfs: make sure we stay inside the bvec during __btrfs_lookup_bio_sums btrfs: Fix misspellings in comments. btrfs: Print Warning only if ENOSPC_DEBUG is enabled btrfs: scrub: silence an uninitialized variable warning btrfs: move btrfs_compression_type to compression.h btrfs: rename btrfs_print_info to btrfs_print_mod_info Btrfs: Show a warning message if one of objectid reaches its highest value Documentation: btrfs: remove usage specific information btrfs: use kbasename in btrfsic_mount Btrfs: do not collect ordered extents when logging that inode exists Btrfs: fix race when checking if we can skip fsync'ing an inode Btrfs: fix listxattrs not listing all xattrs packed in the same item Btrfs: fix deadlock between direct IO reads and buffered writes Btrfs: fix extent_same allowing destination offset beyond i_size Btrfs: fix file loss on log replay after renaming a file and fsync Btrfs: fix unreplayable log after snapshot delete + parent dir fsync Btrfs: fix lockdep deadlock warning due to dev_replace btrfs: drop unused argument in btrfs_ioctl_get_supported_features btrfs: add GET_SUPPORTED_FEATURES to the control device ioctls btrfs: change max_inline default to 2048 ... commit 548f0e65a38f36976260a63ff4acfa9f3b17307d Author: Arnd Bergmann Date: Mon Mar 14 15:29:43 2016 +0100 aacraid: add missing curly braces gcc-6 warns about obviously wrong indentation for newly added code in aac_slave_configure(): drivers/scsi/aacraid/linit.c: In function 'aac_slave_configure': drivers/scsi/aacraid/linit.c:458:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] sdev->tagged_supported = 1; ^~~~ drivers/scsi/aacraid/linit.c:455:4: note: ...this 'else' clause, but it is not gcc is correct, and evidently this was meant to be within the curly braces that should have been there to start with. This patch adds them, which avoids the warning and makes it clear what was intended here. Nothing changes in behavior because in the 'if' block, the sdev->tagged_supported flag is known to be set already. Signed-off-by: Arnd Bergmann Fixes: 6bf3b630d0a7 ("aacraid: SCSI blk tag support") Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/linit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a798f508f5d0809f45c939e329e17b3eb0ffbc1 Author: Colin Ian King Date: Fri Mar 18 15:08:01 2016 +0000 ACPI / util: cast data to u64 before shifting to fix sign extension obj->buffer.pointer[i] should be cast to u64 to prevent an unintentional sign extension. For example, if pointer[7] is 0x80, then the value 0xffffffffff000000 is or'd into mask rather than the intended value 0xff00000000000000 Detected with static analysis by CoverityScan Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e5963bc343b3fb4ca045e9d1c14cb9ce89234b8 Author: Michael Neuling Date: Mon Mar 21 22:24:52 2016 +0530 cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path Commit 96c4726f01cd "cpufreq: powernv: Remove cpu_to_chip_id() from hot-path" introduced a 'core_to_chip_map' array to cache the chip-ids of all cores. Replace this with a per-CPU variable that stores the pointer to the chip-array. This removes the linear lookup and provides a neater and simpler solution. Signed-off-by: Michael Neuling Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernv-cpufreq.c | 50 +++++++++++++-------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) commit afc54992296a5e7f7d2e41456ed90789b01a4e7b Author: Allen Hubbe Date: Mon Mar 21 04:53:13 2016 -0400 NTB: Make _addr functions optional in the API The functions ntb_peer_db_addr and ntb_peer_spad_addr were required by the api. The functions already support returning an error, so any existing calling code should already check for it. Any existing code using drivers that implement the functions will not be affected. Signed-off-by: Allen Hubbe Signed-off-by: Jon Mason include/linux/ntb.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 838850ee0bb97fc60ca8f1de3bf12ed0854f6173 Author: Dave Jiang Date: Fri Mar 18 16:39:47 2016 -0700 NTB: Fix incorrect clean up routine in ntb_perf The clean up routine when we failed to allocate kthread is not cleaning up all the threads, only the same one over and over again. Reported-by: Dan Carpenter Signed-off-by: Dave Jiang Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit ddc8f6feec76b5deea8090db015920a283006044 Author: Dave Jiang Date: Fri Mar 18 16:39:41 2016 -0700 NTB: Fix incorrect return check in ntb_perf kthread_create_no_node() returns error pointers, never NULL. Fix check so it handles error correctly. Reported-by: Dan Carpenter Signed-off-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7f8a58925b4c0198c12344025b6ffd5dd7d9f1f5 Author: Emil Bartczak Date: Mon Mar 21 01:06:10 2016 +0100 rtc: mcp795: add devicetree support Add device tree support to the rtc-mcp795 driver. Signed-off-by: Emil Bartczak Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/maxim,mcp795.txt | 11 +++++++++++ drivers/rtc/rtc-mcp795.c | 10 ++++++++++ 2 files changed, 21 insertions(+) commit e531cdf50a8a0fb7a4d51c06e52097bd01e9bf7c Merge: 4526b71 64e5cd7 Author: Linus Torvalds Date: Mon Mar 21 14:35:52 2016 -0700 Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Fix ABI regression of MMC BLK ioctl - Remove the unused MMC_DATA_STREAM flag - Enable asynchronous system PM for the host device - Minor fixes and clean-ups SDHCI host: Throughout the years, the numbers of SDHCI variants have increased and so has also the numbers of SDHCI callbacks/quirks. The purpose of these callbacks/quirks were to enable SDHCI to deal with variant specific requirements, but unfortunate this method didn't scale. Instead we have ended up with a mess. Not only did the code become suboptimal but also highly fragile. Lately many discussions of how to move forward with SDHCI has taken place at the MMC mailing list. Step by step, we aim to turn SDHCI's common code into a set of library functions. This will enable for optimizations and allow some of the existing callbacks and quirks to be removed, which also should help to make the code less fragile. Therefore I am also really pleased to announce that Adrian Hunter (Intel) has volunteered to step in as the maintainer for SDHCI. Future wise, I hope the community around SDHCI will continue to grow and that this release cycle can be the starting point of moving SDHCI into a better shape. As a matter of fact, already in this cycle the re-factoring has begun, but of course there are also fixes and new features included. Some highlights: - sdhci-iproc: Add support for Broadcom's BCM2835 eMMC IP - sdhci-acpi: Add support for QCOM controllers - sdhci-pic32: Add new SDHCI variant for PIC32MZDA Other hosts: - atmel-mci: Fix a NULL pointer dereference - mediatek: Add SD write-protect support - mmc_spi: Fix card detect in GPIO case - tmio/sdhi: Add r8a7795 support - tmio/sdhi: Some fixes and clean-ups - dw_mmc: Add HW reset support - dw_mmc: Some fixes and clean-ups - sunxi: Add support for MMC DDR52 mode" * tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc: (123 commits) mmc: sdhci-of-at91: fix wake-up issue when using runtime pm mmc: sdhci-pci: Do not set DMA mask in enable_dma() mmc: sdhci-acpi: Remove enable_dma() hook mmc: sdhci: Set DMA mask when adding host mmc: block: fix ABI regression of mmc_blk_ioctl mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config mmc: core: remove redundant memset of sdio_read_cccr mmc: core: remove redundant memset of mmc_decode_cid mmc: of_mmc_spi: fix unused warning mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan mmc: sdhci-of-arasan: fix missing sdhci_pltfm_free for err handling mmc: sdhci-of-arasan: remove disable clk_ahb from sdhci_arasan_resume Documentation: bindings: add description of phy for sdhci-of-arasan mmc: sdhci: Fix override of timeout clk wrt max_busy_timeout mmc: mmci: Remove unnecessary header file mmc: sdhci-acpi: add QCOM controllers mmc: tegra: implement memcomp pad calibration mmc: mediatek: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch mmc: mediatek: Change signal voltage error to dev_dbg() mmc: sh_mmcif, tmio: Use ARCH_RENESAS ... commit 520a07bff6fbb23cac905007d74c67058b189acb Merge: 34abf9e 68996a6 5511d78 Author: Doug Ledford Date: Mon Mar 21 17:32:23 2016 -0400 Merge branches 'i40iw', 'sriov' and 'hfi1' into k.o/for-4.6 commit 4526b710c1a31767044c3b1abb9f1f51e98bf49f Merge: 770c4c1 1d034e6 Author: Linus Torvalds Date: Mon Mar 21 14:18:10 2016 -0700 Merge tag 'md/4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD updates from Shaohua Li: "This update mainly fixes bugs. - a raid5 discard related fix from Jes - a MD multipath bio clone fix from Ming - raid1 error handling deadlock fix from Nate and corresponding raid10 fix from myself - a raid5 stripe batch fix from Neil - a patch from Sebastian to avoid unnecessary uevent - several cleanup/debug patches" * tag 'md/4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid5: Cleanup cpu hotplug notifier raid10: include bio_end_io_list in nr_queued to prevent freeze_array hang raid1: include bio_end_io_list in nr_queued to prevent freeze_array hang md: fix typos for stipe md/bitmap: remove redundant return in bitmap_checkpage md/raid1: remove unnecessary BUG_ON md: multipath: don't hardcopy bio in .make_request path md/raid5: output stripe state for debug md/raid5: preserve STRIPE_PREREAD_ACTIVE in break_stripe_batch_list Update MD git tree URL md/bitmap: remove redundant check MD: warn for potential deadlock md: Drop sending a change uevent when stopping RAID5: revert e9e4c377e2f563 to fix a livelock RAID5: check_reshape() shouldn't call mddev_suspend md/raid5: Compare apples to apples (or sectors to sectors) commit 68996a6e760e5c74654723eeb57bf65628ae87f4 Author: Eli Cohen Date: Fri Mar 11 22:58:43 2016 +0200 IB/ipoib: Allow mcast packets from other VFs With SRIOV enabled, two VFs on the same HCA which have the same port LID and may have the same QP number. To enable receiving multicasts from such VFs, further qualify the check: ignore the receive only if, in addition, the packet source gid equals the receiving VF's source gid. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit eff901d30e6cebd940072637f112ce4d0090ac12 Author: Eli Cohen Date: Fri Mar 11 22:58:42 2016 +0200 IB/mlx5: Implement callbacks for manipulating VFs Implement the IB defined callbacks used to manipulate the policy for the link state, set GUIDs or get statistics information. This functionality is added into a new file that will be used to add any SRIOV related functionality to the mlx5 IB layer. The following callbacks have been added: mlx5_ib_get_vf_config mlx5_ib_set_vf_link_state mlx5_ib_get_vf_stats mlx5_ib_set_vf_guid In addition, publish whether this device is based on a virtual function. In mlx5 supported devices, virtual functions are implemented as vHCAs. vHCAs have their own QP number space so it is possible that two vHCAs will use a QP with the same number at the same time. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/Makefile | 2 +- drivers/infiniband/hw/mlx5/ib_virt.c | 194 +++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/main.c | 10 ++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 ++ include/linux/mlx5/driver.h | 5 +- include/linux/mlx5/mlx5_ifc.h | 6 ++ 6 files changed, 223 insertions(+), 2 deletions(-) commit 1f324bff9ba3db276f074169d5b4af9e9c117ba1 Author: Eli Cohen Date: Fri Mar 11 22:58:41 2016 +0200 net/mlx5_core: Implement modify HCA vport command Implement the modify HCA vport commands used to modify the parameters of virtual HCA's ports. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 +++ drivers/net/ethernet/mellanox/mlx5/core/vport.c | 67 +++++++++++++++++++++++++ include/linux/mlx5/vport.h | 4 ++ 3 files changed, 77 insertions(+) commit 2a4826fe746e01712ca53902ee75c1a1f6c0a4aa Author: Eli Cohen Date: Fri Mar 11 22:58:40 2016 +0200 net/mlx5_core: Add VF param when querying vport counter Add a vf parameter to mlx5_core_query_vport_counter so we can call it to query counters of virtual functions. Also update current users of the API. PFs may call mlx5_core_query_vport_counter with other_vport set to indicate that they are querying a virtual function. The virtual function to be queried is given by the vf parameter. Virtual function numbering is zero based so the first VF is 0 and so on. When a PF queries its own function, the other_vport parameter is cleared. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mad.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 5 +++-- include/linux/mlx5/vport.h | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) commit 9c3c5f8e1f3092f43a46b247a95ae526c1b4542e Author: Eli Cohen Date: Fri Mar 11 22:58:39 2016 +0200 IB/ipoib: Add ndo operations for configuring VFs Add ndo operations to the network driver that enables configuring the following operations: ipoib_set_vf_link_state - configure the VF link policy ipoib_get_vf_config - get link state configuration ipoib_set_vf_guid - set a VF port or node GUID ipoib_get_vf_stats - get statistics of a VF Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 65 ++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) commit 50174a7f2c24d13cdeec435ee1ba70b1e0b1318f Author: Eli Cohen Date: Fri Mar 11 22:58:38 2016 +0200 IB/core: Add interfaces to control VF attributes Following the practice exercised for network devices which allow the PF net device to configure attributes of its virtual functions, we introduce the following functions to be used by IPoIB which is the network driver implementation for IB devices. ib_set_vf_link_state - set the policy for a VF link. More below. ib_get_vf_config - read configuration information of a VF ib_get_vf_stats - read VF statistics ib_set_vf_guid - set the node or port GUID of a VF Also add an indication in the device cap flags that indicates that this IB devices is based on a virtual function. A VF shares the physical port with the PF and other VFs. When setting the link state we have three options: 1. Auto - in this mode, the virtual port follows the state of the physical port and becomes active only if the physical port's state is active. In all other cases it remains in a Down state. 2. Down - sets the state of the virtual port to Down 3. Up - causes the virtual port to transition into Initialize state if it was not already in this state. A virtualization aware subnet manager can then bring the state of the port into the Active state. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 19 +++++++++++++++++++ 2 files changed, 59 insertions(+) commit 770c4c1119dbaa0e5e4c1f2e88ca8bfeb0d66b6d Author: Linus Torvalds Date: Mon Mar 21 13:49:01 2016 -0700 [media] vsp1: use proper dma alloc/free functions I noticed this while merging the drm tree and checking for stragglers: the vsp1 driver still used dma_[alloc|free]_writecombine() that got renamed in commit f6e45661f9be ("dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()") I should have noticed back in the media merge (commit bace3db5da97), but better late than never. Signed-off-by: Linus Torvalds drivers/media/platform/vsp1/vsp1_dl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 266c73b77706f2d05b4a3e70a5bb702ed35431d6 Merge: 2c856e1 568d7c7 Author: Linus Torvalds Date: Mon Mar 21 13:48:00 2016 -0700 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for 4.6 kernel. Overall the coolest thing here for me is the nouveau maxwell signed firmware support from NVidia, it's taken a long while to extract this from them. I also wish the ARM vendors just designed one set of display IP, ARM display block proliferation is definitely increasing. Core: - drm_event cleanups - Internal API cleanup making mode_fixup optional. - Apple GMUX vga switcheroo support. - DP AUX testing interface Panel: - Refactoring of DSI core for use over more transports. New driver: - ARM hdlcd driver i915: - FBC/PSR (framebuffer compression, panel self refresh) enabled by default. - Ongoing atomic display support work - Ongoing runtime PM work - Pixel clock limit checks - VBT DSI description support - GEM fixes - GuC firmware scheduler enhancements amdkfd: - Deferred probing fixes to avoid make file or link ordering. amdgpu/radeon: - ACP support for i2s audio support. - Command Submission/GPU scheduler/GPUVM optimisations - Initial GPU reset support for amdgpu vmwgfx: - Support for DX10 gen mipmaps - Pageflipping and other fixes. exynos: - Exynos5420 SoC support for FIMD - Exynos5422 SoC support for MIPI-DSI nouveau: - GM20x secure boot support - adds acceleration for Maxwell GPUs. - GM200 support - GM20B clock driver support - Power sensors work etnaviv: - Correctness fixes for GPU cache flushing - Better support for i.MX6 systems. imx-drm: - VBlank IRQ support - Fence support - OF endpoint support msm: - HDMI support for 8996 (snapdragon 820) - Adreno 430 support - Timestamp queries support virtio-gpu: - Fixes for Android support. rockchip: - Add support for Innosilicion HDMI rcar-du: - Support for 4 crtcs - R8A7795 support - RCar Gen 3 support omapdrm: - HDMI interlace output support - dma-buf import support - Refactoring to remove a lot of legacy code. tilcdc: - Rewrite of pageflipping code - dma-buf support - pinctrl support vc4: - HDMI modesetting bug fixes - Significant 3D performance improvement. fsl-dcu (FreeScale): - Lots of fixes tegra: - Two small fixes sti: - Atomic support for planes - Improved HDMI support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (1063 commits) drm/amdgpu: release_pages requires linux/pagemap.h drm/sti: restore mode_fixup callback drm/amdgpu/gfx7: add MTYPE definition drm/amdgpu: removing BO_VAs shouldn't be interruptible drm/amd/powerplay: show uvd/vce power gate enablement for tonga. drm/amd/powerplay: show uvd/vce power gate info for fiji drm/amdgpu: use sched fence if possible drm/amdgpu: move ib.fence to job.fence drm/amdgpu: give a fence param to ib_free drm/amdgpu: include the right version of gmc header files for iceland drm/radeon: fix indentation. drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ drm/amdgpu: switch back to 32bit hw fences v2 drm/amdgpu: remove amdgpu_fence_is_signaled drm/amdgpu: drop the extra fence range check v2 drm/amdgpu: signal fences directly in amdgpu_fence_process drm/amdgpu: cleanup amdgpu_fence_wait_empty v2 drm/amdgpu: keep all fences in an RCU protected array v2 drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring drm/amdgpu: RCU protected amd_sched_fence_release ... commit 3c52b658b8e4fbbf7975932bbdc4798421dbcb15 Author: Jakub Jelen Date: Sat Mar 19 12:58:07 2016 +0100 perf bench numa: Fix assertion for nodes bitfield Comparing bits and bytes in numa benchmark assertion I hit the issue on two socket Power8 machine presenting its numa nodes as 0,1,16,17 (according to numactl). Therefore I got error (and hang of parent process): perf: bench/numa.c:296: bind_to_memnode: Assertion `!(g->p.nr_nodes > (int)sizeof(nodemask))' failed. This is obviously false positive. We can fit all the 18 nodes into bitfield of 8 bytes (long on 64b architecture). Signed-off-by: Jakub Jelen Cc: Alexander Shishkin Cc: Jakub Jelen Cc: Peter Zijlstra Cc: trivial@kernel.org Link: http://lkml.kernel.org/r/1458388687-24421-1-git-send-email-jakuje@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c1b2a3508714281f604db818fa0cc83c2f9b6a Author: Eli Cohen Date: Fri Mar 11 22:58:37 2016 +0200 IB/core: Support accessing SA in virtualized environment Per the ongoing standardisation process, when virtual HCAs are present in a network, traffic is routed based on a destination GID. In order to access the SA we use the well known SA GID. We also add a GRH required boolean field to the port attributes which is used to report to the verbs consumer whether this port is connected to a virtual network. We use this field to realize whether we need to create an address vector with GRH to access the subnet administrator. We clear the port attributes struct before calling the hardware driver to make sure the default remains that GRH is not required. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 5 +++++ include/rdma/ib_verbs.h | 6 ++++++ 2 files changed, 11 insertions(+) commit fad61ad4e755f5dd13c7702a87cd907207392534 Author: Eli Cohen Date: Fri Mar 11 22:58:36 2016 +0200 IB/core: Add subnet prefix to port info The subnet prefix is a part of the port_info MAD returned and should be available at the ib_port_attr struct. We define it here and provide a default implementation in case the hardware driver does not provide one. The subnet prefix is required when creating the address vector to access the SA in networks where GRH must be used. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 15 ++++++++++++++- include/rdma/ib_verbs.h | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) commit d603c809ef91fa2d211bde5e95be417847410379 Author: Eli Cohen Date: Fri Mar 11 22:58:35 2016 +0200 IB/mlx5: Fix decision on using MAD_IFC Fix the condition that dictates when MAD_IFC should be used. According to firmware specifications, MAD_IFC commands must be used only if the ib_virt capability is off. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc8e27cc97318471b7e707932d5b93b0d5f70830 Author: Eli Cohen Date: Fri Mar 11 22:58:34 2016 +0200 net/core: Add support for configuring VF GUIDs Add two new NLAs to support configuration of Infiniband node or port GUIDs. New applications can choose to use this interface to configure GUIDs with iproute2 with commands such as: ip link set dev ib0 vf 0 node_guid 00:02:c9:03:00:21:6e:70 ip link set dev ib0 vf 0 port_guid 00:02:c9:03:00:21:6e:78 A new ndo, ndo_sef_vf_guid is introduced to notify the net device of the request to change the GUID. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford include/linux/netdevice.h | 3 +++ include/uapi/linux/if_link.h | 7 +++++++ net/core/rtnetlink.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit fb532d6a79b96a4c8f678024d7ed3549ff0ca916 Author: Leon Romanovsky Date: Tue Feb 23 10:25:25 2016 +0200 IB/{core, ulp} Support above 32 possible device capability flags The old bitwise device_cap_flags variable was limited to u32 which has all bits already defined. In order to overcome it, we converted device_cap_flags variable to be u64 type. Signed-off-by: Leon Romanovsky Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- include/rdma/ib_verbs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2953f42513225e2cc90a7a7e3d2d5ce9a7abc799 Author: Leon Romanovsky Date: Tue Feb 23 10:25:24 2016 +0200 IB/core: Replace setting the zero values in ib_uverbs_ex_query_device The setting to zero during variable initialization eliminates the need to explicitly set to zero variables and structures. Signed-off-by: Leon Romanovsky Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 3f0393a57509c200aeecc5e3984bf1a47bffc578 Author: Sagi Grimberg Date: Tue Feb 23 10:25:23 2016 +0200 net/mlx5_core: Introduce offload arithmetic hardware capabilities Define the necessary hardware structures for the offload arithmetic capabilities and read/cache them on driver load. Signed-off-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Reviewed-by: Saeed Mahameed Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++++++ include/linux/mlx5/device.h | 6 ++++++ include/linux/mlx5/mlx5_ifc.h | 31 +++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) commit b06e7de8a9d8d1d540ec122bbdf2face2a211634 Author: Leon Romanovsky Date: Tue Feb 23 10:25:22 2016 +0200 net/mlx5_core: Refactor device capability function Device capability function was called similar in all places. It was called twice for every queried parameter, while the difference between calls was in HCA capability mode only. The change proposed unify these calls into one function. Signed-off-by: Leon Romanovsky Reviewed-by: Saeed Mahameed Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fw.c | 55 ++++---------------------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 28 +++++++------ include/linux/mlx5/driver.h | 3 +- 3 files changed, 24 insertions(+), 62 deletions(-) commit 91d9ed8443b88cc50b81cf5ec900172515270f6f Author: Leon Romanovsky Date: Tue Feb 23 10:25:21 2016 +0200 net/mlx5_core: Fix caching ATOMIC endian mode capability Add caching of maximum device capability of ATOMIC endian mode. Fixes: f91e6d8941bf ('net/mlx5_core: Add setting ATOMIC endian mode') Signed-off-by: Leon Romanovsky Reviewed-by: Saeed Mahameed Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2c856e14dad8cb1b085ae1f30c5e125c6d46019b Merge: d34687a 357b565 Author: Linus Torvalds Date: Mon Mar 21 13:14:16 2016 -0700 Merge tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm[64] perf updates from Will Deacon: "I have another mixed bag of ARM-related perf patches here. It's about 25% CPU and 75% interconnect, but with drivers/bus/ languishing without an obvious maintainer or tree, Olof and I agreed to keep all of these PMU patches together. I suspect a whole load of code from drivers/bus/arm-* can be moved under drivers/perf/, so that's on the radar for the future. Summary: - Initial support for ARMv8.1 CPU PMUs - Support for the CPU PMU in Cavium ThunderX - CPU PMU support for systems running 32-bit Linux in secure mode - Support for the system PMU in ARM CCI-550 (Cache Coherent Interconnect)" * tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (26 commits) drivers/perf: arm_pmu: avoid NULL dereference when not using devicetree arm64: perf: Extend ARMV8_EVTYPE_MASK to include PMCR.LC arm-cci: remove unused variable arm-cci: don't return value from void function arm-cci: make private functions static arm-cci: CoreLink CCI-550 PMU driver arm-cci500: Rearrange PMU driver for code sharing with CCI-550 PMU arm-cci: CCI-500: Work around PMU counter writes arm-cci: Provide hook for writing to PMU counters arm-cci: Add helper to enable PMU without synchornising counters arm-cci: Add routines to save/restore all counters arm-cci: Get the status of a counter arm-cci: write_counter: Remove redundant check arm-cci: Delay PMU counter writes to pmu::pmu_enable arm-cci: Refactor CCI PMU enable/disable methods arm-cci: Group writes to counter arm-cci: fix handling cpumask_any_but return value arm-cci: simplify sysfs attr handling drivers/perf: arm_pmu: implement CPU_PM notifier arm64: dts: Add Cavium ThunderX specific PMU ... commit 5658600e7f67063e75b8fb8fa6c697183d305dd3 Author: Dan Carpenter Date: Fri Mar 18 08:41:59 2016 +0300 ib_srpt: fix a WARN_ON() message The first argument of WARN_ON() is a condition, so it means the warning message here will just be the name without the ->qp_num information. Signed-off-by: Dan Carpenter Reviewed-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34abf9ed73f2cf4fcc69eefd7e0af225cf9671a8 Author: Tatyana Nikolova Date: Fri Mar 18 10:38:33 2016 -0500 i40iw: Replace the obsolete crypto hash interface with shash This patch replaces the obsolete crypto hash interface with shash and resolves a build failure after merge of the rdma tree which is caused by the removal of crypto hash interface Removing CRYPTO_ALG_ASYNC from crypto_alloc_shash(), because it is by definition sync only Signed-off-by: Mustafa Ismail Signed-off-by: Tatyana Nikolova Acked-by: Herbert Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_osdep.h | 7 +++--- drivers/infiniband/hw/i40iw/i40iw_puda.c | 6 +++--- drivers/infiniband/hw/i40iw/i40iw_puda.h | 8 +++---- drivers/infiniband/hw/i40iw/i40iw_utils.c | 36 +++++++++++++++++++++---------- 5 files changed, 37 insertions(+), 21 deletions(-) commit d34687ab97731b3a707106f78756342b61f46dbc Merge: 77d9131 deaf756 Author: Linus Torvalds Date: Mon Mar 21 13:00:46 2016 -0700 Merge tag 'arc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC architecture updates from Vineet Gupta: - Big Endian io accessors fix [Lada] - Spellos fixes [Adam] - Fix for DW GMAC breakage [Alexey] - Making DMA API 64-bit ready - Shutting up -Wmaybe-uninitialized noise for ARC - Other minor fixes here and there, comments update * tag 'arc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (21 commits) ARCv2: ioremap: Support dynamic peripheral address space ARC: dma: reintroduce platform specific dma<->phys ARC: dma: ioremap: use phys_addr_t consistenctly in code paths ARC: dma: pass_phys() not sg_virt() to cache ops ARC: dma: non-coherent pages need V-P mapping if in HIGHMEM ARC: dma: Use struct page based page allocator helpers ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8 ARC: [plat-axs10x] add Ethernet PHY description in .dts arc: use of_platform_default_populate() to populate default bus ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build arc: [plat-nsimosci*] use ezchip network driver ARCv2: LLSC: software backoff is NOT needed starting HS2.1c ARC: mm: Use virt_to_pfn() for addr >> PAGE_SHIFT pattern ARC: [plat-nsim] document ranges ARC: build: Better way to detect ISA compatible toolchain ARCv2: Allow enabling PAE40 w/o HIGHMEM ARC: [BE] readl()/writel() to work in Big Endian CPU configuration ARC: [*defconfig] No need to specify CONFIG_CROSS_COMPILE ARC: [BE] Select correct CROSS_COMPILE prefix ARC: bitops: Remove non relevant comments ... commit 5511d7810752f426f0a9f999100fd249d352c2ef Author: Mitko Haralanov Date: Tue Mar 8 11:15:44 2016 -0800 IB/hfi1: Add SDMA cache eviction algorithm This commit adds a cache eviction algorithm for the SDMA user buffer cache. Besides the interval RB tree used for node lookup, the cache nodes are also arranged in a doubly-linked list. When a node is used, it is put at the beginning of the list. Less frequently used nodes naturally move to the tail of the list. When the cache limit is reached, the eviction code starts traversing the linked list in reverse, freeing buffers until enough space has been freed to fit the new user buffer. This guarantees that only the least used cache nodes will be removed from the cache. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 61 +++++++++++++++++++++++++++++++++-- drivers/staging/rdma/hfi1/user_sdma.h | 3 ++ 2 files changed, 62 insertions(+), 2 deletions(-) commit a7922f7ddf023c93b0c409d7a3557fdf0b5ce343 Author: Mitko Haralanov Date: Tue Mar 8 11:15:39 2016 -0800 IB/hfi1: Switch to using the pin query function Use the new function to query whether the expected receive user buffer can be pinned successfully. This requires that a new variable be added to the hfi1_filedata structure used to hold the number of pages pinned by the expected receive code. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/user_exp_rcv.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit bd3a8947de916534722b0861d865d3a809c0743c Author: Mitko Haralanov Date: Tue Mar 8 11:15:33 2016 -0800 IB/hfi1: Specify mm when releasing pages This change adds a pointer to the process mm_struct when calling hfi1_release_user_pages(). Previously, the function used the mm_struct of the current process to adjust the number of pinned pages. However, is some cases, namely when unpinning pages due to a MMU notifier call, we want to drop into that code block as it will cause a deadlock (the MMU notifiers take the process' mmap_sem prior to calling the callbacks). By allowing to caller to specify the pointer to the mm_struct, the caller has finer control over that part of hfi1_release_user_pages(). Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 2 +- drivers/staging/rdma/hfi1/user_exp_rcv.c | 4 ++-- drivers/staging/rdma/hfi1/user_pages.c | 11 ++++++----- drivers/staging/rdma/hfi1/user_sdma.c | 19 +++++++++++++------ 4 files changed, 22 insertions(+), 14 deletions(-) commit 2c97ce4f3c292e9ab75c7b6b4d9f69f0a9ee241d Author: Mitko Haralanov Date: Tue Mar 8 11:15:28 2016 -0800 IB/hfi1: Add pin query function System administrators can use the locked memory ulimit setting to set the maximum amount of memory a user can lock/pin. However, this setting alone is not enough to guarantee good operation of the hfi1 driver due to the fact that the setting does not have fine enough granularity to account for the limit being used by multiple user processes and caches. Therefore, a better limiting algorithm is needed. This is where the new hfi1_can_pin_pages() function and the cache_size module parameter come in. The function works by looking at the ulimit and cache_size value to compute a cache size. The algorithm examines the ulimit value and, if it is not "unlimited", computes a per-cache limit based on the number of configured user contexts. After that, the lower of the two - cache_size and computed per-cache limit - is used. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/user_pages.c | 52 ++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 6 deletions(-) commit 5cd3a88d7f2b050164dc1df59a398294515126d9 Author: Mitko Haralanov Date: Tue Mar 8 11:15:22 2016 -0800 IB/hfi1: Implement SDMA-side buffer caching Add support for caching of user buffers used for SDMA transfers. This change improves performance by avoiding repeatedly pinning the pages of buffers, which are being re-used by the application. While the cost of the pinning operation has been made heavier by adding the extra code to search the cache tree, re-allocate pages arrays, and future cache evictions, that cost will be amortized against the savings when the same buffer is re-used. It is also worth noting that in most cases, the cost of pinning should be much lower due to the buffer already being in the cache. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 255 ++++++++++++++++++++-------------- drivers/staging/rdma/hfi1/user_sdma.h | 1 + 2 files changed, 155 insertions(+), 101 deletions(-) commit a489876010377481823ae5dbbd83fa32792a2e16 Author: Mitko Haralanov Date: Tue Mar 8 11:15:16 2016 -0800 IB/hfi1: Adjust last address values for intervals Last address values for intervals in the interval RB tree nodes should be non-inclusive in order to avoid confusing ranges. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f310a00e02094ea7a2a7d2ae45bd51d97706caa Author: Mitko Haralanov Date: Tue Mar 8 11:15:10 2016 -0800 IB/hfi1: Add filter callback This commit adds a filter callback, which can be used to filter out interval RB nodes matching a certain interval down to a single one. This is needed for the upcoming SDMA-side caching where buffers will need to be filtered by their virtual address. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 19 ++++++++++++++----- drivers/staging/rdma/hfi1/mmu_rb.h | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) commit b8718e2e2e4702dfbe0d9a15d527e0531807e871 Author: Mitko Haralanov Date: Tue Mar 8 11:15:04 2016 -0800 IB/hfi1: Remove compare callback Interval RB trees provide their own searching function, which also takes care of determining the path through the tree that should be taken. This make the compare callback unnecessary. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 2 +- drivers/staging/rdma/hfi1/mmu_rb.h | 2 -- drivers/staging/rdma/hfi1/user_exp_rcv.c | 14 -------------- 3 files changed, 1 insertion(+), 17 deletions(-) commit 353b71c7c08ed75fe83843a382e5ca53376d07ca Author: Mitko Haralanov Date: Tue Mar 8 11:14:59 2016 -0800 IB/hfi1: Add MMU tracing Add a new tracepoint type for the MMU functions and calls to that tracepoint to allow tracing of MMU functionality. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 10 ++++++++++ drivers/staging/rdma/hfi1/trace.c | 1 + drivers/staging/rdma/hfi1/trace.h | 1 + 3 files changed, 12 insertions(+) commit df5a00f81dab36b3479a2b84c836e98e701c78bc Author: Mitko Haralanov Date: Tue Mar 8 11:14:53 2016 -0800 IB/hfi1: Use interval RB trees The interval RB trees can handle RB nodes which hold ranged information. This is exactly the usage for the buffer cache implemented in the expected receive code path. Convert the MMU/RB functions to use the interval RB tree API. This will help with future users of the caching API, as well. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 106 +++++++++++-------------------------- drivers/staging/rdma/hfi1/mmu_rb.h | 3 +- 2 files changed, 34 insertions(+), 75 deletions(-) commit 909e2cd004b639276678c195760efeea6c173626 Author: Mitko Haralanov Date: Tue Mar 8 11:14:48 2016 -0800 IB/hfi1: Notify remove MMU/RB callback of calling context Tell the remove MMU/RB callback if it's being called as part of a memory invalidation or not. This can be important in preventing a deadlock if the remove callback attempts to take the map_sem semaphore because the kernel's MMU invalidation functions have already taken it. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 10 +++++----- drivers/staging/rdma/hfi1/mmu_rb.h | 2 +- drivers/staging/rdma/hfi1/user_exp_rcv.c | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) commit 368f2b59d024fbb58015dfd0e09c54c424cda979 Author: Mitko Haralanov Date: Tue Mar 8 11:14:42 2016 -0800 IB/hfi1: Remove the use of add/remove RB function pointers The usage of function pointers for RB node insertion and removal in the expected receive code path was meant to be a small performance optimization. However, maintaining it, especially with the new MMU API, would become more troublesome as the API is extended. Since the performance optimization is minor, remove the function pointers and replace with direct calls. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 2 -- drivers/staging/rdma/hfi1/user_exp_rcv.c | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) commit eef9c896a94e715fcf8eb41e98b2469319641c73 Author: Mitko Haralanov Date: Tue Mar 8 11:14:36 2016 -0800 IB/hfi1: Allow remove MMU callbacks to free nodes In order to allow the remove MMU callbacks to free the RB nodes, it is necessary to prevent any references to the nodes after the remove callback has been called. Therefore, remove the node from the tree prior to calling the callback. In other words, the MMU/RB API now guarantees that all RB node operations it performs will be done prior to calling the remove callback and that the RB node will not be touched afterwards. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4b00d9490f2147d29f107f36391b0cc77bcd944f Author: Mitko Haralanov Date: Tue Mar 8 11:14:31 2016 -0800 IB/hfi1: Prevent NULL pointer dereference Prevent a potential NULL pointer dereference (found by code inspection) when unregistering an MMU handler. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 3 +++ 1 file changed, 3 insertions(+) commit c81e1f6452406a633b7c4ea3e0a12e5deaf57f5c Author: Mitko Haralanov Date: Tue Mar 8 11:14:25 2016 -0800 IB/hfi1: Allow MMU function execution in IRQ context Future users of the MMU/RB functions might be searching or manipulating the MMU RB trees in interrupt context. Therefore, the MMU/RB functions need to be able to run in interrupt context. This requires that we use the IRQ-aware API for spin locks. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mmu_rb.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 06e0ffa69312ce33484bf5c63aa5fc576fde13a8 Author: Mitko Haralanov Date: Tue Mar 8 11:14:20 2016 -0800 IB/hfi1: Re-factor MMU notification code The MMU notification code added to the expected receive side has been re-factored and split into it's own file. This was done in order to make the code more general and, therefore, usable by other parts of the driver. The caching behavior remains the same. However, the handling of the RB tree (insertion, deletions, and searching) as well as the MMU invalidation processing is now handled by functions in the mmu_rb.[ch] files. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/file_ops.c | 1 + drivers/staging/rdma/hfi1/hfi.h | 14 +- drivers/staging/rdma/hfi1/mmu_rb.c | 304 ++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/mmu_rb.h | 73 +++++++ drivers/staging/rdma/hfi1/user_exp_rcv.c | 336 ++++++++----------------------- 6 files changed, 471 insertions(+), 259 deletions(-) commit 77d913178c248d436a15151be5214ef2bf06a465 Merge: 53d2e69 ab73ef4 Author: Linus Torvalds Date: Mon Mar 21 12:22:37 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF and quota updates from Jan Kara: "This contains a rewrite of UDF handling of filename encoding to fix remaining overflow issues from Andrew Gabbasov and quota changes to support new Q_[X]GETNEXTQUOTA quotactl for VFS quota formats" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Fix possible GPF due to uninitialised pointers ext4: Make Q_GETNEXTQUOTA work for quota in hidden inodes quota: Forbid Q_GETQUOTA and Q_GETNEXTQUOTA for frozen filesystem quota: Fix possible races during quota loading ocfs2: Implement get_next_id() quota_v2: Implement get_next_id() for V2 quota format quota: Add support for ->get_nextdqblk() for VFS quota udf: Merge linux specific translation into CS0 conversion function udf: Remove struct ustr as non-needed intermediate storage udf: Use separate buffer for copying split names udf: Adjust UDF_NAME_LEN to better reflect actual restrictions udf: Join functions for UTF8 and NLS conversions udf: Parameterize output length in udf_put_filename quota: Allow Q_GETQUOTA for frozen filesystem quota: Fixup comments about return value of Q_[X]GETNEXTQUOTA commit 53d2e6976bd4042672ed7b90dfbf4b31635b7dcf Merge: d407574 2cdb958 Author: Linus Torvalds Date: Mon Mar 21 11:53:05 2016 -0700 Merge tag 'xfs-for-linus-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs updates from Dave Chinner: "There's quite a lot in this request, and there's some cross-over with ext4, dax and quota code due to the nature of the changes being made. As for the rest of the XFS changes, there are lots of little things all over the place, which add up to a lot of changes in the end. The major changes are that we've reduced the size of the struct xfs_inode by ~100 bytes (gives an inode cache footprint reduction of >10%), the writepage code now only does a single set of mapping tree lockups so uses less CPU, delayed allocation reservations won't overrun under random write loads anymore, and we added compile time verification for on-disk structure sizes so we find out when a commit or platform/compiler change breaks the on disk structure as early as possible. Change summary: - error propagation for direct IO failures fixes for both XFS and ext4 - new quota interfaces and XFS implementation for iterating all the quota IDs in the filesystem - locking fixes for real-time device extent allocation - reduction of duplicate information in the xfs and vfs inode, saving roughly 100 bytes of memory per cached inode. - buffer flag cleanup - rework of the writepage code to use the generic write clustering mechanisms - several fixes for inode flag based DAX enablement - rework of remount option parsing - compile time verification of on-disk format structure sizes - delayed allocation reservation overrun fixes - lots of little error handling fixes - small memory leak fixes - enable xfsaild freezing again" * tag 'xfs-for-linus-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (66 commits) xfs: always set rvalp in xfs_dir2_node_trim_free xfs: ensure committed is initialized in xfs_trans_roll xfs: borrow indirect blocks from freed extent when available xfs: refactor delalloc indlen reservation split into helper xfs: update freeblocks counter after extent deletion xfs: debug mode forced buffered write failure xfs: remove impossible condition xfs: check sizes of XFS on-disk structures at compile time xfs: ioends require logically contiguous file offsets xfs: use named array initializers for log item dumping xfs: fix computation of inode btree maxlevels xfs: reinitialise per-AG structures if geometry changes during recovery xfs: remove xfs_trans_get_block_res xfs: fix up inode32/64 (re)mount handling xfs: fix format specifier , should be %llx and not %llu xfs: sanitize remount options xfs: convert mount option parsing to tokens xfs: fix two memory leaks in xfs_attr_list.c error paths xfs: XFS_DIFLAG2_DAX limited by PAGE_SIZE xfs: dynamically switch modes when XFS_DIFLAG2_DAX is set/cleared ... commit d407574e7948210223a7adca5ff26e3b0ec8143e Merge: 5518f66 12bb0a8 Author: Linus Torvalds Date: Mon Mar 21 11:03:02 2016 -0700 Merge tag 'for-f2fs-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "New Features: - uplift filesystem encryption into fs/crypto/ - give sysfs entries to control memroy consumption Enhancements: - aio performance by preallocating blocks in ->write_iter - use writepages lock for only WB_SYNC_ALL - avoid redundant inline_data conversion - enhance forground GC - use wait_for_stable_page as possible - speed up SEEK_DATA and fiiemap Bug Fixes: - corner case in terms of -ENOSPC for inline_data - hung task caused by long latency in shrinker - corruption between atomic write and f2fs_trace_pid - avoid garbage lengths in dentries - revoke atomicly written pages if an error occurs In addition, there are various minor bug fixes and clean-ups" * tag 'for-f2fs-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (81 commits) f2fs: submit node page write bios when really required f2fs: add missing argument to f2fs_setxattr stub f2fs: fix to avoid unneeded unlock_new_inode f2fs: clean up opened code with f2fs_update_dentry f2fs: declare static functions f2fs: use cryptoapi crc32 functions f2fs: modify the readahead method in ra_node_page() f2fs crypto: sync ext4_lookup and ext4_file_open fs crypto: move per-file encryption from f2fs tree to fs/crypto f2fs: mutex can't be used by down_write_nest_lock() f2fs: recovery missing dot dentries in root directory f2fs: fix to avoid deadlock when merging inline data f2fs: introduce f2fs_flush_merged_bios for cleanup f2fs: introduce f2fs_update_data_blkaddr for cleanup f2fs crypto: fix incorrect positioning for GCing encrypted data page f2fs: fix incorrect upper bound when iterating inode mapping tree f2fs: avoid hungtask problem caused by losing wake_up f2fs: trace old block address for CoWed page f2fs: try to flush inode after merging inline data f2fs: show more info about superblock recovery ... commit 6b0725232dd1a8ba330663603db2a4009c177181 Merge: 7d34fa7 ae74f10 Author: David S. Miller Date: Mon Mar 21 13:35:57 2016 -0400 Merge branch 'bridge-gso-segs-and-size' Eric Dumazet says: ==================== net: propagate max_gso_segs and max_gso_size bridge code does not properly update max_gso_segs and max_gso_size. Since this was not really obvious, first patch adds two new rtnetlink attributes to help debugging this kind of issues (ip -d link) Second patch fixes bridge code. ==================== Signed-off-by: David S. Miller commit ae74f10068387bb0e64d8f1c8beac5e35c1458b1 Author: Eric Dumazet Date: Mon Mar 21 09:55:11 2016 -0700 bridge: update max_gso_segs and max_gso_size It can be useful to lower max_gso_segs on NIC with very low number of TX descriptors like bcmgenet. However, this is defeated by bridge since it does not propagate the lower value of max_gso_segs and max_gso_size. Signed-off-by: Eric Dumazet Cc: Petri Gynther Cc: Stephen Hemminger Signed-off-by: David S. Miller net/bridge/br_if.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c70ce028e834f8e51306217dbdbd441d851c64d3 Author: Eric Dumazet Date: Mon Mar 21 09:55:10 2016 -0700 net/rtnetlink: add IFLA_GSO_MAX_SEGS and IFLA_GSO_MAX_SIZE attributes It can be useful to report dev->gso_max_segs and dev->gso_max_size so that "ip -d link" can display them to help debugging. For the moment, these attributes are read-only. Signed-off-by: Eric Dumazet Cc: Petri Gynther Cc: Stephen Hemminger Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 2 ++ net/core/rtnetlink.c | 4 ++++ 2 files changed, 6 insertions(+) commit 7d34fa75d3ee99a90ebb33c2917aa9152fb36a9c Author: Jiri Benc Date: Mon Mar 21 17:50:05 2016 +0100 vxlan: fix too large pskb_may_pull with remote checksum vxlan_remcsum is called after iptunnel_pull_header and thus the skb has vxlan header already pulled. Don't include vxlan header again in the calculation. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5692d7ea4183b8dd5a49d73d6a4436aa22929b7b Author: Jiri Benc Date: Mon Mar 21 17:39:18 2016 +0100 vxlan: fix sparse warnings Sparse reports false positives for the header manipulation inlines. Annotate them correctly. Tested by sparse on a little endian and big endian machine. Fixes: 54bfd872bf16d ("vxlan: keep flags and vni in network byte order") Reported-by: kbuild test robot Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/net/vxlan.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ed49e650371008b0e00c8004cc2ca93055740f78 Author: Luis de Bethencourt Date: Mon Mar 21 16:31:14 2016 +0000 net: add description for len argument of dev_get_phys_port_name When the function dev_get_phys_port_name was added it missed a description for it's len argument. Adding it. Fixes: db24a9044ee1 ("net: add support for phys_port_name") Signed-off-by: Luis de Bethencourt Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit 5518f66b5a64b76fd602a7baf60590cd838a2ca0 Merge: 643ad15 fa5ff8a Author: Linus Torvalds Date: Mon Mar 21 10:05:13 2016 -0700 Merge branch 'for-4.6-ns' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup namespace support from Tejun Heo: "These are changes to implement namespace support for cgroup which has been pending for quite some time now. It is very straight-forward and only affects what part of cgroup hierarchies are visible. After unsharing, mounting a cgroup fs will be scoped to the cgroups the task belonged to at the time of unsharing and the cgroup paths exposed to userland would be adjusted accordingly" * 'for-4.6-ns' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix and restructure error handling in copy_cgroup_ns() cgroup: fix alloc_cgroup_ns() error handling in copy_cgroup_ns() Add FS_USERNS_FLAG to cgroup fs cgroup: Add documentation for cgroup namespaces cgroup: mount cgroupns-root when inside non-init cgroupns kernfs: define kernfs_node_dentry cgroup: cgroup namespace setns support cgroup: introduce cgroup namespaces sched: new clone flag CLONE_NEWCGROUP for cgroup namespace kernfs: Add API to generate relative kernfs path commit f35592a97460f57d1089fd674176e9f34ba311f2 Author: Kinglong Mee Date: Sat Feb 13 21:51:31 2016 +0800 nfs/blocklayout: make sure making a aligned read request Only treat write goes up to the inode size as aligned request, because it always write PAGE_CACHE_SIZE, but read a dynamic size. Signed-off-by: Kinglong Mee Signed-off-by: Trond Myklebust fs/nfs/blocklayout/blocklayout.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6986c012faa480fb0fda74eaae9abb22f7ad1004 Author: Miklos Szeredi Date: Mon Mar 21 17:31:46 2016 +0100 ovl: cleanup unused var in rename2 Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 2 -- 1 file changed, 2 deletions(-) commit 56656e960b555cb98bc414382566dcb59aae99a2 Author: Miklos Szeredi Date: Mon Mar 21 17:31:46 2016 +0100 ovl: rename is_merge to is_lowest The 'is_merge' is an historical naming from when only a single lower layer could exist. With the introduction of multiple lower layers the meaning of this flag was changed to mean only the "lowest layer" (while all lower layers were being merged). So now 'is_merge' is inaccurate and hence renaming to 'is_lowest' Signed-off-by: Miklos Szeredi fs/overlayfs/readdir.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f134f2446548267330f45b06f14d59aaf1641fdc Author: Sohom Bhattacharjee Date: Tue Mar 15 20:57:59 2016 +0530 ovl: fixed coding style warning This patch fixes a newline warning found by the checkpatch.pl tool Signed-off-by: Sohom-Bhattacharjee Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 1 + 1 file changed, 1 insertion(+) commit 45aebeaf4f67468f76bedf62923a576a519a9b68 Author: Vivek Goyal Date: Mon Feb 22 09:28:34 2016 -0500 ovl: Ensure upper filesystem supports d_type In some instances xfs has been created with ftype=0 and there if a file on lower fs is removed, overlay leaves a whiteout in upper fs but that whiteout does not get filtered out and is visible to overlayfs users. And reason it does not get filtered out because upper filesystem does not report file type of whiteout as DT_CHR during iterate_dir(). So it seems to be a requirement that upper filesystem support d_type for overlayfs to work properly. Do this check during mount and fail if d_type is not supported. Suggested-by: Dave Chinner Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/readdir.c | 37 +++++++++++++++++++++++++++++++++++++ fs/overlayfs/super.c | 15 +++++++++++++++ 3 files changed, 53 insertions(+) commit fb5bb2c3b73df060d588b6521de5ab03589283f7 Author: David Howells Date: Tue Jul 7 15:04:44 2015 +0100 ovl: Warn on copy up if a process has a R/O fd open to the lower file Print a warning when overlayfs copies up a file if the process that triggered the copy up has a R/O fd open to the lower file being copied up. This can help catch applications that do things like the following: fd1 = open("foo", O_RDONLY); fd2 = open("foo", O_RDWR); where they expect fd1 and fd2 to refer to the same file - which will no longer be the case post-copy up. With this patch, the following commands: bash 5/mnt/a/foo128 assuming /mnt/a/foo128 to be an un-copied up file on an overlay will produce the following warning in the kernel log: overlayfs: Copying up foo129, but open R/O on fd 5 which will cease to be coherent [pid=3818 bash] This is enabled by setting: /sys/module/overlay/parameters/check_copy_up to 1. The warnings are ratelimited and are also limited to one warning per file - assuming the copy up completes in each case. Signed-off-by: David Howells Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 07f2af7bfd247857b1bf16ae7f479b5b6f4ef305 Author: Konstantin Khlebnikov Date: Mon Jun 29 20:18:56 2015 +0300 ovl: honor flag MS_SILENT at mount This patch hides error about missing lowerdir if MS_SILENT is set. We use mount(NULL, "/", "overlay", MS_SILENT, NULL) for testing support of overlayfs: syscall returns -ENODEV if it's not supported. Otherwise kernel automatically loads module and returns -EINVAL because lowerdir is missing. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 11f3710417d026ea2f4fcf362d866342c5274185 Author: Miklos Szeredi Date: Mon Mar 21 17:31:44 2016 +0100 ovl: verify upper dentry before unlink and rename Unlink and rename in overlayfs checked the upper dentry for staleness by verifying upper->d_parent against upperdir. However the dentry can go stale also by being unhashed, for example. Expand the verification to actually look up the name again (under parent lock) and check if it matches the upper dentry. This matches what the VFS does before passing the dentry to filesytem's unlink/rename methods, which excludes any inconsistency caused by overlayfs. Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 59 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 21 deletions(-) commit ae20f12d2de6629ee6f679ccf22f9b7b209c464d Author: Christian König Date: Fri Mar 18 19:29:52 2016 +0100 drm/amdgpu: add invalidate_page callback for userptrs Otherwise we can run into problems with the writeback code. Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 98 +++++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 26 deletions(-) commit 0d2b42b0bdba45c82d29d794ea30a4c90e3f4098 Author: Christian König Date: Fri Mar 18 19:29:51 2016 +0100 drm/amdgpu: Revert "remove the userptr rmn->lock" This reverts commit c02196834456f2d5fad334088b70e98ce4967c34. In the meantime we moved get_user_pages() outside of the reservation lock, so that shouldn't be an issue any more Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 0ccbf11988d30c826810884fb9d2743e3923a464 Author: Alex Deucher Date: Tue Mar 15 11:22:27 2016 -0400 drm/amdgpu: clean up path handling for powerplay Use $(FULL_AMD_PATH) like everything else. Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a82d397bffc2ff3a72e9b8ca3850771ff5cf451f Author: Colin Ian King Date: Fri Mar 18 16:47:29 2016 +0000 drm/amd/powerplay: fix memory leak of tdp_table tdp_table is being leaked on failed allocations of hwmgr->dyn_state.cac_dtp_table. kfree tdp_table on the error return path to fix the leak. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 227f33beab746aeec4ef3305bd17b1d374df09e7 Author: Dan Carpenter Date: Mon Mar 21 12:02:31 2016 +0300 mdio-sun4i: oops in error handling in probe We could end up dereferencing an error pointer when we call regulator_disable(). Fixes: 4bdcb1dd9feb ('net: Add MDIO bus driver for the Allwinner EMAC') Signed-off-by: Dan Carpenter Acked-by: Chen-Yu Tsai Signed-off-by: David S. Miller drivers/net/phy/mdio-sun4i.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit abc34d753ee013a62595c2f7e9260e173dd083c6 Author: Arnd Bergmann Date: Mon Mar 21 09:30:59 2016 +0100 net: smc911x: avoid unused variable warnings The change to use the generic DMA engine API in the smc911x driver has led to a harmless warning about unused local variables: smsc/smc911x.c: In function 'smc911x_probe': smsc/smc911x.c:1796:20: error: unused variable 'param' smsc/smc911x.c:1795:17: error: unused variable 'mask' smsc/smc911x.c:1794:26: error: unused variable 'config' This puts the variable declarations inside of the same #ifdef that protects their use. Signed-off-by: Arnd Bergmann Fixes: 79d3b59a93ba ("net: smc911x: convert pxa dma to dmaengine") Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 2 ++ 1 file changed, 2 insertions(+) commit c64c1437afb14ebc900e40910f31ffb20bf652ad Author: Takashi Iwai Date: Mon Mar 21 16:07:30 2016 +0100 ALSA: hda - Fix missing ELD update at unplugging i915 get_eld ops may return an error when no encoder is connected, and currently we regard the error as fatal and skip the whole ELD handling. This ended up with the missing ELD update at unplugging. This patch fixes the issue by treating the error as the unplugged state, instead of skipping the rest. Reported-by: Libin Yang Cc: # v4.5 Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e01dc539df3ada9061a1097224513236b5381349 Author: Paul Gortmaker Date: Sun Feb 21 19:06:08 2016 -0500 drivers/xen: make platform-pci.c explicitly non-modular The Kconfig currently controlling compilation of this code is: arch/x86/xen/Kconfig:config XEN_PVHVM arch/x86/xen/Kconfig: def_bool y ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. In removing "module" from the init fcn name, we observe a namespace collision with the probe function, so we use "probe" in the name of the probe function, and "init" in the registration fcn, as per standard convention, as suggested by Stefano. Signed-off-by: Paul Gortmaker Reviewed-by: Stefano Stabellini Signed-off-by: David Vrabel drivers/xen/platform-pci.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 46894f17af151f9f2050821aaa889a32c7cbd16f Author: Paul Gortmaker Date: Sun Feb 21 19:06:07 2016 -0500 drivers/xen: make sys-hypervisor.c explicitly non-modular The Kconfig currently controlling compilation of this code is: config XEN_SYS_HYPERVISOR bool "Create xen entries under /sys/hypervisor" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. However one could argue that fs_initcall() might make more sense here. This change means that the one line function xen_properties_destroy() has only one user left, and since that is inside an #ifdef, we just manually inline it there vs. adding more ifdeffery around the function to avoid compile warnings about "defined but not used". In order to be consistent we also manually inline the other _destroy functions that are also just one line sysfs functions calls with only one call site remaing, even though they wouldn't need #ifdeffery. Signed-off-by: Paul Gortmaker Reviewed-by: Stefano Stabellini Signed-off-by: David Vrabel drivers/xen/sys-hypervisor.c | 59 ++++++-------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) commit ab1241a1fc4351be16a5fd5c34001de08c696169 Author: Paul Gortmaker Date: Sun Feb 21 19:06:06 2016 -0500 drivers/xen: make xenbus_dev_[front/back]end explicitly non-modular The Makefile / Kconfig currently controlling compilation here is: obj-y += xenbus_dev_frontend.o [...] obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o ...with: drivers/xen/Kconfig:config XEN_BACKEND drivers/xen/Kconfig: bool "Backend driver support" ...meaning that they currently are not being built as modules by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. 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 Reviewed-by: Stefano Stabellini Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_dev_backend.c | 13 ++----------- drivers/xen/xenbus/xenbus_dev_frontend.c | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) commit 106eaa8e6e19cbaff34c99c9996d61634fb44b0d Author: Paul Gortmaker Date: Sun Feb 21 19:06:05 2016 -0500 drivers/xen: make [xen-]ballon explicitly non-modular The Makefile / Kconfig currently controlling compilation here is: obj-y += grant-table.o features.o balloon.o manage.o preempt.o time.o [...] obj-$(CONFIG_XEN_BALLOON) += xen-balloon.o ...with: drivers/xen/Kconfig:config XEN_BALLOON drivers/xen/Kconfig: bool "Xen memory balloon driver" ...meaning that they currently are not being built as modules 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. In doing so we uncover two implict includes that were obtained by module.h having such a wide include scope itself: In file included from drivers/xen/xen-balloon.c:41:0: include/xen/balloon.h:26:51: warning: ‘struct page’ declared inside parameter list [enabled by default] int alloc_xenballooned_pages(int nr_pages, struct page **pages); ^ include/xen/balloon.h: In function ‘register_xen_selfballooning’: include/xen/balloon.h:35:10: error: ‘ENOSYS’ undeclared (first use in this function) return -ENOSYS; ^ This is fixed by adding mm-types.h and errno.h to the list. We also delete the MODULE_LICENSE tags since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Reviewed-by: Stefano Stabellini Signed-off-by: David Vrabel drivers/xen/balloon.c | 4 ---- drivers/xen/xen-balloon.c | 14 +++----------- 2 files changed, 3 insertions(+), 15 deletions(-) commit 59aa56bf2a92e1df97d218937d5cd108927a5c46 Author: Paul Gortmaker Date: Sun Feb 21 19:06:04 2016 -0500 xen: audit usages of module.h ; remove unnecessary instances Code that uses no modular facilities whatsoever should not be sourcing module.h at all, since that header drags in a bunch of other headers with it. Similarly, code that is not explicitly using modular facilities like module_init() but only is declaring module_param setup variables should be using moduleparam.h and not the larger module.h file for that. In making this change, we also uncover an implicit use of BUG() in inline fcns within arch/arm/include/asm/xen/hypercall.h so we explicitly source for that file now. Signed-off-by: Paul Gortmaker Reviewed-by: Stefano Stabellini Signed-off-by: David Vrabel arch/arm/include/asm/xen/hypercall.h | 2 ++ drivers/xen/events/events_2l.c | 1 - drivers/xen/events/events_base.c | 2 +- drivers/xen/events/events_fifo.c | 1 - drivers/xen/features.c | 2 +- drivers/xen/grant-table.c | 1 - drivers/xen/xen-pciback/conf_space.c | 2 +- drivers/xen/xen-pciback/pciback_ops.c | 2 +- drivers/xen/xen-pciback/xenbus.c | 2 +- drivers/xen/xen-selfballoon.c | 1 - drivers/xen/xenbus/xenbus_xs.c | 1 - drivers/xen/xenfs/xensyms.c | 1 - 12 files changed, 7 insertions(+), 11 deletions(-) commit aace66b170ce7feda2d1860a81eefff37fa9d1d2 Author: Nishanth Menon Date: Wed Mar 16 19:23:14 2016 -0500 mailbox: Introduce TI message manager driver Support for TI Message Manager Module. This hardware block manages a bunch of hardware queues meant for communication between processor entities. Clients sitting on top of this would manage the required protocol for communicating with the counterpart entities. For more details on TI Message Manager hardware block, see documentation that will is available here: http://www.ti.com/lit/ug/spruhy8/spruhy8.pdf Chapter 8.1(Message Manager) Signed-off-by: Nishanth Menon Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 11 + drivers/mailbox/Makefile | 2 + drivers/mailbox/ti-msgmgr.c | 639 +++++++++++++++++++++++++++++++++++++++ include/linux/soc/ti/ti-msgmgr.h | 35 +++ 4 files changed, 687 insertions(+) commit 94b5293d55772f33517ea1acc237d8858c5d55d9 Author: Nishanth Menon Date: Wed Mar 16 19:23:13 2016 -0500 Documentation: dt: mailbox: Add TI Message Manager Message Manager is a hardware block used to communicate with various processor systems within certain Texas Instrument's Keystone generation SoCs. This hardware engine is used to transfer messages from various compute entities(or processors) within the SoC. It is designed to be self contained without needing software initialization for operation. Signed-off-by: Nishanth Menon Acked-by: Rob Herring Signed-off-by: Jassi Brar .../bindings/mailbox/ti,message-manager.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 0c313cb207326f759a58f486214288411b25d4cf Author: Rafael J. Wysocki Date: Sun Mar 20 01:33:35 2016 +0100 cpuidle: menu: Fall back to polling if next timer event is near Commit a9ceb78bc75c (cpuidle,menu: use interactivity_req to disable polling) changed the behavior of the fallback state selection part of menu_select() so it looks at interactivity_req instead of data->next_timer_us when it makes its decision. That effectively caused polling to be used more often as fallback idle which led to significant increases of energy consumption in some cases. Commit e132b9b3bc7f (cpuidle: menu: use high confidence factors only when considering polling) changed that logic again to be more predictable, but that didn't help with the increased energy consumption problem. For this reason, go back to making decisions on which state to fall back to based on data->next_timer_us which is the time we know for sure something will happen rather than a prediction (which may be inaccurate and turns out to be so often enough to be problematic). However, take the target residency of the first proper idle state (C1) into account, so that state is not used as the fallback one if its target residency is greater than data->next_timer_us. Fixes: a9ceb78bc75c (cpuidle,menu: use interactivity_req to disable polling) Signed-off-by: Rafael J. Wysocki Reported-and-tested-by: Doug Smythies drivers/cpuidle/governors/menu.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 389f239c53420802ad5085e51e88c37e2df5e003 Author: Chris Mason Date: Mon Mar 21 06:59:09 2016 -0700 btrfs: make sure we stay inside the bvec during __btrfs_lookup_bio_sums Commit c40a3d38aff4e1c (Btrfs: Compute and look up csums based on sectorsized blocks) changes around how we walk the bios while looking up crcs. There's an inner loop that is jumping to the next bvec based on sectors and before it derefs the next bvec, it needs to make sure we're still in the bio. In this case, the outer loop would have decided to stop moving forward too, and the bvec deref is never actually used for anything. But CONFIG_DEBUG_PAGEALLOC catches it because we're outside our bio. Signed-off-by: Chris Mason Reviewed-by: David Sterba fs/btrfs/file-item.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 70cf769c5ba283483a42c46f3734202b55dd3041 Merge: b562e44 cd6438c 84bd042 9e358e2 3189e49 048b31c d4e42e7 59a68eb Author: Joerg Roedel Date: Mon Mar 21 14:58:47 2016 +0100 Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'arm/mediatek', 'arm/io-pgtable', 'arm/renesas' and 'core' into next commit a6cdf1c08cbfe0818a3d8042844d75bf74fd82bd Author: Catalin Marinas Date: Mon Mar 21 11:00:17 2016 +0000 kvm: arm64: Disable compiler instrumentation for hypervisor code With the recent rewrite of the arm64 KVM hypervisor code in C, enabling certain options like KASAN would allow the compiler to generate memory accesses or function calls to addresses not mapped at EL2. This patch disables the compiler instrumentation on the arm64 hypervisor code for gcov-based profiling (GCOV_KERNEL), undefined behaviour sanity checker (UBSAN) and kernel address sanitizer (KASAN). Signed-off-by: Catalin Marinas Cc: Christoffer Dall Cc: Marc Zyngier Cc: Paolo Bonzini Cc: # 4.5+ Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 30b5b8808c12bcd947dd474980482561b69c1bcb Author: Tero Roponen Date: Mon Mar 21 09:26:41 2016 +0200 PCI: Restore inclusion of pci/hotplug Kconfig Commit e7e127e3c767 ("PCI: Include pci/hotplug Kconfig directly from pci/Kconfig") added one line to pci/Kconfig. However, for some mysterious reason it isn't there now, even though there are no traces of removing it in the git log. I detected this issue when 'make oldconfig' removed all the options that depended on HOTPLUG_PCI. [bhelgaas: I botched the cfeb8139a1fb ("Merge branch 'pci/host-hv' into next") merge. "git diff cfeb8139a1fb^ cfeb8139a1fb" shows a conflict in drivers/pci/Kconfig, and I mistakenly dropped the hotplug/Kconfig piece.] Signed-off-by: Tero Roponen Signed-off-by: Bjorn Helgaas drivers/pci/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f09f1bacfe2b1e64a5d94bc2711f73b654c95514 Author: Catalin Marinas Date: Fri Mar 11 17:39:25 2016 +0000 arm64: Split pr_notice("Virtual kernel memory layout...") into multiple pr_cont() The printk() implementation has a limit of LOG_LINE_MAX (== 1024 - 32) buffer per call which the arm64 mem_init() breaches when printing the virtual memory layout with CONFIG_KASAN enabled. The result is that the last line is no longer printed. This patch splits the call into a pr_notice() + additional pr_cont() calls. Signed-off-by: Catalin Marinas Acked-by: Mark Rutland arch/arm64/mm/init.c | 60 ++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 32 deletions(-) commit cc7c0cda8f8c03d6867408e3df953b2fa67d704c Author: Kefeng Wang Date: Tue Mar 15 17:47:10 2016 +0800 arm64: drop unused __local_flush_icache_all() After commit 65da0a8e34a8 ("arm64: use non-global mappings for UEFI runtime regions"), nobody use __local_flush_icache_all() anymore, so drop it. Signed-off-by: Kefeng Wang Acked-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/cacheflush.h | 7 ------- 1 file changed, 7 deletions(-) commit b90b4a608ea2401cc491828f7a385edd2e236e37 Author: Mark Rutland Date: Tue Mar 15 11:22:57 2016 +0000 arm64: fix KASLR boot-time I-cache maintenance Commit f80fb3a3d50843a4 ("arm64: add support for kernel ASLR") missed a DSB necessary to complete I-cache maintenance in the primary boot path, and hence stale instructions may still be present in the I-cache and may be executed until the I-cache maintenance naturally completes. Since commit 8ec41987436d566f ("arm64: mm: ensure patched kernel text is fetched from PoU"), all CPUs invalidate their I-caches after their MMU is enabled. Prior a CPU's MMU having been enabled, arbitrary lines may have been fetched from the PoC into I-caches. We never patch text expected to be executed with the MMU off. Thus, it is unnecessary to perform broadcast I-cache maintenance in the primary boot path. This patch reduces the scope of the I-cache maintenance to the local CPU, and adds the missing DSB with similar scope, matching prior maintenance in the primary boot path. Signed-off-by: Mark Rutland Acked-by: Ard Biesehvuel Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b660950c60a7278f9d8deb7c32a162031207c758 Author: Ard Biesheuvel Date: Fri Mar 18 10:58:09 2016 +0100 arm64/kernel: fix incorrect EL0 check in inv_entry macro The implementation of macro inv_entry refers to its 'el' argument without the required leading backslash, which results in an undefined symbol 'el' to be passed into the kernel_entry macro rather than the index of the exception level as intended. This undefined symbol strangely enough does not result in build failures, although it is visible in vmlinux: $ nm -n vmlinux |head U el 0000000000000000 A _kernel_flags_le_hi32 0000000000000000 A _kernel_offset_le_hi32 0000000000000000 A _kernel_size_le_hi32 000000000000000a A _kernel_flags_le_lo32 ..... However, it does result in incorrect code being generated for invalid exceptions taken from EL0, since the argument check in kernel_entry assumes EL1 if its argument does not equal '0'. Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357b565d5d52b2dc2a51390eb8f887a9caa8597f Author: Will Deacon Date: Mon Mar 21 11:07:15 2016 +0000 drivers/perf: arm_pmu: avoid NULL dereference when not using devicetree Commit c6b90653f1f7 ("drivers/perf: arm_pmu: make info messages more verbose") breaks booting on systems where the PMU is probed without devicetree (e.g by inspecting the MIDR of the current CPU). In this case, pdev->dev.of_node is NULL and we shouldn't try to access its ->fullname field when printing probe error messages. This patch fixes the probing code to use of_node_full_name, which safely handles NULL nodes and removes the "Error %i" part of the string, since it's not terribly useful. Reported-by: Guenter Roeck Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ed2a1002d25ccdb6606c8ccb608524118bd30614 Author: MaJun Date: Thu Mar 17 16:34:01 2016 +0800 irqchip/mbigen: Handle multiple device nodes in a mbigen module Each mbigen device is represented as a independent platform device. If the devices belong to the same mbigen hardware module, then the register space for these devices is the same. That leads to a resource conflict. The solution for this is to represent the mbigen module as a platform device and make the mbigen devices subdevices of that. The register space is associated to the mbigen module and therefor the resource conflict is avoided. [ tglx: Massaged changelog, cleaned up the code and removed the silly printk ] Signed-off-by: Ma Jun Cc: mark.rutland@arm.com Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Catalin.Marinas@arm.com Cc: guohanjun@huawei.com Cc: Will.Deacon@arm.com Cc: huxinwei@huawei.com Cc: lizefan@huawei.com Cc: dingtianhong@huawei.com Cc: zhaojunhua@hisilicon.com Cc: liguozhu@hisilicon.com Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1458203641-17172-3-git-send-email-majun258@huawei.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mbigen.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit d0e286415dc1f4fea2971d6186b0775c7062575b Author: MaJun Date: Thu Mar 17 16:34:00 2016 +0800 irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module A mbigen hardware module can contain more than one device node. These device nodes contain the same register definition. mbigen_dev1:intc_dev1 { ... reg = <0x0 0xc0080000 0x0 0x10000>; ... }; mbigen_dev2:intc_dev2 { ... reg = <0x0 0xc0080000 0x0 0x10000>; ... }; In this case both devices try to request the same resource resulting in a resource conflict. To address this problem the devices need to be subnodes of the mbigen hardware module, which then contains the unique register space. [ tglx: Massaged changelog ] Suggested-by: Mark Rutland Signed-off-by: Ma Jun Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Catalin.Marinas@arm.com Cc: guohanjun@huawei.com Cc: Will.Deacon@arm.com Cc: huxinwei@huawei.com Cc: lizefan@huawei.com Cc: dingtianhong@huawei.com Cc: zhaojunhua@hisilicon.com Cc: liguozhu@hisilicon.com Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20160203111602.GA1234@leverpostej Link: http://lkml.kernel.org/r/1458203641-17172-2-git-send-email-majun258@huawei.com Signed-off-by: Thomas Gleixner .../interrupt-controller/hisilicon,mbigen-v2.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 7b0fd56930399d87241ad2f49d48c315307471ee Author: Srinivas Pandruvada Date: Sun Mar 20 16:52:18 2016 -0700 perf/x86/intel/rapl: Add missing Broadwell models Added Broadwell-H and Broadwell-Server. Signed-off-by: Srinivas Pandruvada Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: bp@alien8.de Link: http://lkml.kernel.org/r/1458517938-25308-1-git-send-email-srinivas.pandruvada@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 2 ++ 1 file changed, 2 insertions(+) commit cb2252522aaff572f28dc6613307e1e0e62496cd Author: Kan Liang Date: Sun Mar 20 11:58:21 2016 -0700 perf/x86/intel/uncore: Remove ev_sel_ext bit support for PCU The ev_sel_ext in PCU_MSR_PMON_CTL is locked on some CPU models, so despite it being documented in the SDM, if we write 1 to that bit then we can get a #GP fault. Which #GP the perf fuzzer happily triggered in Peter Zijlstra's testing. Also, there are no public events which use that bit, so remove ev_sel_ext bit support for PCU. Reported-by: Peter Zijlstra Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1458500301-3594-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snbep.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 73e6aafd9ea81498d31361f01db84a0118da2d1c Author: Zhao Lei Date: Thu Mar 17 12:19:43 2016 +0800 sched/cpuacct: Simplify the cpuacct code - Use for() instead of while() loop in some functions to make the code simpler. - Use this_cpu_ptr() instead of per_cpu_ptr() to make the code cleaner and a bit faster. Suggested-by: Peter Zijlstra Signed-off-by: Zhao Lei Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Tejun Heo Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/d8a7ef9592f55224630cb26dea239f05b6398a4e.1458187654.git.zhaolei@cn.fujitsu.com Signed-off-by: Ingo Molnar kernel/sched/cpuacct.c | 28 +++++----------------------- kernel/sched/cpuacct.h | 4 ++-- 2 files changed, 7 insertions(+), 25 deletions(-) commit 1a736b77a3f50910843d076623204ba6e5057dc1 Author: Dongsheng Yang Date: Mon Dec 21 19:14:42 2015 +0800 sched/cpuacct: Rename parameter in cpuusage_write() for readability The name of the 'reset' parameter to cpuusage_write() is quite confusing, because the only valid value we allow is '0', so !reset is actually the case that resets ... Rename it to 'val' and explain it in a comment that we only allow 0. Signed-off-by: Dongsheng Yang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: cgroups@vger.kernel.org Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1450696483-2864-1-git-send-email-yangds.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar kernel/sched/cpuacct.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d4335581dc30ec6545999c7443bb9fead274a980 Author: Matt Fleming Date: Wed Mar 9 14:59:08 2016 +0000 sched/fair: Add comments to explain select_idle_sibling() It's not entirely obvious how the main loop in select_idle_sibling() works on first glance. Sprinkle a few comments to explain the design and intention behind the loop based on some conversations with Mike and Peter. Signed-off-by: Matt Fleming Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457535548-15329-1-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar kernel/sched/fair.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit f75d48644c56a31731d17fa693c8175328957e1d Author: Peter Zijlstra Date: Wed Mar 9 12:40:54 2016 +0100 bitops: Do not default to __clear_bit() for __clear_bit_unlock() __clear_bit_unlock() is a special little snowflake. While it carries the non-atomic '__' prefix, it is specifically documented to pair with test_and_set_bit() and therefore should be 'somewhat' atomic. Therefore the generic implementation of __clear_bit_unlock() cannot use the fully non-atomic __clear_bit() as a default. If an arch is able to do better; is must provide an implementation of __clear_bit_unlock() itself. Specifically, this came up as a result of hackbench livelock'ing in slab_lock() on ARC with SMP + SLUB + !LLSC. The issue was incorrect pairing of atomic ops. slab_lock() -> bit_spin_lock() -> test_and_set_bit() slab_unlock() -> __bit_spin_unlock() -> __clear_bit() The non serializing __clear_bit() was getting "lost" 80543b8e: ld_s r2,[r13,0] <--- (A) Finds PG_locked is set 80543b90: or r3,r2,1 <--- (B) other core unlocks right here 80543b94: st_s r3,[r13,0] <--- (C) sets PG_locked (overwrites unlock) Fixes ARC STAR 9000817404 (and probably more). Reported-by: Vineet Gupta Tested-by: Vineet Gupta Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Christoph Lameter Cc: David Rientjes Cc: Helge Deller Cc: James E.J. Bottomley Cc: Joonsoo Kim Cc: Linus Torvalds Cc: Noam Camus Cc: Paul E. McKenney Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160309114054.GJ6356@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/asm-generic/bitops/lock.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3a47d5124a957358274e9ca7b115b2f3a914f56d Author: Peter Zijlstra Date: Wed Mar 9 13:04:03 2016 +0100 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. Reported-by: Pavan Kondeti Tested-by: Pavan Kondeti Signed-off-by: Peter Zijlstra (Intel) Cc: Ben Segall Cc: Linus Torvalds Cc: Matt Fleming Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: byungchul.park@lge.com Link: http://lkml.kernel.org/r/20160309120403.GK6344@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2f5177f0fd7e531b26d54633be62d1d4cb94621c Author: Peter Zijlstra Date: Wed Mar 16 16:22:45 2016 +0100 sched/cgroup: Fix/cleanup cgroup teardown/init The CPU controller hasn't kept up with the various changes in the whole cgroup initialization / destruction sequence, and commit: 2e91fa7f6d45 ("cgroup: keep zombies associated with their original cgroups") caused it to explode. The reason for this is that zombies do not inhibit css_offline() from being called, but do stall css_released(). Now we tear down the cfs_rq structures on css_offline() but zombies can run after that, leading to use-after-free issues. The solution is to move the tear-down to css_released(), which guarantees nobody (including no zombies) is still using our cgroup. Furthermore, a few simple cleanups are possible too. There doesn't appear to be any point to us using css_online() (anymore?) so fold that in css_alloc(). And since cgroup code guarantees an RCU grace period between css_released() and css_free() we can forgo using call_rcu() and free the stuff immediately. Suggested-by: Tejun Heo Reported-by: Kazuki Yamaguchi Reported-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 2e91fa7f6d45 ("cgroup: keep zombies associated with their original cgroups") Link: http://lkml.kernel.org/r/20160316152245.GY6344@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit 42e405f7b1d252c90a2468dd2140f47b8142b7a0 Merge: e9532e6 710d60c Author: Ingo Molnar Date: Mon Mar 21 10:47:40 2016 +0100 Merge branch 'linus' into sched/urgent, to pick up dependencies Signed-off-by: Ingo Molnar commit 2510ffe17f9707eb96cf286cf5d11ad372ff679f Author: Marc Zyngier Date: Fri Mar 18 17:25:59 2016 +0000 arm64: KVM: Turn kvm_ksym_ref into a NOP on VHE When running with VHE, there is no need to translate kernel pointers to the EL2 memory space, since we're already there (and we have a much saner memory map to start with). Unfortunately, kvm_ksym_ref is getting in the way, and the first call into the "hypervisor" section is going to end up in fireworks, since we're now branching into nowhereland. Meh. A potential solution is to test if VHE is engaged or not, and only perform the translation in the negative case. With this in place, VHE is able to run again. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_asm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 898f949fb7bc1210b79f06a04d1956d106a32633 Author: Eric Auger Date: Mon Mar 7 23:50:36 2016 +0700 KVM: arm/arm64: disable preemption when calling smp_call_function_many Preemption must be disabled when calling smp_call_function_many Reported-by: bartosz.wawrzyniak@tieto.com Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 2 ++ 1 file changed, 2 insertions(+) commit c7ab62bfbe0e27ef452d19d88b083f01e99f13a7 Author: Huang Rui Date: Wed Mar 9 13:45:06 2016 +0800 perf/x86/amd/power: Add AMD accumulated power reporting mechanism Introduce an AMD accumlated power reporting mechanism for the Family 15h, Model 60h processor that can be used to calculate the average power consumed by a processor during a measurement interval. The feature support is indicated by CPUID Fn8000_0007_EDX[12]. This feature will be implemented both in hwmon and perf. The current design provides one event to report per package/processor power consumption by counting each compute unit power value. Here the gory details of how the computation is done: * Tsample: compute unit power accumulator sample period * Tref: the PTSC counter period (PTSC: performance timestamp counter) * N: the ratio of compute unit power accumulator sample period to the PTSC period * Jmax: max compute unit accumulated power which is indicated by MSR_C001007b[MaxCpuSwPwrAcc] * Jx/Jy: compute unit accumulated power which is indicated by MSR_C001007a[CpuSwPwrAcc] * Tx/Ty: the value of performance timestamp counter which is indicated by CU_PTSC MSR_C0010280[PTSC] * PwrCPUave: CPU average power i. Determine the ratio of Tsample to Tref by executing CPUID Fn8000_0007. N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]]. ii. Read the full range of the cumulative energy value from the new MSR MaxCpuSwPwrAcc. Jmax = value returned. iii. At time x, software reads CpuSwPwrAcc and samples the PTSC. Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC. iv. At time y, software reads CpuSwPwrAcc and samples the PTSC. Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC. v. Calculate the average power consumption for a compute unit over time period (y-x). Unit of result is uWatt: if (Jy < Jx) // Rollover has occurred Jdelta = (Jy + Jmax) - Jx else Jdelta = Jy - Jx PwrCPUave = N * Jdelta * 1000 / (Ty - Tx) Simple example: root@hr-zp:/home/ray/tip# ./tools/perf/perf stat -a -e 'power/power-pkg/' make -j4 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h SKIPPED include/generated/compile.h Building modules, stage 2. Kernel: arch/x86/boot/bzImage is ready (#40) MODPOST 4225 modules Performance counter stats for 'system wide': 183.44 mWatts power/power-pkg/ 341.837270111 seconds time elapsed root@hr-zp:/home/ray/tip# ./tools/perf/perf stat -a -e 'power/power-pkg/' sleep 10 Performance counter stats for 'system wide': 0.18 mWatts power/power-pkg/ 10.012551815 seconds time elapsed Suggested-by: Peter Zijlstra Suggested-by: Ingo Molnar Suggested-by: Borislav Petkov Signed-off-by: Huang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Robert Richter Cc: Stephane Eranian Cc: Vince Weaver Cc: jacob.w.shin@gmail.com Link: http://lkml.kernel.org/r/1457502306-2559-1-git-send-email-ray.huang@amd.com [ Fixed the modular build. ] Signed-off-by: Ingo Molnar arch/x86/Kconfig | 9 ++ arch/x86/events/Makefile | 1 + arch/x86/events/amd/power.c | 353 ++++++++++++++++++++++++++++++++++++++++++++ arch/x86/events/core.c | 4 +- include/linux/perf_event.h | 4 + 5 files changed, 369 insertions(+), 2 deletions(-) commit 01fe03ff1c7ce6b6e2212cb6171a49c2858fbc7c Author: Huang Rui Date: Thu Jan 14 10:50:06 2016 +0800 x86/cpufeature, perf/x86: Add AMD Accumulated Power Mechanism feature flag AMD CPU family 15h model 0x60 introduces a mechanism for measuring accumulated power. It is used to report the processor power consumption and support for it is indicated by CPUID Fn8000_0007_EDX[12]. Signed-off-by: Huang Rui Signed-off-by: Borislav Petkov Cc: Aaron Lu Cc: Alexander Shishkin Cc: Andreas Herrmann Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Aravind Gopalakrishnan Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: Fengguang Wu Cc: Frédéric Weisbecker Cc: Guenter Roeck Cc: H. Peter Anvin Cc: Hector Marco-Gisbert Cc: Jacob Shin Cc: Jiri Olsa Cc: John Stultz Cc: Kristen Carlson Accardi Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Richter Cc: Ross Zwisler Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Cc: Wan Zongshun Cc: spg_linux_kernel@amd.com Link: http://lkml.kernel.org/r/1452739808-11871-4-git-send-email-ray.huang@amd.com [ Resolved conflict and moved the synthetic CPUID slot to 19. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/amd.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 1dcaac1ce07db672e2cb5b4ef9642990689bb2a1 Author: Peter Zijlstra Date: Tue Mar 8 17:56:05 2016 +0100 perf/core: Document some hotplug bits Document some of the hotplug notifier usage. Requested-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f8519155b4d5224e215203bf0e94a8478a8f8945 Author: Suravee Suthikulpanit Date: Sun Feb 28 22:23:29 2016 -0600 perf/x86/amd: Add support for new IOMMU performance events This patch adds new IOMMU performance event based on the information in table 74 of the AMD I/O Virtualization Technology (IOMMU) Specification (Document Id: 4882, Rev 2.62, Feb 2015) Signed-off-by: Suravee Suthikulpanit Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joerg Roedel Acked-by: Joerg Roedel Cc: Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://support.amd.com/TechDocs/48882_IOMMU.pdf Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 5 +++++ 1 file changed, 5 insertions(+) commit b47bcb93bbf201e9c5af698945755efeb60c0bc8 Author: Christian König Date: Mon Feb 29 10:53:11 2016 -0500 dma-buf/fence: fix fence_is_later v2 A fence is never later than itself. This caused a bunch of overhead for AMDGPU. v2: simplify check as suggested by Michel. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher Reviewed-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst Signed-off-by: Alex Deucher Signed-off-by: Sumit Semwal Signed-off-by: Daniel Vetter include/linux/fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87e332d56b2c7dc6733f690c9069f4fe75f21c9d Author: Daniel Vetter Date: Mon Mar 21 08:24:22 2016 +0100 dma-buf: Update docs for SYNC ioctl Just a bit of wording polish plus mentioning that it can fail and must be restarted. Requested by Sumit. v2: Fix them typos (Hans). Cc: Chris Wilson Cc: Tiago Vignatti Cc: Stéphane Marchesin Cc: David Herrmann Cc: Sumit Semwal Cc: Daniel Vetter CC: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: intel-gfx@lists.freedesktop.org Cc: devel@driverdev.osuosl.org Cc: Hans Verkuil Acked-by: Sumit Semwal Acked-by: Hans Verkuil Signed-off-by: Daniel Vetter Documentation/dma-buf-sharing.txt | 11 ++++++----- drivers/dma-buf/dma-buf.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) commit 8dfeae0d73bf803be1a533e147b3b0ea69375596 Author: Huang Rui Date: Thu Jan 14 10:50:04 2016 +0800 perf/x86/amd: Move nodes_per_socket into bsp_init_amd() nodes_per_socket is static and it needn't be initialized many times during every CPU core init. So move its initialization into bsp_init_amd(). Signed-off-by: Huang Rui Signed-off-by: Borislav Petkov Cc: Aaron Lu Cc: Alexander Shishkin Cc: Andreas Herrmann Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Aravind Gopalakrishnan Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: Fengguang Wu Cc: Frédéric Weisbecker Cc: Guenter Roeck Cc: H. Peter Anvin Cc: Hector Marco-Gisbert Cc: Jacob Shin Cc: Jiri Olsa Cc: John Stultz Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Richter Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Cc: spg_linux_kernel@amd.com Link: http://lkml.kernel.org/r/1452739808-11871-2-git-send-email-ray.huang@amd.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 27348f382b6786fd201779246ee70fa115a5b890 Author: Peter Zijlstra Date: Fri Mar 11 23:39:39 2016 +0100 perf/x86/cqm: Factor out some common code Having the same code twice (and once quite ugly) is fragile. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit e7ee3e8cb550ce43752ae1d1b190d6b5c4150a43 Author: Vikas Shivappa Date: Fri Mar 11 11:26:17 2016 -0800 perf/x86/mbm: Add support for MBM counter overflow handling This patch adds a per package timer which periodically updates the memory bandwidth counters for the events that are currently active. Current patch has a periodic timer every 1s since the SDM guarantees that the counter will not overflow in 1s but this time can be definitely improved by calibrating on the system. The overflow is really a function of the max memory b/w that the socket can support, max counter value and scaling factor. Signed-off-by: Vikas Shivappa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/013b756c5006b1c4ca411f3ecf43ed52f19fbf87.1457723885.git.tony.luck@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 139 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 5 deletions(-) commit 2d4de8376ff1d94a5070cfa9092c59bfdc4e693e Author: Vikas Shivappa Date: Thu Mar 10 15:32:11 2016 -0800 perf/x86/mbm: Implement RMID recycling RMID could be allocated or deallocated as part of RMID recycling. When an RMID is allocated for MBM event, the MBM counter needs to be initialized because next time we read the counter we need the previous value to account for total bytes that went to the memory controller. Similarly, when RMID is deallocated we need to update the ->count variable. Signed-off-by: Vikas Shivappa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1457652732-4499-6-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 87f01cc2a2914b61ade5ec834377fa7819484173 Author: Tony Luck Date: Fri Mar 11 11:26:11 2016 -0800 perf/x86/mbm: Add memory bandwidth monitoring event management Includes all the core infrastructure to measure the total_bytes and bandwidth. We have per socket counters for both total system wide L3 external bytes and local socket memory-controller bytes. The OS does MSR writes to MSR_IA32_QM_EVTSEL and MSR_IA32_QM_CTR to read the counters and uses the IA32_PQR_ASSOC_MSR to associate the RMID with the task. The tasks have a common RMID for CQM (cache quality of service monitoring) and MBM. Hence most of the scheduling code is reused from CQM. Signed-off-by: Tony Luck [ Restructured rmid_read to not have an obvious hole, removed MBM_CNTR_MAX as its unused. ] Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vikas Shivappa Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/abd7aac9a18d93b95b985b931cf258df0164746d.1457723885.git.tony.luck@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 122 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 6 deletions(-) commit 33c3cc7acfd95968d74247f1a4e1b0727a07ed43 Author: Vikas Shivappa Date: Thu Mar 10 15:32:09 2016 -0800 perf/x86/mbm: Add Intel Memory B/W Monitoring enumeration and init The MBM init patch enumerates the Intel MBM (Memory b/w monitoring) and initializes the perf events and datastructures for monitoring the memory b/w. Its based on original patch series by Tony Luck and Kanaka Juvva. Memory bandwidth monitoring (MBM) provides OS/VMM a way to monitor bandwidth from one level of cache to another. The current patches support L3 external bandwidth monitoring. It supports both 'local bandwidth' and 'total bandwidth' monitoring for the socket. Local bandwidth measures the amount of data sent through the memory controller on the socket and total b/w measures the total system bandwidth. Extending the cache quality of service monitoring (CQM) we add two more events to the perf infrastructure: intel_cqm_llc/local_bytes - bytes sent through local socket memory controller intel_cqm_llc/total_bytes - total L3 external bytes sent The tasks are associated with a Resouce Monitoring ID (RMID) just like in CQM and OS uses a MSR write to indicate the RMID of the task during scheduling. Signed-off-by: Vikas Shivappa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1457652732-4499-4-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 126 ++++++++++++++++++++++++++++++++++++- arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/kernel/cpu/common.c | 4 +- 3 files changed, 128 insertions(+), 4 deletions(-) commit ada2f634cd50d050269b67b4e2966582387e7c27 Author: Vikas Shivappa Date: Thu Mar 10 15:32:08 2016 -0800 perf/x86/cqm: Fix CQM memory leak and notifier leak Fixes the hotcpu notifier leak and other global variable memory leaks during CQM (cache quality of service monitoring) initialization. Signed-off-by: Vikas Shivappa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1457652732-4499-3-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) commit a223c1c7ab4cc64537dc4b911f760d851683768a Author: Vikas Shivappa Date: Thu Mar 10 15:32:07 2016 -0800 perf/x86/cqm: Fix CQM handling of grouping events into a cache_group Currently CQM (cache quality of service monitoring) is grouping all events belonging to same PID to use one RMID. However its not counting all of these different events. Hence we end up with a count of zero for all events other than the group leader. The patch tries to address the issue by keeping a flag in the perf_event.hw which has other CQM related fields. The field is updated at event creation and during grouping. Signed-off-by: Vikas Shivappa [peterz: Changed hw_perf_event::is_group_event to an int] Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Cc: fenghua.yu@intel.com Cc: h.peter.anvin@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1457652732-4499-2-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cqm.c | 13 ++++++++++--- include/linux/perf_event.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) commit 8184059e93c200757f5c0805dae0f14e880eab5d Author: Peter Zijlstra Date: Fri Jan 29 15:17:51 2016 +0100 perf/core: Fix Undefined behaviour in rb_alloc() Sasha reported: [ 3494.030114] UBSAN: Undefined behaviour in kernel/events/ring_buffer.c:685:22 [ 3494.030647] shift exponent -1 is negative Andrey spotted that this is because: It happens if nr_pages = 0: rb->page_order = ilog2(nr_pages); Fix it by making both assignments conditional on nr_pages; since otherwise they should both be 0 anyway, and will be because of the kzalloc() used to allocate the structure. Reported-by: Sasha Levin Reported-by: Andrey Ryabinin Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20160129141751.GA407@worktop Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e8d8a90fc5014e4cdcf1de2f320081d26c7f440f Author: Peter Zijlstra Date: Fri Mar 18 17:31:27 2016 +0100 perf/x86/BTS: Fix RCU usage This splat reminds us: [ 8166.045595] [ INFO: suspicious RCU usage. ] [ 8166.168972] [] lockdep_rcu_suspicious+0xe7/0x120 [ 8166.175966] [] perf_callchain+0x23e/0x250 [ 8166.182280] [] perf_prepare_sample+0x27d/0x350 [ 8166.189082] [] intel_pmu_drain_bts_buffer+0x133/0x200 ... that as the core code does, one should hold rcu_read_lock() over that entire BTS event-output generation sequence as well. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 91a612eea9a316c464cc170ff8492ec09e7d1c69 Author: Peter Zijlstra Date: Thu Mar 17 15:17:35 2016 +0100 perf/core: Fix dynamic interrupt throttle There were two problems with the dynamic interrupt throttle mechanism, both triggered by the same action. When you (or perf_fuzzer) write a huge value into /proc/sys/kernel/perf_event_max_sample_rate the computed perf_sample_allowed_ns becomes 0. This effectively disables the whole dynamic throttle. This is fixed by ensuring update_perf_cpu_limits() never sets the value to 0. However, we allow disabling of the dynamic throttle by writing 100 to /proc/sys/kernel/perf_cpu_time_max_percent. This will generate a warning in dmesg. The second problem is that by setting the max_sample_rate to a huge number, the adaptive process can take a few tries, since it halfs the limit each time. Change that to directly compute a new value based on the observed duration. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 87 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 36 deletions(-) commit c2872d381f1ab1bc39c7f044644bf1d3da7c11dd Author: Peter Zijlstra Date: Thu Mar 17 15:06:58 2016 +0100 perf/x86/ibs: Add IBS interrupt to the dynamic throttle Interrupt throttling is normally only done against sysctl_perf_event_sample_rate. This means that if that number is too high (for whatever reason) you can lock up your machine. We have, however, a dynamic throttling scheme too, but for that to work, we need to add a callback to the interrupt handler, IBS did not have this, so add it. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/amd/ibs.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a50f52917011365a4a2c0f1d2cea0990c4465cd Author: Peter Zijlstra Date: Wed Mar 16 23:55:21 2016 +0100 perf/x86/ibs: Fix race with IBS_STARTING state While tracing the IBS bits I saw the NMI hitting between clearing IBS_STARTING and the actual MSR writes to disable the counter. Since IBS_STARTING was cleared, the handler assumed these were spurious NMIs and because STOPPING wasn't set yet either, insta-triggered an "Unknown NMI". Cure this by clearing IBS_STARTING after disabling the hardware. Tested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/amd/ibs.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit 0158b83f7508851cda9e62c4b14678c5bd492cb2 Author: Peter Zijlstra Date: Fri Mar 11 15:23:46 2016 +0100 perf/x86/ibs: Fix IBS throttle When the IBS IRQ handler get a !0 return from perf_event_overflow; meaning it should throttle the event, it only disables it, it doesn't call perf_ibs_stop(). This confuses the state machine, as we'll use pmu::start() -> perf_ibs_start() to unthrottle. Tested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Vince Weaver Cc: dvyukov@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Link: http://lkml.kernel.org/r/20160311142346.GE6344@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/events/amd/ibs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e02cd40f15190b78fcc6b3f50c952fb4028e9a5 Author: Peter Zijlstra Date: Thu Mar 10 15:39:24 2016 +0100 perf/core: Fix the unthrottle logic Its possible to IOC_PERIOD while the event is throttled, this would re-start the event and the next tick would then try to unthrottle it, and find the event wasn't actually stopped anymore. This would tickle a WARN in the x86-pmu code which isn't expecting to start a !stopped event. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: David Ahern Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: dvyukov@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160310143924.GR6356@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/events/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9ef595d83aea6b4d93c9a120df3c5db2e226929f Author: Joe Perches Date: Thu Mar 10 15:21:43 2016 -0800 sparc: Convert naked unsigned uses to unsigned int Use the more normal kernel definition/declaration style. Done via: $ git ls-files arch/sparc | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int Signed-off-by: Joe Perches Signed-off-by: David S. Miller arch/sparc/include/asm/compat_signal.h | 8 ++++---- arch/sparc/include/asm/obio.h | 32 ++++++++++++++++---------------- arch/sparc/include/asm/openprom.h | 10 +++++----- arch/sparc/include/asm/sigcontext.h | 2 +- arch/sparc/include/uapi/asm/stat.h | 4 ++-- arch/sparc/kernel/audit.c | 12 ++++++------ arch/sparc/kernel/compat_audit.c | 12 ++++++------ arch/sparc/kernel/kernel.h | 12 ++++++------ arch/sparc/kernel/process_64.c | 2 +- arch/sparc/kernel/setup_32.c | 2 +- arch/sparc/kernel/setup_64.c | 2 +- arch/sparc/kernel/signal32.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 4 ++-- arch/sparc/kernel/unaligned_64.c | 4 ++-- arch/sparc/mm/fault_32.c | 8 ++++---- 15 files changed, 58 insertions(+), 58 deletions(-) commit 08f80073039aba911fbf3f316a00a4ac5d03052f Author: Adam Buchbinder Date: Fri Mar 4 11:21:18 2016 -0800 sparc: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Reviewed-by: Julian Calaby Signed-off-by: David S. Miller arch/sparc/include/asm/pgtable_64.h | 2 +- arch/sparc/include/asm/processor_64.h | 2 +- arch/sparc/include/asm/tsb.h | 2 +- arch/sparc/kernel/entry.S | 2 +- arch/sparc/kernel/ioport.c | 6 +++--- arch/sparc/kernel/leon_kernel.c | 2 +- arch/sparc/kernel/sysfs.c | 2 +- arch/sparc/net/bpf_jit_comp.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) commit 568d7c764ae01f3706085ac8f0d8a8ac7e826bd7 Author: Stephen Rothwell Date: Thu Mar 17 15:30:49 2016 +1100 drm/amdgpu: release_pages requires linux/pagemap.h Signed-off-by: Stephen Rothwell Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 + 2 files changed, 2 insertions(+) commit 643ad15d47410d37d43daf3ef1c8ac52c281efa5 Merge: 24b5e20 0d47638 Author: Linus Torvalds Date: Sun Mar 20 19:08:56 2016 -0700 Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 protection key support from Ingo Molnar: "This tree adds support for a new memory protection hardware feature that is available in upcoming Intel CPUs: 'protection keys' (pkeys). There's a background article at LWN.net: https://lwn.net/Articles/643797/ The gist is that protection keys allow the encoding of user-controllable permission masks in the pte. So instead of having a fixed protection mask in the pte (which needs a system call to change and works on a per page basis), the user can map a (handful of) protection mask variants and can change the masks runtime relatively cheaply, without having to change every single page in the affected virtual memory range. This allows the dynamic switching of the protection bits of large amounts of virtual memory, via user-space instructions. It also allows more precise control of MMU permission bits: for example the executable bit is separate from the read bit (see more about that below). This tree adds the MM infrastructure and low level x86 glue needed for that, plus it adds a high level API to make use of protection keys - if a user-space application calls: mmap(..., PROT_EXEC); or mprotect(ptr, sz, PROT_EXEC); (note PROT_EXEC-only, without PROT_READ/WRITE), the kernel will notice this special case, and will set a special protection key on this memory range. It also sets the appropriate bits in the Protection Keys User Rights (PKRU) register so that the memory becomes unreadable and unwritable. So using protection keys the kernel is able to implement 'true' PROT_EXEC on x86 CPUs: without protection keys PROT_EXEC implies PROT_READ as well. Unreadable executable mappings have security advantages: they cannot be read via information leaks to figure out ASLR details, nor can they be scanned for ROP gadgets - and they cannot be used by exploits for data purposes either. We know about no user-space code that relies on pure PROT_EXEC mappings today, but binary loaders could start making use of this new feature to map binaries and libraries in a more secure fashion. There is other pending pkeys work that offers more high level system call APIs to manage protection keys - but those are not part of this pull request. Right now there's a Kconfig that controls this feature (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) that is default enabled (like most x86 CPU feature enablement code that has no runtime overhead), but it's not user-configurable at the moment. If there's any serious problem with this then we can make it configurable and/or flip the default" * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits) x86/mm/pkeys: Fix mismerge of protection keys CPUID bits mm/pkeys: Fix siginfo ABI breakage caused by new u64 field x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA mm/core, x86/mm/pkeys: Add execute-only protection keys support x86/mm/pkeys: Create an x86 arch_calc_vm_prot_bits() for VMA flags x86/mm/pkeys: Allow kernel to modify user pkey rights register x86/fpu: Allow setting of XSAVE state x86/mm: Factor out LDT init from context init mm/core, x86/mm/pkeys: Add arch_validate_pkey() mm/core, arch, powerpc: Pass a protection key in to calc_vm_flag_bits() x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU x86/mm/pkeys: Add Kconfig prompt to existing config option x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps x86/mm/pkeys: Dump PKRU with other kernel registers mm/core, x86/mm/pkeys: Differentiate instruction fetches x86/mm/pkeys: Optimize fault handling in access_error() mm/core: Do not enforce PKEY permissions on remote mm access um, pkeys: Add UML arch_*_access_permitted() methods mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys x86/mm/gup: Simplify get_user_pages() PTE bit handling ... commit 24b5e20f11a75866bbffc46c30a22fa50612a769 Merge: 26660a4 d367cef Author: Linus Torvalds Date: Sun Mar 20 18:58:18 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 are: - Use separate EFI page tables when executing EFI firmware code. This isolates the EFI context from the rest of the kernel, which has security and general robustness advantages. (Matt Fleming) - Run regular UEFI firmware with interrupts enabled. This is already the status quo under other OSs. (Ard Biesheuvel) - Various x86 EFI enhancements, such as the use of non-executable attributes for EFI memory mappings. (Sai Praneeth Prakhya) - Various arm64 UEFI enhancements. (Ard Biesheuvel) - ... various fixes and cleanups. The separate EFI page tables feature got delayed twice already, because it's an intrusive change and we didn't feel confident about it - third time's the charm we hope!" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) x86/mm/pat: Fix boot crash when 1GB pages are not supported by the CPU x86/efi: Only map kernel text for EFI mixed mode x86/efi: Map EFI_MEMORY_{XP,RO} memory region bits to EFI page tables x86/mm/pat: Don't implicitly allow _PAGE_RW in kernel_map_pages_in_pgd() efi/arm*: Perform hardware compatibility check efi/arm64: Check for h/w support before booting a >4 KB granular kernel efi/arm: Check for LPAE support before booting a LPAE kernel efi/arm-init: Use read-only early mappings efi/efistub: Prevent __init annotations from being used arm64/vmlinux.lds.S: Handle .init.rodata.xxx and .init.bss sections efi/arm64: Drop __init annotation from handle_kernel_image() x86/mm/pat: Use _PAGE_GLOBAL bit for EFI page table mappings efi/runtime-wrappers: Run UEFI Runtime Services with interrupts enabled efi: Reformat GUID tables to follow the format in UEFI spec efi: Add Persistent Memory type name efi: Add NV memory attribute x86/efi: Show actual ending addresses in efi_print_memmap x86/efi/bgrt: Don't ignore the BGRT if the 'valid' bit is 0 efivars: Use to_efivar_entry efi: Runtime-wrapper: Get rid of the rtc_lock spinlock ... commit 26660a4046b171a752e72a1dd32153230234fe3a Merge: 46e595a 1bcb58a Author: Linus Torvalds Date: Sun Mar 20 18:23:21 2016 -0700 Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull 'objtool' stack frame validation from Ingo Molnar: "This tree adds a new kernel build-time object file validation feature (ONFIG_STACK_VALIDATION=y): kernel stack frame correctness validation. It was written by and is maintained by Josh Poimboeuf. The motivation: there's a category of hard to find kernel bugs, most of them in assembly code (but also occasionally in C code), that degrades the quality of kernel stack dumps/backtraces. These bugs are hard to detect at the source code level. Such bugs result in incorrect/incomplete backtraces most of time - but can also in some rare cases result in crashes or other undefined behavior. The build time correctness checking is done via the new 'objtool' user-space utility that was written for this purpose and which is hosted in the kernel repository in tools/objtool/. The tool's (very simple) UI and source code design is shaped after Git and perf and shares quite a bit of infrastructure with tools/perf (which tooling infrastructure sharing effort got merged via perf and is already upstream). Objtool follows the well-known kernel coding style. Objtool does not try to check .c or .S files, it instead analyzes the resulting .o generated machine code from first principles: it decodes the instruction stream and interprets it. (Right now objtool supports the x86-64 architecture.) From tools/objtool/Documentation/stack-validation.txt: "The kernel CONFIG_STACK_VALIDATION option enables a host tool named objtool which runs at compile time. It has a "check" subcommand which analyzes every .o file and ensures the validity of its stack metadata. It enforces a set of rules on asm code and C inline assembly code so that stack traces can be reliable. Currently it only checks frame pointer usage, but there are plans to add CFI validation for C files and CFI generation for asm files. For each function, it recursively follows all possible code paths and validates the correct frame pointer state at each instruction. It also follows code paths involving special sections, like .altinstructions, __jump_table, and __ex_table, which can add alternative execution paths to a given instruction (or set of instructions). Similarly, it knows how to follow switch statements, for which gcc sometimes uses jump tables." When this new kernel option is enabled (it's disabled by default), the tool, if it finds any suspicious assembly code pattern, outputs warnings in compiler warning format: warning: objtool: rtlwifi_rate_mapping()+0x2e7: frame pointer state mismatch warning: objtool: cik_tiling_mode_table_init()+0x6ce: call without frame pointer save/setup warning: objtool:__schedule()+0x3c0: duplicate frame pointer save warning: objtool:__schedule()+0x3fd: sibling call from callable instruction with changed frame pointer ... so that scripts that pick up compiler warnings will notice them. All known warnings triggered by the tool are fixed by the tree, most of the commits in fact prepare the kernel to be warning-free. Most of them are bugfixes or cleanups that stand on their own, but there are also some annotations of 'special' stack frames for justified cases such entries to JIT-ed code (BPF) or really special boot time code. There are two other long-term motivations behind this tool as well: - To improve the quality and reliability of kernel stack frames, so that they can be used for optimized live patching. - To create independent infrastructure to check the correctness of CFI stack frames at build time. CFI debuginfo is notoriously unreliable and we cannot use it in the kernel as-is without extra checking done both on the kernel side and on the build side. The quality of kernel stack frames matters to debuggability as well, so IMO we can merge this without having to consider the live patching or CFI debuginfo angle" * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits) objtool: Only print one warning per function objtool: Add several performance improvements tools: Copy hashtable.h into tools directory objtool: Fix false positive warnings for functions with multiple switch statements objtool: Rename some variables and functions objtool: Remove superflous INIT_LIST_HEAD objtool: Add helper macros for traversing instructions objtool: Fix false positive warnings related to sibling calls objtool: Compile with debugging symbols objtool: Detect infinite recursion objtool: Prevent infinite recursion in noreturn detection objtool: Detect and warn if libelf is missing and don't break the build tools: Support relative directory path for 'O=' objtool: Support CROSS_COMPILE x86/asm/decoder: Use explicitly signed chars objtool: Enable stack metadata validation on 64-bit x86 objtool: Add CONFIG_STACK_VALIDATION option objtool: Add tool to perform compile-time stack metadata validation x86/kprobes: Mark kretprobe_trampoline() stack frame as non-standard sched: Always inline context_switch() ... commit 46e595a17dcf11404f713845ecb5b06b92a94e43 Merge: e3b1f64 33b96d2 Author: Linus Torvalds Date: Sun Mar 20 15:40:32 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: - Rockchip rk3368 gains power domain support - Small updates for the ARM spmi driver - The Atmel PMC driver saw a larger rework, touching both arch/arm/mach-at91 and drivers/clk/at91 - All reset controller driver changes alway get merged through arm-soc, though this time the largest change is the addition of a MIPS pistachio reset driver - One bugfix for the NXP (formerly Freescale) i.MX weim bus driver" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits) bus: imx-weim: Take the 'status' property value into account clk: at91: remove useless includes clk: at91: pmc: remove useless capacities handling clk: at91: pmc: drop at91_pmc_base usb: gadget: atmel: access the PMC using regmap ARM: at91: remove useless includes and function prototypes ARM: at91: pm: move idle functions to pm.c ARM: at91: pm: find and remap the pmc ARM: at91: pm: simply call at91_pm_init clk: at91: pmc: move pmc structures to C file clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe clk: at91: remove IRQ handling and use polling clk: at91: make use of syscon/regmap internally clk: at91: make use of syscon to share PMC registers in several drivers hwmon: (scpi) add energy meter support firmware: arm_scpi: add support for 64-bit sensor values firmware: arm_scpi: decrease Tx timeout to 20ms firmware: arm_scpi: fix send_message and sensor_get_value for big-endian reset: sti: Make reset_control_ops const reset: zynq: Make reset_control_ops const ... commit e3b1f64e04f57198ca0ab1216d824a5547be8446 Merge: 915c56b fa54ae1 Author: Linus Torvalds Date: Sun Mar 20 15:32:14 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. The realview_smp_defconfig and realview_defconfig got merged into one, so we are now down to 110 files. For stm32, we have now added a Kconfig fragment, the first such file on arch/arm. The purpose here is to have a shared defconfig file that works for all boards, while the DRAM offset has to be hardwired on NOMMU machines at compile time. The Exynos defconfig changes depend on changes in the RTC tree, so this is pulled in here, but has already been merged into 4.6 now" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) ARM: imx_v4_v5_defconfig: Enable initramfs support ARM: imx_v4_v5_defconfig: Cleanup imx_v4_v5_defconfig ARM: multi_v7_defconfig: Enable LP872x regulator support ARM: omap2plus_defconfig: Enable LP872x regulator support ARM: mxs_defconfig: Enable initramfs support ARM: mxs_defconfig: Cleanup mxs_defconfig ARM: multi_v5_defconfig: Enable initramfs support ARM: multi_v5_defconfig: Cleanup multi_v5_defconfig ARM: multi_v7_defconfig: enable useful configurations for Vybrid ARM: multi_v7_defconfig: add MACH_ARTPEC6 ARM: omap2plus_defconfig: Enable AT24 eeprom ARM: omap2plus_defconfig: Enable TI TVP5150 video decoder support ARM: omap2plus_defconfig: Enable ISP support and dependencies ARM: omap2plus_defconfig: Enable OMAP IOMMU support ARM: socfpga_defconfig: enable support for initramfs/initrd support ARM: at91/defconfig: add sama5d2 adc support in sama5_defconfig ARM: multi_v7_defconfig: Enable BCM283x ARM: bcm2835_defconfig: Enable RPi power domain driver ARM: bcm2835_defconfig: Enable RPi firmware driver ARM: bcm2835_defconfig: enable ARMv7 support ... commit 915c56bc01d6eab071e0dd1c6ea3bf73fbe5124f Merge: 5a6b7e5 8061a17 Author: Linus Torvalds Date: Sun Mar 20 15:26:57 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: "The arm64 device tree changes make up an increasing portion of the overall changes, so they are kept separate from the 32-bit devicetree changes and from the other arm64 updates. Newly added SoCs and boards are: - 96Boards Husky board - AMD Overdrive board - Amlogic S905 SoC and related Tronsmart boxes - Annapurna Labs Alpine family and development board - Broadcom Vulcan servers - Broadcom Northstar 2 SoC - Marvell Armada 3700 family and development board - Qualcomm MSM8996 SoC Additional devices are enabled for existing platforms from Applied Micro, Hisilicon, Mediatek, Qualcomm, and Renesas and there are a couple of other updates for Rockchip, Xilinx and NXP/Freescale" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (102 commits) ARM64: dts: amlogic: Add Tronsmart Vega S95 configs Documentation: devicetree: amlogic: Document Tronsmart Vega S95 boards ARM64: dts: Prepare configs for Amlogic Meson GXBaby Documentation: devicetree: amlogic: Document Meson GXBaby devicetree: bindings: Add vendor prefix for Tronsmart arm64: dts: qcom: Fix MPP's function used for LED control arm64: dts: alpine: add the MSIX node in the Alpine v2 dtsi arm64: dts: add the Alpine v2 EVP arm64: dts: marvell: re-order Device Tree nodes for Armada AP806 arm64: dts: marvell: update Armada AP806 clock description arm64: dts: marvell: add Device Tree files for Armada 7K/8K arm64: dts: apm: Add DT node for X-Gene v2 SLIMpro Mailbox I2C Driver arm64: dts: apm: Mailbox device tree node for APM X-Gene v2 platform. arm64: dts: apm: Add DT node for X-Gene v1 SLIMpro Mailbox I2C Driver arm64: dts: apm: mailbox device tree node for APM X-Gene platform. arm64: dts: apm: Update GPIO to control power-off on X-Gene v2 platforms arm64: dts: apm: Update GPIO standby controller DT node for X-Gene v2 platforms arm64: dts: apm: Update GPIO to control power-off on X-Gene v1 platforms arm64: dts: salvator-x: enable USB 2.0 Host of channel 1 and 2 arm64: dts: salvator-x: enable usb2_phy of channel 1 and 2 ... commit 5a6b7e53d035db7941b27122365cca9f2e912596 Merge: 8c6d408 2ef7d5f Author: Linus Torvalds Date: Sun Mar 20 15:15:48 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, plus a couple of related 64-bit updates: New SoC support: - Allwinner A83T - Axis Artpec-6 SoC - Mediatek MT7623 SoC - TI Keystone K2G SoC - ST Microelectronics stm32f469 New board or machine support: - ARM Juno R2 - Buffalo Linkstation LS-QVL and LS-GL - Cubietruck plus - D-Link DIR-885L - DT support for ARM RealView PB1176 and PB11MPCore - Google Nexus 7 - Homlet v2 - Itead Ibox - Lamobo R1 - LG Optimus Black - Logicpd dm3730 - Raspberry Pi Model A Other changes include - Lots of updates for Qualcomm APQ8064, MSM8974 and others - Improved support for Nokia N900 and other OMAP machines - Common clk support for lpc32xx - HDLCD display on ARM - Improved stm32f429 support - Improved Renesas device support, r8a779x and others - Lots of Rockchip updates - Samsung cleanups - ADC support for Atmel SAMA5D2 - BCM2835 (Raspberry Pi) improvements - Broadcom Northstar Plus enhancements - OMAP GPMC rework - Several improvements for Atmel SAMA5D2 / Xplained - Global change to remove inofficial "arm,amba-bus" compatible string" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (350 commits) ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus" ARM: dts: artpec: dual-license on artpec6.dtsi ARM: dts: ux500: add synaptics RMI4 for Ux500 TVK DT arm64: dts: juno/vexpress: fix node name unit-address presence warnings arm64: dts: foundation-v8: add SBSA Generic Watchdog device node ARM: dts: at91: sama5d2 Xplained: add leds node ARM: dts: at91: sama5d2 Xplained: add user push button ARM: dts: at91: sama5d2 Xplained: set pin muxing for usb gadget and usb host ARM: dts: stm32f429: Enable Ethernet on Eval board ARM: dts: omap3-sniper: TWL4030 keypad support Revert "ARM: dts: DRA7: Add dt nodes for PWMSS" ARM: dts: dm814x: dra62x: Disable wait pin monitoring for NAND ARM: dts: dm814x: dra62x: Fix NAND device nodes ARM: dts: stm32f429: Add Ethernet support ARM: dts: stm32f429: Add system config bank node ARM: dts: at91: sama5d2: add nand0 and nfc0 nodes ARM: dts: at91: sama5d2: add dma properties to UART nodes ARM: dts: at91: sama5d2 Xplained: Correct the macb irq pinctrl node ARM: dts: exynos: Don't overheat the Odroid XU3-Lite on high load ARM: dts: exynos: Add cooling levels for Exynos5422/5800 CPUs ... commit 8c6d4082fc6ad2214e945b5b7368b828fb16e9a9 Merge: 33b3d2e a86e56c Author: Linus Torvalds Date: Sun Mar 20 15:08:45 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: "Here's our branch of ARM64 contents for this merge window, now containing all ARM64 changes other than device tree files. - Various new platforms get added: * Allwinner A64 SoC * Annapurna Labs Alpine SoCs * Broadcom Vulcan * Marvell Armada 3700 SoCs * Amlogic S905 - Various defconfig changes to enable platform specific drivers This branch includes the clk git tree to resolve a build-time dependency" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) arm64: defconfig: Increase MMC_BLOCK_MINORS to 16 arm64: defconfig: Add Qualcomm sdhci and restart functionality ARM64: Enable Amlogic Meson GXBaby platform arm64: defconfig: Enable Samsung MFD and related configs arm64: alpine: select the Alpine MSI controller driver arm64: defconfig: enable the Alpine family arm64: add Alpine SoC family arm64: defconfig: Enable exynos thermal config arm64: add defconfig options for Allwinner SoCs arm64: defconfig: Enable DesignWare APB GPIO controller arm64: defconfig: Add Renesas R-Car Gen3 USB 2.0 phy driver support arm64: EXYNOS: Consolidate ARCH_EXYNOS7 symbol into ARCH_EXYNOS clk: samsung: Don't build ARMv8 clock drivers on ARMv7 MAINTAINERS: Add entry for Broadcom Vulcan SoC arm64: cputype info for Broadcom Vulcan arm64: Broadcom Vulcan support arm64: defconfig: Add Broadcom Vulcan to defconfig arm64: update ARCH_MVEBU for Marvell Armada 7K/8K support Documentation: arm: add Marvell Armada 7K and 8K families Documentation: arm: add link to Armada 38x Functional Spec ... commit 33b3d2e88c9efd701b6153ca4714d4aa6e9f5af0 Merge: e88fa1b 307d40c Author: Linus Torvalds Date: Sun Mar 20 14:57:08 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: "Newly added support for additional SoCs: - Axis Artpec-6 SoC family - Allwinner A83T SoC - Mediatek MT7623 - NXP i.MX6QP SoC - ST Microelectronics stm32f469 microcontroller New features: - SMP support for Mediatek mt2701 - Big-endian support for NXP i.MX - DaVinci now uses the new DMA engine dma_slave_map - OMAP now uses the new DMA engine dma_slave_map - earlyprintk support for palmchip uart on mach-tango - delay timer support for orion Other: - Exynos PMU driver moved out to drivers/soc/ - Various smaller updates for Renesas, Xilinx, PXA, AT91, OMAP, uniphier" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits) ARM: uniphier: rework SMP code to support new System Bus binding ARM: uniphier: add missing of_node_put() ARM: at91: avoid defining CONFIG_* symbols in source code ARM: DRA7: hwmod: Add data for eDMA tpcc, tptc0, tptc1 ARM: imx: Make reset_control_ops const ARM: imx: Do L2 errata only if the L2 cache isn't enabled ARM: imx: select ARM_CPU_SUSPEND only for imx6 dmaengine: pxa_dma: fix the maximum requestor line ARM: alpine: select the Alpine MSI controller driver ARM: pxa: add the number of DMA requestor lines dmaengine: mmp-pdma: add number of requestors dma: mmp_pdma: Add the #dma-requests DT property documentation ARM: OMAP2+: Add rtc hwmod configuration for ti81xx ARM: s3c24xx: Avoid warning for inb/outb ARM: zynq: Move early printk virtual address to vmalloc area ARM: DRA7: hwmod: Add custom reset handler for PCIeSS ARM: SAMSUNG: Remove unused register offset definition ARM: EXYNOS: Cleanup header files inclusion drivers: soc: samsung: Enable COMPILE_TEST MAINTAINERS: Add maintainers entry for drivers/soc/samsung ... commit e88fa1b8b00a947299e2415e819301fa52037cf4 Merge: dae0b74 809683e Author: Linus Torvalds Date: Sun Mar 20 14:37:22 2016 -0700 Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups from Arnd Bergmann: "A few simple cleanups across multiple platforms, not much standing out: - lpc32xx removes its private implementation of the clk API, after generic code was merged in 4.5 - all unused Makefile.boot files get removed - a number of simplifications for shmobile - asm/clkdev.h gets replaced with the asm-generic version after all mach/clkdev.h implementations are gone" * tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: shmobile: Kconfig: Get rid of old comment ARM: shmobile: Consolidate SCU mapping code arm: lpc32xx: remove direct control of GPIOs from shared mach file arm: lpc32xx: remove selected HAVE_IDE arm: lpc32xx: switch to common clock framework ARM: Use generic clkdev.h header ARM: plat-versatile: Remove unused clock.c file ARM: netx: remove redundant "depends on ARCH_NETX" ARM: integrator: remove redundant select in Kconfig ARM: drop unused Makefile.boot of Multiplatform SoCs ARM: mvebu: add missing of_node_put() ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code ARM: shmobile: Typo s/MIPDR/MPIDR/ ARM: shmobile: Add includes providing forward declarations ARM: shmobile: rcar-gen2: Make rcar_gen2_dma_contiguous static ARM: mv78xx0: use "depends on" instead of "if" after prompt commit dae0b74eb7abd7d5c7572414b0c8f91c2dab63c0 Merge: 142b9e6 88e9da9 Author: Linus Torvalds Date: Sun Mar 20 14:26:57 2016 -0700 Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC non-urgent fixes from Arnd Bergmann: "As usual, we queue up a few fixes that don't seem urgent enough to go in through -rc. - a number of randconfig warning fixes from Arnd - various small fixes for OMAP - one somewhat larger patch to restore the OMAP3 cpuidle tuning that was lost in a cleanup - a small regression fix for cns3xxx PCI" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits) CNS3xxx: Fix PCI cns3xxx_write_config() MAINTAINERS: unify email addrs for Kevin Hilman CNS3xxx: remove unused *_VIRT definitions ARM: OMAP2+: Fix hwmod clock for l4_ls soc: TI knav_qmss: fix dma_addr_t printing ARM: prima2: always enable reset controller ARM: socfpga: hide unused functions ARM: ux500: fix ureachable iounmap() ARM: ks8695: fix __initdata annotation ARM: mvebu: mark mvebu_hwcc_pci_nb as __maybe_unused ARM: mv78xx0: avoid unused function warning ARM: orion: only select I2C_BOARDINFO when using I2C ARM: OMAP2+: Fix out of range register access with syscon_config.max_register ARM: OMAP3: Add cpuidle parameters table for omap3430 ARM: davinci: make I2C support optional ARM: davinci: DA8xx+DMx combined kernels need PATCH_PHYS_VIRT ARM: davinci: avoid unused mityomapl138_pn_info variable ARM: davinci: limit DT support to DA850 ARM: DRA7: hwmod: Add reset data for PCIe ARM: DRA7: hwmod: Fix OCP2SCP sysconfig ... commit 7fdf9663261cc77a516396fec82cee8a8ea07e76 Author: Matti Gottlieb Date: Tue Mar 15 13:46:47 2016 +0200 iwlwifi: mvm: fix memory leak in paging Currently paging download buffer is freed during the the unloading of the opmode which happens when the driver is unloaded. This causes a memory leak since the paging download buffer is allocated every time we enable the interface, so the download buffer can be allocated many times, but only be freed once. Free paging download buffer during disabling of the interface. CC: stable@vger.kernel.org [4.3+] Signed-off-by: Matti Gottlieb Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0d7ef45cdeebcc95d581703f45f6de7b2ee89b8d Author: Wolfram Sang Date: Wed Mar 2 23:33:32 2016 +0100 ide: palm_bk3710: test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate, so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang Signed-off-by: David S. Miller drivers/ide/palm_bk3710.c | 2 ++ 1 file changed, 2 insertions(+) commit eccf432f6542d9895d6c50edb5634c6147918ed2 Author: Arnd Bergmann Date: Mon Feb 8 15:31:45 2016 +0100 ide: icside: remove incorrect initconst annotation The icside_probe function can be called for hotplugged devices, so its reference to the __initconst icside_v6_port_info variable may be invalid, as Kbuild points out: WARNING: drivers/ide/icside.o(.text+0x338): Section mismatch in reference from the function icside_probe() to the (unknown reference) .init.rodata:(unknown) Interestingly, this problem only shows up with clang but not with gcc, which optimizes out the __initconst variable. This removes the incorrect annotation. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/ide/icside.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c191307af5f0135b9e35975f3cef4168cefee66 Author: David S. Miller Date: Sun Mar 20 16:53:42 2016 -0400 Revert "lan78xx: add ndo_get_stats64" This reverts commit a59f8c5b048dc938fb958c91c282c865cd845705. There are several bugs in this new code, for example: 1) Uses sleeping locks in get_stats64, which is not allowed, as the operation can be invoked in an atomic context. 2) Uses PM fields without CONFIG_PM or similar guards. 3) Does not synchronize HW stats when the device runtime suspends. Therefore this is being reverted until a correct version is implemented. Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 49 ----------------------------------------------- 1 file changed, 49 deletions(-) commit 142b9e6c9de0fd7c0dff9a1d4a25390de46abf5e Author: Ard Biesheuvel Date: Fri Mar 18 10:04:37 2016 +0100 x86/kallsyms: fix GOLD link failure with new relative kallsyms table format Commit 2213e9a66bb8 ("kallsyms: add support for relative offsets in kallsyms address table") changed the default kallsyms symbol table format to use relative references rather than absolute addresses. This reduces the size of the kallsyms symbol table by 50% on 64-bit architectures, and further reduces the size of the relocation tables used by relocatable kernels. Since the memory footprint of the static kernel image is always much smaller than 4 GB, these relative references are assumed to be representable in 32 bits, even when the native word size is 64 bits. On 64-bit architectures, this obviously only works if the distance between each relative reference and the chosen anchor point is representable in 32 bits, and so the table generation code in scripts/kallsyms.c scans the table for the lowest value that is covered by the kernel text, and selects it as the anchor point. However, when using the GOLD linker rather than the default BFD linker to build the x86_64 kernel, the symbol phys_offset_64, which is the result of arithmetic defined in the linker script, is emitted as a 'T' rather than an 'A' type symbol, resulting in scripts/kallsyms.c to mistake it for a suitable anchor point, even though it is far away from the actual kernel image in the virtual address space. This results in out-of-range warnings from scripts/kallsyms.c and a broken build. So let's align with the BFD linker, and emit the phys_offset_[32|64] symbols as absolute symbols explicitly. Note that the out of range issue does not exist on 32-bit x86, but this patch changes both symbols for symmetry. Reported-by: Markus Trippelsdorf Signed-off-by: Ard Biesheuvel Cc: Andrew Morton Cc: Kees Cook Cc: Guenter Roeck Signed-off-by: Linus Torvalds arch/x86/kernel/vmlinux.lds.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9fc2f052c96142e50c6ddd0a5e7432af68bd13b Author: Luis de Bethencourt Date: Sat Mar 19 21:31:38 2016 +0000 net: sched: Add description for cpu_bstats argument Commit 22e0f8b9322c ("net: sched: make bstats per cpu and estimator RCU safe") added the argument cpu_bstats to functions gen_new_estimator and gen_replace_estimator and now the descriptions of these are missing for the documentation. Adding them. Signed-off-by: Luis de Bethencourt Signed-off-by: David S. Miller net/core/gen_estimator.c | 2 ++ 1 file changed, 2 insertions(+) commit b002fdcc89979ff342d4139d165a4e1d51e586ff Author: Luis de Bethencourt Date: Sat Mar 19 21:19:55 2016 +0000 gen_stats.c: Add description for cpu argument Function gnet_stats_copy_basic is missing the description of the cpu argument in the documentation. Adding it. Signed-off-by: Luis de Bethencourt Signed-off-by: David S. Miller net/core/gen_stats.c | 1 + 1 file changed, 1 insertion(+) commit ebf918cf9922748b9d4d9bf6a2620530cdc5a1d0 Author: Tina Ruchandani Date: Sat Mar 19 11:21:14 2016 -0700 isdn: Use ktime_t instead of 'struct timeval' 'struct timeval' uses 32-bit representation for seconds which will overflow in year 2038 and beyond. mISDN/clock.c needs to compute and store elapsed time in intervals of 125 microseconds. This patch replaces the usage of 'struct timeval' with 64-bit ktime_t which is y2038 safe. The patch also replaces do_gettimeofday() (wall-clock time) with ktime_get() (monotonic time) since we only care about elapsed time here. Signed-off-by: Tina Ruchandani Suggested-by: Arnd Bergmnann Suggested-by: David Miller Signed-off-by: David S. Miller drivers/isdn/mISDN/clock.c | 69 +++++++++++++++++++--------------------------- include/linux/mISDNif.h | 2 +- 2 files changed, 30 insertions(+), 41 deletions(-) commit c27cb97218b3e72417ffc5e73dce488844017b39 Author: Andreas Gruenbacher Date: Sat Mar 19 00:25:11 2016 +0100 ubifs: Remove unused header UBIFS does not support POSIX ACLs, so there is no need for including any POSIX ACL hesders. Signed-off-by: Andreas Gruenbacher Signed-off-by: Richard Weinberger fs/ubifs/xattr.c | 1 - 1 file changed, 1 deletion(-) commit a785993681171fff827abb617916438a399c9d68 Author: Richard Weinberger Date: Thu Mar 3 14:22:14 2016 +0100 MAINTAINERS: Update UBIFS entry ...to represent the status quo. Signed-off-by: Richard Weinberger Acked-by: Artem Bityutskiy MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 58d303def2a1fbfb5c794bafe7da54b900d9694e Author: Joe Perches Date: Thu Feb 25 09:25:20 2016 -0800 mtd: ubi: Add logging functions ubi_msg, ubi_warn and ubi_err Using logging functions instead of macros can reduce overall object size. $ size drivers/mtd/ubi/built-in.o* text data bss dec hex filename 271620 163364 73696 508680 7c308 drivers/mtd/ubi/built-in.o.allyesconfig.new 287638 165380 73504 526522 808ba drivers/mtd/ubi/built-in.o.allyesconfig.old 87728 3780 504 92012 1676c drivers/mtd/ubi/built-in.o.defconfig.new 97084 3780 504 101368 18bf8 drivers/mtd/ubi/built-in.o.defconfig.old Signed-off-by: Joe Perches Signed-off-by: Richard Weinberger drivers/mtd/ubi/misc.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/mtd/ubi/ubi.h | 16 ++++++++++------ 2 files changed, 59 insertions(+), 6 deletions(-) commit 3e7f2c5104a01f5385f64d45372aadaab898a656 Author: Joe Perches Date: Tue Feb 23 04:13:49 2016 -0800 ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn The existing logging macros are fairly large and converting the macros to functions make the object code smaller. Use %pV and __builtin_return_address(0) as appropriate. $ size fs/ubifs/built-in.o* text data bss dec hex filename 575831 309688 161312 1046831 ff92f fs/ubifs/built-in.o.allyesconfig.new 622457 312872 161120 1096449 10bb01 fs/ubifs/built-in.o.allyesconfig.old 223785 640 644 225069 36f2d fs/ubifs/built-in.o.defconfig.new 251873 640 644 253157 3dce5 fs/ubifs/built-in.o.defconfig.old Signed-off-by: Joe Perches Signed-off-by: Richard Weinberger fs/ubifs/Makefile | 1 + fs/ubifs/misc.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ubifs/ubifs.h | 41 +++++++++++++++++---------------------- 3 files changed, 75 insertions(+), 24 deletions(-) commit 4320f21935534dad44e8d112fc085d13c29e7f66 Merge: 659e0bc a09a4c8 Author: David S. Miller Date: Sun Mar 20 16:33:40 2016 -0400 Merge branch 'tunnel-fixes' Jesse Gross says: ==================== Tunneling fixes This series fixes a problem that was reported where encapsulated packets do not have their encapsulation offload markers stripped off when being decapsulated. This causes a significant performance drop if the packets are later retransmitted. Fixing this revealed two other bugs which are also addressed as prerequisites: * GRO can aggregate packets for multiple layers of encapsulation which the stack cannot properly handle. * IPIP packets which are combined by GRO are not marked properly with their GSO type. Note that this is based off the net-next tree as the current target for bug fixes. v2: No code changes, just additional information in commit messages and a new cover letter. ==================== Signed-off-by: David S. Miller commit a09a4c8dd1ec7f830e1fb9e59eb72bddc965d168 Author: Jesse Gross Date: Sat Mar 19 09:32:02 2016 -0700 tunnels: Remove encapsulation offloads on decap. If a packet is either locally encapsulated or processed through GRO it is marked with the offloads that it requires. However, when it is decapsulated these tunnel offload indications are not removed. This means that if we receive an encapsulated TCP packet, aggregate it with GRO, decapsulate, and retransmit the resulting frame on a NIC that does not support encapsulation, we won't be able to take advantage of hardware offloads even though it is just a simple TCP packet at this point. This fixes the problem by stripping off encapsulation offload indications when packets are decapsulated. The performance impacts of this bug are significant. In a test where a Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed, decapsulated, and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a result of avoiding unnecessary segmentation at the VM tap interface. Reported-by: Ramu Ramamurthy Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE") Signed-off-by: Jesse Gross Signed-off-by: David S. Miller include/net/ip_tunnels.h | 16 ++++++++++++++++ net/ipv4/fou.c | 13 +++++++++++-- net/ipv4/ip_tunnel_core.c | 3 ++- net/ipv6/sit.c | 6 ++++-- 4 files changed, 33 insertions(+), 5 deletions(-) commit fac8e0f579695a3ecbc4d3cac369139d7f819971 Author: Jesse Gross Date: Sat Mar 19 09:32:01 2016 -0700 tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsulation device expresses support for handling offloaded encapsulated packets, so we won't generate these types of frames in the transmit path. However, GRO doesn't have a check for multiple levels of encapsulation and will attempt to build them. UDP tunnel GRO actually does prevent this situation but it only handles multiple UDP tunnels stacked on top of each other. This generalizes that solution to prevent any kind of tunnel stacking that would cause problems. Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack") Signed-off-by: Jesse Gross Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++-- net/core/dev.c | 2 +- net/ipv4/af_inet.c | 15 ++++++++++++++- net/ipv4/gre_offload.c | 5 +++++ net/ipv4/udp_offload.c | 6 +++--- net/ipv6/ip6_offload.c | 15 ++++++++++++++- 6 files changed, 39 insertions(+), 8 deletions(-) commit b8cba75bdf6a48ea4811bbefb11a94a5c7281b68 Author: Jesse Gross Date: Sat Mar 19 09:32:00 2016 -0700 ipip: Properly mark ipip GRO packets as encapsulated. ipip encapsulated packets can be merged together by GRO but the result does not have the proper GSO type set or even marked as being encapsulated at all. Later retransmission of these packets will likely fail if the device does not support ipip offloads. This is similar to the issue resolved in IPv6 sit in feec0cb3 ("ipv6: gro: support sit protocol"). Reported-by: Patrick Boutilier Fixes: 9667e9bb ("ipip: Add gro callbacks to ipip offload") Tested-by: Patrick Boutilier Acked-by: Eric Dumazet Signed-off-by: Jesse Gross Signed-off-by: David S. Miller net/ipv4/af_inet.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 659e0bcaebc4ca36e64eac6e9f39c1904b17472c Author: Marcelo Ricardo Leitner Date: Sat Mar 19 12:17:43 2016 -0300 sctp: keep fragmentation point aligned to word size If the user supply a different fragmentation point or if there is a network header that cause it to not be aligned, force it to be aligned. Fragmentation point at a value that is not aligned is not optimal. It causes extra padding to be used and has just no pros. v2: - Make use of the new WORD_TRUNC macro Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3822a5ff4bc32043fa9c7b6d6f125bcdca6da39c Author: Marcelo Ricardo Leitner Date: Sat Mar 19 12:17:20 2016 -0300 sctp: align MTU to a word SCTP is a protocol that is aligned to a word (4 bytes). Thus using bare MTU can sometimes return values that are not aligned, like for loopback, which is 65536 but ipv4_mtu() limits that to 65535. This mis-alignment will cause the last non-aligned bytes to never be used and can cause issues with congestion control. So it's better to just consider a lower MTU and keep congestion control calcs saner as they are based on PMTU. Same applies to icmp frag needed messages, which is also fixed by this patch. One other effect of this is the inability to send MTU-sized packet without queueing or fragmentation and without hitting Nagle. As the check performed at sctp_packet_can_append_data(): if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead) /* Enough data queued to fill a packet */ return SCTP_XMIT_OK; with the above example of MTU, if there are no other messages queued, one cannot send a packet that just fits one packet (65532 bytes) and without causing DATA chunk fragmentation or a delay. v2: - Added WORD_TRUNC macro Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 8 +++++--- net/sctp/associola.c | 3 ++- net/sctp/input.c | 3 ++- net/sctp/transport.c | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) commit 31b055ef0c6116a27e9a787304ecf87a77d34764 Author: Marcelo Ricardo Leitner Date: Fri Mar 18 18:39:19 2016 -0300 sctp: do not leak chunks that are sent to unconfirmed paths Currently, if a chunk is scheduled to be sent through a transport that is currently unconfirmed, it will be leaked as it is dequeued from outq and is not re-queued nor freed. As I'm not aware of any situation that may lead to this situation, I'm fixing this by freeing the chunk and also logging a trace so that we can fix the other bug if it ever happens. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/outqueue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 07b4d6a1749422fa1e054f3c2aba444acdba39e8 Author: Marcelo Ricardo Leitner Date: Fri Mar 18 18:39:18 2016 -0300 sctp: do not update a_rwnd if we are not issuing a sack The SACK can be lost pretty much elsewhere, but if its allocation fail, we know we are not sending it, so it is better to revert a_rwnd to its previous value as this may give it a chance to issue a window update later. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f0691533b756931089902464ca15afc218a49d70 Merge: 2b2f72d c67f5db Author: Linus Torvalds Date: Sun Mar 20 13:28:18 2016 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/vhost updates from Michael Tsirkin: "New features, performance improvements, cleanups: - basic polling support for vhost - rework virtio to optionally use DMA API, fixing it on Xen - balloon stats gained a new entry - using the new napi_alloc_skb speeds up virtio net - virtio blk stats can now be read while another VCPU is busy inflating or deflating the balloon plus misc cleanups in various places" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() vhost_net: basic polling support vhost: introduce vhost_vq_avail_empty() vhost: introduce vhost_has_work() virtio_balloon: Allow to resize and update the balloon stats in parallel virtio_balloon: Use a workqueue instead of "vballoon" kthread virtio/s390: size of SET_IND payload virtio/s390: use dev_to_virtio vhost: rename vhost_init_used() vhost: rename cross-endian helpers virtio_blk: VIRTIO_BLK_F_WCE->VIRTIO_BLK_F_FLUSH vring: Use the DMA API on Xen virtio_pci: Use the DMA API if enabled virtio_mmio: Use the DMA API if enabled virtio: Add improved queue allocation API virtio_ring: Support DMA APIs vring: Introduce vring_use_dma_api() s390/dma: Allow per device dma ops alpha/dma: use common noop dma ops dma: Provide simple noop dma ops commit abbdb5a74cead60e20b79c960c1772955f0b6b81 Author: Eric Dumazet Date: Sun Mar 20 11:27:47 2016 -0700 net: remove a dubious unlikely() clause TCP protocol is still used these days, and TCP uses clones in its transmit path. We can not optimize linux stack assuming it is mostly used in routers, or that TCP is dead. Fixes: 795bb1c00d ("net: bulk free infrastructure for NAPI context, use napi_consume_skb") Signed-off-by: Eric Dumazet Cc: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a779c4feda5d52e0f19e48af71b75dd1032a5b8 Author: Colin Ian King Date: Sun Mar 20 17:44:56 2016 +0000 net/mlx4: remove unused array zero_gid[] zero_gid is not used, so remove this redundant array. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 -- 1 file changed, 2 deletions(-) commit 2b2f72d8ce59acce95ceb156f0f31b848e32e6d4 Merge: fffad3e c5a9d1f Author: Linus Torvalds Date: Sun Mar 20 12:58:32 2016 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - mailbox bindings and drivers for * APM X-Gene * Hisilicon Hi6220 * Rockchip RK3368 platforms - minor fixes to the above three drivers. - misc cleanups of mailbox-test driver. * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: rockchip: avoid 64-bit division mailbox: rockchip: Add Rockchip mailbox driver dt-bindings: rockchip-mailbox: Add mailbox controller document on Rockchip SoCs mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL mailbox: Hi6220: add mailbox driver dt-bindings: mailbox: Document Hi6220 mailbox driver mailbox: mailbox-test: add support for separate tx/rx buffer with single channel mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk mailbox: mailbox-test: fix the compatible string mailbox: mailbox-test: rename driver as generic test driver Documentation: mailbox: Add APM X-Gene SLIMpro mailbox dts documentation mailbox: Add support for APM X-Gene platform mailbox driver commit fffad3e1b34aaced7724ef513dff0d8232ad8d80 Merge: 1e75a9f 9da8320 Author: Linus Torvalds Date: Sun Mar 20 12:22:07 2016 -0700 Merge tag 'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux Pull Xtensa updates from Chris Zankel: "Xtensa improvements for 4.6: - control whether perf IRQ is treated as NMI from Kconfig - implement ioremap for regions outside KIO segment - fix ISS serial port behaviour when EOF is reached - fix preemption in {clear,copy}_user_highpage - fix endianness issues for XTFPGA devices, big-endian cores are now fully functional - clean up debug infrastructure and add support for hardware breakpoints and watchpoints - add processor configurations for Three Core HiFi-2 MX and HiFi3 cpus" * tag 'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux: xtensa: add test_kc705_hifi variant xtensa: add Three Core HiFi-2 MX Variant. xtensa: support hardware breakpoints/watchpoints xtensa: use context structure for debug exceptions xtensa: remove remaining non-functional KGDB bits xtensa: clear all DBREAKC registers on start xtensa: xtfpga: fix earlycon endianness xtensa: xtfpga: fix i2c controller register width and endianness xtensa: xtfpga: fix ethernet controller endianness xtensa: xtfpga: fix serial port register width and endianness xtensa: define CONFIG_CPU_{BIG,LITTLE}_ENDIAN xtensa: fix preemption in {clear,copy}_user_highpage xtensa: ISS: don't hang if stdin EOF is reached xtensa: support ioremap for memory outside KIO region xtensa: use XTENSA_INT_LEVEL macro in asm/timex.h xtensa: make fake NMI configurable commit 46f920d8a970cf102e18f25814a4ff4729ad8537 Author: Axel Lin Date: Sun Mar 20 20:44:05 2016 +0800 irqchip/tegra: Switch to use irq_domain_free_irqs_common Current code calls irq_domain_alloc_irqs_parent() in .alloc, so it should call irq_domain_free_irqs_parent() accordingly in .free. Fix it by switching to use irq_domain_free_irqs_common() instead of the open-coded private implementation. Signed-off-by: Axel Lin Cc: Alexandre Courbot Cc: Jason Cooper Cc: Stephen Warren Cc: Marc Zyngier Cc: Thierry Reding Cc: linux-tegra@vger.kernel.org Link: http://lkml.kernel.org/r/1458477845.28679.1.camel@ingics.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-tegra.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 1e32ec3c8020051432f0b1c2314c8df6057f1b9b Merge: c78a85a 69716a2 Author: David S. Miller Date: Sun Mar 20 13:44:35 2016 -0400 Merge branch 'flowi6_tos' Daniel Borkmann says: ==================== flowi6_tos fixes This set is a follow-up to address Jiri's recent feedback [1] on the flowi6_tos issue, that it is not used for IPv6 route lookups. The three patches fix all current users of flowi6_tos and remove the define to avoid any future confusion on this. Tested the vxlan and geneve ones with IPv6 routing rules. For details, please see individual patches. [ As fixes are currently applied against net-next tree, I've rebased it against that. ] Thanks! [1] http://patchwork.ozlabs.org/patch/592055/ ==================== Signed-off-by: David S. Miller commit 69716a2b51aeb68fe295c0d09e26c8781eacebde Author: Daniel Borkmann Date: Fri Mar 18 18:37:59 2016 +0100 ipv6, trace: fix tos reporting on fib6_table_lookup flowi6_tos of struct flowi6 is unused in IPv6, therefore dumping tos on that tracepoint will also give incorrect information wrt traffic class. If we want to fix it, we need to extract it via ip6_tclass(flp->flowlabel). While for the same test case I get a count of 0 non-zero tos values before the change, they now start to show up after the change: # ./perf record -e fib6:fib6_table_lookup -a sleep 10 # ./perf script | grep -v "tos 0" | wc -l 60 Since there's no user in the kernel tree anymore of flowi6_tos, remove the define to avoid any future confusion on this. Fixes: b811580d91e9 ("net: IPv6 fib lookup tracepoint") Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/flow.h | 2 +- include/trace/events/fib6.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 95caf6f71a9998b5382e3fb9abbca34c02e8f74f Author: Daniel Borkmann Date: Fri Mar 18 18:37:58 2016 +0100 geneve: fix populating tclass in geneve_get_v6_dst The struct flowi6's flowi6_tos is not used in IPv6 route lookup, the traffic class information is handled in the flowi6's flowlabel member instead. For example, for policy routing, fib6_rule_match() uses ip6_tclass() that is applied on the flowlabel for matching on tclass, which would currently not work as expected. Fixes: 3a56f86f1be6 ("geneve: handle ipv6 priority like ipv4 tos") Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/geneve.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit eaa93bf4c6090809395605d1775a0db9970eda5e Author: Daniel Borkmann Date: Fri Mar 18 18:37:57 2016 +0100 vxlan: fix populating tclass in vxlan6_get_route Jiri mentioned that flowi6_tos of struct flowi6 is never used/read anywhere. In fact, rest of the kernel uses the flowi6's flowlabel, where the traffic class _and_ the flowlabel (aka flowinfo) is encoded. For example, for policy routing, fib6_rule_match() uses ip6_tclass() that is applied on the flowlabel member for matching on tclass. Similar fix is needed for geneve, where flowi6_tos is set as well. Installing a v6 blackhole rule that f.e. matches on tos is now working with vxlan. Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class") Reported-by: Jiri Benc Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/vxlan.c | 3 +-- include/net/ipv6.h | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit aaf2559332ba272671bb870464a99b909b29a3a1 Author: Tejun Heo Date: Fri Mar 18 13:52:04 2016 -0400 writeback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode When cgroup writeback is in use, there can be multiple wb's (bdi_writeback's) per bdi and an inode may switch among them dynamically. In a couple places, the wrong wb was used leading to performing operations on the wrong list under the wrong lock corrupting the io lists. * writeback_single_inode() was taking @wb parameter and used it to remove the inode from io lists if it becomes clean after writeback. The callers of this function were always passing in the root wb regardless of the actual wb that the inode was associated with, which could also change while writeback is in progress. Fix it by dropping the @wb parameter and using inode_to_wb_and_lock_list() to determine and lock the associated wb. * After writeback_sb_inodes() writes out an inode, it re-locks @wb and inode to remove it from or move it to the right io list. It assumes that the inode is still associated with @wb; however, the inode may have switched to another wb while writeback was in progress. Fix it by using inode_to_wb_and_lock_list() to determine and lock the associated wb after writeback is complete. As the function requires the original @wb->list_lock locked for the next iteration, in the unlikely case where the inode has changed association, switch the locks. Kudos to Tahsin for pinpointing these subtle breakages. Signed-off-by: Tejun Heo Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching") Link: http://lkml.kernel.org/g/CAAeU0aMYeM_39Y2+PaRvyB1nqAPYZSNngJ1eBRmrxn7gKAt2Mg@mail.gmail.com Reported-and-diagnosed-by: Tahsin Erdogan Tested-by: Tahsin Erdogan Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Jens Axboe fs/fs-writeback.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 614a4e3773148a31f58dc174bbf578ceb63510c2 Author: Tejun Heo Date: Fri Mar 18 13:50:03 2016 -0400 writeback, cgroup: fix premature wb_put() in locked_inode_to_wb_and_lock_list() locked_inode_to_wb_and_lock_list() wb_get()'s the wb associated with the target inode, unlocks inode, locks the wb's list_lock and verifies that the inode is still associated with the wb. To prevent the wb going away between dropping inode lock and acquiring list_lock, the wb is pinned while inode lock is held. The wb reference is put right after acquiring list_lock citing that the wb won't be dereferenced anymore. This isn't true. If the inode is still associated with the wb, the inode has reference and it's safe to return the wb; however, if inode has been switched, the wb still needs to be unlocked which is a dereference and can lead to use-after-free if it it races with wb destruction. Fix it by putting the reference after releasing list_lock. Signed-off-by: Tejun Heo Fixes: 87e1d789bf55 ("writeback: implement [locked_]inode_to_wb_and_lock_list()") Cc: stable@vger.kernel.org # v4.2+ Tested-by: Tahsin Erdogan Signed-off-by: Jens Axboe fs/fs-writeback.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 897bb0c7f1ea82d7cc882b19790b5e1df00ffc29 Author: Thomas Gleixner Date: Sat Mar 19 11:30:33 2016 +0100 blk-mq: Use proper cpumask iterator queue_for_each_ctx() iterates over per_cpu variables under the assumption that the possible cpu mask cannot have holes. That's wrong as all cpumasks can have holes. In case there are holes the iteration ends up accessing uninitialized memory and crashing as a result. Replace the macro by a proper for_each_possible_cpu() loop and drop the unused macro blk_ctx_sum() which references queue_for_each_ctx(). Reported-by: Xiong Zhou Signed-off-by: Thomas Gleixner Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 6 ++++-- block/blk-mq.c | 3 ++- include/linux/blk-mq.h | 14 -------------- 3 files changed, 6 insertions(+), 17 deletions(-) commit 9fc515bc9e735c10cd327f05c20f5ef69474188d Author: Emmanuel Grumbach Date: Thu Mar 10 13:07:17 2016 +0200 iwlwifi: pcie: lower the debug level for RSA semaphore access IWL_INFO is not an error but still printed by default. "can't access the RSA semaphore it is write protected" seems worrisome but it is not really a problem. CC: [4.1+] Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c66f4aa7f3cb6579dfe977c05fcb5db25b41cd7 Author: Luis de Bethencourt Date: Sat Mar 19 17:22:36 2016 +0000 drm: remove excess description Description of expected_size doesn't match any parameter of the function drm_atomic_replace_property_blob. Removing it. Signed-off-by: Luis de Bethencourt Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1458408156-15990-1-git-send-email-luisbg@osg.samsung.com drivers/gpu/drm/drm_atomic.c | 1 - 1 file changed, 1 deletion(-) commit 655048a0b98bc6288ce87cb95a18bf4cada6c1a9 Author: Matt Ranostay Date: Thu Mar 17 20:48:07 2016 -0700 iio: light: apds9960: correct FIFO check condition Correct issue that the last entry in FIFO was being read twice due to an incorrect decrement of entry count variable before condition check. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c913eb92eb1143806dd295cd2f29e48c00c93fd Author: Stefan Eichenberger Date: Fri Mar 18 16:51:04 2016 +0100 iio: adc: max1363: correct reference voltage Swap max11644/max11645 and max 11646/max11647 reference voltages according to datasheet. Signed-off-by: Stefan Eichenberger Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3fb77e2948ec85bb718418b0a5270ec2e08c2841 Author: Stefan Eichenberger Date: Fri Mar 18 16:51:03 2016 +0100 iio: adc: max1363: add missing adc to max1363_id max11644-max11647 had an enum value but were not added to the max1363_id, so they where not selectable in the devictree. Signed-off-by: Stefan Eichenberger Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0ef21100ae912f76ed89f76ecd894f4ffb3689c1 Author: Victor Clément Date: Sat Mar 19 13:17:42 2016 +0100 ALSA: usb-audio: add Microsoft HD-5001 to quirks The Microsoft HD-5001 webcam microphone does not support sample rate reading as the HD-5000 one. This results in dmesg errors and sound hanging with pulseaudio. Signed-off-by: Victor Clément Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 7169701ad3f9fadd7413b354ae317e67c0b37389 Author: Takashi Iwai Date: Sat Mar 19 10:40:21 2016 +0100 ALSA: hda - Workaround for unbalanced i915 power refcount by concurrent probe The recent addition of on-demand i915 audio component binding in the codec driver seems leading to the unbalanced i915 power refcount, according to Intel CI tests. Typically, it gets a kernel WARNING like: WARNING: CPU: 3 PID: 173 at sound/hda/hdac_i915.c:91 snd_hdac_display_power+0xf1/0x110 [snd_hda_core]() Call Trace: [] dump_stack+0x67/0x92 [] warn_slowpath_common+0x81/0xc0 [] warn_slowpath_null+0x15/0x20 [] snd_hdac_display_power+0xf1/0x110 [snd_hda_core] [] azx_intel_link_power+0xd/0x10 [snd_hda_intel] [] azx_link_power+0x1a/0x30 [snd_hda_codec] [] snd_hdac_link_power+0x29/0x40 [snd_hda_core] [] hda_codec_runtime_suspend+0x76/0xa0 [snd_hda_codec] ..... The scenario is like below: - HD-audio driver and i915 driver are probed concurrently at the (almost) same time; HDA bus tries to bind with i915, but it fails because i915 initialization is still being processed. - Later on, HD-audio probes the HDMI codec, where it again tries to bind with i915. At this time, it succeeds. - At finishing the probe of HDA, it decreases the refcount as if it were already bound at the bus probe, since the component is bound now. This triggers a kernel WARNING due to the unbalance. As a workaround, in this patch, we just disable the on-demand i915 component binding in the codec driver. This essentially reverts back to the state of 4.4 kernel. We know that this is no real solution, but it's a minimalistic simple change that can be applied to 4.5.x kernel as stable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94566 Reported-by: Ville Syrjälä Cc: # v4.5 Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1e75a9f34a5ed5902707fb74b468356c55142b71 Merge: 1c3d770 d1ed3ba Author: Linus Torvalds Date: Sat Mar 19 19:35:51 2016 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - new drivers for: NI 903x/913x watchdog driver, WinSystems EBC-C384 watchdog timer and ARM SBSA watchdog driver - Support for NCT6102D devices - Improvements of the generic watchdog framework (improve restart handler, make set_timeout optional, introduce infrastructure triggered keepalives, ... - improvements on the pnx4008 watchdog driver - several smaller fixes and improvements * git://www.linux-watchdog.org/linux-watchdog: (28 commits) watchdog: Ensure that wdd is not dereferenced if NULL watchdog: imx2: Convert to use infrastructure triggered keepalives watchdog: dw_wdt: Convert to use watchdog infrastructure watchdog: Add support for minimum time between heartbeats watchdog: Make stop function optional watchdog: Introduce WDOG_HW_RUNNING flag watchdog: Introduce hardware maximum heartbeat in watchdog core watchdog: Make set_timeout function optional arm: lpc32xx: remove restart handler arm: lpc32xx: phy3250 remove restart hook watchdog: pnx4008: restart: support "cmd" from userspace watchdog: pnx4008: add support for soft reset watchdog: pnx4008: add restart handler watchdog: pnx4008: update logging during power-on watchdog: tangox_wdt: test clock rate to avoid division by 0 watchdog: atlas7_wdt: test clock rate to avoid division by 0 watchdog: s3c2410_wdt: Add max and min timeout values Watchdog: introduce ARM SBSA watchdog driver Documentation: add sbsa-gwdt driver documentation watchdog: Add watchdog timer support for the WinSystems EBC-C384 ... commit 1c3d770043583d99118d52cad309f586ef8e7d4a Merge: 3c2de27 e38e5ce Author: Linus Torvalds Date: Sat Mar 19 19:21:24 2016 -0700 Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Stefan Richter: "IEEE 1394 subsystem patches: - move away from outmoded timekeeping API - error reporting fix - documentation bits" * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: ABI documentation: libhinawa uses firewire-cdev firewire: ABI documentation: jujuutils were renamed to linux-firewire-utils firewire: ohci: propagate return code from soft_reset to probe and resume firewire: nosy: Replace timeval with timespec64 commit 3c2de27d793bf55167804fc47954711e94f27be7 Merge: 51b3eae 8b23a8c Author: Linus Torvalds Date: Sat Mar 19 18:52:29 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs updates from Al Viro: - Preparations of parallel lookups (the remaining main obstacle is the need to move security_d_instantiate(); once that becomes safe, the rest will be a matter of rather short series local to fs/*.c - preadv2/pwritev2 series from Christoph - assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (32 commits) splice: handle zero nr_pages in splice_to_pipe() vfs: show_vfsstat: do not ignore errors from show_devname method dcache.c: new helper: __d_add() don't bother with __d_instantiate(dentry, NULL) untangle fsnotify_d_instantiate() a bit uninline d_add() replace d_add_unique() with saner primitive quota: use lookup_one_len_unlocked() cifs_get_root(): use lookup_one_len_unlocked() nfs_lookup: don't bother with d_instantiate(dentry, NULL) kill dentry_unhash() ceph_fill_trace(): don't bother with d_instantiate(dn, NULL) autofs4: don't bother with d_instantiate(dentry, NULL) in ->lookup() configfs: move d_rehash() into configfs_create() for regular files ceph: don't bother with d_rehash() in splice_dentry() namei: teach lookup_slow() to skip revalidate namei: massage lookup_slow() to be usable by lookup_one_len_unlocked() lookup_one_len_unlocked(): use lookup_dcache() namei: simplify invalidation logics in lookup_dcache() namei: change calling conventions for lookup_{fast,slow} and follow_managed() ... commit c78a85a8430e35aecd53e190a2f6b999062b1037 Merge: 133800d de06dbf Author: David S. Miller Date: Sat Mar 19 21:05:24 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux commit 51b3eae8dbe5e6fa9657b21388ad6642d6934952 Merge: de06dbf fd97646 Author: Linus Torvalds Date: Sat Mar 19 17:52:49 2016 -0700 Merge branch 'stable-4.6' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "A small set of patches for audit this time; just three in total and one is a spelling fix. The two patches with actual content are designed to help prevent new instances of auditd from displacing an existing, functioning auditd and to generate a log of the attempt. Not to worry, dead/stuck auditd instances can still be replaced by a new instance without problem. Nothing controversial, and everything passes our regression suite" * 'stable-4.6' of git://git.infradead.org/users/pcmoore/audit: audit: Fix typo in comment audit: log failed attempts to change audit_pid configuration audit: stop an old auditd being starved out by a new auditd commit ed72662a84771fec1337dd8b187e070af6fd3890 Author: Richard Cochran Date: Fri Mar 18 22:26:11 2016 +0100 cpufreq: acpi-cpufreq: Clean up hot plug notifier callback This driver has two issues. First, it tries to fiddle with the hot plugged CPU's MSR on the UP_PREPARE event, at a time when the CPU is not yet online. Second, the driver sets the "boost-disable" bit for a CPU when going down, but does not clear the bit again if the CPU comes up again due to DOWN_FAILED. This patch fixes the issues by changing the driver to react to the ONLINE/DOWN_FAILED events instead of UP_PREPARE. As an added benefit, the driver also becomes symmetric with respect to the hot plug mechanism. Signed-off-by: Richard Cochran Signed-off-by: Rafael J. Wysocki drivers/cpufreq/acpi-cpufreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fdfdb2b1301670a69195ba1e5666df4a7f02eb46 Author: Rafael J. Wysocki Date: Fri Mar 18 23:20:02 2016 +0100 intel_pstate: Do not call wrmsrl_on_cpu() with disabled interrupts After commit a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) wrmsrl_on_cpu() cannot be called in the intel_pstate_adjust_busy_pstate() path as that is executed with disabled interrupts. However, atom_set_pstate() called from there via intel_pstate_set_pstate() uses wrmsrl_on_cpu() to update the IA32_PERF_CTL MSR which triggers the WARN_ON_ONCE() in smp_call_function_single(). The reason why wrmsrl_on_cpu() is used by atom_set_pstate() is because intel_pstate_set_pstate() calling it is also invoked during the initialization and cleanup of the driver and in those cases it is not guaranteed to be run on the CPU that is being updated. However, in the case when intel_pstate_set_pstate() is called by intel_pstate_adjust_busy_pstate(), wrmsrl() can be used to update the register safely. Moreover, intel_pstate_set_pstate() already contains code that only is executed if the function is called by intel_pstate_adjust_busy_pstate() and there is a special argument passed to it because of that. To fix the problem at hand, rearrange the code taking the above observations into account. First, replace the ->set() callback in struct pstate_funcs with a ->get_val() one that will return the value to be written to the IA32_PERF_CTL MSR without updating the register. Second, split intel_pstate_set_pstate() into two functions, intel_pstate_update_pstate() to be called by intel_pstate_adjust_busy_pstate() that will contain all of the intel_pstate_set_pstate() code which only needs to be executed in that case and will use wrmsrl() to update the MSR (after obtaining the value to write to it from the ->get_val() callback), and intel_pstate_set_min_pstate() to be invoked during the initialization and cleanup that will set the P-state to the minimum one and will update the MSR using wrmsrl_on_cpu(). Finally, move the code shared between intel_pstate_update_pstate() and intel_pstate_set_min_pstate() to a new static inline function intel_pstate_record_pstate() and make them both call it. Of course, that unifies the handling of the IA32_PERF_CTL MSR writes between Atom and Core. Fixes: a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) Reported-and-tested-by: Josh Boyer Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 73 +++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 30 deletions(-) commit de06dbfa7861c9019eedefc0c356ba86e5098f1b Merge: b31a3bc 1b3bf84 Author: Linus Torvalds Date: Sat Mar 19 16:31:54 2016 -0700 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Another mixture of changes this time around: - Split XIP linker file from main linker file to make it more maintainable, and various XIP fixes, and clean up a resulting macro. - Decompressor cleanups from Masahiro Yamada - Avoid printing an error for a missing L2 cache - Remove some duplicated symbols in System.map, and move vectors/stubs back into kernel VMA - Various low priority fixes from Arnd - Updates to allow bus match functions to return negative errno values, touching some drivers and the driver core. Greg has acked these changes. - Virtualisation platform udpates form Jean-Philippe Brucker. - Security enhancements from Kees Cook - Rework some Kconfig dependencies and move PSCI idle management code out of arch/arm into drivers/firmware/psci.c - ARM DMA mapping updates, touching media, acked by Mauro. - Fix places in ARM code which should be using virt_to_idmap() so that Keystone2 can work. - Fix Marvell Tauros2 to work again with non-DT boots. - Provide a delay timer for ARM Orion platforms" * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (45 commits) ARM: 8546/1: dma-mapping: refactor to fix coherent+cma+gfp=0 ARM: 8547/1: dma-mapping: store buffer information ARM: 8543/1: decompressor: rename suffix_y to compress-y ARM: 8542/1: decompressor: merge piggy.*.S and simplify Makefile ARM: 8541/1: decompressor: drop redundant FORCE in Makefile ARM: 8540/1: decompressor: use clean-files instead of extra-y to clean files ARM: 8539/1: decompressor: drop more unneeded assignments to "targets" ARM: 8538/1: decompressor: drop unneeded assignments to "targets" ARM: 8532/1: uncompress: mark putc as inline ARM: 8531/1: turn init_new_context into an inline function ARM: 8530/1: remove VIRT_TO_BUS ARM: 8537/1: drop unused DEBUG_RODATA from XIP_KERNEL ARM: 8536/1: mm: hide __start_rodata_section_aligned for non-debug builds ARM: 8535/1: mm: DEBUG_RODATA makes no sense with XIP_KERNEL ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs ARM: make the physical-relative calculation more obvious ARM: 8512/1: proc-v7.S: Adjust stack address when XIP_KERNEL ARM: 8411/1: Add default SPARSEMEM settings ARM: 8503/1: clk_register_clkdev: remove format string interface ARM: 8529/1: remove 'i' and 'zi' targets ... commit b31a3bc3dbd2f42b61674d37de7f46022e1f6846 Merge: d5e2d00 b15d53d Author: Linus Torvalds Date: Sat Mar 19 16:09:43 2016 -0700 Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh Pull arch/sh updates from Rich Felker: "This includes minor cleanups, a fix for a crash that likely affects all sh models with MMU, and introduction of a framework for boards described by device tree, which sets the stage for future J2 support" * tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh: sched/preempt, sh: kmap_coherent relies on disabled preemption sh: add SMP method selection to device tree pseudo-board sh: add device tree support and generic board using device tree sh: remove arch-specific localtimer and use generic one sh: make MMU-specific SMP code conditional on CONFIG_MMU sh: provide unified syscall trap compatible with all SH models sh: New gcc support sh: Disable trace for kernel uncompressing. sh: Use generic clkdev.h header commit d5e2d00898bdfed9586472679760fc81a2ca2d02 Merge: 31e1823 6e669f0 Author: Linus Torvalds Date: Sat Mar 19 15:38:41 2016 -0700 Merge tag 'powerpc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "This was delayed a day or two by some build-breakage on old toolchains which we've now fixed. There's two PCI commits both acked by Bjorn. There's one commit to mm/hugepage.c which is (co)authored by Kirill. Highlights: - Restructure Linux PTE on Book3S/64 to Radix format from Paul Mackerras - Book3s 64 MMU cleanup in preparation for Radix MMU from Aneesh Kumar K.V - Add POWER9 cputable entry from Michael Neuling - FPU/Altivec/VSX save/restore optimisations from Cyril Bur - Add support for new ftrace ABI on ppc64le from Torsten Duwe Various cleanups & minor fixes from: - Adam Buchbinder, Andrew Donnellan, Balbir Singh, Christophe Leroy, Cyril Bur, Luis Henriques, Madhavan Srinivasan, Pan Xinhui, Russell Currey, Sukadev Bhattiprolu, Suraj Jitindar Singh. General: - atomics: Allow architectures to define their own __atomic_op_* helpers from Boqun Feng - Implement atomic{, 64}_*_return_* variants and acquire/release/ relaxed variants for (cmp)xchg from Boqun Feng - Add powernv_defconfig from Jeremy Kerr - Fix BUG_ON() reporting in real mode from Balbir Singh - Add xmon command to dump OPAL msglog from Andrew Donnellan - Add xmon command to dump process/task similar to ps(1) from Douglas Miller - Clean up memory hotplug failure paths from David Gibson pci/eeh: - Redesign SR-IOV on PowerNV to give absolute isolation between VFs from Wei Yang. - EEH Support for SRIOV VFs from Wei Yang and Gavin Shan. - PCI/IOV: Rename and export virtfn_{add, remove} from Wei Yang - PCI: Add pcibios_bus_add_device() weak function from Wei Yang - MAINTAINERS: Update EEH details and maintainership from Russell Currey cxl: - Support added to the CXL driver for running on both bare-metal and hypervisor systems, from Christophe Lombard and Frederic Barrat. - Ignore probes for virtual afu pci devices from Vaibhav Jain perf: - Export Power8 generic and cache events to sysfs from Sukadev Bhattiprolu - hv-24x7: Fix usage with chip events, display change in counter values, display domain indices in sysfs, eliminate domain suffix in event names, from Sukadev Bhattiprolu Freescale: - Updates from Scott: "Highlights include 8xx optimizations, 32-bit checksum optimizations, 86xx consolidation, e5500/e6500 cpu hotplug, more fman and other dt bits, and minor fixes/cleanup" * tag 'powerpc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (179 commits) powerpc: Fix unrecoverable SLB miss during restore_math() powerpc/8xx: Fix do_mtspr_cpu6() build on older compilers powerpc/rcpm: Fix build break when SMP=n powerpc/book3e-64: Use hardcoded mttmr opcode powerpc/fsl/dts: Add "jedec,spi-nor" flash compatible powerpc/T104xRDB: add tdm riser card node to device tree powerpc32: PAGE_EXEC required for inittext powerpc/mpc85xx: Add pcsphy nodes to FManV3 device tree powerpc/mpc85xx: Add MDIO bus muxing support to the board device tree(s) powerpc/86xx: Introduce and use common dtsi powerpc/86xx: Update device tree powerpc/86xx: Move dts files to fsl directory powerpc/86xx: Switch to kconfig fragments approach powerpc/86xx: Update defconfigs powerpc/86xx: Consolidate common platform code powerpc32: Remove one insn in mulhdu powerpc32: small optimisation in flush_icache_range() powerpc: Simplify test in __dma_sync() powerpc32: move xxxxx_dcache_range() functions inline powerpc32: Remove clear_pages() and define clear_page() inline ... commit 31e182363b39d84031eadf0caf6d99fd9eb056f0 Merge: 1200b68 5027e19 Author: Linus Torvalds Date: Sat Mar 19 15:15:07 2016 -0700 Merge tag 'devicetree-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - new tool 'dtx_diff' to diff DT files - sync kernel's dtc/libfdt to current dtc repo master - fix for reserved memory regions located in highmem - document standard unit suffixes for DT properties - various DT binding doc updates * tag 'devicetree-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: Add vendor prefix for eGalax_eMPIA Technology Inc Input: ads7846: Add description how to use internal reference (ADS7846) ARM: realview: add EB syscon variants to bindings devicetree: bindings: ARM: Use "uV" for micro-volt serial: fsl-imx-uart: Fix typo in fsl,dte-mode description of: add 'const' for of_property_*_string*() parameter '*np' of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() of: alloc anywhere from memblock if range not specified kbuild: Allow using host dtc instead of kernel's copy of: resolver: Add missing of_node_get and of_node_put of: Add United Radiant Technology Corporation vendor prefix dt/bindings: add documentation on standard property unit suffixes scripts/dtc: Update to upstream commit b06e55c88b9b ARM: boot: Add an implementation of strnlen for libfdt scripts/dtc: dtx_diff - add info to error message dtc: create tool to diff device trees commit 1200b6809dfd9d73bc4c7db76d288c35fa4b2ebe Merge: 6b5f04b fe30937 Author: Linus Torvalds Date: Sat Mar 19 10:05:34 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Highlights: 1) Support more Realtek wireless chips, from Jes Sorenson. 2) New BPF types for per-cpu hash and arrap maps, from Alexei Starovoitov. 3) Make several TCP sysctls per-namespace, from Nikolay Borisov. 4) Allow the use of SO_REUSEPORT in order to do per-thread processing of incoming TCP/UDP connections. The muxing can be done using a BPF program which hashes the incoming packet. From Craig Gallek. 5) Add a multiplexer for TCP streams, to provide a messaged based interface. BPF programs can be used to determine the message boundaries. From Tom Herbert. 6) Add 802.1AE MACSEC support, from Sabrina Dubroca. 7) Avoid factorial complexity when taking down an inetdev interface with lots of configured addresses. We were doing things like traversing the entire address less for each address removed, and flushing the entire netfilter conntrack table for every address as well. 8) Add and use SKB bulk free infrastructure, from Jesper Brouer. 9) Allow offloading u32 classifiers to hardware, and implement for ixgbe, from John Fastabend. 10) Allow configuring IRQ coalescing parameters on a per-queue basis, from Kan Liang. 11) Extend ethtool so that larger link mode masks can be supported. From David Decotigny. 12) Introduce devlink, which can be used to configure port link types (ethernet vs Infiniband, etc.), port splitting, and switch device level attributes as a whole. From Jiri Pirko. 13) Hardware offload support for flower classifiers, from Amir Vadai. 14) Add "Local Checksum Offload". Basically, for a tunneled packet the checksum of the outer header is 'constant' (because with the checksum field filled into the inner protocol header, the payload of the outer frame checksums to 'zero'), and we can take advantage of that in various ways. From Edward Cree" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1548 commits) bonding: fix bond_get_stats() net: bcmgenet: fix dma api length mismatch net/mlx4_core: Fix backward compatibility on VFs phy: mdio-thunder: Fix some Kconfig typos lan78xx: add ndo_get_stats64 lan78xx: handle statistics counter rollover RDS: TCP: Remove unused constant RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket net: smc911x: convert pxa dma to dmaengine team: remove duplicate set of flag IFF_MULTICAST bonding: remove duplicate set of flag IFF_MULTICAST net: fix a comment typo ethernet: micrel: fix some error codes ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it bpf, dst: add and use dst_tclassid helper bpf: make skb->tc_classid also readable net: mvneta: bm: clarify dependencies cls_bpf: reset class and reuse major in da ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c ldmvsw: Add ldmvsw.c driver code ... commit 57d335ce88d055eb212e2531dd7a8b4240404a57 Author: Thomas Gleixner Date: Sat Mar 19 12:28:38 2016 +0100 x86/oprofile/nmi: Add missing hotplug FROZEN handling We really do not want to keep that nmi enabled across suspend/resume. Signed-off-by: Thomas Gleixner arch/x86/oprofile/nmi_int.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f80be5e3d5aaea26c7351f4f08ab67fc4325a4ff Author: Thomas Gleixner Date: Sat Mar 19 12:17:24 2016 +0100 x86/hpet: Use proper mask to modify hotplug action Magic hex constants are a guarantee for wreckage when the defines change. Signed-off-by: Thomas Gleixner arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f47ab81aca8264adae25005f0130db60c0af7797 Author: Thomas Gleixner Date: Sat Mar 19 11:47:39 2016 +0100 x86/apic/uv: Fix the hotplug notifier The notifier is missing the CPU_DOWN_FAILED transition. That leaves the heartbeat disabled when CPU_DOWN_PREPARE fails. It also does not handle the FROZEN transition variants. That might not be an issue for UV, but it's inconsistent. Signed-off-by: Thomas Gleixner Cc: Dimitri Sivanich arch/x86/kernel/apic/x2apic_uv_x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a38f98735e168a20573c24dfffa96095b6fe1d23 Author: Thomas Gleixner Date: Sat Mar 19 11:41:42 2016 +0100 x86/apb/timer: Use proper mask to modify hotplug action Magic hex constants are a guarantee for wreckage when the defines change. Signed-off-by: Thomas Gleixner arch/x86/kernel/apb_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18b862dcd57a3e23e34c8cd1e939f68548c1209a Author: Chris Wilson Date: Fri Mar 18 20:02:39 2016 +0000 dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() Drivers, especially i915.ko, can fail during the initial migration of a dma-buf for CPU access. However, the error code from the driver was not being propagated back to ioctl and so userspace was blissfully ignorant of the failure. Rendering corruption ensues. Whilst fixing the ioctl to return the error code from dma_buf_start_cpu_access(), also do the same for dma_buf_end_cpu_access(). For most drivers, dma_buf_end_cpu_access() cannot fail. i915.ko however, as most drivers would, wants to avoid being uninterruptible (as would be required to guarrantee no failure when flushing the buffer to the device). As userspace already has to handle errors from the SYNC_IOCTL, take advantage of this to be able to restart the syscall across signals. This fixes a coherency issue for i915.ko as well as reducing the uninterruptible hold upon its BKL, the struct_mutex. Fixes commit c11e391da2a8fe973c3c2398452000bed505851e Author: Daniel Vetter Date: Thu Feb 11 20:04:51 2016 -0200 dma-buf: Add ioctls to allow userspace to flush Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible Testcase: igt/prime_mmap_coherency/ioctl-errors Signed-off-by: Chris Wilson Cc: Tiago Vignatti Cc: Stéphane Marchesin Cc: David Herrmann Cc: Sumit Semwal Cc: Daniel Vetter CC: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: intel-gfx@lists.freedesktop.org Cc: devel@driverdev.osuosl.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk drivers/dma-buf/dma-buf.c | 17 +++++++++++------ drivers/gpu/drm/i915/i915_gem_dmabuf.c | 15 +++++---------- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 5 +++-- drivers/gpu/drm/udl/udl_fb.c | 4 ++-- drivers/staging/android/ion/ion.c | 6 ++++-- include/linux/dma-buf.h | 6 +++--- 6 files changed, 28 insertions(+), 25 deletions(-) commit 3e8db2246b434c6b18a6a9f09904038bddcf76c7 Author: Thomas Gleixner Date: Fri Mar 18 17:20:30 2016 +0100 x86/topology: Use total_cpus not nr_cpu_ids for logical packages nr_cpu_ids can be limited on the command line via nr_cpus=. That can break the logical package management because it results in a smaller number of packages, but the cpus to online are occupying the full package space as the hyper threads are enumerated after the physical cores typically. total_cpus is the real possible cpu space not limited by nr_cpus command line and gives us the proper number of packages. Reported-by: Mike Galbraith Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Signed-off-by: Thomas Gleixner Cc: Xiong Zhou Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andreas Herrmann Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1603181254330.3978@nanos arch/x86/kernel/smpboot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 63d1e995be455ae9196270eb4b789de21afd42ed Author: Peter Zijlstra Date: Fri Mar 18 16:03:48 2016 +0100 x86/topology: Fix Intel HT disable As per the comment in the code; due to BIOS it is sometimes impossible to know if there actually are smp siblings until the machine is fully enumerated. So we rather overestimate the number of possible packages. Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Signed-off-by: Peter Zijlstra (Intel) Cc: aherrmann@suse.com Cc: jencce.kernel@gmail.com Cc: bp@alien8.de Cc: Mike Galbraith Link: http://lkml.kernel.org/r/20160318150538.611014173@infradead.org Signed-off-by: Thomas Gleixner arch/x86/kernel/smpboot.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b5d5f27d938fb6fc8d3202704e699d2694a02da6 Author: Peter Zijlstra Date: Fri Mar 18 16:03:46 2016 +0100 x86/topology: Fix logical package mapping That first branch testing pkg against __max_logical_packages is wrong, because if the first pkg id is larger, then the find_first_zero will find us logical package id 0. However, if the second pkg id is indeed 0, we'll again claim it without testing if it was already taken. Also, it fails to print the mapping. Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Reported-by: Xiong Zhou Signed-off-by: Peter Zijlstra (Intel) Cc: aherrmann@suse.com Cc: bp@alien8.de Cc: Mike Galbraith Link: http://lkml.kernel.org/r/20160317095220.GO6344@twins.programming.kicks-ass.net Link: http://lkml.kernel.org/r/20160318150538.482393396@infradead.org Signed-off-by: Thomas Gleixner arch/x86/kernel/smpboot.c | 5 ----- 1 file changed, 5 deletions(-) commit deaf7565eb618a80534844300aeacffa14125182 Author: Vineet Gupta Date: Sat Oct 24 19:31:16 2015 +0530 ARCv2: ioremap: Support dynamic peripheral address space The peripheral address space is architectural address window which is uncached and typically used to wire up peripherals. For ARC700 cores (ARCompact ISA based) this was fixed to 1GB region 0xC000_0000 - 0xFFFF_FFFF. For ARCv2 based HS38 cores the start address is flexible and can be 0xC, 0xD, 0xE, 0xF 000_000 by programming AUX_NON_VOLATILE_LIMIT reg (typically done in bootloader) Further in cas of PAE, the physical address can extend beyond 4GB so need to confine this check, otherwise all pages beyond 4GB will be treated as uncached Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 1 + arch/arc/kernel/setup.c | 14 ++------------ arch/arc/mm/cache.c | 7 +++++++ arch/arc/mm/ioremap.c | 17 +++++++++++++++-- 4 files changed, 25 insertions(+), 14 deletions(-) commit f2e3d55397ff7ad62e159e14281b346760857935 Author: Vineet Gupta Date: Wed Mar 16 16:38:57 2016 +0530 ARC: dma: reintroduce platform specific dma<->phys Signed-off-by: Vineet Gupta arch/arc/Kconfig | 3 +++ arch/arc/include/asm/dma-mapping.h | 7 +++++++ arch/arc/mm/dma.c | 9 ++++----- 3 files changed, 14 insertions(+), 5 deletions(-) commit f5db19e93f680160a0fb3e2b05ceb4832b24d486 Author: Vineet Gupta Date: Wed Mar 16 15:04:39 2016 +0530 ARC: dma: ioremap: use phys_addr_t consistenctly in code paths To support dma in physical memory beyond 4GB with PAE40 Signed-off-by: Vineet Gupta arch/arc/include/asm/cacheflush.h | 6 +++--- arch/arc/include/asm/io.h | 4 ++-- arch/arc/mm/cache.c | 30 +++++++++++++++--------------- arch/arc/mm/dma.c | 12 ++++++------ arch/arc/mm/ioremap.c | 20 +++++++++++--------- 5 files changed, 37 insertions(+), 35 deletions(-) commit 971573cf57394775deb591c3920e565c80cbc800 Author: Vineet Gupta Date: Wed Mar 16 14:51:33 2016 +0530 ARC: dma: pass_phys() not sg_virt() to cache ops Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b7003930e010eeb976632c1a374246b7cbc2995 Author: Vineet Gupta Date: Mon Mar 14 15:34:36 2016 +0530 ARC: dma: non-coherent pages need V-P mapping if in HIGHMEM Previously a non-coherent page (hardware IOC or simply driver needs) could be handled by cpu with paddr alone (kvaddr used to be needed for coherent mappings to enforce uncached semantics via a MMU mapping). Now however such a page might still require a V-P mapping if it was in physical address space > 32bits due to PAE40, which the CPU can't access directly with a paddr So decouple decision of kvaddr allocation from type of alloc request (coh/non-coh) Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) commit d98a15a5653bfae5bccc68a06a60ccf035b2c4cc Author: Vineet Gupta Date: Mon Mar 14 15:03:59 2016 +0530 ARC: dma: Use struct page based page allocator helpers vs. the ones which reutne void *, so that we can handle pages > 4GB in subsequent patches Also plug a potential page leak in case ioremap fails Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 6b5f04b6cf8ebab9a65d9c0026c650bb2538fd0f Merge: fcab86a cfe02a8 Author: Linus Torvalds Date: Fri Mar 18 20:25:49 2016 -0700 Merge branch 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "cgroup changes for v4.6-rc1. No userland visible behavior changes in this pull request. I'll send out a separate pull request for the addition of cgroup namespace support. - The biggest change is the revamping of cgroup core task migration and controller handling logic. There are quite a few places where controllers and tasks are manipulated. Previously, many of those places implemented custom operations for each specific use case assuming specific starting conditions. While this worked, it makes the code fragile and difficult to follow. The bulk of this pull request restructures these operations so that most related operations are performed through common helpers which implement recursive (subtrees are always processed consistently) and idempotent (they make cgroup hierarchy converge to the target state rather than performing operations assuming specific starting conditions). This makes the code a lot easier to understand, verify and extend. - Implicit controller support is added. This is primarily for using perf_event on the v2 hierarchy so that perf can match cgroup v2 path without requiring the user to do anything special. The kernel portion of perf_event changes is acked but userland changes are still pending review. - cgroup_no_v1= boot parameter added to ease testing cgroup v2 in certain environments. - There is a regression introduced during v4.4 devel cycle where attempts to migrate zombie tasks can mess up internal object management. This was fixed earlier this week and included in this pull request w/ stable cc'd. - Misc non-critical fixes and improvements" * 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (44 commits) cgroup: avoid false positive gcc-6 warning cgroup: ignore css_sets associated with dead cgroups during migration Documentation: cgroup v2: Trivial heading correction. cgroup: implement cgroup_subsys->implicit_on_dfl cgroup: use css_set->mg_dst_cgrp for the migration target cgroup cgroup: make cgroup[_taskset]_migrate() take cgroup_root instead of cgroup cgroup: move migration destination verification out of cgroup_migrate_prepare_dst() cgroup: fix incorrect destination cgroup in cgroup_update_dfl_csses() cgroup: Trivial correction to reflect controller. cgroup: remove stale item in cgroup-v1 document INDEX file. cgroup: update css iteration in cgroup_update_dfl_csses() cgroup: allocate 2x cgrp_cset_links when setting up a new root cgroup: make cgroup_calc_subtree_ss_mask() take @this_ss_mask cgroup: reimplement rebind_subsystems() using cgroup_apply_control() and friends cgroup: use cgroup_apply_enable_control() in cgroup creation path cgroup: combine cgroup_mutex locking and offline css draining cgroup: factor out cgroup_{apply|finalize}_control() from cgroup_subtree_control_write() cgroup: introduce cgroup_{save|propagate|restore}_control() cgroup: make cgroup_drain_offline() and cgroup_apply_control_{disable|enable}() recursive cgroup: factor out cgroup_apply_control_enable() from cgroup_subtree_control_write() ... commit fe30937b65354c7fec244caebbdaae68e28ca797 Author: Eric Dumazet Date: Thu Mar 17 17:23:36 2016 -0700 bonding: fix bond_get_stats() bond_get_stats() can be called from rtnetlink (with RTNL held) or from /proc/net/dev seq handler (with RCU held) The logic added in commit 5f0c5f73e5ef ("bonding: make global bonding stats more reliable") kind of assumed only one cpu could run there. If multiple threads are reading /proc/net/dev, stats can be really messed up after a while. A second problem is that some fields are 32bit, so we need to properly handle the wrap around problem. Given that RTNL is not always held, we need to use bond_for_each_slave_rcu(). Fixes: 5f0c5f73e5ef ("bonding: make global bonding stats more reliable") Signed-off-by: Eric Dumazet Cc: Andy Gospodarek Cc: Jay Vosburgh Cc: Veaceslav Falico Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 66 ++++++++++++++++++++++------------------- include/net/bonding.h | 1 + 2 files changed, 36 insertions(+), 31 deletions(-) commit eee577232203842b4dcadb7ab477a298479633ed Author: Eric Dumazet Date: Thu Mar 17 11:57:06 2016 -0700 net: bcmgenet: fix dma api length mismatch When un-mapping skb->data in __bcmgenet_tx_reclaim(), we must use the length that was used in original dma_map_single(), instead of skb->len that might be bigger (includes the frags) We simply can store skb_len into tx_cb_ptr->dma_len and use it at unmap time. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Eric Dumazet Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76e39ccf9c36352a8fc7c084ec25b735010685fd Author: Eli Cohen Date: Thu Mar 17 18:49:42 2016 +0200 net/mlx4_core: Fix backward compatibility on VFs Commit 85743f1eb345 ("net/mlx4_core: Set UAR page size to 4KB regardless of system page size") introduced dependency where old VF drivers without this fix fail to load if the PF driver runs with this commit. To resolve this add a module parameter which disables that functionality by default. If both the PF and VFs are running with a driver with that commit the administrator may set the module param to true. The module parameter is called enable_4k_uar. Fixes: 85743f1eb345 ('net/mlx4_core: Set UAR page size to 4KB ...') Signed-off-by: Eli Cohen Tested-by: Alexey Kardashevskiy Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit fcab86add71623e3963d7565c0d61bb9d99aea7c Merge: ef504fa 8134233 Author: Linus Torvalds Date: Fri Mar 18 20:06:46 2016 -0700 Merge branch 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - ahci grew runtime power management support so that the controller can be turned off if no devices are attached. - sata_via isn't dead yet. It got hotplug support and more refined workaround for certain WD drives. - Misc cleanups. There's a merge from for-4.5-fixes to avoid confusing conflicts in ahci PCI ID table. * 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ata: ahci_xgene: dereferencing uninitialized pointer in probe AHCI: Remove obsolete Intel Lewisburg SATA RAID device IDs ata: sata_rcar: Use ARCH_RENESAS sata_via: Implement hotplug for VT6421 sata_via: Apply WD workaround only when needed on VT6421 ahci: Add runtime PM support for the host controller ahci: Add functions to manage runtime PM of AHCI ports ahci: Convert driver to use modern PM hooks ahci: Cache host controller version scsi: Drop runtime PM usage count after host is added scsi: Set request queue runtime PM status back to active on resume block: Add blk_set_runtime_active() ata: ahci_mvebu: add support for Armada 3700 variant libata: fix unbalanced spin_lock_irqsave/spin_unlock_irq() in ata_scsi_park_show() libata: support AHCI on OCTEON platform commit ef504fa591aae6f6ebdf26edbe6ec0bfd32ea7d3 Merge: 814a2bf 22aceb3 Author: Linus Torvalds Date: Fri Mar 18 20:05:39 2016 -0700 Merge branch 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Three trivial workqueue changes" * 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fix comment for work_on_cpu() sched/core: Get rid of 'cpu' argument in wq_worker_sleeping() workqueue: Replace usage of init_name with dev_set_name() commit e2ad1f976b721df383ff12c12a6dcc805cbb80f3 Author: Andreas Färber Date: Thu Mar 17 00:23:37 2016 +0100 phy: mdio-thunder: Fix some Kconfig typos Drop two extra occurrences of "on" in option title and help text. Fixes: 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Cc: David Daney Signed-off-by: Andreas Färber Acked-by: David Daney Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a59f8c5b048dc938fb958c91c282c865cd845705 Author: Woojung Huh Date: Wed Mar 16 22:10:42 2016 +0000 lan78xx: add ndo_get_stats64 Add lan78xx_get_stats64 of ndo_get_stats64 to report all statistics counters including errors from HW statistics. Read from HW when auto suspend is disabled, use saved counter when auto suspend is enabled because periodic call to ndo_get_stats64 prevents USB auto suspend. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 20ff55655a93554611fb7790c8a2d29ee4598d24 Author: Woojung Huh Date: Wed Mar 16 22:10:40 2016 +0000 lan78xx: handle statistics counter rollover Update to handle statistics counter rollover. Check statistics counter periodically and compensate it when counter value rolls over at max (20 or 32bits). Simple mechanism adjusts monitoring timer to allow USB auto suspend. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 252 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 239 insertions(+), 13 deletions(-) commit 814a2bf957739f367cbebfa1b60237387b72d0ee Merge: 237045f f9310b2 Author: Linus Torvalds Date: Fri Mar 18 19:26:54 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge second patch-bomb from Andrew Morton: - a couple of hotfixes - the rest of MM - a new timer slack control in procfs - a couple of procfs fixes - a few misc things - some printk tweaks - lib/ updates, notably to radix-tree. - add my and Nick Piggin's old userspace radix-tree test harness to tools/testing/radix-tree/. Matthew said it was a godsend during the radix-tree work he did. - a few code-size improvements, switching to __always_inline where gcc screwed up. - partially implement character sets in sscanf * emailed patches from Andrew Morton : (118 commits) sscanf: implement basic character sets lib/bug.c: use common WARN helper param: convert some "on"/"off" users to strtobool lib: add "on"/"off" support to kstrtobool lib: update single-char callers of strtobool() lib: move strtobool() to kstrtobool() include/linux/unaligned: force inlining of byteswap operations include/uapi/linux/byteorder, swab: force inlining of some byteswap operations include/asm-generic/atomic-long.h: force inlining of some atomic_long operations usb: common: convert to use match_string() helper ide: hpt366: convert to use match_string() helper ata: hpt366: convert to use match_string() helper power: ab8500: convert to use match_string() helper power: charger_manager: convert to use match_string() helper drm/edid: convert to use match_string() helper pinctrl: convert to use match_string() helper device property: convert to use match_string() helper lib/string: introduce match_string() helper radix-tree tests: add test for radix_tree_iter_next radix-tree tests: add regression3 test ... commit 7fa7728d23e7928dfb6e9f5540a97fb2d562b989 Merge: 79d3b59 a3382e4 Author: David S. Miller Date: Fri Mar 18 22:25:46 2016 -0400 Merge branch 'rds-buffer-tuning' Sowmini Varadhan says: ==================== RDS: TCP: tunable socket buffer parameters Patch 1 uses sysctl to create tunable socket buffer size parameters. Patch 2 removes an unuused constant. v2: use sysctl v3: review comments from Santosh Shilimkar, Eric Dumazet v4: review comments from Hannes Sowa ==================== Signed-off-by: David S. Miller commit a3382e408b645b4f68ec01f9c048e356c62598fb Author: Sowmini Varadhan Date: Wed Mar 16 11:38:13 2016 -0700 RDS: TCP: Remove unused constant RDS_TCP_DEFAULT_BUFSIZE has been unused since commit 1edd6a14d24f ("RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune"). Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 2 -- 1 file changed, 2 deletions(-) commit c6a58ffed53612be86b758df1cdb0b0f4305e9cb Author: Sowmini Varadhan Date: Wed Mar 16 11:38:12 2016 -0700 RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket Add per-net sysctl tunables to set the size of sndbuf and rcvbuf on the kernel tcp socket. The tunables are added at /proc/sys/net/rds/tcp/rds_tcp_sndbuf and /proc/sys/net/rds/tcp/rds_tcp_rcvbuf. These values must be set before accept() or connect(), and there may be an arbitrary number of existing rds-tcp sockets when the tunable is modified. To make sure that all connections in the netns pick up the same value for the tunable, we reset existing rds-tcp connections in the netns, so that they can reconnect with the new parameters. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 135 insertions(+), 10 deletions(-) commit 79d3b59a93ba25f3b2c72eb4099c189d41d30204 Author: Robert Jarzmik Date: Wed Mar 16 18:26:02 2016 +0100 net: smc911x: convert pxa dma to dmaengine Convert the dma transfers to be dmaengine based, now pxa has a dmaengine slave driver. This makes this driver a bit more PXA agnostic. The driver was only compile tested. The risk is quite small as no current PXA platform I'm aware of is using smc911x driver. Signed-off-by: Robert Jarzmik Tested-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 85 ++++++++++++++++++++++++------------- drivers/net/ethernet/smsc/smc911x.h | 63 ++++++++++++--------------- 2 files changed, 82 insertions(+), 66 deletions(-) commit c9d0bc5d225b026797c05f19a4871e96e2ef9f1c Merge: 93e68cd bc0df13 Author: David S. Miller Date: Fri Mar 18 22:14:53 2016 -0400 Merge branch 'IFF_MULTICAST-dup-sets' Zhang Shengju says: ==================== remove duplicate set of flag IFF_MULTICAST This patch series remove duplicate set of flag IFF_MULTICAST. ==================== Signed-off-by: David S. Miller commit bc0df13887b1147f4e63390d7d6767f7fa64b91b Author: Zhang Shengju Date: Wed Mar 16 09:59:16 2016 +0000 team: remove duplicate set of flag IFF_MULTICAST Remove unnecessary set of flag IFF_MULTICAST, since ether_setup already does this. Signed-off-by: Zhang Shengju Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team.c | 1 - 1 file changed, 1 deletion(-) commit 1098cee6e1b11e4fe80b2765eb54d412d4294f03 Author: Zhang Shengju Date: Wed Mar 16 09:59:15 2016 +0000 bonding: remove duplicate set of flag IFF_MULTICAST Remove unnecessary set of flag IFF_MULTICAST, since ether_setup already does this. Signed-off-by: Zhang Shengju Reviewed-by: Nikolay Aleksandrov Signed-off-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5173cb814b36439a9d9537016965e75798b9f130 Author: Alexey Khoroshilov Date: Sat Mar 19 01:35:54 2016 +0300 mtip32xx: fix checks for dma mapping errors exec_drive_taskfile() checks for dma mapping errors by comparison returned address with zero, while pci_dma_mapping_error() should be used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29fd20b8e68a4d31a82909265b1e650b7b860f54 Author: Javier González Date: Thu Mar 3 15:06:41 2016 +0100 lightnvm: do not load L2P table if not supported An Open-Channel SSD can work on two modes: (i) hybrid mode, where the L2P table is maintained both by the host and by the device; and (ii) full host-based, where the L2P table is uniquely maintained by the host. In the advent of a new target implementing the full host-based mode, do not assume that the L2P table must be loaded on the generic media manager; check device properties loaded on the identify command instead. Signed-off-by: Javier González Moved into the following statement. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/gennvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 719b59172cdcd5a2ba532b4bb4d56c36df20c28e Author: Javier González Date: Thu Mar 3 15:06:40 2016 +0100 lightnvm: do not reserve lun on l2p loading When the l2p table is loaded, addresses are checked for the lun they belong to and luns are reserved accordingly. This assumes that metadata is being stored in the backend device to recover the previous target configuration. Since this is not yet implemented, this check collides with some of the core initialization (e.g., sysblock initialization when a page is formed by several sectors). We take this check out and for now rely on that the right target will be created instead. When metadata is stored to recover a target, this check will come natural as part of the recovery strategy. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/gennvm.c | 3 --- 1 file changed, 3 deletions(-) commit 9f867268436d799549909437e627e7cf279e1127 Author: Matias Bjorling Date: Thu Mar 3 15:06:39 2016 +0100 nvme: lightnvm: return ppa completion status PPAs sent to device is separately acknowledge in a 64bit status variable. The status is stored in DW0 and DW1 of the completion queue entry. Store this status inside the nvm_rq for further processing. This can later be used to implement retry techniques for failed writes and reads. Reviewed-by: Christoph Hellwig Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 17 +++++++++++++++-- include/linux/lightnvm.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) commit da1e284919b0b99c5bf0618b6c98cbaf2c17e62e Author: Wenwei Tao Date: Thu Mar 3 15:06:38 2016 +0100 lightnvm: add a bitmap of luns Add a bitmap of luns to indicate the status of luns: inuse/available. When create targets do the necessary check to avoid allocating luns that are already allocated. Signed-off-by: Wenwei Tao Freed dev->lun_map if nvm_core_init later failed in the init process. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 6 ++++ drivers/lightnvm/gennvm.c | 18 ++++++++++++ drivers/lightnvm/rrpc.c | 74 ++++++++++++++++++++++++++++------------------- include/linux/lightnvm.h | 5 ++++ 4 files changed, 74 insertions(+), 29 deletions(-) commit 4c9dacb82d5aa36aa2568df60d897f2eb3d8819b Author: Wenwei Tao Date: Thu Mar 3 15:06:37 2016 +0100 lightnvm: specify target's logical address area We can create more than one target on a lightnvm device by specifying its begin lun and end lun. But only specify the physical address area is not enough, we need to get the corresponding non- intersection logical address area division from the backend device's logcial address space. Otherwise the targets on the device might use the same logical addresses cause incorrect information in the device's l2p table. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 1 + drivers/lightnvm/gennvm.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/lightnvm/gennvm.h | 6 +++++ drivers/lightnvm/rrpc.c | 35 +++++++++++++++++++++++-- drivers/lightnvm/rrpc.h | 1 + include/linux/lightnvm.h | 8 ++++++ 6 files changed, 116 insertions(+), 2 deletions(-) commit 3681c85dffda70e551dead31c8d102bd69033fe8 Author: Wenwei Tao Date: Sat Mar 5 00:27:04 2016 +0800 null_blk: add lightnvm null_blk device to the nullb_list After register null_blk devices into lightnvm, we forget to add these devices to the the nullb_list, makes them invisible to the null_blk driver. Signed-off-by: Wenwei Tao Fixes: a514379b0c77 ("null_blk: oops when initializing without lightnvm") Signed-off-by: Jens Axboe drivers/block/null_blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 237045fc3c67d44088f767dca5a9fa30815eba62 Merge: 35d88d9 118472a Author: Linus Torvalds Date: Fri Mar 18 17:13:31 2016 -0700 Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "This is the block driver pull request for this merge window. It sits on top of for-4.6/core, that was just sent out. This contains: - A set of fixes for lightnvm. One from Alan, fixing an overflow, and the rest from the usual suspects, Javier and Matias. - A set of fixes for nbd from Markus and Dan, and a fixup from Arnd for correct usage of the signed 64-bit divider. - A set of bug fixes for the Micron mtip32xx, from Asai. - A fix for the brd discard handling from Bart. - Update the maintainers entry for cciss, since that hardware has transferred ownership. - Three bug fixes for bcache from Eric Wheeler. - Set of fixes for xen-blk{back,front} from Jan and Konrad. - Removal of the cpqarray driver. It has been disabled in Kconfig since 2013, and we were initially scheduled to remove it in 3.15. - Various updates and fixes for NVMe, with the most important being: - Removal of the per-device NVMe thread, replacing that with a watchdog timer instead. From Christoph. - Exposing the namespace WWID through sysfs, from Keith. - Set of cleanups from Ming Lin. - Logging the controller device name instead of the underlying PCI device name, from Sagi. - And a bunch of fixes and optimizations from the usual suspects in this area" * 'for-4.6/drivers' of git://git.kernel.dk/linux-block: (49 commits) NVMe: Expose ns wwid through single sysfs entry drivers:block: cpqarray clean up brd: Fix discard request processing cpqarray: remove it from the kernel cciss: update MAINTAINERS NVMe: Remove unused sq_head read in completion path bcache: fix cache_set_flush() NULL pointer dereference on OOM bcache: cleaned up error handling around register_cache() bcache: fix race of writeback thread starting before complete initialization NVMe: Create discard zero quirk white list nbd: use correct div_s64 helper mtip32xx: remove unneeded variable in mtip_cmd_timeout() lightnvm: generalize rrpc ppa calculations lightnvm: remove struct nvm_dev->total_blocks lightnvm: rename ->nr_pages to ->nr_sects lightnvm: update closed list outside of intr context xen/blback: Fit the important information of the thread in 17 characters lightnvm: fold get bb tbl when using dual/quad plane mode lightnvm: fix up nonsensical configure overrun checking xen-blkback: advertise indirect segment support earlier ... commit 35d88d97bee90fc09286d28209a64a991291a64a Merge: 040e3ab 4ee86ba Author: Linus Torvalds Date: Fri Mar 18 16:43:11 2016 -0700 Merge branch 'for-4.6/core' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: "Here are the core block changes for this merge window. Not a lot of exciting stuff going on in this round, most of the changes have been on the driver side of things. That pull request is coming next. This pull request contains: - A set of fixes for chained bio handling from Christoph. - A tag bounds check for blk-mq from Hannes, ensuring that we don't do something stupid if a device reports an invalid tag value. - A set of fixes/updates for the CFQ IO scheduler from Jan Kara. - A set of blk-mq fixes from Keith, adding support for dynamic hardware queues, and fixing init of max_dev_sectors for stacking devices. - A fix for the dynamic hw context from Ming. - Enabling of cgroup writeback support on a block device, from Shaohua" * 'for-4.6/core' of git://git.kernel.dk/linux-block: blk-mq: add bounds check on tag-to-rq conversion block: bio_remaining_done() isn't unlikely block: cleanup bio_endio block: factor out chained bio completion block: don't unecessarily clobber bi_error for chained bios block-dev: enable writeback cgroup support blk-mq: Fix NULL pointer updating nr_requests blk-mq: mark request queue as mq asap block: Initialize max_dev_sectors to 0 blk-mq: dynamic h/w context count cfq-iosched: Allow parent cgroup to preempt its child cfq-iosched: Allow sync noidle workloads to preempt each other cfq-iosched: Reorder checks in cfq_should_preempt() cfq-iosched: Don't group_idle if cfqq has big thinktime commit 93e68cd6115f67d8363c94dae8206af36f6d3b00 Author: Zhang Shengju Date: Wed Mar 16 09:12:46 2016 +0000 net: fix a comment typo Fix a comment typo. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller include/uapi/linux/if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3af0d554c1ce11e9d0953381ff566271f9ab81a9 Author: Dan Carpenter Date: Wed Mar 16 10:45:10 2016 +0300 ethernet: micrel: fix some error codes There were two issues here: 1) dma_mapping_error() return true/false but we want to return -ENOMEM 2) If dmaengine_prep_slave_sg() failed then "err" wasn't set but presumably that should be -ENOMEM as well. I changed the success path to "return 0;" instead of "return ret;" for clarity. Fixes: 94fe8c683cea ('ks8842: Support DMA when accessed via timberdale') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8842.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3004932c804255cc0ed97f2afa31c6d252fed89e Merge: 019ded3 fca5fdf Author: David S. Miller Date: Fri Mar 18 19:38:53 2016 -0400 Merge branch 'bpf-misc' Daniel Borkmann says: ==================== Minor BPF follow-ups Some minor last follow-ups I still had in my queue. The first one adds readability support for __sk_buff's tc_classid member, the remaining two are some minor cleanups. For details please see individual patches. ==================== Signed-off-by: David S. Miller commit fca5fdf67de9e092fda23c9eb059ba968e7b5267 Author: Daniel Borkmann Date: Wed Mar 16 01:42:51 2016 +0100 ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it eBPF defines this as BPF_TUNLEN_MAX and OVS just uses the hard-coded value inside struct sw_flow_key. Thus, add and use IP_TUNNEL_OPTS_MAX for this, which makes the code a bit more generic and allows to remove BPF_TUNLEN_MAX from eBPF code. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/ip_tunnels.h | 7 +++++++ net/core/filter.c | 9 ++------- net/ipv4/ip_tunnel_core.c | 6 ++++++ net/openvswitch/flow.h | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) commit 808c1b697c3c4dd2a7132882424c390b0d0acfb9 Author: Daniel Borkmann Date: Wed Mar 16 01:42:50 2016 +0100 bpf, dst: add and use dst_tclassid helper We can just add a small helper dst_tclassid() for retrieving the dst->tclassid value. It makes the code a bit better in that we can get rid of the ifdef from filter.c by moving this into the header. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/dst.h | 12 ++++++++++++ net/core/filter.c | 9 +-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 09c37a2c5bbc28b5fbc07a01db4bccdbd0a5d8a2 Author: Daniel Borkmann Date: Wed Mar 16 01:42:49 2016 +0100 bpf: make skb->tc_classid also readable Currently, the tc_classid from eBPF skb context is write-only, but there's no good reason for tc programs to limit it to write-only. For example, it can be used to transfer its state via tail calls where the resulting tc_classid gets filled gradually. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 019ded3aa7c9799fbe6533baeac9aafc7063bd39 Author: Arnd Bergmann Date: Tue Mar 15 22:47:14 2016 +0100 net: mvneta: bm: clarify dependencies MVNETA_BM has a dependency on MVNETA, so we can only select the former if the latter is enabled. However, the code dependency is the reverse: The mvneta module can call into the mvneta_bm module, so mvneta cannot be a built-in if mvneta_bm is a module, or we get a link error: drivers/net/built-in.o: In function `mvneta_remove': drivers/net/ethernet/marvell/mvneta.c:4211: undefined reference to `mvneta_bm_pool_destroy' drivers/net/built-in.o: In function `mvneta_bm_update_mtu': drivers/net/ethernet/marvell/mvneta.c:1034: undefined reference to `mvneta_bm_bufs_free' This avoids the problem by further clarifying the dependency so that MVNETA_BM is a silent Kconfig option that gets turned on by the new MVNETA_BM_ENABLE option. This way both the core HWBM module and the MVNETA_BM code are always built-in when needed. Signed-off-by: Arnd Bergmann Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management") Signed-off-by: David S. Miller drivers/net/ethernet/marvell/Kconfig | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3a461da1d03e7a857edfa6a002040d07e118c639 Author: Daniel Borkmann Date: Tue Mar 15 22:41:22 2016 +0100 cls_bpf: reset class and reuse major in da There are two issues with the current code. First one is that we need to set res->class to 0 in case we use non-default classid matching. This is important for the case where cls_bpf was initially set up with an optional binding to a default class with tcf_bind_filter(), where the underlying qdisc implements bind_tcf() that fills res->class and tests for it later on when doing the classification. Convention for these cases is that after tc_classify() was called, such qdiscs (atm, drr, qfq, cbq, hfsc, htb) first test class, and if 0, then they lookup based on classid. Second, there's a bug with da mode, where res->classid is only assigned a 16 bit minor, but it needs to expand to the full 32 bit major/minor combination instead, therefore we need to expand with the bound major. This is fine as classes belonging to a classful qdisc must share the same major. Fixes: 045efa82ff56 ("cls_bpf: introduce integrated actions") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/sched/cls_bpf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 70063e949949c004f297d802608a34c87bb8c960 Merge: 1e6bb1a dc153f8 Author: David S. Miller Date: Fri Mar 18 19:33:05 2016 -0400 Merge branch 'ldmvsw' Aaron Young says: ==================== ldmvsw: Add ldmvsw driver This series adds a new Logical Domains vSwitch (ldmvsw) driver. The ldmvsw driver code will live in the drivers/net/ethernet/sun/ directory and will operate on Oracle systems running SPARC Linux in a Logical Domains environment (typically in the control domain). The ldmvsw driver is very similar in function to the existing sunvnet driver. Ldmvsw creates a network interface for each "vsw-port" node found in the Machine Description (MD) of a service domain. These nodes correspond to ports on a vswitch created by the logical domains manager. The created network interface(s) can be used by bridge/vswitch software (such as the Linux bridge or Open vSwitch) to provide guest domain(s) with network interconnectivity or connectivity to a physical network. Here is a example diagram of ldmvsw driver usage in a logical domain environment to provide a guest domain with network connectivity to a physical NIC on the service domain: +----------------+ +----------------- | Service Domain | | Guest domain | | | | | | LinuxBridge | | | | | | | | | | NIC Ldmvsw | | Sunvnet | +----------------+ +----------------+ | | LDC | LAN ------------------------------ As stated, the sunvnet and ldmvsw drivers are _very_ similar in function. They both create network interface(s) to receive/transmit network traffic across LDC network channel(s). Since the driver is so similar in function to sunvnet, the approach will be as follows to integrate the driver and take advantage of common code: Patch #1: Split sunvnet.c driver into sunvnet.c and sunvnet_common.c Patch #2: Modify the sunvnet_common code and data structures to be compatible with both the sunvnet and ldmvsw drivers. Patch #3: Add the new ldmvsw.c driver code Patch #4: Checkpatch cleanup of the sunvnet/sunvnet_common code. NOTE - Patch#1 renames a file (sunvnet.h -> sunvnet_common.h). When generating the patches (using git format-patch), I had to use the --no-renames option otherwise patch#1 would NOT apply using 'patch -p1' - which as I understand is a requirement for patch acceptance. I wasn't sure if this is proper thing to do. Please advise if not. Thanks. v2 changes: * change all EXPORT_SYMBOL declarations to EXPORT_SYMBOL_GPL * remove inline attribute for external function port_is_up_common() * Give all exported/global funcs in sunvnet_common.c a 'sunvnet_' prefix to avoid kernel global namespace pollution/collisions * ldmvsw.c: Order local variable declarations from longest to shortest line * ldmvsw.c: register the netdevice after all supporting state is ready/setup. NOTE: The consensus at Oracle is that the following functions must be done AFTER register_netdev() - this is the same ordering currently used in the sunvnet driver: 1. sunvnet_port_add_txq_common() - needs registered netdev 2. napi_enable() - requires registered netdev 3. vio_port_up() - as soon as this function is called LDC handshake messages will come in which must be handled by the napi code. ==================== Signed-off-by: David S. Miller commit dc153f850daba6eb665fbfedd349d09bcfd9bda9 Author: Aaron Young Date: Tue Mar 15 11:35:40 2016 -0700 ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c Checkpatch updates for sunvnet.c and sunvnet_common.c. Signed-off-by: Aaron Young Signed-off-by: Rashmi Narasimhan Reviewed-by: Sowmini Varadhan Reviewed-by: Alexandre Chartre Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet.c | 6 +- drivers/net/ethernet/sun/sunvnet_common.c | 100 ++++++++++++++++-------------- 2 files changed, 56 insertions(+), 50 deletions(-) commit 5d01fa0c6bd84ddf1339a3fadfefecd2c28d472e Author: Aaron Young Date: Tue Mar 15 11:35:39 2016 -0700 ldmvsw: Add ldmvsw.c driver code Add ldmvsw.c driver Details: The ldmvsw driver very closely follows the sunvnet.c code and makes use of the sunvnet_common.c code for core functionality. A significant difference between sunvnet and ldmvsw driver is sunvnet creates a network interface for each vnet-port *parent* node in the MD while the ldmvsw driver creates a network interface for every vsw-port node in the Machine Description (MD). Therefore the netdev_priv() for sunvnet is a vnet structure while the netdev_priv() for ldmvsw is a vnet_port structure. Vnet_port structures allocated by ldmvsw have the vsw bit set. When finding the net_device associated with a port, the common code keys off this bit to use either the net_device found in the vnet_port or the net_device in the vnet structure (see the VNET_PORT_TO_NET_DEVICE() macro in sunvnet_common.h). This scheme allows the common code to work with both drivers with minimal changes. Similar to Xen, network interfaces created by the ldmvsw driver will always have a HW Addr (i.e. mac address) of FE:FF:FF:FF:FF:FF and each will be assigned the devname "vif." - where and are a unique handle/port pair assigned to the associated vsw-port node in the MD. Signed-off-by: Aaron Young Signed-off-by: Rashmi Narasimhan Reviewed-by: Sowmini Varadhan Reviewed-by: Alexandre Chartre Signed-off-by: David S. Miller arch/sparc/configs/sparc64_defconfig | 1 + drivers/net/ethernet/sun/Kconfig | 11 + drivers/net/ethernet/sun/Makefile | 1 + drivers/net/ethernet/sun/ldmvsw.c | 468 +++++++++++++++++++++++++++++++++++ 4 files changed, 481 insertions(+) commit 67d0719f06ded9488311472b3d65ad37d992c332 Author: Aaron Young Date: Tue Mar 15 11:35:38 2016 -0700 ldmvsw: Make sunvnet_common compatible with ldmvsw Modify sunvnet common code and data structures to be compatible with both sunvnet and ldmvsw drivers. Details: Sunvnet operates on "vnet-port" nodes which appear in the Machine Description (MD) in a guest domain. Ldmvsw operates on "vsw-port" nodes which appear in the MD of a service domain. A difference between the sunvnet driver and the ldmvsw driver is the sunvnet driver creates a network interface (i.e. a struct net_device) for every vnet-port *parent* "network" node. Several vnet-ports may appear under this common parent network node - each corresponding to a common parent network interface. Conversely, since bridge/vswitch software will need to interface with every vsw-port in a system, the ldmvsw driver creates a network interface (i.e. a struct net_device) for every vsw-port - not every parent node as with sunvnet. This difference required some special handling in the common code as explained below. There are 2 key data structures used by the sunvnet and ldmvsw drivers (which are now found in sunvnet_common.h): 1. struct vnet_port This structure represents a vnet-port node in sunvnet and a vsw-port in the ldmvsw driver. 2. struct vnet This structure represents a parent "network" node in sunvnet and a parent "virtual-network-switch" node in ldmvsw. Since the sunvnet driver allocates a net_device for every parent "network" node, a net_device member appears in the struct vnet. Since the ldmvsw driver allocates a net_device for every port, a net_device member was added to the vnet_port. The common code distinguishes which structure net_device member to use by checking a 'vsw' bit that was added to the vnet_port structure. See the VNET_PORT_TO_NET_DEVICE() marco in sunvnet_common.h. The netdev_priv() in sunvnet is allocated as a vnet. The netdev_priv() in ldmvsw is a vnet_port. Therefore, any place in the common code where a netdev_priv() call was made, a wrapper function was implemented in each driver to first get the vnet and/or vnet_port (in a driver specific way) and pass them as newly added parameters to the common functions (see wrapper funcs: vnet_set_rx_mode() and vnet_poll_controller()). Since these wrapper functions call __tx_port_find(), __tx_port_find() was moved from the common code back into sunvnet.c. Note - ldmvsw.c does not require this function. These changes also required that port_is_up() be made into a common function and thus it was given a _common suffix and exported like the other common functions. A wrapper function was also added for vnet_start_xmit_common() to pass a driver-specific function arg to return the port associated with a given struct sk_buff and struct net_device. This was required because vnet_start_xmit_common() grabs a lock prior to getting the associated port. Using a function pointer arg allowed the code to work unchanged without risking changes to the non-trivial locking logic in vnet_start_xmit_common(). Signed-off-by: Aaron Young Signed-off-by: Rashmi Narasimhan Reviewed-by: Sowmini Varadhan Reviewed-by: Alexandre Chartre Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet.c | 74 +++++++++++++++++++++++-- drivers/net/ethernet/sun/sunvnet_common.c | 89 +++++++++++-------------------- drivers/net/ethernet/sun/sunvnet_common.h | 28 +++++++--- 3 files changed, 121 insertions(+), 70 deletions(-) commit 31762eaa0d0804d34e297daad57cda45cbc6c961 Author: Aaron Young Date: Tue Mar 15 11:35:37 2016 -0700 ldmvsw: Split sunvnet driver into common code Split sunvnet.c into sunvnet.c and sunvnet_common.c. Details: Since the sunvnet and ldmvsw drivers will both use common sunvnet code, move the functions (and support functions) anticipated to be common code from sunvnet.c to sunvnet_common.c. Similarly, sunvnet.h was renamed to sunvnet_common.h. The sunvnet_common.c code will be compiled into the kernel and act as a library of functions that are linked by either (or both) drivers when loaded. Function names for external functions in sunvnet_common.c (to be called by both the sunvnet and ldmvsw drivers) were tagged with a "_common" suffix to clearly designate them as common functions. No functional changes as of yet... just moved code verbatim to the new sunvnet_common.c/h files. Makefile/Kconfig support added to build sunvnet_common.c file. The code is included in the kernel if SUN_LDOMS is defined/selected. NOTE - per the SubmittingPatches documentation, since the code was just moved from one file another, the code was NOT checkpatch'd in this commit to aid in review. Signed-off-by: Aaron Young Signed-off-by: Rashmi Narasimhan Reviewed-by: Sowmini Varadhan Reviewed-by: Alexandre Chartre Signed-off-by: David S. Miller drivers/net/ethernet/sun/Kconfig | 5 + drivers/net/ethernet/sun/Makefile | 1 + drivers/net/ethernet/sun/sunvnet.c | 1755 +---------------------------- drivers/net/ethernet/sun/sunvnet.h | 114 -- drivers/net/ethernet/sun/sunvnet_common.c | 1753 ++++++++++++++++++++++++++++ drivers/net/ethernet/sun/sunvnet_common.h | 133 +++ 6 files changed, 1917 insertions(+), 1844 deletions(-) commit 040e3abbb958f5a038c16c1af7258e396303c2e1 Merge: f7813ad 55ff8cf Author: Linus Torvalds Date: Fri Mar 18 16:19:15 2016 -0700 Merge tag 'usb-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here is a USB fix for the reported issue with commit 69bec7259853 ("USB: core: let USB device know device node") as well as some other issues that have been reported so far with this merge window" * tag 'usb-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: uas: Reduce can_queue to MAX_CMNDS USB: cdc-acm: more sanity checking USB: usb_driver_claim_interface: add sanity checking usb/core: usb_alloc_dev(): fix setting of ->portnum USB: iowarrior: fix oops with malicious USB descriptors commit 1e6bb1a3540fec3ef112b9a89dda88e684c3ff59 Author: Yuval Mintz Date: Tue Mar 15 19:52:04 2016 +0200 bnx2x: Prevent false warning for lack of FC NPIV Not all adapters have FC-NPIV configured. If bnx2fc is used with such an adapter, driver would read irrelevant data from the the nvram and log "FC-NPIV table with bad length..." In system logs. Simply accept that reading '0' as the feature offset in nvram indicates the feature isn't there and return. Reported-by: Andrew Patterson Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 38c848c73180fb1d142a39e664b6d9663751f6b2 Author: Yoshihiro Kaneko Date: Wed Mar 16 00:52:16 2016 +0900 ravb: fix result value overwrite The result value is overwritten by a return value of ravb_ptp_interrupt(). Signed-off-by: Yoshihiro Kaneko Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c9a266afefe137bff06bbe0fc48b4d3b3cb348c Author: Manish Chopra Date: Tue Mar 15 07:13:45 2016 -0400 qlge: Fix receive packets drop. When running small packets [length < 256 bytes] traffic, packets were being dropped due to invalid data in those packets which were delivered by the driver upto the stack. Using pci_dma_sync_single_for_cpu ensures copying latest and updated data into skb from the receive buffer. Signed-off-by: Sony Chacko Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 15c6ea6f81328b0071cf63fb00b324199a9b8647 Author: Arnd Bergmann Date: Tue Mar 15 22:44:31 2016 +0100 rtc: asm9260: remove incorrect __init/__exit annotations The probe and remove callbacks of the platform driver are marked __init and __exit, respectively. However, this is not a correct way to annotate them, as it will result in those sections to be discarded at link time or after boot, while we can actually call them again based on manual unbinding, or deferred probing. Kbuild warns about the problem: WARNING: drivers/rtc/rtc-asm9260.o(.data+0x0): Section mismatch in reference from the variable asm9260_rtc_driver to the function .init.text:asm9260_rtc_probe() This removes the annotations, so we no longer branch into missing code and avoid the warning. Signed-off-by: Arnd Bergmann Fixes: 125e550fd257 ("rtc: add Alphascale asm9260 driver") Signed-off-by: Alexandre Belloni drivers/rtc/rtc-asm9260.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcebd81d00a062af5a4cf900b08c8ca22a26d52f Author: Stefan Christ Date: Tue Mar 15 14:22:26 2016 +0100 rtc: m41t80: avoid out of range year values Avoid saving an out of range year value to the RTC. Reading that value from the RTC again returns a totally wrong time value. For Example $ timedatectl set-ntp no $ timedatectl set-time "1990-01-01 12:12:00" # Reboot rtc-m41t80 0-0068: setting system clock to 2090-01-01 12:12:35 UTC (3786955955) Signed-off-by: Stefan Christ Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ae6e00b4c01f701a9a268adf35371c018396cd05 Author: Javier Martinez Canillas Date: Mon Mar 14 22:38:38 2016 -0300 rtc: s3c: Don't print an error on probe deferral The clock and source clock looked up by the driver may not be available just because the clock controller driver was not probed yet so printing an error in this case is not correct and only adds confusion to users. However, knowing that a driver's probe was deferred may be useful so it can be printed as a debug information. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s3c.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit cc2fa619a738a052eb90ccbbbc48947a2e2aa1d3 Author: Phil Reid Date: Tue Mar 15 15:34:33 2016 +0800 net: stmmac: Don't search for phys if mdio node is defined. If a dt mdio entry has been added least assume that we wont search for phys attached. The DT and of_mdiobus_register already do this. This stops DSA phys being found and phys created for them, as this is handled by the DSA driver. Signed-off-by: Phil Reid Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 48e77422a3cb74e04384090e21235f4916278373 Author: Dan Carpenter Date: Tue Mar 15 10:19:04 2016 +0300 mediatek: unlock on error in mtk_tx_map() There was a missing unlock on the error path. Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet') Signed-off-by: Dan Carpenter Acked-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) commit 977bc20cf66367a530d17696f7e1783510a115b7 Author: Dan Carpenter Date: Tue Mar 15 10:18:49 2016 +0300 mediatek: checking for IS_ERR() instead of NULL of_phy_connect() returns NULL on error, it never returns error pointers. Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet') Signed-off-by: Dan Carpenter Acked-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 fe3a5f6c795810edb1646a840fec3c8c350c2a4e Author: Simon Horman Date: Tue Mar 15 12:00:35 2016 +0900 openvswitch: allow output of MPLS packets on tunnel vports Currently output of MPLS packets on tunnel vports is not allowed by Open vSwitch. This is because historically encapsulation was done in such a way that the inner_protocol field of the skb needed to hold the inner protocol for both MPLS and tunnel encapsulation in order for GSO segmentation to be performed correctly. Since b2acd1dc3949 ("openvswitch: Use regular GRE net_device instead of vport") Open vSwitch makes use of lwt to output to tunnel netdevs which perform encapsulation. As no drivers expose support for MPLS offloads this means that GSO packets are segmented in software by validate_xmit_skb(), which is called from __dev_queue_xmit(), before tunnel encapsulation occurs. This means that the inner protocol of MPLS is no longer needed by the time encapsulation occurs and the contention on the inner_protocol field of the skb no longer occurs. Thus it is now safe to output MPLS to tunnel vports. Signed-off-by: Simon Horman Reviewed-by: Jesse Gross Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 3 --- 1 file changed, 3 deletions(-) commit d07a147f00de303c799af3427d4e2d612902a7d3 Author: David Daney Date: Mon Mar 14 17:57:08 2016 -0700 netdev: Move octeon/octeon_mgmt driver to cavium directory. No code changes. Since OCTEON is a Cavium product, move the driver to the vendor directory to unclutter things a bit. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/Kconfig | 1 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/cavium/Kconfig | 11 + drivers/net/ethernet/cavium/Makefile | 1 + drivers/net/ethernet/cavium/octeon/Makefile | 5 + drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 1593 ++++++++++++++++++++++ drivers/net/ethernet/octeon/Kconfig | 14 - drivers/net/ethernet/octeon/Makefile | 5 - drivers/net/ethernet/octeon/octeon_mgmt.c | 1593 ---------------------- 9 files changed, 1610 insertions(+), 1614 deletions(-) commit e014e8468552236f0f0cb64c7c341c1dce506070 Author: Wu Fengguang Date: Sat Mar 19 00:54:50 2016 +0800 ovs: internal_set_rx_headroom() can be static Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller net/openvswitch/vport-internal_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b73f96fcb49ec90c2f837719893e7b25fcdf08d8 Author: Wu Fengguang Date: Fri Mar 18 23:27:28 2016 +0800 net: dst_cache_per_cpu_dst_set() can be static Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller net/core/dst_cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 741f3a69f101250dc6b171b88e14ea51b099b1a9 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Oct 19 21:10:26 2015 +0300 tracing: Remove redundant reset per-CPU buff in irqsoff tracer There is no reason to do it twice: from commit b6f11df26fdc28 ("trace: Call tracing_reset_online_cpus before tracer->init()") resetting of per-CPU buffers done before tracer->init() call. tracer->init() calls {irqs,preempt,preemptirqs}off_tracer_init() and it calls __irqsoff_tracer_init(), which resets per-CPU ringbuffer second time. It's slowpath, but anyway. Link: http://lkml.kernel.org/r/1445278226-16187-1-git-send-email-0x7f454c46@gmail.com Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Steven Rostedt kernel/trace/trace_irqsoff.c | 1 - 1 file changed, 1 deletion(-) commit 93a9ff151754fbdf951b1b993bcf96453f6e36b3 Author: Takashi Iwai Date: Fri Mar 18 19:45:13 2016 +0100 ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI snd_hdac_sync_audio_rate() call is mandatory only for HSW and later models, but we call the function unconditionally blindly assuming that the function doesn't do anything harmful. But since recently, the function checks the validity of the passed pin NID, and eventually spews the warning if an unexpected pin is passed. This is seen on old chips like Baytrail. The fix is to limit the call of this function again only for the chips with the proper binding. This can be identified by the same flag as the eld notifier. Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Cc: # v4.5 Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8b23a8ce1094f25a85826e25217c5b9779a4f5aa Merge: f938128 ed782b5 d6785d9 8e0b60b Author: Al Viro Date: Fri Mar 18 16:07:38 2016 -0400 Merge branches 'work.lookups', 'work.misc' and 'work.preadv2' into for-next commit d6785d9152147596f60234157da2b02540c3e60f Author: Rabin Vincent Date: Thu Mar 10 21:19:06 2016 +0100 splice: handle zero nr_pages in splice_to_pipe() Running the following command: busybox cat /sys/kernel/debug/tracing/trace_pipe > /dev/null with any tracing enabled pretty very quickly leads to various NULL pointer dereferences and VM BUG_ON()s, such as these: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: [] generic_pipe_buf_release+0xc/0x40 Call Trace: [] splice_direct_to_actor+0x143/0x1e0 [] ? generic_pipe_buf_nosteal+0x10/0x10 [] do_splice_direct+0x8f/0xb0 [] do_sendfile+0x199/0x380 [] SyS_sendfile64+0x90/0xa0 [] entry_SYSCALL_64_fastpath+0x12/0x6d page dumped because: VM_BUG_ON_PAGE(atomic_read(&page->_count) == 0) kernel BUG at include/linux/mm.h:367! invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC RIP: [] generic_pipe_buf_release+0x3c/0x40 Call Trace: [] splice_direct_to_actor+0x143/0x1e0 [] ? generic_pipe_buf_nosteal+0x10/0x10 [] do_splice_direct+0x8f/0xb0 [] do_sendfile+0x199/0x380 [] SyS_sendfile64+0x90/0xa0 [] tracesys_phase2+0x84/0x89 (busybox's cat uses sendfile(2), unlike the coreutils version) This is because tracing_splice_read_pipe() can call splice_to_pipe() with spd->nr_pages == 0. spd_pages underflows in splice_to_pipe() and we fill the page pointers and the other fields of the pipe_buffers with garbage. All other callers of splice_to_pipe() avoid calling it when nr_pages == 0, and we could make tracing_splice_read_pipe() do that too, but it seems reasonable to have splice_to_page() handle this condition gracefully. Cc: stable@vger.kernel.org Signed-off-by: Rabin Vincent Reviewed-by: Christoph Hellwig Signed-off-by: Al Viro fs/splice.c | 3 +++ 1 file changed, 3 insertions(+) commit 9d2099ab054558af0b3d4860b68a11aff420aa40 Author: Li Bin Date: Mon Dec 28 16:35:07 2015 +0800 x86: ftrace: Fix the misleading comment for arch/x86/kernel/ftrace.c Fix the misleading comment for arch/x86/kernel/ftrace.c that it had used nop instead of jmp. Signed-off-by: Li Bin Signed-off-by: Steven Rostedt arch/x86/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a29054d9478d0435ab01b7544da4f674ab13f533 Author: Steven Rostedt (Red Hat) Date: Fri Mar 18 15:46:48 2016 -0400 tracing: Fix crash from reading trace_pipe with sendfile If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to fix this in the splice_to_pipe() code, but it's also a good idea to not let that happen from trace_pipe either. Link: http://lkml.kernel.org/r/1457641146-9068-1-git-send-email-rabin@rab.in Cc: stable@vger.kernel.org # 2.6.30+ Reported-by: Rabin Vincent Signed-off-by: Steven Rostedt kernel/trace/trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ba08311647892cc7912de74525fd78416caf544a Author: Hannes Reinecke Date: Fri Mar 18 14:55:38 2016 +0100 scsi_common: do not clobber fixed sense information For fixed sense the information field is 32 bits, to we need to truncate the information field to avoid clobbering the sense code. Fixes: a1524f226a02 ("libata-eh: Set 'information' field for autosense") Cc: #v4.1+ Signed-off-by: Hannes Reinecke Reviewed-by: Lee Duncan Reviewed-by: Bart Van Assche Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/scsi_common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit c80fa12e6d4ab07b6aff9be1b3be7df265b9497b Author: Arnd Bergmann Date: Thu Mar 17 13:29:52 2016 +0100 scsi: ufs: select CONFIG_NLS A recent change to ufshcd introduced a call to utf16s_to_utf8s, a function that is provided by the NLS module, so we get a link error when that is not present: drivers/scsi/built-in.o: In function `ufshcd_read_string_desc': :(.text+0x124d0): undefined reference to `utf16s_to_utf8s' This adds a Kconfig 'select' statement to avoid the build error. Signed-off-by: Arnd Bergmann Fixes: b573d484e4ff ("scsi: ufs: add support to read device and string descriptors") Signed-off-by: Martin K. Petersen drivers/scsi/ufs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ef3fb2422ffe92ead0579c21a02095b329434900 Author: Arnd Bergmann Date: Wed Mar 16 17:39:17 2016 +0100 scsi: fc: use get/put_unaligned64 for wwn access A bug in the gcc-6.0 prerelease version caused at least one driver (lpfc) to have excessive stack usage when dealing with wwn data, on the ARM architecture. lpfc_scsi.c: In function 'lpfc_find_next_oas_lun': lpfc_scsi.c:117:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] I have reported this as a gcc regression in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70232 However, using a better implementation of wwn_to_u64() not only helps with the particular gcc problem but also leads to better object code for any version or architecture. The kernel already provides get_unaligned_be64() and put_unaligned_be64() helper functions that provide an optimized implementation with the desired semantics. The lpfc_find_next_oas_lun() function in the example that grew from 1146 bytes to 5144 bytes when moving from gcc-5.3 to gcc-6.0 is now 804 bytes, as the optimized get_unaligned_be64() load can be done in three instructions. The stack usage is now down to 28 bytes from 128 bytes with gcc-5.3 before. Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinicke Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen include/scsi/scsi_transport_fc.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 14cee5b4de4b9e01438d58d1806e7eef78720405 Author: Maurizio Lombardi Date: Wed Mar 16 14:44:08 2016 +0100 fnic: move printk()s outside of the critical code section. This patch moves a printk() outside of the code section where interrupt are disabled. In some cases a flood of error messages may cause a kernel panic. It also removes one of the printk()s because the same error message was printed twice. [709686.317197] Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 12 [709686.317200] CPU: 12 PID: 1963 Comm: systemd-journal Tainted: GF O-------------- 3.10.0-229.el7.x86_64 #1 [709686.317201] Hardware name: Cisco Systems Inc UCSB-B200-M3/UCSB-B200-M3, BIOS B200M3.2.2.3.6.030620151309 03/06/2015 [709686.317206] ffffffff8182b2e8 00000000392722ba ffff88046fcc5c48 ffffffff81603f36 [709686.317209] ffff88046fcc5cc8 ffffffff815fd7da 0000000000000010 ffff88046fcc5cd8 [709686.317211] ffff88046fcc5c78 00000000392722ba ffff88046fcc5c88 000000000000000c [709686.317212] Call Trace: [709686.317221] [] dump_stack+0x19/0x1b [709686.317223] [] panic+0xd8/0x1e7 [709686.317227] [] ? watchdog_enable_all_cpus.part.2+0x40/0x40 [709686.317229] [] watchdog_overflow_callback+0xc2/0xd0 [709686.317233] [] __perf_event_overflow+0xa1/0x250 [709686.317235] [] perf_event_overflow+0x14/0x20 [709686.317239] [] intel_pmu_handle_irq+0x1fd/0x410 [709686.317242] [] ? unmap_kernel_range_noflush+0x11/0x20 [709686.317246] [] ? ghes_copy_tofrom_phys+0x124/0x210 [709686.317249] [] perf_event_nmi_handler+0x2b/0x50 [709686.317251] [] nmi_handle.isra.0+0x69/0xb0 [709686.317252] [] do_nmi+0xd0/0x340 [709686.317256] [] end_repeat_nmi+0x1e/0x2e [709686.317260] [] ? memcpy+0xd/0x110 [709686.317263] [] ? memcpy+0xd/0x110 [709686.317265] [] ? memcpy+0xd/0x110 [709686.317269] <> [] ? vgacon_scroll+0x2d7/0x330 [709686.317273] [] scrup+0xfc/0x110 [709686.317275] [] lf+0xa0/0xb0 [709686.317278] [] vt_console_print+0x2d2/0x420 [709686.317283] [] call_console_drivers.constprop.15+0x91/0xf0 [709686.317287] [] console_unlock+0x3bf/0x400 [709686.317291] [] vprintk_emit+0x2b6/0x530 [709686.317294] [] printk_emit+0x44/0x5b [709686.317297] [] devkmsg_writev+0x158/0x1d0 [709686.317303] [] do_sync_readv_writev+0x79/0xd0 [709686.317307] [] do_readv_writev+0xce/0x260 [709686.317310] [] ? __sb_start_write+0x58/0x110 [709686.317314] [] vfs_writev+0x35/0x60 [709686.317318] [] SyS_writev+0x5c/0xd0 [709686.317322] [] system_call_fastpath+0x16/0x1b Signed-off-by: Maurizio Lombardi Reviewed-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bc7095a926b3148bdfc8b282474002abbda0f6b5 Author: Arnd Bergmann Date: Tue Mar 15 22:40:31 2016 +0100 qla2xxx: avoid maybe_uninitialized warning The qlt_check_reserve_free_req() function produces an incorrect warning when CONFIG_PROFILE_ANNOTATED_BRANCHES is set: drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_check_reserve_free_req': drivers/scsi/qla2xxx/qla_target.c:1887:3: error: 'cnt_in' may be used uninitialized in this function [-Werror=maybe-uninitialized] ql_dbg(ql_dbg_io, vha, 0x305a, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "qla_target(%d): There is no room in the request ring: vha->req->ring_index=%d, vha->req->cnt=%d, req_cnt=%d Req-out=%d Req-in=%d Req-Length=%d\n", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vha->vp_idx, vha->req->ring_index, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vha->req->cnt, req_cnt, cnt, cnt_in, vha->req->length); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/qla2xxx/qla_target.c:1887:3: error: 'cnt' may be used uninitialized in this function [-Werror=maybe-uninitialized] The problem is that gcc fails to track the state of the condition across an annotated branch. This slightly rearranges the code to move the second if() block into the first one, to avoid the warning while retaining the behavior of the code. Signed-off-by: Arnd Bergmann Acked-By: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_target.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3deb9438d34a09f6796639b652a01d110aca9f75 Author: Arnd Bergmann Date: Mon Mar 14 15:29:45 2016 +0100 megaraid_sas: add missing curly braces in ioctl handler gcc-6 found a dubious indentation in the megasas_mgmt_fw_ioctl function: drivers/scsi/megaraid/megaraid_sas_base.c: In function 'megasas_mgmt_fw_ioctl': drivers/scsi/megaraid/megaraid_sas_base.c:6658:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] kbuff_arr[i] = NULL; ^~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:6653:3: note: ...this 'if' clause, but it is not if (kbuff_arr[i]) ^~ The code is actually correct, as there is no downside in clearing a NULL pointer again. This clarifies the code and avoids the warning by adding extra curly braces. Signed-off-by: Arnd Bergmann Fixes: 90dc9d98f01b ("megaraid_sas : MFI MPT linked list corruption fix") Reviewed-by: Hannes Reinecke Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aeb6641f8ebdd61939f462a8255b316f9bfab707 Author: Arnd Bergmann Date: Mon Mar 14 15:29:44 2016 +0100 lpfc: fix misleading indentation gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array() call in lpfc_online(), which clearly doesn't look right: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online': drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] lpfc_destroy_vport_work_array(phba, vports); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not if (vports != NULL) ^~ Looking at the patch that introduced this code, it's clear that the behavior is correct and the indentation is wrong. This fixes the indentation and adds curly braces around the previous if() block for clarity, as that is most likely what caused the code to be misindented in the first place. Signed-off-by: Arnd Bergmann Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list") Reviewed-by: Sebastian Herbszt Reviewed-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 73cdf0c6ea9c597894924f3b91ad636389555c1b Author: Wang Nan Date: Fri Feb 26 09:31:49 2016 +0000 perf symbols: Record text offset in dso to calculate objdump address Store DSO's .text offset into DSO, used for VDSOs and will also be used for other needs, like handling kernel modules. Signed-off-by: Wang Nan Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Cody P Schafer Cc: He Kuang Cc: Jiri Olsa Cc: Kirill Smelkov Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-2-git-send-email-wangnan0@huawei.com [ Extracted from larger patch ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.h | 1 + tools/perf/util/symbol-elf.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit f7813ad5cbfd1fab2899914281b72a1ba0805c80 Merge: 12e7b0a 9f0257b Author: Linus Torvalds Date: Fri Mar 18 10:21:04 2016 -0700 Merge tag 'for-linus-4.6' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull IPMI updates from Corey Minyard: "Just some minor fixes, nothing big" * tag 'for-linus-4.6' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: do not probe ACPI devices if si_tryacpi is unset ipmi_si: Avoid a wrong long timeout on transaction done ipmi_si: Fix module parameter doc names ipmi_ssif: Fix logic around alert handling commit 12e7b0a62752234497de51356903f5f4e6bd2f77 Merge: 021f163 0343b2f Author: Linus Torvalds Date: Fri Mar 18 10:15:11 2016 -0700 Merge tag 'mfd-for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Freescale Touch Screen ADC - X-Powers AXP PMIC with RSB - TI TPS65086 Power Management IC (PMIC) New Device Support: - Supply device PCI IDs for Intel Broxton Fix-ups: - Move to clkdev_create() API; intel_quark_i2c_gpio - Complete re-write of TI's TPS65912 Power Management IC (PMIC) - Remove unnecessary function argument; axp20x - Separate out bus related code; axp20x - Coding Style changes; axp20x - Allow more drivers to be compiled as modules - Work around false positive 'used uninitialised' warning; db8500-prcmu Bug Fixes: - Remove do_div(); fsl-imx25-gcq - Fix driver init when built-in; tps65010 - Fix clock-unregister leak; intel-lpss" * tag 'mfd-for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (53 commits) mfd: intel-lpss: Pass I2C configuration via properties on BXT mfd: imx6sx: Add PCIe register definitions for iomuxc gpr mfd: ipaq-micro: Use __maybe_unused to hide pm functions mfd: max77686: Add max77802 to I2C device ID table mfd: max77686: Export OF module alias information mfd: max77686: Allow driver to be built as a module mfd: stmpe: Add the proper PWM resources mfd: tps65090: Set regmap config reg counts properly mfd: syscon: Return ENOTSUPP instead of ENOSYS when disabled mfd: as3711: Set regmap config reg counts properly mfd: rc5t583: Set regmap config reg counts properly gpio: tps65086: Add GPO driver for the TPS65086 PMIC mfd: mt6397: Add platform device ID table mfd: da9063: Fix missing volatile registers in the core regmap_range volatile lists mfd: mt6397: Add MT6323 support to MT6397 driver mfd: mt6397: Add support for different Slave types mfd: mt6397: int_con and int_status may vary in location dt-bindings: mfd: Add bindings for the MediaTek MT6323 PMIC mfd: da9062: Fix missing volatile registers in the core regmap_range volatile lists mfd: Add documentation for ACT8945A DT bindings ... commit 021f163d696caed5a336fa1569efdd22216da340 Merge: 9ea4463 222bde0 Author: Linus Torvalds Date: Fri Mar 18 10:05:46 2016 -0700 Merge tag 'sound-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "After a heavy storm by syzkaller in 4.5 cycle, we have relatively few changes in the core at this time while a lot of changes are found in the driver side, unsurprisingly. Below are some highlights: ALSA core: - A few more hardening in ALSA timer codes - An extension of sequencer API for advertising the card / pid - Small fixes in compress-offload and jack layers HD-audio: - Dynamic PCM assignment in HDMI/DP codec; preparation for upcoming DP-MST support - Lots of code refactoring for sharing with ASoC SKL driver - Regression fixes for Intel HDMI/DP - Fixups for CX20724 codec, Lenovo AiO USB-audio: - Add quirk_alias option to make quirk debugging easier - Fixes for possible Oops by malformed firmware Firewire: - Add support for FW-1804 in tascam driver - Improvements / changes in card registration, multi stream handling, etc for DICE - Lots of code refactoring ASoC: - Enhancements of still ongoing topology API - Lots of commits for Intel Skylake support including HDMI support - A few Intel Atom driver updates for recent devices - Lots of improvements to the Renesas drivers - Capture support for Qualcomm drivers - Support for TI DaVinci DRA7xxx devices - New machine drivers for Freescale systems with Cirrus CODECs, Mediatek systems with RT5650 CODECs - New CPU drivers for Allwinner S/PDIF controllers - New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514" * tag 'sound-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (291 commits) ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation ALSA: mixart: silence an uninitialized variable warning ALSA: usb-audio: Add sanity checks for endpoint accesses ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk() ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() ALSA: hda - Limit i915 HDMI binding only for HSW and later ALSA: hda - Fix unconditional GPIO toggle via automute ALSA: mixart: silence unitialized variable warnings ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_type ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41. ALSA: hda - Add new GPU codec ID 0x10de0082 to snd-hda ASoC: rsnd: add simplified module explanation ASoC: hdac_hdmi: Add broxton device ID ASoC: Intel: Bxtn: Add Broxton PCI ID ASoC: Intel: Skylake: Move Skylake dsp ops & loader ops ASoC: Intel: add dmabuffer to common sst_dsp ASoC: Intel: Skylake: Unstatify skl_dsp_enable_core ASoC: Intel: Skylake: Fix whitepsace issues ASoC: Intel: Skylake: Move module id defines ... commit bd48128539ab89986b24ad08ecd3e027dd1993a1 Author: Takashi Iwai Date: Fri Mar 18 18:01:53 2016 +0100 ALSA: hda - Fix forgotten HDMI monitor_present update We forgot to copy monitor_present value when updating the ELD information. This won't change the ELD retrieval and the jack notification behavior, but appears only in the proc output. In that sense, it's no fatal error, but a bug is a bug is a bug. Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit ca70c24fb17b161a6096c584238cf81f664db45d Author: Arnaldo Carvalho de Melo Date: Fri Mar 18 13:57:20 2016 -0300 tools: Move utilities.mak from perf to tools/scripts/ As it is used by several other tools, better move it outside tools/perf. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-34s9kue3xq9w5mijdmfrfx8s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/Makefile | 2 +- tools/lib/subcmd/Makefile | 2 +- tools/perf/Documentation/Makefile | 2 +- tools/perf/Makefile.perf | 2 +- tools/perf/config/Makefile | 2 +- tools/perf/config/utilities.mak | 179 -------------------------------------- tools/scripts/utilities.mak | 179 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 184 insertions(+), 184 deletions(-) commit cb86e05390debcc084cfdb0a71ed4c5dbbec517d Author: Steven Rostedt (Red Hat) Date: Fri Mar 18 12:27:43 2016 -0400 tracing: Have preempt(irqs)off trace preempt disabled functions Joel Fernandes reported that the function tracing of preempt disabled sections was not being reported when running either the preemptirqsoff or preemptoff tracers. This was due to the fact that the function tracer callback for those tracers checked if irqs were disabled before tracing. But this fails when we want to trace preempt off locations as well. Joel explained that he wanted to see funcitons where interrupts are enabled but preemption was disabled. The expected output he wanted: <...>-2265 1d.h1 3419us : preempt_count_sub <-irq_exit <...>-2265 1d..1 3419us : __do_softirq <-irq_exit <...>-2265 1d..1 3419us : msecs_to_jiffies <-__do_softirq <...>-2265 1d..1 3420us : irqtime_account_irq <-__do_softirq <...>-2265 1d..1 3420us : __local_bh_disable_ip <-__do_softirq <...>-2265 1..s1 3421us : run_timer_softirq <-__do_softirq <...>-2265 1..s1 3421us : hrtimer_run_pending <-run_timer_softirq <...>-2265 1..s1 3421us : _raw_spin_lock_irq <-run_timer_softirq <...>-2265 1d.s1 3422us : preempt_count_add <-_raw_spin_lock_irq <...>-2265 1d.s2 3422us : _raw_spin_unlock_irq <-run_timer_softirq <...>-2265 1..s2 3422us : preempt_count_sub <-_raw_spin_unlock_irq <...>-2265 1..s1 3423us : rcu_bh_qs <-__do_softirq <...>-2265 1d.s1 3423us : irqtime_account_irq <-__do_softirq <...>-2265 1d.s1 3423us : __local_bh_enable <-__do_softirq There's a comment saying that the irq disabled check is because there's a possible race that tracing_cpu may be set when the function is executed. But I don't remember that race. For now, I added a check for preemption being enabled too to not record the function, as there would be no race if that was the case. I need to re-investigate this, as I'm now thinking that the tracing_cpu will always be correct. But no harm in keeping the check for now, except for the slight performance hit. Link: http://lkml.kernel.org/r/1457770386-88717-1-git-send-email-agnel.joel@gmail.com Fixes: 5e6d2b9cfa3a "tracing: Use one prologue for the preempt irqs off tracer function tracers" Cc: stable@vget.kernel.org # 2.6.37+ Reported-by: Joel Fernandes Signed-off-by: Steven Rostedt kernel/trace/trace_irqsoff.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 413b321b32a802e3c755d264c5da5789ff8d6f46 Author: Masahiro Yamada Date: Wed Mar 9 14:25:43 2016 +0900 ARM: dts: uniphier: add pinmux node for I2C ch4 This will be needed for UniPhier PH1-LD11 and PH1-LD20 SoCs. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 090f41f406349bf444f35cceb5ee28ea1f567f0b Author: Masahiro Yamada Date: Fri Feb 26 16:18:36 2016 +0900 ARM: dts: uniphier: add @{address} to EEPROM node Just for consistent coding style. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-ref-daughter.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f8b8c60ec50ec9210e5f0c4873a054376d185b5 Author: Masahiro Yamada Date: Fri Feb 26 16:18:35 2016 +0900 ARM: dts: uniphier: add PH1-Pro4 Sanji board support Initial commit for PH1-Pro4 Sanji board support. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts | 108 ++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit 9ea446352047d8350553250db51da2c73a610688 Merge: 9dffdb3 082eaa5 Author: Linus Torvalds Date: Fri Mar 18 09:39:22 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "Initial roundup of 4.6 merge window patches. This is the first of two pull requests. It is the smaller request, but touches for more different things (this is everything but what is in or going into staging). The pull request for the code in staging/rdma is on hold until after we decide what to do on the write/writev API issue and may be partially deferred until 4.7 as a result. Summary: - cxgb4 updates - nes updates - unification of iwarp portmapper code to core - add drain_cq API - various ib_core updates - minor ipoib updates - minor mlx4 updates - more significant mlx5 updates (including a minor merge conflict with net-next tree...merge is simple to resolve and Stephen's resolution was confirmed by Mellanox) - trivial net/9p rdma conversion - ocrdma RoCEv2 update - srpt updates" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (85 commits) iwpm: crash fix for large connections test iw_cxgb3: support for iWARP port mapping iw_cxgb4: remove port mapper related code iw_nes: remove port mapper related code iwcm: common code for port mapper net/9p: convert to new CQ API IB/mlx5: Add support for don't trap rules net/mlx5_core: Introduce forward to next priority action net/mlx5_core: Create anchor of last flow table iser: Accept arbitrary sg lists mapping if the device supports it mlx5: Add arbitrary sg list support IB/core: Add arbitrary sg_list support IB/mlx5: Expose correct max_fast_reg_page_list_len IB/mlx5: Make coding style more consistent IB/mlx5: Convert UMR CQ to new CQ API IB/ocrdma: Skip using unneeded intermediate variable IB/ocrdma: Skip using unneeded intermediate variable IB/ocrdma: Delete unnecessary variable initialisations in 11 functions IB/core: Documentation fix in the MAD header file IB/core: trivial prink cleanup. ... commit d2522f9731f47878e8ba547f2de281a1c7f24c3a Author: Masahiro Yamada Date: Fri Feb 26 16:18:34 2016 +0900 ARM: dts: uniphier: add PH1-Pro4 Ace board support Initial commit for PH1-Pro4 Ace board support. Note: There are two variants for the amount of DDR memory; 1GB or 2GB. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts | 113 ++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) commit 4755723992bef91da119e6763c888d6a5da453ae Author: Masahiro Yamada Date: Fri Feb 26 16:18:33 2016 +0900 ARM: dts: uniphier: enable I2C channel 2 of ProXstream2 Gentil board This is used for on-board inter-connection. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-proxstream2-gentil.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 3bdf9e4271c337d75458514aa9d3d7b28aa43aea Author: Masahiro Yamada Date: Fri Feb 26 16:18:32 2016 +0900 ARM: dts: uniphier: add EEPROM node for ProXstream2 Gentil board This board has an EEPROM (STMicroelectronics M24C64-WMN6TP) connected to the I2C channel 0 of the SoC. Its slave address is 0x54. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-proxstream2-gentil.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 61f838c7faad95a5ae105a136e14d1c7b372c970 Author: Masahiro Yamada Date: Fri Feb 26 16:18:31 2016 +0900 ARM: dts: uniphier: add reference clock nodes Add master clock nodes generated by crystal oscillators. PH1-sLD3, PH1-LD4: 24.576 MHz PH1-Pro4, ProXstream2: 25.000 MHz PH1-Pro5: 20.000 MHz Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-common32.dtsi | 7 +++++++ arch/arm/boot/dts/uniphier-ph1-ld4.dtsi | 4 ++++ arch/arm/boot/dts/uniphier-ph1-pro4.dtsi | 4 ++++ arch/arm/boot/dts/uniphier-ph1-pro5.dtsi | 4 ++++ arch/arm/boot/dts/uniphier-ph1-sld3.dtsi | 6 ++++++ arch/arm/boot/dts/uniphier-ph1-sld8.dtsi | 4 ++++ arch/arm/boot/dts/uniphier-proxstream2.dtsi | 4 ++++ 7 files changed, 33 insertions(+) commit 14bae133b8712206d49d57574dc6a25d18b40dcf Author: Masahiro Yamada Date: Fri Feb 26 16:18:30 2016 +0900 ARM: dts: uniphier: rework UniPhier System Bus nodes During the review process of the UniPhier System Bus driver (drivers/bus/uniphier.c), the current binding of the System Bus Controller turned out to be no good. In order to make the driver really usable, we have to switch over to the new binding defined by Documentation/devicetree/bindings/bus/uniphier-system-bus.txt. The old binding will be still supported for a while to keep the backward compatibility. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-common32.dtsi | 20 +++++++++++--------- arch/arm/boot/dts/uniphier-ph1-sld3.dtsi | 20 +++++++++++--------- arch/arm/boot/dts/uniphier-support-card.dtsi | 3 ++- arch/arm64/boot/dts/socionext/uniphier-ph1-ld20.dtsi | 19 +++++++++++++------ 4 files changed, 37 insertions(+), 25 deletions(-) commit 5c5154e42905561ae51b300a884563f1a91eeb66 Author: Masahiro Yamada Date: Fri Feb 26 16:18:29 2016 +0900 ARM: dts: uniphier: factor out ranges property of support card This property is used in common by several boards. Move it to the common place (uniphier-support-card.dtsi). If necessary, each board can still override the property. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/boot/dts/uniphier-ph1-ld4-ref.dts | 8 -------- arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts | 8 -------- arch/arm/boot/dts/uniphier-ph1-pro4-ref.dts | 8 -------- arch/arm/boot/dts/uniphier-ph1-sld3-ref.dts | 8 -------- arch/arm/boot/dts/uniphier-ph1-sld8-ref.dts | 8 -------- arch/arm/boot/dts/uniphier-support-card.dtsi | 3 +++ arch/arm64/boot/dts/socionext/uniphier-ph1-ld20-ref.dts | 8 -------- 7 files changed, 3 insertions(+), 48 deletions(-) commit 65e43389c39467239f85301edd844dd2c6d24913 Author: Masahiro Yamada Date: Fri Feb 26 16:18:28 2016 +0900 arm64: dts: uniphier: rename PH1-LD10 to PH1-LD20 Due to the company's awful projecting, this chip has been renamed to PH1-LD20. It has not been shipped yet, this change would have no impact on our customers. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/socionext/Makefile | 2 +- .../boot/dts/socionext/uniphier-ph1-ld10-ref.dts | 95 ------- .../boot/dts/socionext/uniphier-ph1-ld10.dtsi | 280 --------------------- .../boot/dts/socionext/uniphier-ph1-ld20-ref.dts | 95 +++++++ .../boot/dts/socionext/uniphier-ph1-ld20.dtsi | 280 +++++++++++++++++++++ 5 files changed, 376 insertions(+), 376 deletions(-) commit 307d40c56b0c86315859ee724b51748260f50e65 Author: Masahiro Yamada Date: Fri Feb 26 16:16:08 2016 +0900 ARM: uniphier: rework SMP code to support new System Bus binding During the review process of the UniPhier System Bus driver (drivers/bus/uniphier.c), the current binding of the System Bus Controller turned out to be no good. In order to use the driver, some nodes in the device trees must be tweaked. It would also have impacts on the SMP code because the SMP related registers are located in the System Bus Controller block. This commit reworks the smp_operations to support the new binding, but still supports the old binding, too. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/mach-uniphier/platsmp.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 9eca796ee385ee61488fbe62fa83224e13abcfe0 Author: Masahiro Yamada Date: Fri Feb 26 16:16:07 2016 +0900 ARM: uniphier: add missing of_node_put() This node pointer is allocated by of_find_compatible_node() in this function. It should be put before exitting this function. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/mach-uniphier/platsmp.c | 1 + 1 file changed, 1 insertion(+) commit d30596737e8e7b2f1235d7ba20592b8309e3af04 Author: Cyan Ogilvie Date: Wed Mar 16 18:59:41 2016 +0200 HID: wiimote: Fix wiimote mp scale linearization The wiimote motion plus gyros use two scales to report fast and slow rotation - below 440 deg/s uses 8192/440 units / deg/s, and above uses 8192/2000 units / deg/s. Previously this driver attempted to linearize the two by scaling the fast rate by 18 and the slow by 9, but this results in a scale of 8192*9/440 = ~167.564 for slow and 8192*18/2000 = 73.728 for fast. Correct the fast motion scale factor so that both report ~167.564 units / deg/s Signed-off-by: Cyan Ogilvie Reviewed-by: David Herrmann Signed-off-by: Jiri Kosina drivers/hid/hid-wiimote-modules.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 55ff8cfbc4e12a7d2187df523938cc671fbebdd1 Author: Hans de Goede Date: Mon Mar 7 20:11:52 2016 +0100 USB: uas: Reduce can_queue to MAX_CMNDS The uas driver can never queue more then MAX_CMNDS (- 1) tags and tags are shared between luns, so there is no need to claim that we can_queue some random large number. Not claiming that we can_queue 65536 commands, fixes the uas driver failing to initialize while allocating the tag map with a "Page allocation failure (order 7)" error on systems which have been running for a while and thus have fragmented memory. Cc: stable@vger.kernel.org Reported-and-tested-by: Yves-Alexis Perez Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8835ba4a39cf53f705417b3b3a94eb067673f2c9 Author: Oliver Neukum Date: Tue Mar 15 10:14:04 2016 +0100 USB: cdc-acm: more sanity checking An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b818e3956fc1ad976bee791eadcbb3b5fec5bfd Author: Oliver Neukum Date: Wed Mar 16 13:26:17 2016 +0100 USB: usb_driver_claim_interface: add sanity checking Attacks that trick drivers into passing a NULL pointer to usb_driver_claim_interface() using forged descriptors are known. This thwarts them by sanity checking. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/core/driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7222c832254a75dcd67d683df75753d4a4e125bb Author: Nicolai Stange Date: Thu Mar 17 23:53:02 2016 +0100 usb/core: usb_alloc_dev(): fix setting of ->portnum With commit 69bec7259853 ("USB: core: let USB device know device node"), the port1 argument of usb_alloc_dev() gets overwritten as follows: ... usb_alloc_dev(..., unsigned port1) { ... if (!parent->parent) { port1 = usb_hcd_find_raw_port_number(..., port1); } ... } Later on, this now overwritten port1 gets assigned to ->portnum: dev->portnum = port1; However, since xhci_find_raw_port_number() isn't idempotent, the aforementioned commit causes a number of KASAN splats like the following: BUG: KASAN: slab-out-of-bounds in xhci_find_raw_port_number+0x98/0x170 at addr ffff8801d9311670 Read of size 8 by task kworker/2:1/87 [...] Workqueue: usb_hub_wq hub_event 0000000000000188 000000005814b877 ffff8800cba17588 ffffffff8191447e 0000000041b58ab3 ffffffff82a03209 ffffffff819143a2 ffffffff82a252f4 ffff8801d93115e0 0000000000000188 ffff8801d9311628 ffff8800cba17588 Call Trace: [] dump_stack+0xdc/0x15e [] ? _atomic_dec_and_lock+0xa2/0xa2 [] ? print_section+0x61/0xb0 [] print_trailer+0x179/0x2c0 [] object_err+0x34/0x40 [] kasan_report_error+0x2f8/0x8b0 [] ? __slab_alloc+0x5e/0x90 [] ? __lock_is_held+0x90/0x130 [] kasan_report+0x71/0xa0 [] ? kmem_cache_alloc_trace+0x212/0x560 [] ? xhci_find_raw_port_number+0x98/0x170 [] __asan_load8+0x64/0x70 [] xhci_find_raw_port_number+0x98/0x170 [] xhci_setup_addressable_virt_dev+0x235/0xa10 [] xhci_setup_device+0x3c1/0x1430 [] ? trace_hardirqs_on+0xd/0x10 [] ? xhci_setup_device+0x1430/0x1430 [] xhci_address_device+0x13/0x20 [] hub_port_init+0x55a/0x1550 [] hub_event+0xef5/0x24d0 [] ? hub_port_debounce+0x2f0/0x2f0 [] ? debug_object_deactivate+0x1be/0x270 [] ? print_rt_rq+0x53/0x2d0 [] ? trace_hardirqs_off+0xd/0x10 [] ? _raw_spin_unlock_irqrestore+0x5b/0x60 [] ? irq_domain_set_hwirq_and_chip+0x30/0xb0 [] ? debug_lockdep_rcu_enabled+0x39/0x40 [] ? __lock_is_held+0x90/0x130 [] process_one_work+0x567/0xec0 [...] Afterwards, xhci reports some functional errors: xhci_hcd 0000:00:14.0: ERROR: unexpected setup address command completion code 0x11. xhci_hcd 0000:00:14.0: ERROR: unexpected setup address command completion code 0x11. usb 4-3: device not accepting address 2, error -22 Fix this by not overwriting the port1 argument in usb_alloc_dev(), but storing the raw port number as required by OF in an additional variable, raw_port. Fixes: 69bec7259853 ("USB: core: let USB device know device node") Signed-off-by: Nicolai Stange Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4ec0ef3a82125efc36173062a50624550a900ae0 Author: Josh Boyer Date: Mon Mar 14 10:42:38 2016 -0400 USB: iowarrior: fix oops with malicious USB descriptors The iowarrior driver expects at least one valid endpoint. If given malicious descriptors that specify 0 for the number of endpoints, it will crash in the probe function. Ensure there is at least one endpoint on the interface before using it. The full report of this issue can be found here: http://seclists.org/bugtraq/2016/Mar/87 Reported-by: Ralf Spenneberg Cc: stable Signed-off-by: Josh Boyer Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 10c4de10b2624ab9d83bd8e708d39a1867302a6a Author: Christoph Hellwig Date: Wed Mar 9 15:43:27 2016 +0100 nfsd: block and scsi layout drivers need to depend on CONFIG_BLOCK Signed-off-by: Christoph Hellwig Reported-by: Randy Dunlap Signed-off-by: J. Bruce Fields fs/nfsd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f99d4fbdae6765d0bb4ed5441f6fa1f036122d59 Author: Christoph Hellwig Date: Fri Mar 4 20:46:17 2016 +0100 nfsd: add SCSI layout support This is a simple extension to the block layout driver to use SCSI persistent reservations for access control and fencing, as well as SCSI VPD pages for device identification. For this we need to pass the nfs4_client to the proc_getdeviceinfo method to generate the reservation key, and add a new fence_client method to allow for fence actions in the layout driver. Signed-off-by: Christoph Hellwig Signed-off-by: J. Bruce Fields Documentation/filesystems/nfs/pnfs-scsi-server.txt | 23 +++ fs/nfsd/Kconfig | 13 ++ fs/nfsd/Makefile | 1 + fs/nfsd/blocklayout.c | 208 ++++++++++++++++++++- fs/nfsd/blocklayoutxdr.c | 65 ++++++- fs/nfsd/blocklayoutxdr.h | 14 ++ fs/nfsd/nfs4layouts.c | 27 ++- fs/nfsd/nfs4proc.c | 6 +- fs/nfsd/pnfs.h | 6 + fs/xfs/Makefile | 1 + fs/xfs/xfs_pnfs.h | 2 +- 11 files changed, 358 insertions(+), 8 deletions(-) commit 368248eeb14d08823f1b53de83debd5fd6c108d2 Author: Christoph Hellwig Date: Fri Mar 4 20:46:17 2016 +0100 nfsd: move some blocklayout code Trivial reorganization, no change in behavior. Move some code around, pull some code out of block layoutcommit that will be useful for the scsi layout. [bfields@redhat.com: split off from "nfsd: add SCSI layout support"] Signed-off-by: J. Bruce Fields fs/nfsd/blocklayout.c | 90 ++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 40 deletions(-) commit 81c39329010d6131c0909ccb91ffeaffc2e99010 Author: Christoph Hellwig Date: Fri Mar 4 20:46:16 2016 +0100 nfsd: add a new config option for the block layout driver Split the config symbols into a generic pNFS one, which is invisible and gets selected by the layout drivers, and one for the block layout driver. Signed-off-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/Kconfig | 13 +++++++++---- fs/nfsd/Makefile | 3 ++- fs/nfsd/nfs4layouts.c | 4 ++++ fs/nfsd/pnfs.h | 2 ++ fs/xfs/Makefile | 2 +- fs/xfs/xfs_export.c | 2 +- fs/xfs/xfs_pnfs.h | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) commit d9186c03976506cde2c2b1219028bed449c948ed Author: Christoph Hellwig Date: Fri Mar 4 20:46:15 2016 +0100 nfs/blocklayout: add SCSI layout support This is a trivial extension to the block layout driver to support the new SCSI layouts draft. There are three changes: - device identifcation through the SCSI VPD page. This allows us to directly use the udev generated persistent device names instead of requiring an expensive lookup by crawling every block device node in /dev and reading a signature for it. - use of SCSI persistent reservations to protect device access and allow for robust fencing. On the client sides this just means registering and unregistering a server supplied key. - an optimized LAYOUTCOMMIT payload that doesn't send unessecary fields to the server. Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfs/blocklayout/blocklayout.c | 59 ++++++++++++++-- fs/nfs/blocklayout/blocklayout.h | 14 +++- fs/nfs/blocklayout/dev.c | 144 ++++++++++++++++++++++++++++++++++++++- fs/nfs/blocklayout/extent_tree.c | 44 ++++++++---- fs/nfs/blocklayout/rpc_pipefs.c | 2 +- 5 files changed, 238 insertions(+), 25 deletions(-) commit c3efb42b207e22991dee86ca15861ede11a419fc Author: Vinod Koul Date: Fri Mar 18 20:10:23 2016 +0530 ASoC: Intel: Skylake: Fix kbuild dependency The Skylake driver selects SND_HDA_I915 which causes kbuild to spew warning: warning: (SND_SOC_INTEL_SKYLAKE) selects SND_HDA_I915 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && DRM_I915 && SND_HDA_CORE) The SND_HDA_I915 should not be selected so drop that. Reported-by: Takashi Iwai Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 886f6f8337dd506e9ae0e45ee13eef3a0ceebd03 Author: David Daney Date: Fri Mar 18 09:46:29 2016 +0100 i2c: octeon: Support I2C_M_RECV_LEN If I2C_M_RECV_LEN is set consider the length byte. Signed-off-by: David Daney Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 54108e56a8339018284c81cf8dcde66afc7e42c1 Author: Jan Glauber Date: Fri Mar 18 09:46:27 2016 +0100 i2c: octeon: Cleanup resource allocation code Remove resource values from struct i2c_octeon and use devm_ioremap_resource helper. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit dfcd821218c958dbc3e74566ccf5f362f517e279 Author: Jan Glauber Date: Fri Mar 18 09:46:26 2016 +0100 i2c: octeon: Cleanup i2c-octeon driver Cleanup only without functional change. - removed DRV_VERSION - defines: use defines instead of plain values, use BIT_ULL macro, add comments - rename waitqueue return value to time_left - sort local variables by length - fix indentation and whitespace errors - make function return void if the result is not used (octeon_i2c_stop, octeon_i2c_set_clock) - remove debug code from octeon_i2c_stop - renamed some functions for readability - update copyright Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 190 ++++++++++++++++++---------------------- 1 file changed, 84 insertions(+), 106 deletions(-) commit 5027e19db8cee24e189f8afa53b548e1ac5d0c1d Author: Fabio Estevam Date: Fri Mar 4 19:12:01 2016 -0300 of: Add vendor prefix for eGalax_eMPIA Technology Inc eGalax_eMPIA Technology Inc (EETI) is a company specialized in touchscreen controller solutions. Signed-off-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit c8ca003b2fde177b83de87f9f20f6a5933fb50bf Author: Chunyu Hu Date: Mon Mar 14 20:35:41 2016 +0800 tracing: Fix return while holding a lock in register_tracer() commit d39cdd2036a6 ("tracing: Make tracer_flags use the right set_flag callback") introduces a potential mutex deadlock issue, as it forgets to free the mutex when allocaing the tracer_flags gets fail. The issue was found by Dan Carpenter through Smatch static code check tool. Link: http://lkml.kernel.org/r/1457958941-30265-1-git-send-email-chuhu@redhat.com Fixes: d39cdd2036a6 ("tracing: Make tracer_flags use the right set_flag callback") Reported-by: Dan Carpenter Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt kernel/trace/trace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6363c6b599ae67b779d01a48642a7c0d7d721814 Author: Geliang Tang Date: Tue Mar 15 22:12:34 2016 +0800 ftrace: Use kasprintf() in ftrace_profile_tracefs() Use kasprintf() instead of kmalloc() and snprintf(). Link: http://lkml.kernel.org/r/135a7bc36e51fd9eaa57124dd2140285b771f738.1458050835.git.geliangtang@163.com Acked-by: Namhyung Kim Signed-off-by: Geliang Tang Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7f50d06bb6b825d34f069c6c7a1aab96ad0b94d9 Author: Jiri Olsa Date: Wed Mar 16 15:34:33 2016 +0100 ftrace: Update dynamic ftrace calls only if necessary Currently dynamic ftrace calls are updated any time the ftrace_ops is un/registered. If we do this update only when it's needed, we save lot of time for perf system wide ftrace function sampling/counting. The reason is that for system wide sampling/counting, perf creates event for each cpu in the system. Each event then registers separate copy of ftrace_ops, which ends up in FTRACE_UPDATE_CALLS updates. On servers with many cpus that means serious stall (240 cpus server): Counting: # time ./perf stat -e ftrace:function -a sleep 1 Performance counter stats for 'system wide': 370,663 ftrace:function 1.401427505 seconds time elapsed real 3m51.743s user 0m0.023s sys 3m48.569s Sampling: # time ./perf record -e ftrace:function -a sleep 1 [ perf record: Woken up 0 times to write data ] Warning: Processed 141200 events and lost 5 chunks! [ perf record: Captured and wrote 10.703 MB perf.data (135950 samples) ] real 2m31.429s user 0m0.213s sys 2m29.494s There's no reason to do the FTRACE_UPDATE_CALLS update for each event in perf case, because all the ftrace_ops always share the same filter, so the updated calls are always the same. It's required that only first ftrace_ops registration does the FTRACE_UPDATE_CALLS update (also sometimes the second if the first one used the trampoline), but the rest can be only cheaply linked into the ftrace_ops list. Counting: # time ./perf stat -e ftrace:function -a sleep 1 Performance counter stats for 'system wide': 398,571 ftrace:function 1.377503733 seconds time elapsed real 0m2.787s user 0m0.005s sys 0m1.883s Sampling: # time ./perf record -e ftrace:function -a sleep 1 [ perf record: Woken up 0 times to write data ] Warning: Processed 261730 events and lost 9 chunks! [ perf record: Captured and wrote 19.907 MB perf.data (256293 samples) ] real 1m31.948s user 0m0.309s sys 1m32.051s Link: http://lkml.kernel.org/r/1458138873-1553-6-git-send-email-jolsa@kernel.org Acked-by: Namhyung Kim Signed-off-by: Jiri Olsa Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 84b6d3e6149c5280bc18b42e2f12efdaf354e49c Author: Jiri Olsa Date: Wed Mar 16 15:34:32 2016 +0100 ftrace: Make ftrace_hash_rec_enable return update bool Change __ftrace_hash_rec_update to return true in case we need to update dynamic ftrace call records. It return false in case no update is needed. Link: http://lkml.kernel.org/r/1458138873-1553-5-git-send-email-jolsa@kernel.org Acked-by: Namhyung Kim Signed-off-by: Jiri Olsa Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 691be973c0621255abb31572a98e35c57be70212 Author: Takashi Iwai Date: Fri Mar 18 15:10:08 2016 +0100 ALSA: hda - Really restrict i915 notifier to HSW+ The commit [b62232d429fa: ALSA: hda - Limit i915 HDMI binding only for HSW and later] tried to limit the usage of i915 audio notifier to the recent Intel models and switch to the old method on pre-Haswell models. However, it assumed that the i915 component binding hasn't been done on such models, and the assumption was wrong: namely, Baytrail had already the i915 component binding due to powerwell control. Thus, the workaround wasn't applied to Baytrail. For fixing this properly, this patch introduces a new flag indicating the usage of audio notifier and codec_has_acomp() refers to this flag instead of checking the existence of audio component. Reported-by: Ville Syrjälä Cc: # v4.5 Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 551adc60573cb68e3d55cacca9ba1b7437313df7 Author: Thomas Gleixner Date: Mon Mar 14 09:40:46 2016 +0100 x86/irq: Cure live lock in fixup_irqs() Harry reported, that he's able to trigger a system freeze with cpu hot unplug. The freeze turned out to be a live lock caused by recent changes in irq_force_complete_move(). When fixup_irqs() and from there irq_force_complete_move() is called on the dying cpu, then all other cpus are in stop machine an wait for the dying cpu to complete the teardown. If there is a move of an interrupt pending then irq_force_complete_move() sends the cleanup IPI to the cpus in the old_domain mask and waits for them to clear the mask. That's obviously impossible as those cpus are firmly stuck in stop machine with interrupts disabled. I should have known that, but I completely overlooked it being concentrated on the locking issues around the vectors. And the existance of the call to __irq_complete_move() in the code, which actually sends the cleanup IPI made it reasonable to wait for that cleanup to complete. That call was bogus even before the recent changes as it was just a pointless distraction. We have to look at two cases: 1) The move_in_progress flag of the interrupt is set This means the ioapic has been updated with the new vector, but it has not fired yet. In theory there is a race: set_ioapic(new_vector) <-- Interrupt is raised before update is effective, i.e. it's raised on the old vector. So if the target cpu cannot handle that interrupt before the old vector is cleaned up, we get a spurious interrupt and in the worst case the ioapic irq line becomes stale, but my experiments so far have only resulted in spurious interrupts. But in case of cpu hotplug this should be a non issue because if the affinity update happens right before all cpus rendevouz in stop machine, there is no way that the interrupt can be blocked on the target cpu because all cpus loops first with interrupts enabled in stop machine, so the old vector is not yet cleaned up when the interrupt fires. So the only way to run into this issue is if the delivery of the interrupt on the apic/system bus would be delayed beyond the point where the target cpu disables interrupts in stop machine. I doubt that it can happen, but at least there is a theroretical chance. Virtualization might be able to expose this, but AFAICT the IOAPIC emulation is not as stupid as the real hardware. I've spent quite some time over the weekend to enforce that situation, though I was not able to trigger the delayed case. 2) The move_in_progress flag is not set and the old_domain cpu mask is not empty. That means, that an interrupt was delivered after the change and the cleanup IPI has been sent to the cpus in old_domain, but not all CPUs have responded to it yet. In both cases we can assume that the next interrupt will arrive on the new vector, so we can cleanup the old vectors on the cpus in the old_domain cpu mask. Fixes: 98229aa36caa "x86/irq: Plug vector cleanup race" Reported-by: Harry Junior Tested-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Joe Lawrence Cc: Borislav Petkov Cc: Ben Hutchings Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1603140931430.3657@nanos Signed-off-by: Thomas Gleixner arch/x86/include/asm/hw_irq.h | 1 + arch/x86/kernel/apic/vector.c | 88 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 71 insertions(+), 18 deletions(-) commit f508a5ba7a4570418df6cfd68fe663ffdef2be63 Author: Thomas Gleixner Date: Fri Mar 18 08:35:29 2016 +0100 x86/tsc: Prevent NULL pointer deref in calibrate_delay_is_known() The topology_core_cpumask is used to find a neighbour cpu in calibrate_delay_is_known(). It might not be allocated at the first invocation of that function on the boot cpu, when CONFIG_CPUMASK_OFFSTACK is set. The mask is allocated later in native_smp_prepare_cpus. As a consequence the underlying find_next_bit() call dereferences a NULL pointer. Add a proper check to prevent this. Fixes: c25323c07345 "x86/tsc: Use topology functions" Reported-and-tested-by: Richard W.M. Jones Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Boyer Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1603180843270.3978@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/tsc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7834c10313fb823e538f2772be78edcdeed2e6e3 Author: Dave Jones Date: Mon Mar 14 21:20:54 2016 -0400 x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() Since 4.4, I've been able to trigger this occasionally: =============================== [ INFO: suspicious RCU usage. ] 4.5.0-rc7-think+ #3 Not tainted Cc: Andi Kleen Link: http://lkml.kernel.org/r/20160315012054.GA17765@codemonkey.org.uk Signed-off-by: Thomas Gleixner ------------------------------- ./arch/x86/include/asm/msr-trace.h:47 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 = 1 RCU used illegally from extended quiescent state! no locks held by swapper/3/0. stack backtrace: CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.5.0-rc7-think+ #3 ffffffff92f821e0 1f3e5c340597d7fc ffff880468e07f10 ffffffff92560c2a ffff880462145280 0000000000000001 ffff880468e07f40 ffffffff921376a6 ffffffff93665ea0 0000cc7c876d28da 0000000000000005 ffffffff9383dd60 Call Trace: [] dump_stack+0x67/0x9d [] lockdep_rcu_suspicious+0xe6/0x100 [] do_trace_write_msr+0x127/0x1a0 [] native_apic_msr_eoi_write+0x23/0x30 [] smp_trace_call_function_interrupt+0x38/0x360 [] trace_call_function_interrupt+0x90/0xa0 [] ? cpuidle_enter_state+0x1b4/0x520 Move the entering_irq() call before ack_APIC_irq(), because entering_irq() tells the RCU susbstems to end the extended quiescent state, so that the following trace call in ack_APIC_irq() works correctly. Suggested-by: Andi Kleen Fixes: 4787c368a9bc "x86/tracing: Add irq_enter/exit() in smp_trace_reschedule_interrupt()" Signed-off-by: Dave Jones Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org arch/x86/include/asm/apic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47325078f2a3e543150e7df967e45756b2fff7ec Author: Mark Brown Date: Fri Mar 18 12:04:23 2016 +0000 ASoC: dapm: Make sure we have a card when displaying component widgets The dummy component is reused for all cards so we special case and don't bind it to any of them. This means that code like that displaying the component widgets that tries to look at the card will crash. In the future we will fix this by ensuring that the dummy component looks like other components but that is invasive and so not suitable for a fix. Instead add a special case check here. Reported-by: Harry Pan Suggested-by: Lars-Peter Clausen Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/soc-dapm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9f0257b39c138330fec96e0f8f1a0135c1f0b6a5 Author: Joe Lawrence Date: Thu Feb 18 16:02:54 2016 -0500 ipmi: do not probe ACPI devices if si_tryacpi is unset Extend the tryacpi module parameter to turn off acpi_ipmi_probe such that hard-coded options (type, ports, address, etc.) have complete control over the smi_info data structures setup by the driver. Signed-off-by: Joe Lawrence Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 3 +++ 1 file changed, 3 insertions(+) commit d9dffd2a0bd84039f1b4f7e8835f1b0bbde0b3a7 Author: Corey Minyard Date: Mon Jan 25 16:11:20 2016 -0600 ipmi_si: Avoid a wrong long timeout on transaction done Under some circumstances, the IPMI state machine could return a call without delay option but the driver would still do a long delay because the result wasn't checked. Instead of calling the state machine after transaction done, just go back to the top of the processing to start over. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f813655a36830c54111763ba1acdbb0fe35813d9 Author: Corey Minyard Date: Tue Jan 19 14:51:53 2016 -0600 ipmi_si: Fix module parameter doc names Several were tryacpi instead of their actual values. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21c8f9154d9b3d2d84b619c2afdb6965f9d57975 Author: Corey Minyard Date: Wed Jan 6 09:32:06 2016 -0600 ipmi_ssif: Fix logic around alert handling There was a mistake in the logic, if an alert came in very quickly it would hang the driver. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit a69fe1a2c9b2bd35046cb8f4e61337825cef9239 Author: Vineet Gupta Date: Fri Mar 18 13:58:01 2016 +0530 ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8 linux-next has been reporting gazillion warnings for ARC build and I finally decided to take a bite: http://kisskb.ellerman.id.au/kisskb/buildresult/12638735/ Most of the them are due to -Wmaybe-uninitialized | ../kernel/sysctl.c: In function '__do_proc_doulongvec_minmax': | ../kernel/sysctl.c:1928:12: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized] | ret = tmp - *buf; | ^ | ../kernel/sysctl.c:2342:29: note: 'p' was declared here | char *kbuf = NULL, *p; | ^ | ... | ... Cursory look at code seemed fine and a definite gcc false positive in say kernel/sysctl.c Mystery was why only for ARC (and not with ARM linaro toolchain based off same gcc 4.8). Turns out that -O3 (default for ARC) triggers these and if I enable -O3 for ARM kernel build, I see the same splat. I initially wanted to disable this only for gcc 4.8, but Arnd reported it is seen even on gcc 6.0 for ARM with -O3. Thus better to disable this independent of gcc version. Cc: Claudiu Zissulescu Cc: Arnd Bergmann Cc: Michal Marek Cc: Geert Uytterhoeven Cc: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 24c8cd1b081286fd34340f0e1fc68a774a5a775f Author: Heiko Stübner Date: Fri Mar 18 11:15:11 2016 +0100 spi: fix possible deadlock between internal bus locks and bus_lock_flag External users may use spi_bus_lock to get exclusive access. This will also grab the bus_lock_mutex and may therefore result in a deadlock if __spi_pump_messages also tries to get the mutex. Therefore adapt spi_pump_messages as well as spi_sync to preset the bus_locked parameter according to the master->bus_lock_flag. Fixes: 49023d2e4ead ("spi: core: Fix deadlock when sending messages") Signed-off-by: Heiko Stuebner Signed-off-by: Mark Brown drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 653aa4645244042826f105aab1be3d01b3d493ca Author: Sugar Zhang Date: Fri Mar 18 14:54:22 2016 +0800 ASoC: rt5640: Correct the digital interface data select this patch corrects the interface adc/dac control register definition according to datasheet. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/rt5640.c | 2 +- sound/soc/codecs/rt5640.h | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) commit 7724fd0462b18e6be684b92ed44d258d73751d0c Author: Peter Rosin Date: Mon Mar 14 23:52:43 2016 +0100 MAINTAINERS: add Peter Rosin as i2c mux maintainer [wsa: Thanks a lot! He has some good stuff in the queue :)] Signed-off-by: Peter Rosin Signed-off-by: Wolfram Sang MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ddf3dc82f10e15469b3967ae777d39745d3aab16 Author: Geert Uytterhoeven Date: Tue Mar 15 17:51:28 2016 +0100 dt-bindings: i2c: Spelling s/propoerty/property/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-imx.txt | 2 +- Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 2 +- Documentation/devicetree/bindings/i2c/i2c-sirf.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 64e5cd723120643a4c8bef0880a03a60161d3ccb Author: ludovic.desroches@atmel.com Date: Thu Mar 17 14:54:34 2016 +0100 mmc: sdhci-of-at91: fix wake-up issue when using runtime pm It is impossible to wake-up on card detect event because when sdhci controller is runtime suspended, it is assumed that all clocks are disabled so we can't get irqs. If the device is removable and there is no gpio to manage the card detection then polling is used. It doesn't mean card detection is broken. It is curently we only way to wake-up on card event if using runtime pm. Signed-off-by: Ludovic Desroches Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bd9ff18bffcd1861ff0c7dc3fd06d0df2510cc42 Author: Alexandre Courbot Date: Mon Mar 7 11:07:57 2016 +0900 mmc: sdhci-pci: Do not set DMA mask in enable_dma() DMA mask will already be set by sdhci_set_dma_mask(), which is equivalent to the removed code since pci_set_dma_mask() expands to its DMA-API counterpart. There should also be no reason to set the DMA mask after probe. Signed-off-by: Alexandre Courbot Acked-by: Arnd Bergmann Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 15 --------------- 1 file changed, 15 deletions(-) commit 741b48f4f39730fdf74bc5892fca2de2fe798b63 Author: Alexandre Courbot Date: Mon Mar 7 11:07:56 2016 +0900 mmc: sdhci-acpi: Remove enable_dma() hook This hook was solely used to set the DMA mask, which is now done by the newly-added sdhci_set_dma_mask() function. The use of a flag to ensure the mask is only set once is a strong hint that it should not have been done there anyway. Signed-off-by: Alexandre Courbot Acked-by: Arnd Bergmann Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit 7b91369b46559dcc90e8d414e31c0257972e0cbb Author: Alexandre Courbot Date: Mon Mar 7 11:07:55 2016 +0900 mmc: sdhci: Set DMA mask when adding host Set the DMA mask in sdhci_add_host() after we determined the capabilities of the device. 64-bit devices in particular are given the proper mask that ensures bounce buffers are not used. Also disable DMA if no proper DMA mask can be set, as the DMA-API documentation specifies. Signed-off-by: Alexandre Courbot Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) commit 81ad4276b505e987dd8ebbdf63605f92cd172b52 Author: Zhang Rui Date: Fri Mar 18 10:03:24 2016 +0800 Thermal: Ignore invalid trip points In some cases, platform thermal driver may report invalid trip points, thermal core should not take any action for these trip points. This fixed a regression that bogus trip point starts to screw up thermal control on some Lenovo laptops, after commit bb431ba26c5cd0a17c941ca6c3a195a3a6d5d461 Author: Zhang Rui Date: Fri Oct 30 16:31:47 2015 +0800 Thermal: initialize thermal zone device correctly After thermal zone device registered, as we have not read any temperature before, thus tz->temperature should not be 0, which actually means 0C, and thermal trend is not available. In this case, we need specially handling for the first thermal_zone_device_update(). Both thermal core framework and step_wise governor is enhanced to handle this. And since the step_wise governor is the only one that uses trends, so it's the only thermal governor that needs to be updated. Tested-by: Manuel Krause Tested-by: szegad Tested-by: prash Tested-by: amish Tested-by: Matthias Reviewed-by: Javi Merino Signed-off-by: Zhang Rui Signed-off-by: Chen Yu CC: #3.18+ Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317190 Link: https://bugzilla.kernel.org/show_bug.cgi?id=114551 Signed-off-by: Zhang Rui drivers/thermal/thermal_core.c | 13 ++++++++++++- include/linux/thermal.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 9dffdb38d864ae89e16ff7b3a09451270736e35b Merge: 10fdfee 2df122b Author: Linus Torvalds Date: Thu Mar 17 22:13:41 2016 -0700 Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.6-rc1. Lots of little things here, over 1600 patches or so. Notable is all of the good Lustre work happening, those developers have finally woken up and are cleaning up their code greatly. The Outreachy intern application process is also happening, which brought in another 400 or so patches. Full details are in the very long shortlog. All of these have been in linux-next with no reported issues" * tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1673 commits) staging: lustre: fix aligments in lnet selftest staging: lustre: report minimum of two buffers for LNet selftest load test staging: lustre: test for proper errno code in lstcon_rpc_trans_abort staging: lustre: filter remaining extra spacing for lnet selftest staging: lustre: remove extra spacing when setting variable for lnet selftest staging: lustre: remove extra spacing of variable declartions for lnet selftest staging: lustre: fix spacing issues checkpatch reported in lnet selftest staging: lustre: remove returns in void function for lnet selftest staging: lustre: fix bogus lst errors for lnet selftest staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc staging: android: ion: fix up file mode staging: ion: debugfs invalid gfp mask staging: rts5208: Replace pci_enable_device with pcim_enable_device Staging: ieee80211: Place constant on right side of the test. staging: speakup: Replace del_timer with del_timer_sync staging: lowmemorykiller: fix 2 checks that checkpatch complained staging: mt29f_spinand: Drop void pointer cast staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED ... commit 10fdfee7f7fd8d4a6a8455ac4c9fbbc51d79b9f7 Merge: 0f49fc9 4d2508a Author: Linus Torvalds Date: Thu Mar 17 21:51:52 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "The most notable item is addition of support for Synaptics RMI4 protocol which is native protocol for all current Synaptics devices (touchscreens, touchpads). In later releases we'll switch devices using HID and PS/2 protocol emulation to RMI4. You will also get: - BYD PS/2 touchpad protocol support for psmouse - MELFAS MIP4 Touchscreen driver - rotary encoder was moved away from legacy platform data and to generic device properties API, devm_* API, and can now handle encoders using more than 2 GPIOs - Cypress touchpad driver was switched to devm_* API and device properties - other assorted driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits) ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props Input: synaptics-rmi4 - using logical instead of bitwise AND Input: powermate - fix oops with malicious USB descriptors Input: snvs_pwrkey - fix returned value check of syscon_regmap_lookup_by_phandle() MAINTAINERS: add devicetree bindings to Input Drivers section Input: synaptics-rmi4 - add device tree support to the SPI transport driver Input: synaptics-rmi4 - add SPI transport driver Input: synaptics-rmi4 - add support for F30 Input: synaptics-rmi4 - add support for F12 Input: synaptics-rmi4 - add device tree support for 2d sensors and F11 Input: synaptics-rmi4 - add support for 2D sensors and F11 Input: synaptics-rmi4 - add device tree support for RMI4 I2C devices Input: synaptics-rmi4 - add I2C transport driver Input: synaptics-rmi4 - add support for Synaptics RMI4 devices Input: ad7879 - add device tree support Input: ad7879 - fix default x/y axis assignment Input: ad7879 - move header to platform_data directory Input: ts4800 - add hardware dependency Input: cyapa - fix for losing events during device power transitions Input: sh_keysc - remove dependency on SUPERH ... commit 0f49fc95b86fc77b867d643e2d38bc9f28035ed4 Merge: 49dc2b7 7e545d6 Author: Linus Torvalds Date: Thu Mar 17 21:46:32 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching update from Jiri Kosina: - cleanup of module notifiers; this depends on a module.c cleanup which has been acked by Rusty; from Jessica Yu - small assorted fixes and MAINTAINERS update * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch/module: remove livepatch module notifier modules: split part of complete_formation() into prepare_coming_module() livepatch: Update maintainers livepatch: Fix the error message about unresolvable ambiguity klp: remove CONFIG_LIVEPATCH dependency from klp headers klp: remove superfluous errors in asm/livepatch.h commit 49dc2b7173010792c6923930ffcee84b7094b7de Merge: d66435c d00cd81 Author: Linus Torvalds Date: Thu Mar 17 21:38:27 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: drivers/rtc: broken link fix drm/i915 Fix typos in i915_gem_fence.c Docs: fix missing word in REPORTING-BUGS lib+mm: fix few spelling mistakes MAINTAINERS: add git URL for APM driver treewide: Fix typo in printk commit d66435cc7da95964cb386674bd82ec12ca66320a Merge: 1a46712 e1c9b9f Author: Linus Torvalds Date: Thu Mar 17 21:32:20 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - functionally equivalent cleanups for wacom driver, making the code more readable, from Benjamin Tissoires - a bunch of improvements and fixes for thingm driver from Heiner Kallweit - bugfixes to out-of-bound access for generic parsing functions (which have been there since ever) extract() and implement(), from Dmitry Torokhov - a lot of added / improved device support in sony, wacom, microsoft, multitouch and logitech driver, from various people * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (44 commits) HID: microsoft: Add ID for MS Wireless Comfort Keyboard hid: thingm: reorder calls in thingm_probe HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report() HID: multitouch: Release all touch slots on reset_resume HID: usbhid: enable NO_INIT_REPORTS quirk for Semico USB Keykoard2 HID: penmount: report only one button for PenMount 6000 USB touchscreen controller HID: i2c-hid: Fix suspend/resume when already runtime suspended HID: i2c-hid: Add hid-over-i2c name to i2c id table HID: multitouch: force retrieving of Win8 signature blob HID: Support for CMedia CM6533 HID audio jack controls HID: thingm: improve locking HID: thingm: switch to managed version of led_classdev_register HID: thingm: remove workqueue HID: corsair: fix mapping of non-keyboard usages HID: wacom: close the wireless receiver on remove() HID: wacom: cleanup input devices HID: wacom: reuse wacom_parse_and_register() in wireless_work HID: wacom: move down wireless_work() HID: wacom: break out parsing of device and registering of input HID: wacom: break out wacom_intuos_get_tool_type ... commit 12bb0a8fd47e6020a7b52dc283a2d855f03d6ef5 Author: Jaegeuk Kim Date: Fri Mar 11 15:33:22 2016 -0800 f2fs: submit node page write bios when really required If many threads calls fsync with data writes, we don't need to flush every bios having node page writes. The f2fs_wait_on_page_writeback will flush its bios when the page is really needed. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit fff4c55d36a160ae38f4de7650e341006e0adff2 Author: Arnd Bergmann Date: Tue Mar 15 00:07:56 2016 +0100 f2fs: add missing argument to f2fs_setxattr stub The f2fs_setxattr() prototype for CONFIG_F2FS_FS_XATTR=n has been wrong for a long time, since 8ae8f1627f39 ("f2fs: support xattr security labels"), but there have never been any callers, so it did not matter. Now, the function gets called from f2fs_ioc_keyctl(), which causes a build failure: fs/f2fs/file.c: In function 'f2fs_ioc_keyctl': include/linux/stddef.h:7:14: error: passing argument 6 of 'f2fs_setxattr' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ fs/f2fs/file.c:1599:27: note: in expansion of macro 'NULL' value, F2FS_KEY_SIZE, NULL, type); ^ In file included from ../fs/f2fs/file.c:29:0: fs/f2fs/xattr.h:129:19: note: expected 'int' but argument is of type 'void *' static inline int f2fs_setxattr(struct inode *inode, int index, ^ fs/f2fs/file.c:1597:9: error: too many arguments to function 'f2fs_setxattr' return f2fs_setxattr(inode, F2FS_XATTR_INDEX_KEY, ^ In file included from ../fs/f2fs/file.c:29:0: fs/f2fs/xattr.h:129:19: note: declared here static inline int f2fs_setxattr(struct inode *inode, int index, Thsi changes the prototype of the empty stub function to match that of the actual implementation. This will not make the key management work when F2FS_FS_XATTR is disabled, but it gets it to build at least. Signed-off-by: Arnd Bergmann Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d726732c7ce951da5468b577a89ac26ce3f5a860 Author: Chao Yu Date: Thu Mar 10 22:24:23 2016 +0800 f2fs: fix to avoid unneeded unlock_new_inode During ->lookup, I_NEW state of inode was been cleared in f2fs_iget, so in error path, we don't need to clear it again. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 291bf80becdfbb4cfc726dbd1811b28cedb4d907 Author: Chao Yu Date: Wed Mar 9 22:07:28 2016 +0800 f2fs: clean up opened code with f2fs_update_dentry Just clean up opened code with existing function, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 17a0ee552c4a4310b351b281098454a00e0e8034 Author: Jaegeuk Kim Date: Tue Mar 8 09:04:35 2016 -0800 f2fs: declare static functions Just to avoid sparse warnings. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43b6573bac95d7cc8a7fb51efe8468c994f5cf56 Author: Keith Mok Date: Wed Mar 2 12:04:24 2016 -0800 f2fs: use cryptoapi crc32 functions The crc function is done bit by bit. Optimize this by use cryptoapi crc32 function which is backed by h/w acceleration. Signed-off-by: Keith Mok Signed-off-by: Jaegeuk Kim fs/f2fs/Kconfig | 2 ++ fs/f2fs/checkpoint.c | 6 +++--- fs/f2fs/f2fs.h | 48 +++++++++++++++++++++++++++--------------------- fs/f2fs/super.c | 13 +++++++++++++ 4 files changed, 45 insertions(+), 24 deletions(-) commit 999270de31138f1ae41743a856911f8e5e114264 Author: Fan Li Date: Mon Feb 29 14:29:51 2016 +0800 f2fs: modify the readahead method in ra_node_page() ra_node_page() is used to read ahead one node page. Comparing to regular read, it's faster because it doesn't wait for IO completion. But if it is called twice for reading the same block, and the IO request from the first call hasn't been completed before the second call, the second call will have to wait until the read is over. Here use the code in __do_page_cache_readahead() to solve this problem. It does nothing when someone else already puts the page in mapping. The status of page should be assured by whoever puts it there. This implement also prevents alteration of page reference count. Signed-off-by: Fan li Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8074bb515014d281a6f5f1218648aa3abd9c22ab Author: Jaegeuk Kim Date: Tue Feb 23 09:21:37 2016 -0800 f2fs crypto: sync ext4_lookup and ext4_file_open This patch tries to catch up with lookup and open policies in ext4. Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 2 +- fs/f2fs/file.c | 4 ++++ fs/f2fs/namei.c | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 0b81d0779072696371822e5ed9e7c6292e547024 Author: Jaegeuk Kim Date: Fri May 15 16:26:10 2015 -0700 fs crypto: move per-file encryption from f2fs tree to fs/crypto This patch adds the renamed functions moved from the f2fs crypto files. 1. definitions for per-file encryption used by ext4 and f2fs. 2. crypto.c for encrypt/decrypt functions a. IO preparation: - fscrypt_get_ctx / fscrypt_release_ctx b. before IOs: - fscrypt_encrypt_page - fscrypt_decrypt_page - fscrypt_zeroout_range c. after IOs: - fscrypt_decrypt_bio_pages - fscrypt_pullback_bio_page - fscrypt_restore_control_page 3. policy.c supporting context management. a. For ioctls: - fscrypt_process_policy - fscrypt_get_policy b. For context permission - fscrypt_has_permitted_context - fscrypt_inherit_context 4. keyinfo.c to handle permissions - fscrypt_get_encryption_info - fscrypt_free_encryption_info 5. fname.c to support filename encryption a. general wrapper functions - fscrypt_fname_disk_to_usr - fscrypt_fname_usr_to_disk - fscrypt_setup_filename - fscrypt_free_filename b. specific filename handling functions - fscrypt_fname_alloc_buffer - fscrypt_fname_free_buffer 6. Makefile and Kconfig Cc: Al Viro Signed-off-by: Michael Halcrow Signed-off-by: Ildar Muslukhov Signed-off-by: Uday Savagaonkar Signed-off-by: Theodore Ts'o Signed-off-by: Arnd Bergmann Signed-off-by: Jaegeuk Kim fs/Kconfig | 2 + fs/Makefile | 1 + fs/crypto/Kconfig | 18 ++ fs/crypto/Makefile | 3 + fs/crypto/crypto.c | 556 +++++++++++++++++++++++++++++++++++++++++++++++ fs/crypto/fname.c | 427 ++++++++++++++++++++++++++++++++++++ fs/crypto/keyinfo.c | 278 ++++++++++++++++++++++++ fs/crypto/policy.c | 229 +++++++++++++++++++ fs/f2fs/Kconfig | 10 +- fs/f2fs/Makefile | 2 - fs/f2fs/crypto.c | 473 ---------------------------------------- fs/f2fs/crypto_fname.c | 446 ------------------------------------- fs/f2fs/crypto_key.c | 267 ----------------------- fs/f2fs/crypto_policy.c | 210 ------------------ fs/f2fs/data.c | 31 ++- fs/f2fs/dir.c | 44 ++-- fs/f2fs/f2fs.h | 172 +++------------ fs/f2fs/f2fs_crypto.h | 151 ------------- fs/f2fs/file.c | 38 ++-- fs/f2fs/inline.c | 4 +- fs/f2fs/inode.c | 5 +- fs/f2fs/namei.c | 56 +++-- fs/f2fs/super.c | 55 +++-- include/linux/dcache.h | 2 + include/linux/fs.h | 8 + include/linux/fscrypto.h | 433 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/fs.h | 18 ++ 27 files changed, 2125 insertions(+), 1814 deletions(-) commit 1a46712aa99594eabe1e9aeedf115dfff0db1dfd Merge: 82b666e ccbd805 Author: Linus Torvalds Date: Thu Mar 17 21:05:32 2016 -0700 Merge tag 'gpio-v4.6-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 v4.6. There is quite a lot of interesting stuff going on. The patches to other subsystems and arch-wide are ACKed as far as possible, though I consider things like per-arch as essentially a part of the GPIO subsystem so it should not be needed. Core changes: - The gpio_chip is now a *real device*. Until now the gpio chips were just piggybacking the parent device or (gasp) floating in space outside of the device model. We now finally make GPIO chips devices. The gpio_chip will create a gpio_device which contains a struct device, and this gpio_device struct is kept private. Anything that needs to be kept private from the rest of the kernel will gradually be moved over to the gpio_device. - As a result of making the gpio_device a real device, we have added resource management, so devm_gpiochip_add_data() will cut down on overhead and reduce code lines. A huge slew of patches convert almost all drivers in the subsystem to use this. - Building on making the GPIO a real device, we add the first step of a new userspace ABI: the GPIO character device. We take small steps here, so we first add a pure *information* ABI and the tool "lsgpio" that will list all GPIO devices on the system and all lines on these devices. We can now discover GPIOs properly from userspace. We still have not come up with a way to actually *use* GPIOs from userspace. - To encourage people to use the character device for the future, we have it always-enabled when using GPIO. The old sysfs ABI is still opt-in (and can be used in parallel), but is marked as deprecated. We will keep it around for the foreseeable future, but it will not be extended to cover ever more use cases. Cleanup: - Bjorn Helgaas removed a whole slew of per-architecture includes. This dates back to when GPIO was an opt-in feature and no shared library even existed: just a header file with proper prototypes was provided and all semantics were up to the arch to implement. These patches make the GPIO chip even more a proper device and cleans out leftovers of the old in-kernel API here and there. Still some cruft is left but it's very little now. - There is still some clamping of return values for .get() going on, but we now return sane values in the vast majority of drivers and the errorpath is sanitized. Some patches for powerpc, blackfin and unicore still drop in. - We continue to switch the ARM, MIPS, blackfin, m68k local GPIO implementations to use gpiochip_add_data() and cut down on code lines. - MPC8xxx is converted to use the generic GPIO helpers. - ATH79 is converted to use the generic GPIO helpers. New drivers: - WinSystems WS16C48 - Acces 104-DIO-48E - F81866 (a F7188x variant) - Qoric (a MPC8xxx variant) - TS-4800 - SPI serializers (pisosr): simple 74xx shift registers connected to SPI to obtain a dirt-cheap output-only GPIO expander. - Texas Instruments TPIC2810 - Texas Instruments TPS65218 - Texas Instruments TPS65912 - X-Gene (ARM64) standby GPIO controller" * tag 'gpio-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (194 commits) Revert "Share upstreaming patches" gpio: mcp23s08: Fix clearing of interrupt. gpiolib: Fix comment referring to gpio_*() in gpiod_*() gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit gpio: xgene: Fix kconfig for standby GIPO contoller gpio: Add generic serializer DT binding gpio: uapi: use 0xB4 as ioctl() major gpio: tps65912: fix bad merge Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free" gpio: omap: drop dev field from gpio_bank structure gpio: mpc8xxx: Slightly update the code for better readability gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip gpio: mpc8xxx: Fixup setting gpio direction output gpio: mcp23s08: Add support for mcp23s18 dt-bindings: gpio: altera: Fix altr,interrupt-type property gpio: add driver for MEN 16Z127 GPIO controller gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free gpio: timberdale: Switch to devm_ioremap_resource() gpio: ts4800: Add IMX51 dependency gpiolib: rewrite gpiodev_add_to_list ... commit 82b666eee71618b7ca812ee529af116582617dec Merge: 588ab3f a359596 Author: Linus Torvalds Date: Thu Mar 17 20:19:19 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "The main change is the removal of the bit-rotten 68360 support. Also a fix to always make the ethernet FEC platform info available" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: remove obsolete 68360 support m68knommu: fix FEC platform device registration when driver is modular commit 588ab3f9afdfa1a6b1e5761c858b2c4ab6098285 Merge: 3d15cfd 2776e0e Author: Linus Torvalds Date: Thu Mar 17 20:03:47 2016 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: "Here are the main arm64 updates for 4.6. There are some relatively intrusive changes to support KASLR, the reworking of the kernel virtual memory layout and initial page table creation. Summary: - Initial page table creation reworked to avoid breaking large block mappings (huge pages) into smaller ones. The ARM architecture requires break-before-make in such cases to avoid TLB conflicts but that's not always possible on live page tables - Kernel virtual memory layout: the kernel image is no longer linked to the bottom of the linear mapping (PAGE_OFFSET) but at the bottom of the vmalloc space, allowing the kernel to be loaded (nearly) anywhere in physical RAM - Kernel ASLR: position independent kernel Image and modules being randomly mapped in the vmalloc space with the randomness is provided by UEFI (efi_get_random_bytes() patches merged via the arm64 tree, acked by Matt Fleming) - Implement relative exception tables for arm64, required by KASLR (initial code for ARCH_HAS_RELATIVE_EXTABLE added to lib/extable.c but actual x86 conversion to deferred to 4.7 because of the merge dependencies) - Support for the User Access Override feature of ARMv8.2: this allows uaccess functions (get_user etc.) to be implemented using LDTR/STTR instructions. Such instructions, when run by the kernel, perform unprivileged accesses adding an extra level of protection. The set_fs() macro is used to "upgrade" such instruction to privileged accesses via the UAO bit - Half-precision floating point support (part of ARMv8.2) - Optimisations for CPUs with or without a hardware prefetcher (using run-time code patching) - copy_page performance improvement to deal with 128 bytes at a time - Sanity checks on the CPU capabilities (via CPUID) to prevent incompatible secondary CPUs from being brought up (e.g. weird big.LITTLE configurations) - valid_user_regs() reworked for better sanity check of the sigcontext information (restored pstate information) - ACPI parking protocol implementation - CONFIG_DEBUG_RODATA enabled by default - VDSO code marked as read-only - DEBUG_PAGEALLOC support - ARCH_HAS_UBSAN_SANITIZE_ALL enabled - Erratum workaround Cavium ThunderX SoC - set_pte_at() fix for PROT_NONE mappings - Code clean-ups" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (99 commits) arm64: kasan: Fix zero shadow mapping overriding kernel image shadow arm64: kasan: Use actual memory node when populating the kernel image shadow arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE permission arm64: Fix misspellings in comments. arm64: efi: add missing frame pointer assignment arm64: make mrs_s prefixing implicit in read_cpuid arm64: enable CONFIG_DEBUG_RODATA by default arm64: Rework valid_user_regs arm64: mm: check at build time that PAGE_OFFSET divides the VA space evenly arm64: KVM: Move kvm_call_hyp back to its original localtion arm64: mm: treat memstart_addr as a signed quantity arm64: mm: list kernel sections in order arm64: lse: deal with clobbered IP registers after branch via PLT arm64: mm: dump: Use VA_START directly instead of private LOWEST_ADDR arm64: kconfig: add submenu for 8.2 architectural features arm64: kernel: acpi: fix ioremap in ACPI parking protocol cpu_postboot arm64: Add support for Half precision floating point arm64: Remove fixmap include fragility arm64: Add workaround for Cavium erratum 27456 arm64: mm: Mark .rodata as RO ... commit 3d15cfdb1b77536c205d8e49c0312219ddf162ec Merge: 5cd0911 6accd8e Author: Linus Torvalds Date: Thu Mar 17 19:37:08 2016 -0700 Merge tag 'linux-kselftest-4.6-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 feature to create test-specific kconfig fragments. This feature helps configure Kselftests to test specific Kernel Configuration options as opposed to defconfig. - A new test for Media Controller API - A few fixes" * tag 'linux-kselftest-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: media_dcevice_test fix usage information selftests: media_dcevice_test fix to handle ioctl failure case selftests: add missing .gitignore file or entry Makefile: add kselftest-merge selftests: create test-specific kconfig fragments selftests: breakpoint: add step_after_suspend_test selftests: add a new test for Media Controller API commit bd9e33508c5e1eb5d807d11d7bfc52125fcdb04e Author: Schemmel Hans-Christoph Date: Thu Mar 17 10:07:56 2016 +0000 qmi_wwan: Added support for Gemalto's Cinterion PHxx WWAN interface Added support for Gemalto's Cinterion PHxx WWAN interfaces by adding QMI_FIXED_INTF with Cinterion's VID and PID. PHxx can have: 2 RmNet Interfaces (PID 0x0082) or 1 RmNet + 1 USB Audio interface (PID 0x0083). Signed-off-by: Hans-Christoph Schemmel Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 3 +++ 1 file changed, 3 insertions(+) commit e316ea62e3203d524ff0239a40c56d3a39ad1b5c Author: Eric Dumazet Date: Wed Mar 16 22:52:15 2016 -0700 tcp/dccp: remove obsolete WARN_ON() in icmp handlers Now SYN_RECV request sockets are installed in ehash table, an ICMP handler can find a request socket while another cpu handles an incoming packet transforming this SYN_RECV request socket into an ESTABLISHED socket. We need to remove the now obsolete WARN_ON(req->sk), since req->sk is set when a new child is created and added into listener accept queue. If this race happens, the ICMP will do nothing special. Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") Signed-off-by: Eric Dumazet Reported-by: Ben Lazarus Reported-by: Neal Cardwell Signed-off-by: David S. Miller net/dccp/ipv4.c | 2 -- net/ipv4/tcp_ipv4.c | 2 -- 2 files changed, 4 deletions(-) commit f6773c5e95a6dc1af82157d4e96e412dee3abf31 Author: Eric Dumazet Date: Wed Mar 16 21:59:49 2016 -0700 vlan: propagate gso_max_segs vlan drivers lack proper propagation of gso_max_segs from lower device. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 2 ++ drivers/net/macvlan.c | 2 ++ net/8021q/vlan.c | 1 + net/8021q/vlan_dev.c | 1 + 4 files changed, 6 insertions(+) commit 2572c7fb4e4b941af9a0206ac8093d362ae6d371 Author: Sudip Mukherjee Date: Thu Mar 10 17:51:11 2016 +0530 ntb: fix possible NULL dereference kmalloc can fail and we should check for NULL before using the pointer returned by kmalloc. Signed-off-by: Sudip Mukherjee Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 2 ++ 1 file changed, 2 insertions(+) commit ee5f750f1c9d675028ecedc5439b7171f6647cb8 Author: Dave Jiang Date: Mon Mar 7 15:57:25 2016 -0700 ntb: add missing setup of translation window The perf tool is missing the setup of translation window. Adding call to setup the translation window for backed memory. Signed-off-by: John Kading Signed-off-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c75361c0b08a59d3c9863a5a673ae039d5118c35 Author: Richard Cochran Date: Fri Mar 11 09:43:07 2016 +0100 cpufreq: Make cpufreq_quick_get() safe to call The function, cpufreq_quick_get, accesses the global 'cpufreq_driver' and its fields without taking the associated lock, cpufreq_driver_lock. Without the locking, nothing guarantees that 'cpufreq_driver' remains consistent during the call. This patch fixes the issue by taking the lock before accessing the data structure. Signed-off-by: Richard Cochran Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 84f766855f61ed2e5d07f0ec737b15ee687afb92 Author: Dave Jiang Date: Mon Feb 29 09:35:26 2016 -0700 ntb: stop link work when we do not have memory Instead of keep trying to go through the init routine when we aren't able to allocate memory, we should just stop and go down. Signed-off-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e902133162afd6437e372d74f2d305b0b4cc16d6 Author: Dave Jiang Date: Tue Feb 23 09:11:36 2016 -0700 ntb: stop tasklet from spinning forever during shutdown. We can leave tasklet spinning forever if we disable the tasklet during qp shutdown and the tasklets are still being kicked off. This hopefully should avoid that race condition. Signed-off-by: Dave Jiang Reported-by: Alex Depoutovitch Tested-by: Alex Depoutovitch Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 1985a88107b5330b2a911ad4d279e1bd7e4deb24 Author: Arnd Bergmann Date: Tue Jan 26 10:31:45 2016 +0100 ntb: perf test: fix address space confusion The ntb driver assigns between pointers an __iomem tokens, and also casts them to 64-bit integers, which results in compiler warnings on 32-bit systems: drivers/ntb/test/ntb_perf.c: In function 'perf_copy': drivers/ntb/test/ntb_perf.c:213:10: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] vbase = (u64)(u64 *)mw->vbase; ^ drivers/ntb/test/ntb_perf.c:214:14: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] dst_vaddr = (u64)(u64 *)dst; ^ This adds __iomem annotations where needed and changes the temporary variables to iomem pointers to avoid casting them to u64. I did not see the problem in linux-next earlier, but it show showed up in 4.5-rc1. Signed-off-by: Arnd Bergmann Acked-by: Dave Jiang Fixes: 8a7b6a778a85 ("ntb: ntb perf tool") Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 82be788c96ed5978d3cb4a00079e26b981a3df3f Author: Benjamin Tissoires Date: Thu Mar 17 17:12:54 2016 -0700 Input: synaptics - handle spurious release of trackstick buttons, again Looks like the fimware 8.2 still has the extra buttons spurious release bug. Link: https://bugzilla.kernel.org/show_bug.cgi?id=114321 Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a1376d3de45d3ebc26ecd8f5a57b902f52157082 Author: Andrew Duggan Date: Thu Mar 17 17:06:24 2016 -0700 Input: synaptics-rmi4 - remove check of Non-NULL array Originally the irq_mask member of rmi_function was a pointer. Then it was switched to being a zero length array. However, the checks for a NULL pointer where not removed. Signed-off-by: Andrew Duggan Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d5f5611dd0de52e9a52b56391a7049a52184e72 Author: Richard Pospesel Date: Mon Mar 14 09:41:16 2016 -0700 Input: byd - enable absolute mode The Windows driver's settings dialog contains a visualization of the regions for the hardware edge scrolling capability, which uses a temporarily-enabled limited-resolution absolute mode. This patch enables this during normal operation, and combines the absolute packets with the existing relative packets to provide accurate absolute position and touch reporting. It also adds documentation for all known gesture packets and initialization commands. Reviewed-by: Chris Diamand Signed-off-by: Richard Pospesel Signed-off-by: Dmitry Torokhov drivers/input/mouse/byd.c | 565 ++++++++++++++++++++++++------------- drivers/input/mouse/psmouse-base.c | 2 +- 2 files changed, 369 insertions(+), 198 deletions(-) commit 5cd0911a9e0e408f28079a5e36a981217bf47520 Merge: 1ca80a0 764fd639 Author: Linus Torvalds Date: Thu Mar 17 16:57:55 2016 -0700 Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull pstore update from Tony Luck: "Allow ram backend to be configured with addresses above 4GB" * tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: pstore: Add support for 64 Bit address space commit 1ca80a0a3e37d847f3cd6120ca5eb35b39a9a152 Merge: d77bed0 73b462d Author: Linus Torvalds Date: Thu Mar 17 16:51:32 2016 -0700 Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We only have six patches ready for this merge window: - Arnd Bergmann contributed a patch that fixes an uninitialized variable warning. - The second patch avoids a kernel panic due to referencing an iopen glock that may not be held, in an error path. - The third patch fixes a rounding error that caused xfs_tests direct IO write "fsx" tests to fail on GFS2. - The fourth patch tidies up the code path when glocks are being reused to recreate a dinode that was recently deleted. - The fifth reverts an ages-old patch that should no longer be needed, and which interfered with the transition of dinodes from unlinked to free. - And lastly, a patch to eliminate a function parameter that's not needed" * tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: Eliminate parameter non_block on gfs2_inode_lookup GFS2: Don't filter out I_FREEING inodes anymore GFS2: Prevent delete work from occurring on glocks used for create GFS2: Fix direct IO write rounding error gfs2: avoid uninitialized variable warning GFS2: Check if iopen is held when deleting inode commit d77bed0d4c61cb0258851367a36b358dbeb7abcc Merge: faeb20e b81171c Author: Linus Torvalds Date: Thu Mar 17 16:38:36 2016 -0700 Merge tag 'dlm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "Previous changes introduced the use of socket error reporting for dlm sockets. This set includes two fixes in how the socket error callbacks are used" * tag 'dlm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: DLM: Save and restore socket callbacks properly DLM: Replace nodeid_to_addr with kernel_getpeername commit faeb20ecfa398b043c3224607f512c009c51653d Merge: 364e8dd 0304688 Author: Linus Torvalds Date: Thu Mar 17 16:31:18 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: "Performance improvements in SEEK_DATA and xattr scalability improvements, plus a lot of clean ups and bug fixes" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (38 commits) ext4: clean up error handling in the MMP support jbd2: do not fail journal because of frozen_buffer allocation failure ext4: use __GFP_NOFAIL in ext4_free_blocks() ext4: fix compile error while opening the macro DOUBLE_CHECK ext4: print ext4 mount option data_err=abort correctly ext4: fix NULL pointer dereference in ext4_mark_inode_dirty() ext4: drop unneeded BUFFER_TRACE in ext4_delete_inline_entry() ext4: fix misspellings in comments. jbd2: fix FS corruption possibility in jbd2_journal_destroy() on umount path ext4: more efficient SEEK_DATA implementation ext4: cleanup handling of bh->b_state in DAX mmap ext4: return hole from ext4_map_blocks() ext4: factor out determining of hole size ext4: fix setting of referenced bit in ext4_es_lookup_extent() ext4: remove i_ioend_count ext4: simplify io_end handling for AIO DIO ext4: move trans handling and completion deferal out of _ext4_get_block ext4: rename and split get blocks functions ext4: use i_mutex to serialize unaligned AIO DIO ext4: pack ioend structure better ... commit 364e8dd9d636fea7def862919aac092b19b7c581 Merge: 48d10bd 1ae1602 Author: Linus Torvalds Date: Thu Mar 17 16:25:46 2016 -0700 Merge tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: - A large patch from me to simplify setting up the list of default groups by actually implementing it as a list instead of an array. - a small Y2083 prep patch from Deepa Dinamani. Probably doesn't matter on it's own, but it seems like he is trying to get rid of all CURRENT_TIME uses in file systems, which is a worthwhile goal. * tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs: configfs: switch ->default groups to a linked list configfs: Replace CURRENT_TIME by current_fs_time() commit f9310b2f9a19b7f16c7b1c1558f8b649b9b933c1 Author: Jessica Yu Date: Thu Mar 17 14:23:07 2016 -0700 sscanf: implement basic character sets Implement basic character sets for the '%[' conversion specifier. The '%[' conversion specifier matches a nonempty sequence of characters from the specified set of accepted (or with '^', rejected) characters between the brackets. The substring matched is to be made up of characters in (or not in) the set. This is useful for matching substrings that are delimited by something other than spaces. This implementation differs from its glibc counterpart in the following ways: (1) No support for character ranges (e.g., 'a-z' or '0-9') (2) The hyphen '-' is not a special character (3) The closing bracket ']' cannot be matched (4) No support (yet) for discarding matching input ('%*[') The bitmap code is largely based upon sample code which was provided by Rasmus. The motivation for adding character set support to sscanf originally stemmed from the kernel livepatching project. An ongoing patchset utilizes new livepatch Elf symbol and section names to store important metadata livepatch needs to properly apply its patches. Such metadata is stored in these section and symbol names as substrings delimited by periods '.' and commas ','. For example, a livepatch symbol name might look like this: .klp.sym.vmlinux.printk,0 However, sscanf currently can only extract "substrings" delimited by whitespace using the "%s" specifier. Thus for the above symbol name, one cannot not use sscanf() to extract substrings "vmlinux" or "printk", for example. A number of discussions on the livepatch mailing list dealing with string parsing code for extracting these '.' and ',' delimited substrings eventually led to the conclusion that such code would be completely unnecessary if the kernel sscanf() supported character sets. Thus only a single sscanf() call would be necessary to extract these substrings. In addition, such an addition to sscanf() could benefit other areas of the kernel that might have a similar need in the future. [akpm@linux-foundation.org: 80-col tweaks] Signed-off-by: Jessica Yu Signed-off-by: Rasmus Villemoes Cc: Andy Shevchenko Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit 2553b67a1fbe7bf202e4e8070ab0b00d3d3a06a2 Author: Josh Poimboeuf Date: Thu Mar 17 14:23:04 2016 -0700 lib/bug.c: use common WARN helper The traceoff_on_warning option doesn't have any effect on s390, powerpc, arm64, parisc, and sh because there are two different types of WARN implementations: 1) The above mentioned architectures treat WARN() as a special case of a BUG() exception. They handle warnings in report_bug() in lib/bug.c. 2) All other architectures just call warn_slowpath_*() directly. Their warnings are handled in warn_slowpath_common() in kernel/panic.c. Support traceoff_on_warning on all architectures and prevent any future divergence by using a single common function to emit the warning. Also remove the '()' from '%pS()', because the parentheses look funky: [ 45.607629] WARNING: at /root/warn_mod/warn_mod.c:17 .init_dummy+0x20/0x40 [warn_mod]() Reported-by: Chunyu Hu Signed-off-by: Josh Poimboeuf Acked-by: Heiko Carstens Tested-by: Prarit Bhargava Acked-by: Prarit Bhargava Acked-by: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/bug.h | 6 ++++++ kernel/panic.c | 41 ++++++++++++++++++++++++++--------------- lib/bug.c | 26 ++------------------------ 3 files changed, 34 insertions(+), 39 deletions(-) commit 4cc7ecb7f2a60e8deb783b8fbf7c1ae467acb920 Author: Kees Cook Date: Thu Mar 17 14:23:00 2016 -0700 param: convert some "on"/"off" users to strtobool This changes several users of manual "on"/"off" parsing to use strtobool. Some side-effects: - these uses will now parse y/n/1/0 meaningfully too - the early_param uses will now bubble up parse errors Signed-off-by: Kees Cook Acked-by: Heiko Carstens Acked-by: Michael Ellerman Cc: Amitkumar Karwar Cc: Andy Shevchenko Cc: Daniel Borkmann Cc: Joe Perches Cc: Kalle Valo Cc: Martin Schwidefsky Cc: Nishant Sarmukadam Cc: Rasmus Villemoes Cc: Steve French Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/rtasd.c | 9 ++------- arch/powerpc/platforms/pseries/hotplug-cpu.c | 10 ++-------- arch/s390/kernel/time.c | 8 ++------ arch/s390/kernel/topology.c | 7 ++----- arch/x86/kernel/aperture_64.c | 12 ++---------- include/linux/tick.h | 2 +- kernel/time/hrtimer.c | 10 ++-------- kernel/time/tick-sched.c | 10 ++-------- 8 files changed, 15 insertions(+), 53 deletions(-) commit a81a5a17d44b26521fb1199f8ccf27f4af337a67 Author: Kees Cook Date: Thu Mar 17 14:22:57 2016 -0700 lib: add "on"/"off" support to kstrtobool Add support for "on" and "off" when converting to boolean. Signed-off-by: Kees Cook Cc: Amitkumar Karwar Cc: Andy Shevchenko Cc: Daniel Borkmann Cc: Heiko Carstens Cc: Joe Perches Cc: Kalle Valo Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Nishant Sarmukadam Cc: Rasmus Villemoes Cc: Steve French Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/kstrtox.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 1404297ebf76fd91a41de215fc8c94c2619e5fdb Author: Kees Cook Date: Thu Mar 17 14:22:54 2016 -0700 lib: update single-char callers of strtobool() Some callers of strtobool() were passing a pointer to unterminated strings. In preparation of adding multi-character processing to kstrtobool(), update the callers to not pass single-character pointers, and switch to using the new kstrtobool_from_user() helper where possible. Signed-off-by: Kees Cook Cc: Amitkumar Karwar Cc: Nishant Sarmukadam Cc: Kalle Valo Cc: Steve French Cc: Andy Shevchenko Cc: Daniel Borkmann Cc: Heiko Carstens Cc: Joe Perches Cc: Kees Cook Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/wireless/marvell/mwifiex/debugfs.c | 10 ++--- fs/cifs/cifs_debug.c | 56 +++++++------------------- fs/cifs/cifs_debug.h | 2 +- fs/cifs/cifsfs.c | 6 +-- fs/cifs/cifsglob.h | 4 +- 5 files changed, 24 insertions(+), 54 deletions(-) commit ef951599074ba4fad2d0efa0a977129b41e6d203 Author: Kees Cook Date: Thu Mar 17 14:22:50 2016 -0700 lib: move strtobool() to kstrtobool() Create the kstrtobool_from_user() helper and move strtobool() logic into the new kstrtobool() (matching all the other kstrto* functions). Provides an inline wrapper for existing strtobool() callers. Signed-off-by: Kees Cook Cc: Joe Perches Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Daniel Borkmann Cc: Amitkumar Karwar Cc: Nishant Sarmukadam Cc: Kalle Valo Cc: Steve French Cc: Michael Ellerman Cc: Heiko Carstens Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 2 ++ include/linux/string.h | 6 +++++- lib/kstrtox.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/string.c | 29 ----------------------------- 4 files changed, 57 insertions(+), 30 deletions(-) commit e3bde9568d992c5f985e6e30731a5f9f9bef7b13 Author: Denys Vlasenko Date: Thu Mar 17 14:22:47 2016 -0700 include/linux/unaligned: force inlining of byteswap operations Sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, the following functions get deinlined many times. Examples of disassembly: (24 copies, 108 calls): 66 8b 07 mov (%rdi),%ax 55 push %rbp 48 89 e5 mov %rsp,%rbp 86 e0 xchg %ah,%al 5d pop %rbp c3 retq (25 copies, 181 calls): 8b 07 mov (%rdi),%eax 55 push %rbp 48 89 e5 mov %rsp,%rbp 0f c8 bswap %eax 5d pop %rbp c3 retq (23 copies, 94 calls): 48 8b 07 mov (%rdi),%rax 55 push %rbp 48 89 e5 mov %rsp,%rbp 48 0f c8 bswap %rax 5d pop %rbp c3 retq (2 copies, 11 calls): 89 f8 mov %edi,%eax 55 push %rbp c1 ef 08 shr $0x8,%edi c1 e0 08 shl $0x8,%eax 09 c7 or %eax,%edi 48 89 e5 mov %rsp,%rbp 66 89 3e mov %di,(%rsi) (8 copies, 43 calls): 55 push %rbp 0f cf bswap %edi 89 3e mov %edi,(%rsi) 48 89 e5 mov %rsp,%rbp 5d pop %rbp c3 retq (26 copies, 157 calls): 55 push %rbp 48 0f cf bswap %rdi 48 89 3e mov %rdi,(%rsi) 48 89 e5 mov %rsp,%rbp 5d pop %rbp c3 retq This patch fixes this via s/inline/__always_inline/. It only affects arches with efficient unaligned access insns, such as x86. (arched which lack such ops do not include linux/unaligned/access_ok.h) Code size decrease after the patch is ~8.5k: text data bss dec hex filename 92197848 20826112 36417536 149441496 8e84bd8 vmlinux 92189231 20826144 36417536 149432911 8e82a4f vmlinux6_unaligned_be_after Signed-off-by: Denys Vlasenko Acked-by: Ingo Molnar Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/unaligned/access_ok.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit bc27fb68aaad44dd8f5c34924f05721f0abaeec1 Author: Denys Vlasenko Date: Thu Mar 17 14:22:44 2016 -0700 include/uapi/linux/byteorder, swab: force inlining of some byteswap operations Sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, the following functions get deinlined many times. Examples of disassembly: (12 copies, 51 calls): 66 8b 07 mov (%rdi),%ax 55 push %rbp 48 89 e5 mov %rsp,%rbp 86 e0 xchg %ah,%al 5d pop %rbp c3 retq (12 copies, 135 calls): 8b 07 mov (%rdi),%eax 55 push %rbp 48 89 e5 mov %rsp,%rbp 0f c8 bswap %eax 5d pop %rbp c3 retq (2 copies, 20 calls): 48 8b 07 mov (%rdi),%rax 55 push %rbp 48 89 e5 mov %rsp,%rbp 48 0f c8 bswap %rax 5d pop %rbp c3 retq <__swab16p> (16 copies, 146 calls): 55 push %rbp 89 f8 mov %edi,%eax 86 e0 xchg %ah,%al 48 89 e5 mov %rsp,%rbp 5d pop %rbp c3 retq <__swab32p> (43 copies, ~560 calls): 55 push %rbp 89 f8 mov %edi,%eax 0f c8 bswap %eax 48 89 e5 mov %rsp,%rbp 5d pop %rbp c3 retq <__swab64p> (21 copies, 119 calls): 55 push %rbp 48 89 f8 mov %rdi,%rax 48 0f c8 bswap %rax 48 89 e5 mov %rsp,%rbp 5d pop %rbp c3 retq <__swab32s> (6 copies, 47 calls): 8b 07 mov (%rdi),%eax 55 push %rbp 48 89 e5 mov %rsp,%rbp 0f c8 bswap %eax 89 07 mov %eax,(%rdi) 5d pop %rbp c3 retq This patch fixes this via s/inline/__always_inline/. Code size decrease after the patch is ~4.5k: text data bss dec hex filename 92202377 20826112 36417536 149446025 8e85d89 vmlinux 92197848 20826112 36417536 149441496 8e84bd8 vmlinux5_swap_after Signed-off-by: Denys Vlasenko Acked-by: Ingo Molnar Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/byteorder/big_endian.h | 24 ++++++++++++------------ include/uapi/linux/byteorder/little_endian.h | 24 ++++++++++++------------ include/uapi/linux/swab.h | 10 +++++----- 3 files changed, 29 insertions(+), 29 deletions(-) commit a644fdf029f44f1ff76659154b411afeaeee1f43 Author: Denys Vlasenko Date: Thu Mar 17 14:22:41 2016 -0700 include/asm-generic/atomic-long.h: force inlining of some atomic_long operations Sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, atomic_long_inc(), atomic_long_dec() and atomic_long_add() functions get deinlined about 40 times. Examples of disassembly: (21 copies, 147 calls): 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 48 ff 07 lock incq (%rdi) 5d pop %rbp c3 retq (4 copies, 14 calls) is similar to inc. (11 copies, 41 calls): 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 48 01 3e lock add %rdi,(%rsi) 5d pop %rbp c3 retq This patch fixes this via s/inline/__always_inline/. Code size decrease after the patch is ~1.3k: text data bss dec hex filename 92203657 20826112 36417536 149447305 8e86289 vmlinux 92202377 20826112 36417536 149446025 8e85d89 vmlinux4_atomiclong_after Signed-off-by: Denys Vlasenko Cc: Ingo Molnar Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/atomic-long.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit efc2cd7937fd3c32a8e0ffcdfa2603989f0a2faa Author: Heikki Krogerus Date: Thu Mar 17 14:22:38 2016 -0700 usb: common: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/usb/common/common.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 9adb9254f4b0f591282f713de5356a9e75a44da3 Author: Andy Shevchenko Date: Thu Mar 17 14:22:35 2016 -0700 ide: hpt366: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/ide/hpt366.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 908913bdbddc0b0f00e898bfc771ae625f7a6ab3 Author: Andy Shevchenko Date: Thu Mar 17 14:22:32 2016 -0700 ata: hpt366: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Acked-by: Tejun Heo Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/ata/pata_hpt366.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit ea32cea140f644a4d367bc75b053255e19751034 Author: Andy Shevchenko Date: Thu Mar 17 14:22:29 2016 -0700 power: ab8500: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/power/ab8500_btemp.c | 15 +++++---------- drivers/power/ab8500_charger.c | 16 +++++----------- drivers/power/ab8500_fg.c | 15 +++++---------- drivers/power/abx500_chargalg.c | 14 +++++--------- 4 files changed, 20 insertions(+), 40 deletions(-) commit 5f4768225cee9d9dae723f21b689e98cf3a82c76 Author: Andy Shevchenko Date: Thu Mar 17 14:22:26 2016 -0700 power: charger_manager: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Cc: Sebastian Reichel Cc: Dmitry Eremin-Solenikov Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/power/charger-manager.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit 7a5cf52dbbd67979ce9805311492e606abee0f6a Author: Andy Shevchenko Date: Thu Mar 17 14:22:23 2016 -0700 drm/edid: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Cc: David Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/drm_edid_load.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit dff4359448126936bf9b341ad7a1a7b6e0b6e95b Author: Andy Shevchenko Date: Thu Mar 17 14:22:20 2016 -0700 pinctrl: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pinctrl/pinmux.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit a7c1d0a987ee3be0b87db5c95aa4fbadf7c3c1c2 Author: Andy Shevchenko Date: Thu Mar 17 14:22:17 2016 -0700 device property: convert to use match_string() helper The new helper returns index of the mathing string in an array. We would use it here. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Acked-by: Rafael J. Wysocki Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/property.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 56b060814e2d87d6646a85a2f4609c73587399ca Author: Andy Shevchenko Date: Thu Mar 17 14:22:14 2016 -0700 lib/string: introduce match_string() helper Occasionally we have to search for an occurrence of a string in an array of strings. Make a simple helper for that purpose. Signed-off-by: Andy Shevchenko Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Cc: David Airlie Cc: David Woodhouse Cc: Dmitry Eremin-Solenikov Cc: Greg Kroah-Hartman Cc: Heikki Krogerus Cc: Linus Walleij Cc: Mika Westerberg Cc: Rafael J. Wysocki Cc: Sebastian Reichel Cc: Tejun Heo Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/string.h | 2 ++ lib/string.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 7475851f340f0c100773b554659bfea50026feda Author: Konstantin Khlebnikov Date: Thu Mar 17 14:22:11 2016 -0700 radix-tree tests: add test for radix_tree_iter_next Without fix test crashes inside tagged iteration. Signed-off-by: Konstantin Khlebnikov Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/regression3.c | 47 ++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) commit 2d6f45b802af7a15a0e455bcfad4009aa5e7b66b Author: Konstantin Khlebnikov Date: Thu Mar 17 14:22:08 2016 -0700 radix-tree tests: add regression3 test After calling radix_tree_iter_retry(), 'slot' will be set to NULL. This can cause radix_tree_next_slot() to dereference the NULL pointer. Add Konstantin Khlebnikov's test to the regression framework. Signed-off-by: Matthew Wilcox Reported-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/Makefile | 2 +- tools/testing/radix-tree/linux/kernel.h | 1 + tools/testing/radix-tree/main.c | 1 + tools/testing/radix-tree/regression.h | 1 + tools/testing/radix-tree/regression3.c | 86 +++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 1 deletion(-) commit 7165092fe5ca70bae722ac6cd78421cfd0eec18d Author: Matthew Wilcox Date: Thu Mar 17 14:22:06 2016 -0700 radix-tree,shmem: introduce radix_tree_iter_next() shmem likes to occasionally drop the lock, schedule, then reacqire the lock and continue with the iteration from the last place it left off. This is currently done with a pretty ugly goto. Introduce radix_tree_iter_next() and use it throughout shmem.c. [koct9i@gmail.com: fix bug in radix_tree_iter_next() for tagged iteration] Signed-off-by: Matthew Wilcox Cc: Hugh Dickins Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 16 ++++++++++++++++ mm/shmem.c | 12 +++--------- 2 files changed, 19 insertions(+), 9 deletions(-) commit 2cf938aae17203426a89b5955bd1c9668657bfa8 Author: Matthew Wilcox Date: Thu Mar 17 14:22:03 2016 -0700 mm: use radix_tree_iter_retry() Instead of a 'goto restart', we can now use radix_tree_iter_retry() to restart from our current position. This will make a difference when there are more ways to happen across an indirect pointer. And it eliminates some confusing gotos. [vbabka@suse.cz: remove now-obsolete-and-misleading comment] Signed-off-by: Matthew Wilcox Cc: Hugh Dickins Cc: Konstantin Khlebnikov Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 53 +++++++++++++++++------------------------------------ mm/shmem.c | 23 ++++++++++++----------- 2 files changed, 29 insertions(+), 47 deletions(-) commit c28f2420635b7000f7b9cde6cdbe6e7a0f8beed1 Author: Matthew Wilcox Date: Thu Mar 17 14:22:00 2016 -0700 btrfs: use radix_tree_iter_retry() Even though this is a 'can't happen' situation, use the new radix_tree_iter_retry() pattern to eliminate a goto. [akpm@linux-foundation.org: fix btrfs build] Signed-off-by: Matthew Wilcox Cc: Hugh Dickins Cc: Konstantin Khlebnikov Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/btrfs/tests/btrfs-tests.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7cf19af4debc804e408b059d58df7c9c226ca6fb Author: Matthew Wilcox Date: Thu Mar 17 14:21:57 2016 -0700 radix_tree: add radix_tree_dump This is debug code which is #if 0 out. Signed-off-by: Matthew Wilcox Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit e61452365372570253b2b1de84bab0cdb2e62c64 Author: Matthew Wilcox Date: Thu Mar 17 14:21:54 2016 -0700 radix_tree: add support for multi-order entries With huge pages, it is convenient to have the radix tree be able to return an entry that covers multiple indices. Previous attempts to deal with the problem have involved inserting N duplicate entries, which is a waste of memory and leads to problems trying to handle aliased tags, or probing the tree multiple times to find alternative entries which might cover the requested index. This approach inserts one canonical entry into the tree for a given range of indices, and may also insert other entries in order to ensure that lookups find the canonical entry. This solution only tolerates inserting powers of two that are greater than the fanout of the tree. If we wish to expand the radix tree's abilities to support large-ish pages that is less than the fanout at the penultimate level of the tree, then we would need to add one more step in lookup to ensure that any sibling nodes in the final level of the tree are dereferenced and we return the canonical entry that they reference. Signed-off-by: Matthew Wilcox Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 11 ++++- lib/radix-tree.c | 109 ++++++++++++++++++++++++++++++++++----------- mm/filemap.c | 2 +- 3 files changed, 93 insertions(+), 29 deletions(-) commit 0070e28d97e72aeac2a85f538d8a452400dfe1c7 Author: Matthew Wilcox Date: Thu Mar 17 14:21:51 2016 -0700 radix_tree: loop based on shift count, not height When we introduce entries that can cover multiple indices, we will need to stop in __radix_tree_create based on the shift, not the height. Split out for ease of bisect. Signed-off-by: Matthew Wilcox Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 339e6353046dd4f675304d696a88aefdd727298e Author: Matthew Wilcox Date: Thu Mar 17 14:21:48 2016 -0700 radix_tree: tag all internal tree nodes as indirect pointers Set the 'indirect_ptr' bit on all the pointers to internal nodes, not just on the root node. This enables the following patches to support multi-order entries in the radix tree. This patch is split out for ease of bisection. Signed-off-by: Matthew Wilcox Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 24 ++++++++++++++++++------ tools/testing/radix-tree/test.c | 5 +++-- 2 files changed, 21 insertions(+), 8 deletions(-) commit 1366c37ed84b166a0fffe201154b0d3b78a3976b Author: Matthew Wilcox Date: Thu Mar 17 14:21:45 2016 -0700 radix tree test harness This code is mostly from Andrew Morton and Nick Piggin; tarball downloaded from http://ozlabs.org/~akpm/rtth.tar.gz with sha1sum 0ce679db9ec047296b5d1ff7a1dfaa03a7bef1bd Some small modifications were necessary to the test harness to fix the build with the current Linux source code. I also made minor modifications to automatically test the radix-tree.c and radix-tree.h files that are in the current source tree, as opposed to a copied and slightly modified version. I am sure more could be done to tidy up the harness, as well as adding more tests. [koct9i@gmail.com: fix compilation] Signed-off-by: Matthew Wilcox Cc: Shuah Khan Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/.gitignore | 2 + tools/testing/radix-tree/Makefile | 19 ++ tools/testing/radix-tree/find_next_bit.c | 57 ++++ tools/testing/radix-tree/linux.c | 60 ++++ tools/testing/radix-tree/linux/bitops.h | 150 ++++++++++ tools/testing/radix-tree/linux/bitops/__ffs.h | 43 +++ tools/testing/radix-tree/linux/bitops/ffs.h | 41 +++ tools/testing/radix-tree/linux/bitops/ffz.h | 12 + tools/testing/radix-tree/linux/bitops/find.h | 13 + tools/testing/radix-tree/linux/bitops/fls.h | 41 +++ tools/testing/radix-tree/linux/bitops/fls64.h | 14 + tools/testing/radix-tree/linux/bitops/hweight.h | 11 + tools/testing/radix-tree/linux/bitops/le.h | 53 ++++ tools/testing/radix-tree/linux/bitops/non-atomic.h | 111 +++++++ tools/testing/radix-tree/linux/bug.h | 1 + tools/testing/radix-tree/linux/cpu.h | 34 +++ tools/testing/radix-tree/linux/export.h | 2 + tools/testing/radix-tree/linux/gfp.h | 10 + tools/testing/radix-tree/linux/kernel.h | 34 +++ tools/testing/radix-tree/linux/kmemleak.h | 1 + tools/testing/radix-tree/linux/mempool.h | 16 + tools/testing/radix-tree/linux/notifier.h | 8 + tools/testing/radix-tree/linux/percpu.h | 7 + tools/testing/radix-tree/linux/preempt.h | 4 + tools/testing/radix-tree/linux/radix-tree.h | 1 + tools/testing/radix-tree/linux/rcupdate.h | 9 + tools/testing/radix-tree/linux/slab.h | 28 ++ tools/testing/radix-tree/linux/types.h | 28 ++ tools/testing/radix-tree/main.c | 271 +++++++++++++++++ tools/testing/radix-tree/rcupdate.c | 86 ++++++ tools/testing/radix-tree/regression.h | 7 + tools/testing/radix-tree/regression1.c | 220 ++++++++++++++ tools/testing/radix-tree/regression2.c | 126 ++++++++ tools/testing/radix-tree/tag_check.c | 332 +++++++++++++++++++++ tools/testing/radix-tree/test.c | 218 ++++++++++++++ tools/testing/radix-tree/test.h | 40 +++ 36 files changed, 2110 insertions(+) commit f67c07f07fca95a7f330b8bb928eabaf9fcce75d Author: Matthew Wilcox Date: Thu Mar 17 14:21:42 2016 -0700 radix-tree: add an explicit include of bitops.h The radix-tree header uses the __ffs() function, which is defined in bitops.h. The current kernel headers implicitly include bitops.h, but the userspace test harness does not. Signed-off-by: Matthew Wilcox Cc: Johannes Weiner Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Ross Zwisler Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 1 + 1 file changed, 1 insertion(+) commit d7b85cab74edef84a9330c476478ba8cd732b6a9 Author: Heiko Carstens Date: Thu Mar 17 14:21:38 2016 -0700 lib/bug.c: make panic_on_warn available for all architectures Christian Borntraeger reported that panic_on_warn doesn't have any effect on s390. The panic_on_warn feature was introduced with 9e3961a09798 ("kernel: add panic_on_warn"). However it did care only for the case when WANT_WARN_ON_SLOWPATH is defined. This is turn is only the case for architectures which do not have an own __WARN_TAINT defined. Other architectures which do have __WARN_TAINT defined call report_bug() for warnings within lib/bug.c which does not call panic() in case panic_on_warn is set. Let's simply enable the panic_on_warn feature by adding the same code like it was added to warn_slowpath_common() in panic.c. This enables panic_on_warn also for arm64, parisc, powerpc, s390 and sh. Signed-off-by: Heiko Carstens Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Acked-by: Prarit Bhargava Cc: Catalin Marinas Cc: Will Deacon Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Tested-by: Michael Ellerman (powerpc) Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/bug.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 26a247fd9f8d2df1965b7f22c9be2fb3a48603f3 Author: Chen Gang Date: Thu Mar 17 14:21:35 2016 -0700 include/linux/list_bl.h: use bool instead of int for boolean functions hlist_bl_unhashed() and hlist_bl_empty() are all boolean functions, so return bool instead of int. Signed-off-by: Chen Gang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/list_bl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f68404bd73343b5cfe208f2716d3a37d89b968ed Author: David Kershner Date: Thu Mar 17 14:21:32 2016 -0700 MAINTAINERS: update s-Par driver maintainer list Benjamin Romer is no longer a maintainer for the Unisys s-Par driver, presently in drivers/staging/unisys/. Signed-off-by: David Kershner Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit f468908bb55a0b01d9424c74f8ec8eb906835150 Author: Ivan Delalande Date: Thu Mar 17 14:21:30 2016 -0700 printk: add clear_idx symbol to vmcoreinfo This allows us to extract from the vmcore only the messages emitted since the last time the ring buffer was cleared. We just have to make sure its value is always up-to-date, when old messages are discarded to free space in log_make_free_space() for example. Signed-off-by: Zeyu Zhao Signed-off-by: Ivan Delalande Cc: Kay Sievers Cc: Neil Horman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit adaf6590ee7db23c3a124fb9f213c90c15cecf96 Author: Sergey Senozhatsky Date: Thu Mar 17 14:21:27 2016 -0700 printk: check CON_ENABLED in have_callable_console() have_callable_console() must also test CON_ENABLED bit, not just CON_ANYTIME. We may have disabled CON_ANYTIME console so printk can wrongly assume that it's safe to call_console_drivers(). Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Cc: Jan Kara Cc: Tejun Heo Cc: Kyle McMartin Cc: Dave Jones Cc: Calvin Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b97a20d3a7909daa06625d4440c2c52d7bf08d7 Author: Sergey Senozhatsky Date: Thu Mar 17 14:21:23 2016 -0700 printk: set may_schedule for some of console_trylock() callers console_unlock() allows to cond_resched() if its caller has set `console_may_schedule' to 1, since 8d91f8b15361 ("printk: do cond_resched() between lines while outputting to consoles"). The rules are: -- console_lock() always sets `console_may_schedule' to 1 -- console_trylock() always sets `console_may_schedule' to 0 However, console_trylock() callers (among them is printk()) do not always call printk() from atomic contexts, and some of them can cond_resched() in console_unlock(), so console_trylock() can set `console_may_schedule' to 1 for such processes. For !CONFIG_PREEMPT_COUNT kernels, however, console_trylock() always sets `console_may_schedule' to 0. It's possible to drop explicit preempt_disable()/preempt_enable() in vprintk_emit(), because console_unlock() and console_trylock() are now smart enough: a) console_unlock() does not cond_resched() when it's unsafe (console_trylock() takes care of that) b) console_unlock() does can_use_console() check. Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Cc: Jan Kara Cc: Tejun Heo Cc: Kyle McMartin Cc: Dave Jones Cc: Calvin Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit a8199371afc27946d72f0d53e938e78d2ea0bae3 Author: Sergey Senozhatsky Date: Thu Mar 17 14:21:20 2016 -0700 printk: move can_use_console() out of console_trylock_for_printk() console_unlock() allows to cond_resched() if its caller has set `console_may_schedule' to 1 (this functionality is present since 8d91f8b15361 ("printk: do cond_resched() between lines while outputting to consoles"). The rules are: -- console_lock() always sets `console_may_schedule' to 1 -- console_trylock() always sets `console_may_schedule' to 0 printk() calls console_unlock() with preemption desabled, which basically can lead to RCU stalls, watchdog soft lockups, etc. if something is simultaneously calling printk() frequent enough (IOW, console_sem owner always has new data to send to console divers and can't leave console_unlock() for a long time). printk()->console_trylock() callers do not necessarily execute in atomic contexts, and some of them can cond_resched() in console_unlock(). console_trylock() can set `console_may_schedule' to 1 (allow cond_resched() later in consoe_unlock()) when it's safe. This patch (of 3): vprintk_emit() disables preemption around console_trylock_for_printk() and console_unlock() calls for a strong reason -- can_use_console() check. The thing is that vprintl_emit() can be called on a CPU that is not fully brought up yet (!cpu_online()), which potentially can cause problems if console driver wants to access per-cpu data. A console driver can explicitly state that it's safe to call it from !online cpu by setting CON_ANYTIME bit in console ->flags. That's why for !cpu_online() can_use_console() iterates all the console to find out if there is a CON_ANYTIME console, otherwise console_unlock() must be avoided. can_use_console() ensures that console_unlock() call is safe in vprintk_emit() only; console_lock() and console_trylock() are not covered by this check. Even though call_console_drivers(), invoked from console_cont_flush() and console_unlock(), tests `!cpu_online() && CON_ANYTIME' for_each_console(), it may be too late, which can result in messages loss. Assume that we have 2 cpus -- CPU0 is online, CPU1 is !online, and no CON_ANYTIME consoles available. CPU0 online CPU1 !online console_trylock() ... console_unlock() console_cont_flush spin_lock logbuf_lock if (!cont.len) { spin_unlock logbuf_lock return } for (;;) { vprintk_emit spin_lock logbuf_lock log_store spin_unlock logbuf_lock spin_lock logbuf_lock !console_trylock_for_printk msg_print_text return console_idx = log_next() console_seq++ console_prev = msg->flags spin_unlock logbuf_lock call_console_drivers() for_each_console(con) { if (!cpu_online() && !(con->flags & CON_ANYTIME)) continue; } /* * no message printed, we lost it */ vprintk_emit spin_lock logbuf_lock log_store spin_unlock logbuf_lock !console_trylock_for_printk return /* * go to the beginning of the loop, * find out there are new messages, * lose it */ } console_trylock()/console_lock() call on CPU1 may come from cpu notifiers registered on that CPU. Since notifiers are not getting unregistered when CPU is going DOWN, all of the notifiers receive notifications during CPU UP. For example, on my x86_64, I see around 50 notification sent from offline CPU to itself [swapper/2] from cpu:2 to:2 action:CPU_STARTING hotplug_hrtick [swapper/2] from cpu:2 to:2 action:CPU_STARTING blk_mq_main_cpu_notify [swapper/2] from cpu:2 to:2 action:CPU_STARTING blk_mq_queue_reinit_notify [swapper/2] from cpu:2 to:2 action:CPU_STARTING console_cpu_notify while doing echo 0 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu2/online So grabbing the console_sem lock while CPU is !online is possible, in theory. This patch moves can_use_console() check out of console_trylock_for_printk(). Instead it calls it in console_unlock(), so now console_lock()/console_unlock() are also 'protected' by can_use_console(). This also means that console_trylock_for_printk() is not really needed anymore and can be removed. Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Cc: Jan Kara Cc: Tejun Heo Cc: Kyle McMartin Cc: Dave Jones Cc: Calvin Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 97 ++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 55 deletions(-) commit faeb50b98a337abf7a11375e06a83cda23c8ca67 Author: Rob Landley Date: Thu Mar 17 14:21:17 2016 -0700 include/uapi/linux/elf-em.h: remove v850 The v850 port was removed by commits f606ddf42fd4 and 07a887d399b8 in 2008. These #defines are not used in the current kernel. Signed-off-by: Rob Landley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/elf-em.h | 3 --- 1 file changed, 3 deletions(-) commit 93e205a728e6cb8d7d11f6836e289798a1de25e2 Author: Christoph Lameter Date: Thu Mar 17 14:21:15 2016 -0700 fix Christoph's email addresses There are various email addresses for me throughout the kernel. Use the one that will always be valid. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v1/cgroups.txt | 2 +- Documentation/cgroup-v1/cpusets.txt | 2 +- MAINTAINERS | 2 +- arch/ia64/include/asm/rwsem.h | 2 +- include/linux/quicklist.h | 2 +- mm/mmu_notifier.c | 2 +- mm/quicklist.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit dfbf2897d00499f94cd53a9806e697392cbfe6a3 Author: Steven Rostedt Date: Thu Mar 17 14:21:12 2016 -0700 bug: set warn variable before calling WARN() This has hit me a couple of times already. I would be debugging code and the system would simply hang and then reboot. Finally, I found that the problem was caused by WARN_ON_ONCE() and friends. The macro WARN_ON_ONCE(condition) is defined as: static bool __section(.data.unlikely) __warned; int __ret_warn_once = !!(condition); if (unlikely(__ret_warn_once)) if (WARN_ON(!__warned)) __warned = true; unlikely(__ret_warn_once); Which looks great and all. But what I have hit, is an issue when WARN_ON() itself hits the same WARN_ON_ONCE() code. Because, the variable __warned is not yet set. Then it too calls WARN_ON() and that triggers the warning again. It keeps doing this until the stack is overflowed and the system crashes. By setting __warned first before calling WARN_ON() makes the original WARN_ON_ONCE() really only warn once, and not an infinite amount of times if the WARN_ON() also triggers the warning. Signed-off-by: Steven Rostedt Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/bug.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit c60f169202c7643991a8b4bfeea60e06843d5b5a Author: Andrew Morton Date: Thu Mar 17 14:21:09 2016 -0700 arch/mn10300/kernel/fpu-nofpu.c: needs asm/elf.h arch/mn10300/kernel/fpu-nofpu.c:27:36: error: unknown type name 'elf_fpregset_t' int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpreg) Reported-by: kbuild test robot Cc: Josh Triplett Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/kernel/fpu-nofpu.c | 1 + 1 file changed, 1 insertion(+) commit 8b9e6d58e7016382f9958d9909d8cb20d3f6eece Author: Andrew Morton Date: Thu Mar 17 14:21:06 2016 -0700 mn10300, c6x: CONFIG_GENERIC_BUG must depend on CONFIG_BUG CONFIG_BUG=n && CONFIG_GENERIC_BUG=y make no sense and things break: In file included from include/linux/page-flags.h:9:0, from kernel/bounds.c:9: include/linux/bug.h:91:47: warning: 'struct bug_entry' declared inside parameter list static inline int is_warning_bug(const struct bug_entry *bug) ^ include/linux/bug.h:91:47: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/bug.h: In function 'is_warning_bug': >> include/linux/bug.h:93:12: error: dereferencing pointer to incomplete type return bug->flags & BUGFLAG_WARNING; Reported-by: kbuild test robot Cc: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/c6x/Kconfig | 1 + arch/mn10300/Kconfig | 1 + 2 files changed, 2 insertions(+) commit 0b50a2d86d8e9a6d58e2ca3e5657f962eb698d2f Author: Dave Young Date: Thu Mar 17 14:21:03 2016 -0700 proc-vmcore: wrong data type casting fix On i686 PAE enabled machine the contiguous physical area could be large and it can cause trimming down variables in below calculation in read_vmcore() and mmap_vmcore(): tsz = min_t(size_t, m->offset + m->size - *fpos, buflen); That is, the types being used is like below on i686: m->offset: unsigned long long int m->size: unsigned long long int *fpos: loff_t (long long int) buflen: size_t (unsigned int) So casting (m->offset + m->size - *fpos) by size_t means truncating a given value by 4GB. Suppose (m->offset + m->size - *fpos) being truncated to 0, buflen >0 then we will get tsz = 0. It is of course not an expected result. Similarly we could also get other truncated values less than buflen. Then the real size passed down is not correct any more. If (m->offset + m->size - *fpos) is above 4GB, read_vmcore or mmap_vmcore use the min_t result with truncated values being compared to buflen. Then, fpos proceeds with the wrong value so that we reach below bugs: 1) read_vmcore will refuse to continue so makedumpfile fails. 2) mmap_vmcore will trigger BUG_ON() in remap_pfn_range(). Use unsigned long long in min_t instead so that the variables in are not truncated. Signed-off-by: Baoquan He Signed-off-by: Dave Young Cc: HATAYAMA Daisuke Cc: Vivek Goyal Cc: Jianyu Zhan Cc: Minfei Huang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/vmcore.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7e2bc81da333f0d4ca68882fdaef41e1b0d5690d Author: Minfei Huang Date: Thu Mar 17 14:21:00 2016 -0700 proc/base: make prompt shell start from new line after executing "cat /proc/$pid/wchan" It is not elegant that prompt shell does not start from new line after executing "cat /proc/$pid/wchan". Make prompt shell start from new line. Signed-off-by: Minfei Huang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5946beaa9ee6a3c0bb35db49adecf795fb159d2 Author: Eric Engestrom Date: Thu Mar 17 14:20:57 2016 -0700 procfs: add conditional compilation check `proc_timers_operations` is only used when CONFIG_CHECKPOINT_RESTORE is enabled. Signed-off-by: Eric Engestrom Acked-by: Cyrill Gorcunov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 ++ 1 file changed, 2 insertions(+) commit 5de23d435e88996b1efe0e2cebe242074ce67c9e Author: John Stultz Date: Thu Mar 17 14:20:54 2016 -0700 proc: add /proc//timerslack_ns interface This patch provides a proc/PID/timerslack_ns interface which exposes a task's timerslack value in nanoseconds and allows it to be changed. This allows power/performance management software to set timer slack for other threads according to its policy for the thread (such as when the thread is designated foreground vs. background activity) If the value written is non-zero, slack is set to that value. Otherwise sets it to the default for the thread. This interface checks that the calling task has permissions to to use PTRACE_MODE_ATTACH_FSCREDS on the target task, so that we can ensure arbitrary apps do not change the timer slack for other apps. Signed-off-by: John Stultz Acked-by: Kees Cook Cc: Arjan van de Ven Cc: Thomas Gleixner Cc: Oren Laadan Cc: Ruchi Kandoi Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 18 ++++++++++ fs/proc/base.c | 67 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) commit da8b44d5a9f8bf26da637b7336508ca534d6b319 Author: John Stultz Date: Thu Mar 17 14:20:51 2016 -0700 timer: convert timer_slack_ns from unsigned long to u64 This patchset introduces a /proc//timerslack_ns interface which would allow controlling processes to be able to set the timerslack value on other processes in order to save power by avoiding wakeups (Something Android currently does via out-of-tree patches). The first patch tries to fix the internal timer_slack_ns usage which was defined as a long, which limits the slack range to ~4 seconds on 32bit systems. It converts it to a u64, which provides the same basically unlimited slack (500 years) on both 32bit and 64bit machines. The second patch introduces the /proc//timerslack_ns interface which allows the full 64bit slack range for a task to be read or set on both 32bit and 64bit machines. With these two patches, on a 32bit machine, after setting the slack on bash to 10 seconds: $ time sleep 1 real 0m10.747s user 0m0.001s sys 0m0.005s The first patch is a little ugly, since I had to chase the slack delta arguments through a number of functions converting them to u64s. Let me know if it makes sense to break that up more or not. Other than that things are fairly straightforward. This patch (of 2): The timer_slack_ns value in the task struct is currently a unsigned long. This means that on 32bit applications, the maximum slack is just over 4 seconds. However, on 64bit machines, its much much larger (~500 years). This disparity could make application development a little (as well as the default_slack) to a u64. This means both 32bit and 64bit systems have the same effective internal slack range. Now the existing ABI via PR_GET_TIMERSLACK and PR_SET_TIMERSLACK specify the interface as a unsigned long, so we preserve that limitation on 32bit systems, where SET_TIMERSLACK can only set the slack to a unsigned long value, and GET_TIMERSLACK will return ULONG_MAX if the slack is actually larger then what can be stored by an unsigned long. This patch also modifies hrtimer functions which specified the slack delta as a unsigned long. Signed-off-by: John Stultz Cc: Arjan van de Ven Cc: Thomas Gleixner Cc: Oren Laadan Cc: Ruchi Kandoi Cc: Rom Lemarchand Cc: Kees Cook Cc: Android Kernel Team Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 2 +- fs/select.c | 8 ++++---- include/linux/freezer.h | 2 +- include/linux/hrtimer.h | 12 +++++++----- include/linux/poll.h | 2 +- include/linux/sched.h | 4 ++-- kernel/sys.c | 5 ++++- kernel/time/hrtimer.c | 8 ++++---- kernel/time/timer.c | 4 ++-- 9 files changed, 26 insertions(+), 21 deletions(-) commit 0a687aace3b8e215e08eed8a67014f5b8f133ab0 Author: Tetsuo Handa Date: Thu Mar 17 14:20:48 2016 -0700 mm,oom: do not loop !__GFP_FS allocation if the OOM killer is disabled After the OOM killer is disabled during suspend operation, any !__GFP_NOFAIL && __GFP_FS allocations are forced to fail. Thus, any !__GFP_NOFAIL && !__GFP_FS allocations should be forced to fail as well. Signed-off-by: Tetsuo Handa Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6afcf2895e6f229476bd0dc95fe915e639ae0a49 Author: Tetsuo Handa Date: Thu Mar 17 14:20:45 2016 -0700 mm,oom: make oom_killer_disable() killable While oom_killer_disable() is called by freeze_processes() after all user threads except the current thread are frozen, it is possible that kernel threads invoke the OOM killer and sends SIGKILL to the current thread due to sharing the thawed victim's memory. Therefore, checking for SIGKILL is preferable than TIF_MEMDIE. Signed-off-by: Tetsuo Handa Cc: Tetsuo Handa Cc: David Rientjes Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 1120ed5483941d9cd2cf52cb9644a4311dbd1011 Author: Sergey Senozhatsky Date: Thu Mar 17 14:20:42 2016 -0700 mm/zsmalloc: add `freeable' column to pool stat Add a new column to pool stats, which will tell how many pages ideally can be freed by class compaction, so it will be easier to analyze zsmalloc fragmentation. At the moment, we have only numbers of FULL and ALMOST_EMPTY classes, but they don't tell us how badly the class is fragmented internally. The new /sys/kernel/debug/zsmalloc/zramX/classes output look as follows: class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable [..] 12 224 0 2 146 5 8 4 4 13 240 0 0 0 0 0 1 0 14 256 1 13 1840 1672 115 1 10 15 272 0 0 0 0 0 1 0 [..] 49 816 0 3 745 735 149 1 2 51 848 3 4 361 306 76 4 8 52 864 12 14 378 268 81 3 21 54 896 1 12 117 57 26 2 12 57 944 0 0 0 0 0 3 0 [..] Total 26 131 12709 10994 1071 134 For example, from this particular output we can easily conclude that class-896 is heavily fragmented -- it occupies 26 pages, 12 can be freed by compaction. Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit a82cbf07131b56e7e51fbb008b82ef769af08790 Author: YiPing Xu Date: Thu Mar 17 14:20:39 2016 -0700 zsmalloc: drop unused member 'mapping_area->huge' When unmapping a huge class page in zs_unmap_object, the page will be unmapped by kmap_atomic. the "!area->huge" branch in __zs_unmap_object is alway true, and no code set "area->huge" now, so we can drop it. Signed-off-by: YiPing Xu Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a1c0b1a074c0095492a956b4fe0067b74a82cfe3 Author: Shawn Lin Date: Thu Mar 17 14:20:37 2016 -0700 mm/vmalloc: use PAGE_ALIGNED() to check PAGE_SIZE alignment We have PAGE_ALIGNED() in mm.h, so let's use it instead of IS_ALIGNED() for checking PAGE_SIZE aligned case. Signed-off-by: Shawn Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0775d10f1e65548fcbadf614a6bf3d216165021 Author: Vladimir Davydov Date: Thu Mar 17 14:20:34 2016 -0700 mm: memcontrol: zap oom_info_lock mem_cgroup_print_oom_info is always called under oom_lock, so oom_info_lock is redundant. Signed-off-by: Vladimir Davydov Cc: Johannes Weiner Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 4 ---- 1 file changed, 4 deletions(-) commit 8b5926560fafe80fe764af2aade152d490a96546 Author: Johannes Weiner Date: Thu Mar 17 14:20:31 2016 -0700 mm: memcontrol: clarify the uncharge_list() loop uncharge_list() does an unusual list walk because the function can take regular lists with dedicated list_heads as well as singleton lists where a single page is passed via the page->lru list node. This can sometimes lead to confusion as well as suggestions to replace the loop with a list_for_each_entry(), which wouldn't work. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 4 ++++ 1 file changed, 4 insertions(+) commit b6e6edcfa40561e9c8abe5eecf1c96f8e5fd9c6f Author: Johannes Weiner Date: Thu Mar 17 14:20:28 2016 -0700 mm: memcontrol: reclaim and OOM kill when shrinking memory.max below usage Setting the original memory.limit_in_bytes hardlimit is subject to a race condition when the desired value is below the current usage. The code tries a few times to first reclaim and then see if the usage has dropped to where we would like it to be, but there is no locking, and the workload is free to continue making new charges up to the old limit. Thus, attempting to shrink a workload relies on pure luck and hope that the workload happens to cooperate. To fix this in the cgroup2 memory.max knob, do it the other way round: set the limit first, then try enforcement. And if reclaim is not able to succeed, trigger OOM kills in the group. Keep going until the new limit is met, we run out of OOM victims and there's only unreclaimable memory left, or the task writing to memory.max is killed. This allows users to shrink groups reliably, and the behavior is consistent with what happens when new charges are attempted in excess of memory.max. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 6 ++++++ mm/memcontrol.c | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) commit 588083bb37a3cea8533c392370a554417c8f29cb Author: Johannes Weiner Date: Thu Mar 17 14:20:25 2016 -0700 mm: memcontrol: reclaim when shrinking memory.high below usage When setting memory.high below usage, nothing happens until the next charge comes along, and then it will only reclaim its own charge and not the now potentially huge excess of the new memory.high. This can cause groups to stay in excess of their memory.high indefinitely. To fix that, when shrinking memory.high, kick off a reclaim cycle that goes after the delta. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d9b2ddf8078f743729a054362ad96be076f224af Author: Naoya Horiguchi Date: Thu Mar 17 14:20:22 2016 -0700 tools/vm/page-types.c: avoid memset() in walk_pfn() when count == 1 I found that page-types is very slow and my testing shows many timeout errors. Here's an example with a simple program allocating 1000 thps. $ time ./page-types -p $(pgrep -f test_alloc) ... real 0m17.201s user 0m16.889s sys 0m0.312s Most of time is spent in memset(). Currently memset() clears over whole buffer for every walk_pfn() call, which is inefficient when walk_pfn() is called from walk_vma(), because in that case walk_pfn() is called for each pfn. So this patch limits the zero initialization only for the first element. $ time ./page-types.patched -p $(pgrep -f test_alloc) ... real 0m0.182s user 0m0.046s sys 0m0.135s Fixes: 954e95584579 ("tools/vm/page-types.c: add memory cgroup dumping and filtering") Signed-off-by: Naoya Horiguchi Suggested-by: Konstantin Khlebnikov Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/page-types.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7f2bd006334291178bd2bce3e506d4c7a34a0643 Author: Li Zhang Date: Thu Mar 17 14:20:19 2016 -0700 powerpc/mm: enable page parallel initialisation Parallel initialisation has been enabled for X86, boot time is improved greatly. On Power8, it is improved greatly for small memory. Here is the result from my test on Power8 platform: For 4GB of memory, boot time is improved by 59%, from 24.5s to 10s. For 50GB memory, boot time is improved by 22%, from 56.8s to 43.8s. Signed-off-by: Li Zhang Acked-by: Mel Gorman Acked-by: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 987b3095c2a76ea1b90438f5ace6f9cee354a47d Author: Li Zhang Date: Thu Mar 17 14:20:16 2016 -0700 mm: meminit: initialise more memory for inode/dentry hash tables in early boot Upstream has supported page parallel initialisation for X86 and the boot time is improved greately. Some tests have been done for Power. Here is the result I have done with different memory size. * 4GB memory: boot time is as the following: with patch vs without patch: 10.4s vs 24.5s boot time is improved 57% * 200GB memory: boot time looks the same with and without patches. boot time is about 38s * 32TB memory: boot time looks the same with and without patches boot time is about 160s. The boot time is much shorter than X86 with 24TB memory. From community discussion, it costs about 694s for X86 24T system. Parallel initialisation improves the performance by deferring memory initilisation to kswap with N kthreads, it should improve the performance therotically. In testing on X86, performance is improved greatly with huge memory. But on Power platform, it is improved greatly with less than 100GB memory. For huge memory, it is not improved greatly. But it saves the time with several threads at least, as the following information shows(32TB system log): [ 22.648169] node 9 initialised, 16607461 pages in 280ms [ 22.783772] node 3 initialised, 23937243 pages in 410ms [ 22.858877] node 6 initialised, 29179347 pages in 490ms [ 22.863252] node 2 initialised, 29179347 pages in 490ms [ 22.907545] node 0 initialised, 32049614 pages in 540ms [ 22.920891] node 15 initialised, 32212280 pages in 550ms [ 22.923236] node 4 initialised, 32306127 pages in 550ms [ 22.923384] node 12 initialised, 32314319 pages in 550ms [ 22.924754] node 8 initialised, 32314319 pages in 550ms [ 22.940780] node 13 initialised, 33353677 pages in 570ms [ 22.940796] node 11 initialised, 33353677 pages in 570ms [ 22.941700] node 5 initialised, 33353677 pages in 570ms [ 22.941721] node 10 initialised, 33353677 pages in 570ms [ 22.941876] node 7 initialised, 33353677 pages in 570ms [ 22.944946] node 14 initialised, 33353677 pages in 570ms [ 22.946063] node 1 initialised, 33345485 pages in 580ms It saves the time about 550*16 ms at least, although it can be ignore to compare the boot time about 160 seconds. What's more, the boot time is much shorter on Power even without patches than x86 for huge memory machine. So this patchset is still necessary to be enabled for Power. This patch (of 2): This patch is based on Mel Gorman's old patch in the mailing list, https://lkml.org/lkml/2015/5/5/280 which is discussed but it is fixed with a completion to wait for all memory initialised in page_alloc_init_late(). It is to fix the OOM problem on X86 with 24TB memory which allocates memory in late initialisation. But for Power platform with 32TB memory, it causes a call trace in vfs_caches_init->inode_init() and inode hash table needs more memory. So this patch allocates 1GB for 0.25TB/node for large system as it is mentioned in https://lkml.org/lkml/2015/5/1/627 This call trace is found on Power with 32TB memory, 1024CPUs, 16nodes. Currently, it only allocates 2GB*16=32GB for early initialisation. But Dentry cache hash table needes 16GB and Inode cache hash table needs 16GB. So the system have no enough memory for it. The log from dmesg as the following: Dentry cache hash table entries: 2147483648 (order: 18,17179869184 bytes) vmalloc: allocation failure, allocated 16021913600 of 17179934720 bytes swapper/0: page allocation failure: order:0,mode:0x2080020 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0-0-ppc64 Call Trace: .dump_stack+0xb4/0xb664 (unreliable) .warn_alloc_failed+0x114/0x160 .__vmalloc_area_node+0x1a4/0x2b0 .__vmalloc_node_range+0xe4/0x110 .__vmalloc_node+0x40/0x50 .alloc_large_system_hash+0x134/0x2a4 .inode_init+0xa4/0xf0 .vfs_caches_init+0x80/0x144 .start_kernel+0x40c/0x4e0 start_here_common+0x20/0x4a4 Signed-off-by: Li Zhang Acked-by: Mel Gorman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5f7377147ce0b5d521c0ee2aab2ec3ead51297db Author: Kirill A. Shutemov Date: Thu Mar 17 14:20:13 2016 -0700 thp: fix deadlock in split_huge_pmd() split_huge_pmd() tries to munlock page with munlock_vma_page(). That requires the page to locked. If the is locked by caller, we would get a deadlock: Unable to find swap-space signature INFO: task trinity-c85:1907 blocked for more than 120 seconds. Not tainted 4.4.0-00032-gf19d0bdced41-dirty #1606 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. trinity-c85 D ffff88084d997608 0 1907 309 0x00000000 Call Trace: schedule+0x9f/0x1c0 schedule_timeout+0x48e/0x600 io_schedule_timeout+0x1c3/0x390 bit_wait_io+0x29/0xd0 __wait_on_bit_lock+0x94/0x140 __lock_page+0x1d4/0x280 __split_huge_pmd+0x5a8/0x10f0 split_huge_pmd_address+0x1d9/0x230 try_to_unmap_one+0x540/0xc70 rmap_walk_anon+0x284/0x810 rmap_walk_locked+0x11e/0x190 try_to_unmap+0x1b1/0x4b0 split_huge_page_to_list+0x49d/0x18a0 follow_page_mask+0xa36/0xea0 SyS_move_pages+0xaf3/0x1570 entry_SYSCALL_64_fastpath+0x12/0x6b 2 locks held by trinity-c85/1907: #0: (&mm->mmap_sem){++++++}, at: SyS_move_pages+0x933/0x1570 #1: (&anon_vma->rwsem){++++..}, at: split_huge_page_to_list+0x402/0x18a0 I don't think the deadlock is triggerable without split_huge_page() simplifilcation patchset. But munlock_vma_page() here is wrong: we want to munlock the page unconditionally, no need in rmap lookup, that munlock_vma_page() does. Let's use clear_page_mlock() instead. It can be called under ptl. Fixes: e90309c9f772 ("thp: allow mlocked THP again") Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit fec89c109f3a7737fe3a7bf0f40d1fb7709d353b Author: Kirill A. Shutemov Date: Thu Mar 17 14:20:10 2016 -0700 thp: rewrite freeze_page()/unfreeze_page() with generic rmap walkers freeze_page() and unfreeze_page() helpers evolved in rather complex beasts. It would be nice to cut complexity of this code. This patch rewrites freeze_page() using standard try_to_unmap(). unfreeze_page() is rewritten with remove_migration_ptes(). The result is much simpler. But the new variant is somewhat slower for PTE-mapped THPs. Current helpers iterates over VMAs the compound page is mapped to, and then over ptes within this VMA. New helpers iterates over small page, then over VMA the small page mapped to, and only then find relevant pte. We have short cut for PMD-mapped THP: we directly install migration entries on PMD split. I don't think the slowdown is critical, considering how much simpler result is and that split_huge_page() is quite rare nowadays. It only happens due memory pressure or migration. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 10 ++- mm/huge_memory.c | 210 +++++++++--------------------------------------- mm/rmap.c | 10 ++- 3 files changed, 50 insertions(+), 180 deletions(-) commit e388466de4a2a1a50c43bfaeacc0c8254d9e7cb2 Author: Kirill A. Shutemov Date: Thu Mar 17 14:20:07 2016 -0700 mm: make remove_migration_ptes() beyond mm/migration.c Make remove_migration_ptes() available to be used in split_huge_page(). New parameter 'locked' added: as with try_to_umap() we need a way to indicate that caller holds rmap lock. We also shouldn't try to mlock() pte-mapped huge pages: pte-mapeed THP pages are never mlocked. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 2 ++ mm/migrate.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) commit 2a52bcbcc688eecead2953143f7ef695b8e44575 Author: Kirill A. Shutemov Date: Thu Mar 17 14:20:04 2016 -0700 rmap: extend try_to_unmap() to be usable by split_huge_page() Add support for two ttu_flags: - TTU_SPLIT_HUGE_PMD would split PMD if it's there, before trying to unmap page; - TTU_RMAP_LOCKED indicates that caller holds relevant rmap lock; Also, change rwc->done to !page_mapcount() instead of !page_mapped(). try_to_unmap() works on pte level, so we are really interested in the mappedness of this small page rather than of the compound page it's a part of. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 7 +++++++ include/linux/rmap.h | 3 +++ mm/huge_memory.c | 5 +---- mm/rmap.c | 24 ++++++++++++++++-------- 4 files changed, 27 insertions(+), 12 deletions(-) commit b97731992d00f09456726bfc5ab6641c07773038 Author: Kirill A. Shutemov Date: Thu Mar 17 14:20:01 2016 -0700 rmap: introduce rmap_walk_locked() This patchset rewrites freeze_page() and unfreeze_page() using try_to_unmap() and remove_migration_ptes(). Result is much simpler, but somewhat slower. Migration 8GiB worth of PMD-mapped THP: Baseline 20.21 +/- 0.393 Patched 20.73 +/- 0.082 Slowdown 1.03x It's 3% slower, comparing to 14% in v1. I don't it should be a stopper. Splitting of PTE-mapped pages slowed more. But this is not a common case. Migration 8GiB worth of PMD-mapped THP: Baseline 20.39 +/- 0.225 Patched 22.43 +/- 0.496 Slowdown 1.10x rmap_walk_locked() is the same as rmap_walk(), but the caller takes care of the relevant rmap lock. This is preparation for switching THP splitting from custom rmap walk in freeze_page()/unfreeze_page() to the generic one. There is no support for KSM pages for now: not clear which lock is implied. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 1 + mm/rmap.c | 41 ++++++++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) commit 99490f16f8b287a028306e4092cc85393907075f Author: Dan Williams Date: Thu Mar 17 14:19:58 2016 -0700 mm: ZONE_DEVICE depends on SPARSEMEM_VMEMMAP The primary use case for devm_memremap_pages() is to allocate an memmap array from persistent memory. That capabilty requires vmem_altmap which requires SPARSEMEM_VMEMMAP. Also, without SPARSEMEM_VMEMMAP the addition of ZONE_DEVICE expands ZONES_WIDTH and triggers the: "Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid." ...warning in mm/memory.c. SPARSEMEM_VMEMMAP=n && ZONE_DEVICE=y is not a configuration we should worry about supporting. Signed-off-by: Dan Williams Reported-by: Vlastimil Babka Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0e8fb9312fbaf1a687dd731b04d8ab3121c4ff5a Author: Jan Kara Date: Thu Mar 17 14:19:55 2016 -0700 mm: remove VM_FAULT_MINOR The define has a comment from Nick Piggin from 2007: /* For backwards compat. Remove me quickly. */ I guess 9 years should not be too hurried sense of 'quickly' even for kernel measures. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/fault.c | 2 +- arch/arm64/mm/fault.c | 2 +- arch/unicore32/mm/fault.c | 2 +- arch/xtensa/mm/fault.c | 2 +- include/linux/mm.h | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) commit 870d4b12ad15d21c5db67b373bdc2f62cfe2ec64 Author: Joe Perches Date: Thu Mar 17 14:19:53 2016 -0700 mm: percpu: use pr_fmt to prefix output Use the normal mechanism to make the logging output consistently "percpu:" instead of a mix of "PERCPU:" and "percpu:" Signed-off-by: Joe Perches Acked-by: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/percpu-km.c | 4 ++-- mm/percpu.c | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) commit 1170532bb49f9468aedabdc1d5a560e2521a2bcc Author: Joe Perches Date: Thu Mar 17 14:19:50 2016 -0700 mm: convert printk(KERN_ to pr_ Most of the mm subsystem uses pr_ so make it consistent. Miscellanea: - Realign arguments - Add missing newline to format - kmemleak-test.c has a "kmemleak: " prefix added to the "Kmemleak testing" logging message via pr_fmt Signed-off-by: Joe Perches Acked-by: Tejun Heo [percpu] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/backing-dev.c | 4 ++-- mm/bootmem.c | 7 +++---- mm/dmapool.c | 12 +++++------- mm/internal.h | 2 +- mm/kmemcheck.c | 2 +- mm/kmemleak-test.c | 2 +- mm/memory-failure.c | 52 +++++++++++++++++++++------------------------------- mm/memory.c | 17 +++++++---------- mm/mm_init.c | 7 +++---- mm/nobootmem.c | 4 ++-- mm/page_alloc.c | 24 +++++++++--------------- mm/page_io.c | 22 +++++++++++----------- mm/percpu-km.c | 6 +++--- mm/percpu.c | 12 ++++++------ mm/shmem.c | 14 ++++++-------- mm/slab.c | 51 ++++++++++++++++++++++++--------------------------- mm/slab_common.c | 2 +- mm/sparse-vmemmap.c | 6 +++--- mm/sparse.c | 17 +++++++---------- mm/swap_cgroup.c | 5 ++--- 20 files changed, 118 insertions(+), 150 deletions(-) commit 756a025f00091918d9d09ca3229defb160b409c0 Author: Joe Perches Date: Thu Mar 17 14:19:47 2016 -0700 mm: coalesce split strings Kernel style prefers a single string over split strings when the string is 'user-visible'. Miscellanea: - Add a missing newline - Realign arguments Signed-off-by: Joe Perches Acked-by: Tejun Heo [percpu] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/dmapool.c | 10 ++++------ mm/huge_memory.c | 3 +-- mm/kasan/report.c | 6 ++---- mm/kmemcheck.c | 3 +-- mm/kmemleak.c | 18 ++++++++---------- mm/memblock.c | 3 +-- mm/memory_hotplug.c | 3 +-- mm/mempolicy.c | 4 +--- mm/mmap.c | 8 +++----- mm/oom_kill.c | 3 +-- mm/page_alloc.c | 37 +++++++++++++++++-------------------- mm/page_owner.c | 5 ++--- mm/percpu.c | 4 ++-- mm/slab.c | 28 ++++++++++------------------ mm/slab_common.c | 10 ++++------ mm/slub.c | 19 +++++++++---------- mm/sparse-vmemmap.c | 8 ++++---- mm/sparse.c | 8 ++++---- mm/swapfile.c | 3 +-- mm/vmalloc.c | 4 ++-- 20 files changed, 78 insertions(+), 109 deletions(-) commit 598d80914e84fa79580850530f5d4a50a99bf4f5 Author: Joe Perches Date: Thu Mar 17 14:19:44 2016 -0700 mm: convert pr_warning to pr_warn There are a mixture of pr_warning and pr_warn uses in mm. Use pr_warn consistently. Miscellanea: - Coalesce formats - Realign arguments Signed-off-by: Joe Perches Acked-by: Tejun Heo [percpu] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 5 ++--- mm/kmemleak.c | 14 +++++++------- mm/percpu.c | 15 +++++++-------- 3 files changed, 16 insertions(+), 18 deletions(-) commit b11a7b94100cba5ec926a181894c2897a22651b9 Author: Dan Williams Date: Thu Mar 17 14:19:41 2016 -0700 mm: exclude ZONE_DEVICE from GFP_ZONE_TABLE ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new mm zones that are bumping up against the current maximum limit of 4 zones, i.e. 2 bits in page->flags for the GFP_ZONE_TABLE. The GFP_ZONE_TABLE poses an interesting constraint since include/linux/gfp.h gets included by the 32-bit portion of a 64-bit build. We need to be careful to only build the table for zones that have a corresponding gfp_t flag. GFP_ZONES_SHIFT is introduced for this purpose. This patch does not attempt to solve the problem of adding a new zone that also has a corresponding GFP_ flag. Vlastimil points out that ZONE_DEVICE, by depending on x86_64 and SPARSEMEM_VMEMMAP implies that SECTIONS_WIDTH is zero. In other words even though ZONE_DEVICE does not fit in GFP_ZONE_TABLE it is free to consume another bit in page->flags (expand ZONES_WIDTH) with room to spare. Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931 Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"") Signed-off-by: Dan Williams Reported-by: Mark Reported-by: Vlastimil Babka Cc: Mel Gorman Cc: Rik van Riel Cc: Joonsoo Kim Cc: Dave Hansen Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 33 ++++++++++++++++++++------------- include/linux/page-flags-layout.h | 2 ++ mm/Kconfig | 2 -- 3 files changed, 22 insertions(+), 15 deletions(-) commit d334c9bcb4aebd0c3e89ee415cba86fa5f0253ee Author: Vladimir Davydov Date: Thu Mar 17 14:19:38 2016 -0700 mm: memcontrol: cleanup css_reset callback - Do not take memcg_limit_mutex for resetting limits - the cgroup cannot be altered from userspace anymore, so no need to protect them. - Use plain page_counter_limit() for resetting ->memory and ->memsw limits instead of mem_cgrouop_resize_* helpers - we enlarge the limits, so no need in special handling. - Reset ->swap and ->tcpmem limits as well. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e33e33b4d1c699d06fb8ccd6da80b309b84ec975 Author: Chen Yucong Date: Thu Mar 17 14:19:35 2016 -0700 mm, memory hotplug: print debug message in the proper way for online_pages online_pages() simply returns an error value if memory_notify(MEM_GOING_ONLINE, &arg) return a value that is not what we want for successfully onlining target pages. This patch arms to print more failure information like offline_pages() in online_pages. This patch also converts printk(KERN_) to pr_(), and moves __offline_pages() to not print failure information with KERN_INFO according to David Rientjes's suggestion[1]. [1] https://lkml.org/lkml/2016/2/24/1094 Signed-off-by: Chen Yucong Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0f352e5392c86d054998dd6526f2fdc33ec4bed5 Author: Michal Hocko Date: Thu Mar 17 14:19:32 2016 -0700 mm: remove __GFP_NOFAIL is deprecated comment Commit 647757197cd3 ("mm: clarify __GFP_NOFAIL deprecation status") was incomplete and didn't remove the comment about __GFP_NOFAIL being deprecated in buffered_rmqueue. Let's get rid of this leftover but keep the WARN_ON_ONCE for order > 1 because we should really discourage from using __GFP_NOFAIL with higher order allocations because those are just too subtle. Signed-off-by: Michal Hocko Reviewed-by: Nikolay Borisov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 95813b8faa0cd315f61a8b9d9c523792370b693e Author: Joonsoo Kim Date: Thu Mar 17 14:19:29 2016 -0700 mm/page_ref: add tracepoint to track down page reference manipulation CMA allocation should be guaranteed to succeed by definition, but, unfortunately, it would be failed sometimes. It is hard to track down the problem, because it is related to page reference manipulation and we don't have any facility to analyze it. This patch adds tracepoints to track down page reference manipulation. With it, we can find exact reason of failure and can fix the problem. Following is an example of tracepoint output. (note: this example is stale version that printing flags as the number. Recent version will print it as human readable string.) <...>-9018 [004] 92.678375: page_ref_set: pfn=0x17ac9 flags=0x0 count=1 mapcount=0 mapping=(nil) mt=4 val=1 <...>-9018 [004] 92.678378: kernel_stack: => get_page_from_freelist (ffffffff81176659) => __alloc_pages_nodemask (ffffffff81176d22) => alloc_pages_vma (ffffffff811bf675) => handle_mm_fault (ffffffff8119e693) => __do_page_fault (ffffffff810631ea) => trace_do_page_fault (ffffffff81063543) => do_async_page_fault (ffffffff8105c40a) => async_page_fault (ffffffff817581d8) [snip] <...>-9018 [004] 92.678379: page_ref_mod: pfn=0x17ac9 flags=0x40048 count=2 mapcount=1 mapping=0xffff880015a78dc1 mt=4 val=1 [snip] ... ... <...>-9131 [001] 93.174468: test_pages_isolated: start_pfn=0x17800 end_pfn=0x17c00 fin_pfn=0x17ac9 ret=fail [snip] <...>-9018 [004] 93.174843: page_ref_mod_and_test: pfn=0x17ac9 flags=0x40068 count=0 mapcount=0 mapping=0xffff880015a78dc1 mt=4 val=-1 ret=1 => release_pages (ffffffff8117c9e4) => free_pages_and_swap_cache (ffffffff811b0697) => tlb_flush_mmu_free (ffffffff81199616) => tlb_finish_mmu (ffffffff8119a62c) => exit_mmap (ffffffff811a53f7) => mmput (ffffffff81073f47) => do_exit (ffffffff810794e9) => do_group_exit (ffffffff81079def) => SyS_exit_group (ffffffff81079e74) => entry_SYSCALL_64_fastpath (ffffffff817560b6) This output shows that problem comes from exit path. In exit path, to improve performance, pages are not freed immediately. They are gathered and processed by batch. During this process, migration cannot be possible and CMA allocation is failed. This problem is hard to find without this page reference tracepoint facility. Enabling this feature bloat kernel text 30 KB in my configuration. text data bss dec hex filename 12127327 2243616 1507328 15878271 f2487f vmlinux_disabled 12157208 2258880 1507328 15923416 f2f8d8 vmlinux_enabled Note that, due to header file dependency problem between mm.h and tracepoint.h, this feature has to open code the static key functions for tracepoints. Proposed by Steven Rostedt in following link. https://lkml.org/lkml/2015/12/9/699 [arnd@arndb.de: crypto/async_pq: use __free_page() instead of put_page()] [iamjoonsoo.kim@lge.com: fix build failure for xtensa] [akpm@linux-foundation.org: tweak Kconfig text, per Vlastimil] Signed-off-by: Joonsoo Kim Acked-by: Michal Nazarewicz Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: Sergey Senozhatsky Acked-by: Steven Rostedt Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds crypto/async_tx/async_pq.c | 2 +- include/linux/page_ref.h | 98 +++++++++++++++++++++++++++-- include/trace/events/page_ref.h | 134 ++++++++++++++++++++++++++++++++++++++++ mm/Kconfig.debug | 13 ++++ mm/Makefile | 1 + mm/debug_page_ref.c | 54 ++++++++++++++++ 6 files changed, 296 insertions(+), 6 deletions(-) commit fe896d1878949ea92ba547587bc3075cc688fb8f Author: Joonsoo Kim Date: Thu Mar 17 14:19:26 2016 -0700 mm: introduce page reference manipulation functions The success of CMA allocation largely depends on the success of migration and key factor of it is page reference count. Until now, page reference is manipulated by direct calling atomic functions so we cannot follow up who and where manipulate it. Then, it is hard to find actual reason of CMA allocation failure. CMA allocation should be guaranteed to succeed so finding offending place is really important. In this patch, call sites where page reference is manipulated are converted to introduced wrapper function. This is preparation step to add tracepoint to each page reference manipulation function. With this facility, we can easily find reason of CMA allocation failure. There is no functional change in this patch. In addition, this patch also converts reference read sites. It will help a second step that renames page._count to something else and prevents later attempt to direct access to it (Suggested by Andrew). Signed-off-by: Joonsoo Kim Acked-by: Michal Nazarewicz Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: Sergey Senozhatsky Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/mm/gup.c | 2 +- arch/powerpc/mm/mmu_context_hash64.c | 3 +- arch/powerpc/mm/pgtable_64.c | 2 +- arch/powerpc/platforms/512x/mpc512x_shared.c | 2 +- arch/x86/mm/gup.c | 2 +- drivers/block/aoe/aoecmd.c | 4 +- drivers/net/ethernet/freescale/gianfar.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 9 ++- drivers/net/ethernet/sun/niu.c | 2 +- fs/nilfs2/page.c | 2 +- include/linux/mm.h | 25 ++----- include/linux/page_ref.h | 85 +++++++++++++++++++++++ include/linux/pagemap.h | 19 +---- mm/debug.c | 2 +- mm/huge_memory.c | 6 +- mm/internal.h | 7 +- mm/memory_hotplug.c | 4 +- mm/migrate.c | 10 +-- mm/page_alloc.c | 12 ++-- mm/vmscan.c | 6 +- net/core/sock.c | 2 +- 25 files changed, 134 insertions(+), 82 deletions(-) commit 444eb2a449ef36fe115431ed7b71467c4563c7f1 Author: Mel Gorman Date: Thu Mar 17 14:19:23 2016 -0700 mm: thp: set THP defrag by default to madvise and add a stall-free defrag option THP defrag is enabled by default to direct reclaim/compact but not wake kswapd in the event of a THP allocation failure. The problem is that THP allocation requests potentially enter reclaim/compaction. This potentially incurs a severe stall that is not guaranteed to be offset by reduced TLB misses. While there has been considerable effort to reduce the impact of reclaim/compaction, it is still a high cost and workloads that should fit in memory fail to do so. Specifically, a simple anon/file streaming workload will enter direct reclaim on NUMA at least even though the working set size is 80% of RAM. It's been years and it's time to throw in the towel. First, this patch defines THP defrag as follows; madvise: A failed allocation will direct reclaim/compact if the application requests it never: Neither reclaim/compact nor wake kswapd defer: A failed allocation will wake kswapd/kcompactd always: A failed allocation will direct reclaim/compact (historical behaviour) khugepaged defrag will enter direct/reclaim but not wake kswapd. Next it sets the default defrag option to be "madvise" to only enter direct reclaim/compaction for applications that specifically requested it. Lastly, it removes a check from the page allocator slowpath that is related to __GFP_THISNODE to allow "defer" to work. The callers that really cares are slub/slab and they are updated accordingly. The slab one may be surprising because it also corrects a comment as kswapd was never woken up by that path. This means that a THP fault will no longer stall for most applications by default and the ideal for most users that get THP if they are immediately available. There are still options for users that prefer a stall at startup of a new application by either restoring historical behaviour with "always" or pick a half-way point with "defer" where kswapd does some of the work in the background and wakes kcompactd if necessary. THP defrag for khugepaged remains enabled and will enter direct/reclaim but no wakeup kswapd or kcompactd. After this patch a THP allocation failure will quickly fallback and rely on khugepaged to recover the situation at some time in the future. In some cases, this will reduce THP usage but the benefit of THP is hard to measure and not a universal win where as a stall to reclaim/compaction is definitely measurable and can be painful. The first test for this is using "usemem" to read a large file and write a large anonymous mapping (to avoid the zero page) multiple times. The total size of the mappings is 80% of RAM and the benchmark simply measures how long it takes to complete. It uses multiple threads to see if that is a factor. On UMA, the performance is almost identical so is not reported but on NUMA, we see this usemem 4.4.0 4.4.0 kcompactd-v1r1 nodefrag-v1r3 Amean System-1 102.86 ( 0.00%) 46.81 ( 54.50%) Amean System-4 37.85 ( 0.00%) 34.02 ( 10.12%) Amean System-7 48.12 ( 0.00%) 46.89 ( 2.56%) Amean System-12 51.98 ( 0.00%) 56.96 ( -9.57%) Amean System-21 80.16 ( 0.00%) 79.05 ( 1.39%) Amean System-30 110.71 ( 0.00%) 107.17 ( 3.20%) Amean System-48 127.98 ( 0.00%) 124.83 ( 2.46%) Amean Elapsd-1 185.84 ( 0.00%) 105.51 ( 43.23%) Amean Elapsd-4 26.19 ( 0.00%) 25.58 ( 2.33%) Amean Elapsd-7 21.65 ( 0.00%) 21.62 ( 0.16%) Amean Elapsd-12 18.58 ( 0.00%) 17.94 ( 3.43%) Amean Elapsd-21 17.53 ( 0.00%) 16.60 ( 5.33%) Amean Elapsd-30 17.45 ( 0.00%) 17.13 ( 1.84%) Amean Elapsd-48 15.40 ( 0.00%) 15.27 ( 0.82%) For a single thread, the benchmark completes 43.23% faster with this patch applied with smaller benefits as the thread increases. Similar, notice the large reduction in most cases in system CPU usage. The overall CPU time is 4.4.0 4.4.0 kcompactd-v1r1 nodefrag-v1r3 User 10357.65 10438.33 System 3988.88 3543.94 Elapsed 2203.01 1634.41 Which is substantial. Now, the reclaim figures 4.4.0 4.4.0 kcompactd-v1r1nodefrag-v1r3 Minor Faults 128458477 278352931 Major Faults 2174976 225 Swap Ins 16904701 0 Swap Outs 17359627 0 Allocation stalls 43611 0 DMA allocs 0 0 DMA32 allocs 19832646 19448017 Normal allocs 614488453 580941839 Movable allocs 0 0 Direct pages scanned 24163800 0 Kswapd pages scanned 0 0 Kswapd pages reclaimed 0 0 Direct pages reclaimed 20691346 0 Compaction stalls 42263 0 Compaction success 938 0 Compaction failures 41325 0 This patch eliminates almost all swapping and direct reclaim activity. There is still overhead but it's from NUMA balancing which does not identify that it's pointless trying to do anything with this workload. I also tried the thpscale benchmark which forces a corner case where compaction can be used heavily and measures the latency of whether base or huge pages were used thpscale Fault Latencies 4.4.0 4.4.0 kcompactd-v1r1 nodefrag-v1r3 Amean fault-base-1 5288.84 ( 0.00%) 2817.12 ( 46.73%) Amean fault-base-3 6365.53 ( 0.00%) 3499.11 ( 45.03%) Amean fault-base-5 6526.19 ( 0.00%) 4363.06 ( 33.15%) Amean fault-base-7 7142.25 ( 0.00%) 4858.08 ( 31.98%) Amean fault-base-12 13827.64 ( 0.00%) 10292.11 ( 25.57%) Amean fault-base-18 18235.07 ( 0.00%) 13788.84 ( 24.38%) Amean fault-base-24 21597.80 ( 0.00%) 24388.03 (-12.92%) Amean fault-base-30 26754.15 ( 0.00%) 19700.55 ( 26.36%) Amean fault-base-32 26784.94 ( 0.00%) 19513.57 ( 27.15%) Amean fault-huge-1 4223.96 ( 0.00%) 2178.57 ( 48.42%) Amean fault-huge-3 2194.77 ( 0.00%) 2149.74 ( 2.05%) Amean fault-huge-5 2569.60 ( 0.00%) 2346.95 ( 8.66%) Amean fault-huge-7 3612.69 ( 0.00%) 2997.70 ( 17.02%) Amean fault-huge-12 3301.75 ( 0.00%) 6727.02 (-103.74%) Amean fault-huge-18 6696.47 ( 0.00%) 6685.72 ( 0.16%) Amean fault-huge-24 8000.72 ( 0.00%) 9311.43 (-16.38%) Amean fault-huge-30 13305.55 ( 0.00%) 9750.45 ( 26.72%) Amean fault-huge-32 9981.71 ( 0.00%) 10316.06 ( -3.35%) The average time to fault pages is substantially reduced in the majority of caseds but with the obvious caveat that fewer THPs are actually used in this adverse workload 4.4.0 4.4.0 kcompactd-v1r1 nodefrag-v1r3 Percentage huge-1 0.71 ( 0.00%) 14.04 (1865.22%) Percentage huge-3 10.77 ( 0.00%) 33.05 (206.85%) Percentage huge-5 60.39 ( 0.00%) 38.51 (-36.23%) Percentage huge-7 45.97 ( 0.00%) 34.57 (-24.79%) Percentage huge-12 68.12 ( 0.00%) 40.07 (-41.17%) Percentage huge-18 64.93 ( 0.00%) 47.82 (-26.35%) Percentage huge-24 62.69 ( 0.00%) 44.23 (-29.44%) Percentage huge-30 43.49 ( 0.00%) 55.38 ( 27.34%) Percentage huge-32 50.72 ( 0.00%) 51.90 ( 2.35%) 4.4.0 4.4.0 kcompactd-v1r1nodefrag-v1r3 Minor Faults 37429143 47564000 Major Faults 1916 1558 Swap Ins 1466 1079 Swap Outs 2936863 149626 Allocation stalls 62510 3 DMA allocs 0 0 DMA32 allocs 6566458 6401314 Normal allocs 216361697 216538171 Movable allocs 0 0 Direct pages scanned 25977580 17998 Kswapd pages scanned 0 3638931 Kswapd pages reclaimed 0 207236 Direct pages reclaimed 8833714 88 Compaction stalls 103349 5 Compaction success 270 4 Compaction failures 103079 1 Note again that while this does swap as it's an aggressive workload, the direct relcim activity and allocation stalls is substantially reduced. There is some kswapd activity but ftrace showed that the kswapd activity was due to normal wakeups from 4K pages being allocated. Compaction-related stalls and activity are almost eliminated. I also tried the stutter benchmark. For this, I do not have figures for NUMA but it's something that does impact UMA so I'll report what is available stutter 4.4.0 4.4.0 kcompactd-v1r1 nodefrag-v1r3 Min mmap 7.3571 ( 0.00%) 7.3438 ( 0.18%) 1st-qrtle mmap 7.5278 ( 0.00%) 17.9200 (-138.05%) 2nd-qrtle mmap 7.6818 ( 0.00%) 21.6055 (-181.25%) 3rd-qrtle mmap 11.0889 ( 0.00%) 21.8881 (-97.39%) Max-90% mmap 27.8978 ( 0.00%) 22.1632 ( 20.56%) Max-93% mmap 28.3202 ( 0.00%) 22.3044 ( 21.24%) Max-95% mmap 28.5600 ( 0.00%) 22.4580 ( 21.37%) Max-99% mmap 29.6032 ( 0.00%) 25.5216 ( 13.79%) Max mmap 4109.7289 ( 0.00%) 4813.9832 (-17.14%) Mean mmap 12.4474 ( 0.00%) 19.3027 (-55.07%) This benchmark is trying to fault an anonymous mapping while there is a heavy IO load -- a scenario that desktop users used to complain about frequently. This shows a mix because the ideal case of mapping with THP is not hit as often. However, note that 99% of the mappings complete 13.79% faster. The CPU usage here is particularly interesting 4.4.0 4.4.0 kcompactd-v1r1nodefrag-v1r3 User 67.50 0.99 System 1327.88 91.30 Elapsed 2079.00 2128.98 And once again we look at the reclaim figures 4.4.0 4.4.0 kcompactd-v1r1nodefrag-v1r3 Minor Faults 335241922 1314582827 Major Faults 715 819 Swap Ins 0 0 Swap Outs 0 0 Allocation stalls 532723 0 DMA allocs 0 0 DMA32 allocs 1822364341 1177950222 Normal allocs 1815640808 1517844854 Movable allocs 0 0 Direct pages scanned 21892772 0 Kswapd pages scanned 20015890 41879484 Kswapd pages reclaimed 19961986 41822072 Direct pages reclaimed 21892741 0 Compaction stalls 1065755 0 Compaction success 514 0 Compaction failures 1065241 0 Allocation stalls and all direct reclaim activity is eliminated as well as compaction-related stalls. THP gives impressive gains in some cases but only if they are quickly available. We're not going to reach the point where they are completely free so lets take the costs out of the fast paths finally and defer the cost to kswapd, kcompactd and khugepaged where it belongs. Signed-off-by: Mel Gorman Acked-by: Rik van Riel Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/transhuge.txt | 17 +++++++ include/linux/gfp.h | 2 +- include/linux/huge_mm.h | 9 +--- mm/huge_memory.c | 101 +++++++++++++++++++++++++++-------------- mm/page_alloc.c | 8 ---- mm/slab.c | 8 ++-- mm/slub.c | 2 +- 7 files changed, 91 insertions(+), 56 deletions(-) commit f9054c70d28bc214b2857cf8db8269f4f45a5e23 Author: David Rientjes Date: Thu Mar 17 14:19:19 2016 -0700 mm, mempool: only set __GFP_NOMEMALLOC if there are free elements If an oom killed thread calls mempool_alloc(), it is possible that it'll loop forever if there are no elements on the freelist since __GFP_NOMEMALLOC prevents it from accessing needed memory reserves in oom conditions. Only set __GFP_NOMEMALLOC if there are elements on the freelist. If there are no free elements, allow allocations without the bit set so that memory reserves can be accessed if needed. Additionally, using mempool_alloc() with __GFP_NOMEMALLOC is not supported since the implementation can loop forever without accessing memory reserves when needed. Signed-off-by: David Rientjes Cc: Greg Thelen Cc: Michal Hocko Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempool.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit b14a1ef58e8acb7fa64c1c8f745b21fd8a577aba Author: Satoru Takeuchi Date: Thu Mar 17 14:19:17 2016 -0700 mm: remove unnecessary description about a non-exist gfp flag Since __GFP_NOACCOUNT was removed by commit 20b5c3039863 ("Revert 'gfp: add __GFP_NOACCOUNT'"), its description is not necessary. Signed-off-by: Satoru Takeuchi Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 -- 1 file changed, 2 deletions(-) commit 795ae7a0de6b834a0cc202aa55c190ef81496665 Author: Johannes Weiner Date: Thu Mar 17 14:19:14 2016 -0700 mm: scale kswapd watermarks in proportion to memory In machines with 140G of memory and enterprise flash storage, we have seen read and write bursts routinely exceed the kswapd watermarks and cause thundering herds in direct reclaim. Unfortunately, the only way to tune kswapd aggressiveness is through adjusting min_free_kbytes - the system's emergency reserves - which is entirely unrelated to the system's latency requirements. In order to get kswapd to maintain a 250M buffer of free memory, the emergency reserves need to be set to 1G. That is a lot of memory wasted for no good reason. On the other hand, it's reasonable to assume that allocation bursts and overall allocation concurrency scale with memory capacity, so it makes sense to make kswapd aggressiveness a function of that as well. Change the kswapd watermark scale factor from the currently fixed 25% of the tunable emergency reserve to a tunable 0.1% of memory. Beyond 1G of memory, this will produce bigger watermark steps than the current formula in default settings. Ensure that the new formula never chooses steps smaller than that, i.e. 25% of the emergency reserve. On a 140G machine, this raises the default watermark steps - the distance between min and low, and low and high - from 16M to 143M. Signed-off-by: Johannes Weiner Acked-by: Mel Gorman Acked-by: Rik van Riel Acked-by: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 18 ++++++++++++++++++ include/linux/mm.h | 1 + include/linux/mmzone.h | 2 ++ kernel/sysctl.c | 10 ++++++++++ mm/page_alloc.c | 29 +++++++++++++++++++++++++++-- 5 files changed, 58 insertions(+), 2 deletions(-) commit 3ed3a4f0ddffece942bb2661924d87be4ce63cb7 Author: Kirill A. Shutemov Date: Thu Mar 17 14:19:11 2016 -0700 mm: cleanup *pte_alloc* interfaces There are few things about *pte_alloc*() helpers worth cleaning up: - 'vma' argument is unused, let's drop it; - most __pte_alloc() callers do speculative check for pmd_none(), before taking ptl: let's introduce pte_alloc() macro which does the check. The only direct user of __pte_alloc left is userfaultfd, which has different expectation about atomicity wrt pmd. - pte_alloc_map() and pte_alloc_map_lock() are redefined using pte_alloc(). [sudeep.holla@arm.com: fix build for arm64 hugetlbpage] [sfr@canb.auug.org.au: fix arch/arm/mm/mmu.c some more] Signed-off-by: Kirill A. Shutemov Cc: Dave Hansen Signed-off-by: Sudeep Holla Acked-by: Kirill A. Shutemov Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/mmu.c | 6 +++--- arch/arm/mm/pgd.c | 2 +- arch/arm64/mm/hugetlbpage.c | 2 +- arch/ia64/mm/hugetlbpage.c | 2 +- arch/metag/mm/hugetlbpage.c | 2 +- arch/parisc/mm/hugetlbpage.c | 2 +- arch/sh/mm/hugetlbpage.c | 2 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/tile/mm/hugetlbpage.c | 2 +- arch/um/kernel/skas/mmu.c | 2 +- arch/unicore32/mm/pgd.c | 2 +- arch/x86/kernel/tboot.c | 2 +- include/linux/mm.h | 17 ++++++++--------- mm/memory.c | 8 +++----- mm/mremap.c | 3 +-- mm/userfaultfd.c | 3 +-- 16 files changed, 27 insertions(+), 32 deletions(-) commit 5057dcd0f1aaad57e07e728ba20a99e205c6b9de Author: Igor Redko Date: Thu Mar 17 14:19:08 2016 -0700 virtio_balloon: export 'available' memory to balloon statistics Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory statistics protocol, corresponding to 'Available' in /proc/meminfo. It indicates to the hypervisor how big the balloon can be inflated without pushing the guest system to swap. Signed-off-by: Igor Redko Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Cc: Michael S. Tsirkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/virtio/virtio_balloon.c | 6 ++++++ include/uapi/linux/virtio_balloon.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit d02bd27bd33dd7e8d22594cd568b81be0cb584cd Author: Igor Redko Date: Thu Mar 17 14:19:05 2016 -0700 mm/page_alloc.c: calculate 'available' memory in a separate function Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory statistics protocol, corresponding to 'Available' in /proc/meminfo. It indicates to the hypervisor how big the balloon can be inflated without pushing the guest system to swap. This metric would be very useful in VM orchestration software to improve memory management of different VMs under overcommit. This patch (of 2): Factor out calculation of the available memory counter into a separate exportable function, in order to be able to use it in other parts of the kernel. In particular, it appears a relevant metric to report to the hypervisor via virtio-balloon statistics interface (in a followup patch). Signed-off-by: Igor Redko Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan Cc: Michael S. Tsirkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 31 +------------------------------ include/linux/mm.h | 1 + mm/page_alloc.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 30 deletions(-) commit 7eb50292d7f74ccb89155960d62b2697f2536b28 Author: Yang Shi Date: Thu Mar 17 14:19:02 2016 -0700 mm/Kconfig: remove redundant arch depend for memory hotplug MEMORY_HOTPLUG already depends on ARCH_ENABLE_MEMORY_HOTPLUG which is selected by the supported architectures, so the following arch depend is unnecessary. Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 01609ec2fa1f0c1ad016d7f6ae2371313275984a Author: Vineet Gupta Date: Thu Mar 17 14:18:59 2016 -0700 ARC, thp: remove infrastructure for handling splitting PMDs With THP refcounting work, no need to mark PMDs splitting. (ARC got missed under the sweeping arch change as THP support was likely not present in orig baseline) Signed-off-by: Vineet Gupta Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/include/asm/hugepage.h | 3 --- 1 file changed, 3 deletions(-) commit 458aa76d132dc1c3c60be0f0db99bcc0ce1767fc Author: Aneesh Kumar K.V Date: Thu Mar 17 14:18:56 2016 -0700 mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range We remove one instace of flush_tlb_range here. That was added by commit f714f4f20e59 ("mm: numa: call MMU notifiers on THP migration"). But the pmdp_huge_clear_flush_notify should have done the require flush for us. Hence remove the extra flush. Signed-off-by: Aneesh Kumar K.V Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/pgtable.h | 17 +++++++++++++++++ mm/migrate.c | 8 +++++--- mm/pgtable-generic.c | 14 -------------- 3 files changed, 22 insertions(+), 17 deletions(-) commit bcf6691797f425b301f629bb783b7ff2d0bcfa5a Author: Kirill A. Shutemov Date: Thu Mar 17 14:18:53 2016 -0700 mm, tracing: refresh __def_vmaflag_names Get list of VMA flags up-to-date and sort it to match VM_* definition order. [vbabka@suse.cz: add a note above vmaflag definitions to update the names when changing] Signed-off-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 + include/trace/events/mmflags.h | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) commit 39a1aa8e194ab67983de3b9d0b204ccee12e689a Author: Andrey Ryabinin Date: Thu Mar 17 14:18:50 2016 -0700 mm: deduplicate memory overcommitment code Currently we have two copies of the same code which implements memory overcommitment logic. Let's move it into mm/util.c and hence avoid duplication. No functional changes here. Signed-off-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 124 ------------------------------------------------------------- mm/nommu.c | 116 --------------------------------------------------------- mm/util.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 240 deletions(-) commit ea606cf5d8df370e7932460dfd960b21f20e7c6d Author: Andrey Ryabinin Date: Thu Mar 17 14:18:48 2016 -0700 mm: move max_map_count bits into mm.h max_map_count sysctl unrelated to scheduler. Move its bits from include/linux/sched/sysctl.h to include/linux/mm.h. Signed-off-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 21 +++++++++++++++++++++ include/linux/sched/sysctl.h | 21 --------------------- mm/mmap.c | 1 - mm/mremap.c | 1 - mm/nommu.c | 1 - 5 files changed, 21 insertions(+), 24 deletions(-) commit f9719a03de51e13526d614e79d002f838770b2d6 Author: Kirill A. Shutemov Date: Thu Mar 17 14:18:45 2016 -0700 thp, vmstats: count deferred split events Count how many times we put a THP in split queue. Currently, it happens on partial unmap of a THP. Rapidly growing value can indicate that an application behaves unfriendly wrt THP: often fault in huge page and then unmap part of it. This leads to unnecessary memory fragmentation and the application may require tuning. The event also can help with debugging kernel [mis-]behaviour. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/transhuge.txt | 5 +++++ include/linux/vm_event_item.h | 1 + mm/huge_memory.c | 1 + mm/vmstat.c | 1 + 4 files changed, 8 insertions(+) commit 0a6b76dd23fa08c5fd7b68acdb55018a37afd4aa Author: Vladimir Davydov Date: Thu Mar 17 14:18:42 2016 -0700 mm: workingset: make shadow node shrinker memcg aware Workingset code was recently made memcg aware, but shadow node shrinker is still global. As a result, one small cgroup can consume all memory available for shadow nodes, possibly hurting other cgroups by reclaiming their shadow nodes, even though reclaim distances stored in its shadow nodes have no effect. To avoid this, we need to make shadow node shrinker memcg aware. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 10 ++++++++++ mm/memcontrol.c | 5 ++--- mm/workingset.c | 10 +++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) commit cdcbb72ebfec52373e57092eccaadd5a6e261c3e Author: Vladimir Davydov Date: Thu Mar 17 14:18:39 2016 -0700 mm: workingset: size shadow nodes lru basing on file cache size A page is activated on refault if the refault distance stored in the corresponding shadow entry is less than the number of active file pages. Since active file pages can't occupy more than half memory, we assume that the maximal effective refault distance can't be greater than half the number of present pages and size the shadow nodes lru list appropriately. Generally speaking, this assumption is correct, but it can result in wasting a considerable chunk of memory on stale shadow nodes in case the portion of file pages is small, e.g. if a workload mostly uses anonymous memory. To sort this out, we need to compute the size of shadow nodes lru basing not on the maximal possible, but the current size of file cache. We could take the size of active file lru for the maximal refault distance, but active lru is pretty unstable - it can shrink dramatically at runtime possibly disrupting workingset detection logic. Instead we assume that the maximal refault distance equals half the total number of file cache pages. This will protect us against active file lru size fluctuations while still being correct, because size of active lru is normally maintained lower than size of inactive lru. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 58e698af4c6347c726090d5480b2e51d1d07edf9 Author: Vladimir Davydov Date: Thu Mar 17 14:18:36 2016 -0700 radix-tree: account radix_tree_node to memory cgroup Allocation of radix_tree_node objects can be easily triggered from userspace, so we should account them to memory cgroup. Besides, we need them accounted for making shadow node shrinker per memcg (see mm/workingset.c). A tricky thing about accounting radix_tree_node objects is that they are mostly allocated through radix_tree_preload(), so we can't just set SLAB_ACCOUNT for radix_tree_node_cachep - that would likely result in a lot of unrelated cgroups using objects from each other's caches. One way to overcome this would be making radix tree preloads per memcg, but that would probably look cumbersome and overcomplicated. Instead, we make radix_tree_node_alloc() first try to allocate from the cache with __GFP_ACCOUNT, no matter if the caller has preloaded or not, and only if it fails fall back on using per cpu preloads. This should make most allocations accounted. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/radix-tree.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit b6ecd2dea4435a771a99c497a6ac5df6d3618c5a Author: Vladimir Davydov Date: Thu Mar 17 14:18:33 2016 -0700 mm: memcontrol: zap memcg_kmem_online helper As kmem accounting is now either enabled for all cgroups or disabled system-wide, there's no point in having memcg_kmem_online() helper - instead one can use memcg_kmem_enabled() and mem_cgroup_online(), as shrink_slab() now does. There are only two places left where this helper is used - __memcg_kmem_charge() and memcg_create_kmem_cache(). The former can only be called if memcg_kmem_enabled() returned true. Since the cgroup it operates on is online, mem_cgroup_is_root() check will be enough. memcg_create_kmem_cache() can't use mem_cgroup_online() helper instead of memcg_kmem_online(), because it relies on the fact that in memcg_offline_kmem() memcg->kmem_state is changed before memcg_deactivate_kmem_caches() is called, but there we can just open-code the check. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 10 ---------- mm/memcontrol.c | 2 +- mm/slab_common.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) commit 0fc9f58a90a5012942abf0ae98cfc852afebc0a6 Author: Vladimir Davydov Date: Thu Mar 17 14:18:30 2016 -0700 mm: vmscan: pass root_mem_cgroup instead of NULL to memcg aware shrinker It's just convenient to implement a memcg aware shrinker when you know that shrink_control->memcg != NULL unless memcg_kmem_enabled() returns false. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit b313aeee25098bf361c808fe45ba2d3af398ec46 Author: Vladimir Davydov Date: Thu Mar 17 14:18:27 2016 -0700 mm: memcontrol: enable kmem accounting for all cgroups in the legacy hierarchy Workingset code was recently made memcg aware, but shadow node shrinker is still global. As a result, one small cgroup can consume all memory available for shadow nodes, possibly hurting other cgroups by reclaiming their shadow nodes, even though reclaim distances stored in its shadow nodes have no effect. To avoid this, we need to make shadow node shrinker memcg aware. The actual work is done in patch 6 of the series. Patches 1 and 2 prepare memcg/shrinker infrastructure for the change. Patch 3 is just a collateral cleanup. Patch 4 makes radix_tree_node accounted, which is necessary for making shadow node shrinker memcg aware. Patch 5 reduces shadow nodes overhead in case workload mostly uses anonymous pages. This patch: Currently, in the legacy hierarchy kmem accounting is off for all cgroups by default and must be enabled explicitly by writing something to memory.kmem.limit_in_bytes. Since we don't support reclaim on hitting kmem limit, nor do we have any plans to implement it, this is likely to be -1, just to enable kmem accounting and limit kernel memory consumption by the memory.limit_in_bytes along with user memory. This user API was introduced when the implementation of kmem accounting lacked slab shrinker support and hence was useless in practice. Things have changed since then - slab shrinkers were made memcg aware, the accounting overhead seems to be negligible, and a failure to charge a kmem allocation should not have critical consequences, because we only account those kernel objects that should be safe to fail. That's why kmem accounting is enabled by default for all cgroups in the default hierarchy, which will eventually replace the legacy one. The ability to enable kmem accounting for some cgroups while keeping it disabled for others is getting difficult to maintain. E.g. to make shadow node shrinker memcg aware (see mm/workingset.c), we need to know the relationship between the number of shadow nodes allocated for a cgroup and the size of its lru list. If kmem accounting is enabled for all cgroups there is no problem, but what should we do if kmem accounting is enabled only for half of cgroups? We've no other choice but use global lru stats while scanning root cgroup's shadow nodes, but that would be wrong if kmem accounting was enabled for all cgroups (which is the case if the unified hierarchy is used), in which case we should use lru stats of the root cgroup's lruvec. That being said, let's enable kmem accounting for all memory cgroups by default. If one finds it unstable or too costly, it can always be disabled system-wide by passing cgroup.memory=nokmem to the kernel at boot time. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 41 +++++------------------------------------ 1 file changed, 5 insertions(+), 36 deletions(-) commit 4b0f326163f09e6d67f09dd5e1a70093cee710fc Author: Denys Vlasenko Date: Thu Mar 17 14:18:24 2016 -0700 include/linux/page-flags.h: force inlining of selected page flag modifications Sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, the following functions get deinlined many times. Examples of disassembly: (43 copies, 141 calls): 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 80 0f 08 lock orb $0x8,(%rdi) 5d pop %rbp c3 retq (10 copies, 134 calls): 48 8b 07 mov (%rdi),%rax 55 push %rbp 48 89 e5 mov %rsp,%rbp 48 c1 e8 0b shr $0xb,%rax 83 e0 01 and $0x1,%eax 5d pop %rbp c3 retq This patch fixes this via s/inline/__always_inline/. Code size decrease after the patch is ~7k: text data bss dec hex filename 92125002 20826048 36417536 149368586 8e72f0a vmlinux 92118087 20826112 36417536 149361735 8e71447 vmlinux7_pageops_after Signed-off-by: Denys Vlasenko Cc: Ingo Molnar Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit ee91ef6173e81819f5ff610c2485802081635657 Author: Denys Vlasenko Date: Thu Mar 17 14:18:21 2016 -0700 bufferhead: force inlining of buffer head flag operations With both gcc 4.7.2 and 4.9.2, sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, set_buffer_foo(), clear_buffer_foo() and similar functions get deinlined about 60 times. Examples of disassembly: (14 copies, 43 calls): 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 80 0f 20 lock orb $0x20,(%rdi) 5d pop %rbp c3 retq (3 copies, 34 calls): 48 8b 07 mov (%rdi),%rax 55 push %rbp 48 89 e5 mov %rsp,%rbp 48 c1 e8 05 shr $0x5,%rax 83 e0 01 and $0x1,%eax 5d pop %rbp c3 retq (5 copies, 13 calls): 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 80 0f 40 lock orb $0x40,(%rdi) 5d pop %rbp c3 retq This patch fixes this via s/inline/__always_inline/. This decreases vmlinux by about 3 kbytes. text data bss dec hex filename 88200439 19905208 36421632 144527279 89d4faf vmlinux2 88197239 19905240 36421632 144524111 89d434f vmlinux Signed-off-by: Denys Vlasenko Cc: Ingo Molnar Cc: Thomas Graf Cc: Peter Zijlstra Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/buffer_head.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 075db1502ffd4ff8c58020167484a6e123ae01a3 Author: Konstantin Khlebnikov Date: Thu Mar 17 14:18:18 2016 -0700 tools/vm/page-types.c: add memory cgroup dumping and filtering This adds two command line keys: -c|--cgroup path|@inode Walk only pages owned by this memory cgroup -C|--list-cgroup Show memory cgroup inodes [vdavydov@virtuozzo.com: opt_cgroup should be uint64_t. Fix conflicts with "tools/vm/page-types.c: support swap entry"] Signed-off-by: Konstantin Khlebnikov Cc: Naoya Horiguchi Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/page-types.c | 99 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 15 deletions(-) commit accf62422b3a67fce8ce086aa81c8300ddbf42be Author: Vlastimil Babka Date: Thu Mar 17 14:18:15 2016 -0700 mm, kswapd: replace kswapd compaction with waking up kcompactd Similarly to direct reclaim/compaction, kswapd attempts to combine reclaim and compaction to attempt making memory allocation of given order available. The details differ from direct reclaim e.g. in having high watermark as a goal. The code involved in kswapd's reclaim/compaction decisions has evolved to be quite complex. Testing reveals that it doesn't actually work in at least one scenario, and closer inspection suggests that it could be greatly simplified without compromising on the goal (make high-order page available) or efficiency (don't reclaim too much). The simplification relieas of doing all compaction in kcompactd, which is simply woken up when high watermarks are reached by kswapd's reclaim. The scenario where kswapd compaction doesn't work was found with mmtests test stress-highalloc configured to attempt order-9 allocations without direct reclaim, just waking up kswapd. There was no compaction attempt from kswapd during the whole test. Some added instrumentation shows what happens: - balance_pgdat() sets end_zone to Normal, as it's not balanced - reclaim is attempted on DMA zone, which sets nr_attempted to 99, but it cannot reclaim anything, so sc.nr_reclaimed is 0 - for zones DMA32 and Normal, kswapd_shrink_zone uses testorder=0, so it merely checks if high watermarks were reached for base pages. This is true, so no reclaim is attempted. For DMA, testorder=0 wasn't used, as compaction_suitable() returned COMPACT_SKIPPED - even though the pgdat_needs_compaction flag wasn't set to false, no compaction happens due to the condition sc.nr_reclaimed > nr_attempted being false (as 0 < 99) - priority-- due to nr_reclaimed being 0, repeat until priority reaches 0 pgdat_balanced() is false as only the small zone DMA appears balanced (curiously in that check, watermark appears OK and compaction_suitable() returns COMPACT_PARTIAL, because a lower classzone_idx is used there) Now, even if it was decided that reclaim shouldn't be attempted on the DMA zone, the scenario would be the same, as (sc.nr_reclaimed=0 > nr_attempted=0) is also false. The condition really should use >= as the comment suggests. Then there is a mismatch in the check for setting pgdat_needs_compaction to false using low watermark, while the rest uses high watermark, and who knows what other subtlety. Hopefully this demonstrates that this is unsustainable. Luckily we can simplify this a lot. The reclaim/compaction decisions make sense for direct reclaim scenario, but in kswapd, our primary goal is to reach high watermark in order-0 pages. Afterwards we can attempt compaction just once. Unlike direct reclaim, we don't reclaim extra pages (over the high watermark), the current code already disallows it for good reasons. After this patch, we simply wake up kcompactd to process the pgdat, after we have either succeeded or failed to reach the high watermarks in kswapd, which goes to sleep. We pass kswapd's order and classzone_idx, so kcompactd can apply the same criteria to determine which zones are worth compacting. Note that we use the classzone_idx from wakeup_kswapd(), not balanced_classzone_idx which can include higher zones that kswapd tried to balance too, but didn't consider them in pgdat_balanced(). Since kswapd now cannot create high-order pages itself, we need to adjust how it determines the zones to be balanced. The key element here is adding a "highorder" parameter to zone_balanced, which, when set to false, makes it consider only order-0 watermark instead of the desired higher order (this was done previously by kswapd_shrink_zone(), but not elsewhere). This false is passed for example in pgdat_balanced(). Importantly, wakeup_kswapd() uses true to make sure kswapd and thus kcompactd are woken up for a high-order allocation failure. The last thing is to decide what to do with pageblock_skip bitmap handling. Compaction maintains a pageblock_skip bitmap to record pageblocks where isolation recently failed. This bitmap can be reset by three ways: 1) direct compaction is restarting after going through the full deferred cycle 2) kswapd goes to sleep, and some other direct compaction has previously finished scanning the whole zone and set zone->compact_blockskip_flush. Note that a successful direct compaction clears this flag. 3) compaction was invoked manually via trigger in /proc The case 2) is somewhat fuzzy to begin with, but after introducing kcompactd we should update it. The check for direct compaction in 1), and to set the flush flag in 2) use current_is_kswapd(), which doesn't work for kcompactd. Thus, this patch adds bool direct_compaction to compact_control to use in 2). For the case 1) we remove the check completely - unlike the former kswapd compaction, kcompactd does use the deferred compaction functionality, so flushing tied to restarting from deferred compaction makes sense here. Note that when kswapd goes to sleep, kcompactd is woken up, so it will see the flushed pageblock_skip bits. This is different from when the former kswapd compaction observed the bits and I believe it makes more sense. Kcompactd can afford to be more thorough than a direct compaction trying to limit allocation latency, or kswapd whose primary goal is to reclaim. For testing, I used stress-highalloc configured to do order-9 allocations with GFP_NOWAIT|__GFP_HIGH|__GFP_COMP, so they relied just on kswapd/kcompactd reclaim/compaction (the interfering kernel builds in phases 1 and 2 work as usual): stress-highalloc 4.5-rc1+before 4.5-rc1+after -nodirect -nodirect Success 1 Min 1.00 ( 0.00%) 5.00 (-66.67%) Success 1 Mean 1.40 ( 0.00%) 6.20 (-55.00%) Success 1 Max 2.00 ( 0.00%) 7.00 (-16.67%) Success 2 Min 1.00 ( 0.00%) 5.00 (-66.67%) Success 2 Mean 1.80 ( 0.00%) 6.40 (-52.38%) Success 2 Max 3.00 ( 0.00%) 7.00 (-16.67%) Success 3 Min 34.00 ( 0.00%) 62.00 ( 1.59%) Success 3 Mean 41.80 ( 0.00%) 63.80 ( 1.24%) Success 3 Max 53.00 ( 0.00%) 65.00 ( 2.99%) User 3166.67 3181.09 System 1153.37 1158.25 Elapsed 1768.53 1799.37 4.5-rc1+before 4.5-rc1+after -nodirect -nodirect Direct pages scanned 32938 32797 Kswapd pages scanned 2183166 2202613 Kswapd pages reclaimed 2152359 2143524 Direct pages reclaimed 32735 32545 Percentage direct scans 1% 1% THP fault alloc 579 612 THP collapse alloc 304 316 THP splits 0 0 THP fault fallback 793 778 THP collapse fail 11 16 Compaction stalls 1013 1007 Compaction success 92 67 Compaction failures 920 939 Page migrate success 238457 721374 Page migrate failure 23021 23469 Compaction pages isolated 504695 1479924 Compaction migrate scanned 661390 8812554 Compaction free scanned 13476658 84327916 Compaction cost 262 838 After this patch we see improvements in allocation success rate (especially for phase 3) along with increased compaction activity. The compaction stalls (direct compaction) in the interfering kernel builds (probably THP's) also decreased somewhat thanks to kcompactd activity, yet THP alloc successes improved a bit. Note that elapsed and user time isn't so useful for this benchmark, because of the background interference being unpredictable. It's just to quickly spot some major unexpected differences. System time is somewhat more useful and that didn't increase. Also (after adjusting mmtests' ftrace monitor): Time kswapd awake 2547781 2269241 Time kcompactd awake 0 119253 Time direct compacting 939937 557649 Time kswapd compacting 0 0 Time kcompactd compacting 0 119099 The decrease of overal time spent compacting appears to not match the increased compaction stats. I suspect the tasks get rescheduled and since the ftrace monitor doesn't see that, the reported time is wall time, not CPU time. But arguably direct compactors care about overall latency anyway, whether busy compacting or waiting for CPU doesn't matter. And that latency seems to almost halved. It's also interesting how much time kswapd spent awake just going through all the priorities and failing to even try compacting, over and over. We can also configure stress-highalloc to perform both direct reclaim/compaction and wakeup kswapd/kcompactd, by using GFP_KERNEL|__GFP_HIGH|__GFP_COMP: stress-highalloc 4.5-rc1+before 4.5-rc1+after -direct -direct Success 1 Min 4.00 ( 0.00%) 9.00 (-50.00%) Success 1 Mean 8.00 ( 0.00%) 10.00 (-19.05%) Success 1 Max 12.00 ( 0.00%) 11.00 ( 15.38%) Success 2 Min 4.00 ( 0.00%) 9.00 (-50.00%) Success 2 Mean 8.20 ( 0.00%) 10.00 (-16.28%) Success 2 Max 13.00 ( 0.00%) 11.00 ( 8.33%) Success 3 Min 75.00 ( 0.00%) 74.00 ( 1.33%) Success 3 Mean 75.60 ( 0.00%) 75.20 ( 0.53%) Success 3 Max 77.00 ( 0.00%) 76.00 ( 0.00%) User 3344.73 3246.04 System 1194.24 1172.29 Elapsed 1838.04 1836.76 4.5-rc1+before 4.5-rc1+after -direct -direct Direct pages scanned 125146 120966 Kswapd pages scanned 2119757 2135012 Kswapd pages reclaimed 2073183 2108388 Direct pages reclaimed 124909 120577 Percentage direct scans 5% 5% THP fault alloc 599 652 THP collapse alloc 323 354 THP splits 0 0 THP fault fallback 806 793 THP collapse fail 17 16 Compaction stalls 2457 2025 Compaction success 906 518 Compaction failures 1551 1507 Page migrate success 2031423 2360608 Page migrate failure 32845 40852 Compaction pages isolated 4129761 4802025 Compaction migrate scanned 11996712 21750613 Compaction free scanned 214970969 344372001 Compaction cost 2271 2694 In this scenario, this patch doesn't change the overall success rate as direct compaction already tries all it can. There's however significant reduction in direct compaction stalls (that is, the number of allocations that went into direct compaction). The number of successes (i.e. direct compaction stalls that ended up with successful allocation) is reduced by the same number. This means the offload to kcompactd is working as expected, and direct compaction is reduced either due to detecting contention, or compaction deferred by kcompactd. In the previous version of this patchset there was some apparent reduction of success rate, but the changes in this version (such as using sync compaction only), new baseline kernel, and/or averaging results from 5 executions (my bet), made this go away. Ftrace-based stats seem to roughly agree: Time kswapd awake 2532984 2326824 Time kcompactd awake 0 257916 Time direct compacting 864839 735130 Time kswapd compacting 0 0 Time kcompactd compacting 0 257585 Signed-off-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 10 ++-- mm/internal.h | 1 + mm/vmscan.c | 147 ++++++++++++++++++-------------------------------------- 3 files changed, 54 insertions(+), 104 deletions(-) commit e888ca3545dc6823603b976e40b62af2c68b6fcc Author: Vlastimil Babka Date: Thu Mar 17 14:18:12 2016 -0700 mm, memory hotplug: small cleanup in online_pages() We can reuse the nid we've determined instead of repeated pfn_to_nid() usages. Also zone_to_nid() should be a bit cheaper in general than pfn_to_nid(). Signed-off-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 698b1b30642f1ff0ea10ef1de9745ab633031377 Author: Vlastimil Babka Date: Thu Mar 17 14:18:08 2016 -0700 mm, compaction: introduce kcompactd Memory compaction can be currently performed in several contexts: - kswapd balancing a zone after a high-order allocation failure - direct compaction to satisfy a high-order allocation, including THP page fault attemps - khugepaged trying to collapse a hugepage - manually from /proc The purpose of compaction is two-fold. The obvious purpose is to satisfy a (pending or future) high-order allocation, and is easy to evaluate. The other purpose is to keep overal memory fragmentation low and help the anti-fragmentation mechanism. The success wrt the latter purpose is more The current situation wrt the purposes has a few drawbacks: - compaction is invoked only when a high-order page or hugepage is not available (or manually). This might be too late for the purposes of keeping memory fragmentation low. - direct compaction increases latency of allocations. Again, it would be better if compaction was performed asynchronously to keep fragmentation low, before the allocation itself comes. - (a special case of the previous) the cost of compaction during THP page faults can easily offset the benefits of THP. - kswapd compaction appears to be complex, fragile and not working in some scenarios. It could also end up compacting for a high-order allocation request when it should be reclaiming memory for a later order-0 request. To improve the situation, we should be able to benefit from an equivalent of kswapd, but for compaction - i.e. a background thread which responds to fragmentation and the need for high-order allocations (including hugepages) somewhat proactively. One possibility is to extend the responsibilities of kswapd, which could however complicate its design too much. It should be better to let kswapd handle reclaim, as order-0 allocations are often more critical than high-order ones. Another possibility is to extend khugepaged, but this kthread is a single instance and tied to THP configs. This patch goes with the option of a new set of per-node kthreads called kcompactd, and lays the foundations, without introducing any new tunables. The lifecycle mimics kswapd kthreads, including the memory hotplug hooks. For compaction, kcompactd uses the standard compaction_suitable() and ompact_finished() criteria and the deferred compaction functionality. Unlike direct compaction, it uses only sync compaction, as there's no allocation latency to minimize. This patch doesn't yet add a call to wakeup_kcompactd. The kswapd compact/reclaim loop for high-order pages will be replaced by waking up kcompactd in the next patch with the description of what's wrong with the old approach. Waking up of the kcompactd threads is also tied to kswapd activity and follows these rules: - we don't want to affect any fastpaths, so wake up kcompactd only from the slowpath, as it's done for kswapd - if kswapd is doing reclaim, it's more important than compaction, so don't invoke kcompactd until kswapd goes to sleep - the target order used for kswapd is passed to kcompactd Future possible future uses for kcompactd include the ability to wake up kcompactd on demand in special situations, such as when hugepages are not available (currently not done due to __GFP_NO_KSWAPD) or when a fragmentation event (i.e. __rmqueue_fallback()) occurs. It's also possible to perform periodic compaction with kcompactd. [arnd@arndb.de: fix build errors with kcompactd] [paul.gortmaker@windriver.com: don't use modular references for non modular code] Signed-off-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Arnd Bergmann Signed-off-by: Paul Gortmaker Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compaction.h | 16 +++ include/linux/mmzone.h | 6 ++ include/linux/vm_event_item.h | 1 + include/trace/events/compaction.h | 55 ++++++++++ mm/compaction.c | 222 ++++++++++++++++++++++++++++++++++++++ mm/memory_hotplug.c | 9 +- mm/page_alloc.c | 3 + mm/vmstat.c | 1 + 8 files changed, 311 insertions(+), 2 deletions(-) commit 81c5857b279e6b18f6ff0d1975e80a07af542cd1 Author: Vlastimil Babka Date: Thu Mar 17 14:18:05 2016 -0700 mm, kswapd: remove bogus check of balance_classzone_idx During work on kcompactd integration I have spotted a confusing check of balance_classzone_idx, which I believe is bogus. The balanced_classzone_idx is filled by balance_pgdat() as the highest zone it attempted to balance. This was introduced by commit dc83edd941f4 ("mm: kswapd: use the classzone idx that kswapd was using for sleeping_prematurely()"). The intention is that (as expressed in today's function names), the value used for kswapd_shrink_zone() calls in balance_pgdat() is the same as for the decisions in kswapd_try_to_sleep(). An unwanted side-effect of that commit was breaking the checks in kswapd() whether there was another kswapd_wakeup with a tighter (=lower) classzone_idx. Commits 215ddd6664ce ("mm: vmscan: only read new_classzone_idx from pgdat when reclaiming successfully") and d2ebd0f6b895 ("kswapd: avoid unnecessary rebalance after an unsuccessful balancing") tried to fixed, but apparently introduced a bogus check that this patch removes. Consider zone indexes X < Y < Z, where: - Z is the value used for the first kswapd wakeup. - Y is returned as balanced_classzone_idx, which means zones with index higher than Y (including Z) were found to be unreclaimable. - X is the value used for the second kswapd wakeup The new wakeup with value X means that kswapd is now supposed to balance harder all zones with index <= X. But instead, due to Y < Z, it will go sleep and won't read the new value X. This is subtly wrong. The effect of this patch is that kswapd will react better in some situations, where e.g. the first wakeup is for ZONE_DMA32, the second is for ZONE_DMA, and due to unreclaimable ZONE_NORMAL. Before this patch, kswapd would go sleep instead of reclaiming ZONE_DMA harder. I expect these situations are very rare, and more value is in better maintainability due to the removal of confusing and bogus check. Signed-off-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Rik van Riel Cc: Joonsoo Kim Cc: Mel Gorman Cc: David Rientjes Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21c647865a7d7b810aa94c32b40a4b9393ddfb85 Author: Joonsoo Kim Date: Thu Mar 17 14:18:02 2016 -0700 tile: query dynamic DEBUG_PAGEALLOC setting We can disable debug_pagealloc processing even if the code is compiled with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. Signed-off-by: Joonsoo Kim Cc: Benjamin Herrenschmidt Acked-by: Chris Metcalf Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Pekka Enberg Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/mm/init.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e7df0d88c455c915376397b4bd72a83b9ed656f7 Author: Joonsoo Kim Date: Thu Mar 17 14:17:59 2016 -0700 powerpc: query dynamic DEBUG_PAGEALLOC setting We can disable debug_pagealloc processing even if the code is compiled with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. Signed-off-by: Joonsoo Kim Acked-by: David Rientjes Cc: Christian Borntraeger Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/traps.c | 5 ++--- arch/powerpc/mm/hash_utils_64.c | 36 ++++++++++++++++++++---------------- arch/powerpc/mm/init_32.c | 8 ++++---- 3 files changed, 26 insertions(+), 23 deletions(-) commit 505f6d22dbc63f333d1178dc80264e40b5c35268 Author: Joonsoo Kim Date: Thu Mar 17 14:17:56 2016 -0700 sound: query dynamic DEBUG_PAGEALLOC setting We can disable debug_pagealloc processing even if the code is compiled with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. [akpm@linux-foundation.org: export _debug_pagealloc_enabled to modules] Signed-off-by: Joonsoo Kim Acked-by: David Rientjes Acked-by: Takashi Iwai Cc: Benjamin Herrenschmidt Cc: Chris Metcalf Cc: Christian Borntraeger Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 1 + sound/drivers/pcsp/pcsp.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 922d566cdcb7166c729ff67bb15ff5f93a3774b6 Author: Joonsoo Kim Date: Thu Mar 17 14:17:53 2016 -0700 mm/slub: query dynamic DEBUG_PAGEALLOC setting We can disable debug_pagealloc processing even if the code is compiled with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. [akpm@linux-foundation.org: clean up code, per Christian] Signed-off-by: Joonsoo Kim Reviewed-by: Christian Borntraeger Cc: Benjamin Herrenschmidt Cc: Chris Metcalf Cc: Christoph Lameter Cc: David Rientjes Cc: Pekka Enberg Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f48d97f340cbb0c323fa7a7b36bd76a108a9f49f Author: Joonsoo Kim Date: Thu Mar 17 14:17:49 2016 -0700 mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting As CONFIG_DEBUG_PAGEALLOC can be enabled/disabled via kernel parameters we can optimize some cases by checking the enablement state. This is follow-up work for Christian's Optimize CONFIG_DEBUG_PAGEALLOC: https://lkml.org/lkml/2016/1/27/194 Remaining work is to make sparc to be aware of this but it looks not easy for me so I skip that in this series. This patch (of 5): We can disable debug_pagealloc processing even if the code is complied with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query whether it is enabled or not in runtime. [akpm@linux-foundation.org: update comment, per David. Adjust comment to use 80 cols] Signed-off-by: Joonsoo Kim Reviewed-by: Christian Borntraeger Acked-by: David Rientjes Cc: Benjamin Herrenschmidt Cc: Takashi Iwai Cc: Chris Metcalf Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 0335ddd34f39569a32096084bf3b0960d2b1212b Author: Naoya Horiguchi Date: Thu Mar 17 14:17:47 2016 -0700 tools/vm/page-types.c: support swap entry /proc/pid/pagemap (pte_to_pagemap_entry() internally) already reports about swap entry, so let's make the in-kernel utility aware of it. Signed-off-by: Naoya Horiguchi Cc: Vladimir Davydov Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/page-types.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 0a71649cb724ab97df26baa7731ac31d2364bfe5 Author: Naoya Horiguchi Date: Thu Mar 17 14:17:44 2016 -0700 /proc/kpageflags: return KPF_SLAB for slab tail pages Currently /proc/kpageflags returns just KPF_COMPOUND_TAIL for slab tail pages, which is inconvenient when grasping how slab pages are distributed (userspace always needs to check which kind of tail pages by itself). This patch sets KPF_SLAB for such pages. With this patch: $ grep Slab /proc/meminfo ; tools/vm/page-types -b slab Slab: 64880 kB flags page-count MB symbolic-flags long-symbolic-flags 0x0000000000000080 16220 63 _______S__________________________________ slab total 16220 63 16220 pages equals to 64880 kB, so returned result is consistent with the global counter. Signed-off-by: Naoya Horiguchi Reviewed-by: Vladimir Davydov Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/page.c | 2 ++ 1 file changed, 2 insertions(+) commit 832fc1de01aea28255cb11d270679b7f1273f0d7 Author: Naoya Horiguchi Date: Thu Mar 17 14:17:41 2016 -0700 /proc/kpageflags: return KPF_BUDDY for "tail" buddy pages Currently /proc/kpageflags returns nothing for "tail" buddy pages, which is inconvenient when grasping how free pages are distributed. This patch sets KPF_BUDDY for such pages. With this patch: $ grep MemFree /proc/meminfo ; tools/vm/page-types -b buddy MemFree: 3134992 kB flags page-count MB symbolic-flags long-symbolic-flags 0x0000000000000400 779272 3044 __________B_______________________________ buddy 0x0000000000000c00 4385 17 __________BM______________________________ buddy,mmap total 783657 3061 783657 pages is 3134628 kB (roughly consistent with the global counter,) so it's OK. [akpm@linux-foundation.org: update comment, per Naoya] Signed-off-by: Naoya Horiguchi Reviewed-by: Vladimir Davydov > Cc: Konstantin Khlebnikov Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/page.c | 6 ++++-- include/linux/page-flags.h | 2 ++ mm/internal.h | 3 --- mm/page_alloc.c | 2 -- 4 files changed, 6 insertions(+), 7 deletions(-) commit 12580e4b54ba8a1b22ec977c200be0174ca42348 Author: Vladimir Davydov Date: Thu Mar 17 14:17:38 2016 -0700 mm: memcontrol: report kernel stack usage in cgroup2 memory.stat Show how much memory is allocated to kernel stacks. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 4 ++++ include/linux/memcontrol.h | 3 ++- kernel/fork.c | 10 +++++++++- mm/memcontrol.c | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) commit 27ee57c93ff00b8a2d6c6dd6b0b3dddda7b43b77 Author: Vladimir Davydov Date: Thu Mar 17 14:17:35 2016 -0700 mm: memcontrol: report slab usage in cgroup2 memory.stat Show how much memory is used for storing reclaimable and unreclaimable in-kernel data structures allocated from slab caches. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 15 +++++++++++++++ include/linux/memcontrol.h | 21 +++++++++++++++++++++ mm/memcontrol.c | 8 ++++++++ mm/slab.c | 8 +++++--- mm/slab.h | 30 ++++++++++++++++++++++++++++-- mm/slub.c | 3 ++- 6 files changed, 79 insertions(+), 6 deletions(-) commit 72b54e7314a2e7a68567c92bbb32fe2598a3c783 Author: Vladimir Davydov Date: Thu Mar 17 14:17:32 2016 -0700 mm: memcontrol: make tree_{stat,events} fetch all stats Currently, tree_{stat,events} helpers can only get one stat index at a time, so when there are a lot of stats to be reported one has to call it over and over again (see memory_stat_show). This is neither effective, nor does it look good. Instead, let's make these helpers take a snapshot of all available counters. Signed-off-by: Vladimir Davydov Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 67 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 28 deletions(-) commit fcff7d7eebe6d31e2ce20d994555c86a90197034 Author: Vladimir Davydov Date: Thu Mar 17 14:17:29 2016 -0700 mm: memcontrol: do not bypass slab charge if memcg is offline Slab pages are charged in two steps. First, an appropriate per memcg cache is selected (see memcg_kmem_get_cache) basing on the current context, then the new slab page is charged to the memory cgroup which the selected cache was created for (see memcg_charge_slab -> __memcg_kmem_charge_memcg). It is OK to bypass kmemcg charge at step 1, but if step 1 succeeded and we successfully allocated a new slab page, step 2 must be performed, otherwise we would get a per memcg kmem cache which contains a slab that does not hold a reference to the memory cgroup owning the cache. Since per memcg kmem caches are destroyed on memcg css free, this could result in freeing a cache while there are still active objects in it. However, currently we will bypass slab page charge if the memory cgroup owning the cache is offline (see __memcg_kmem_charge_memcg). This is very unlikely to occur in practice, because for this to happen a process must be migrated to a different cgroup and the old cgroup must be removed while the process is in kmalloc somewhere between steps 1 and 2 (e.g. trying to allocate a new page). Nevertheless, it's still better to eliminate such a possibility. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6a618957ad17d8f4f4c7eeede752685374b1b176 Author: Johannes Weiner Date: Thu Mar 17 14:17:26 2016 -0700 mm: oom_kill: don't ignore oom score on exiting tasks When the OOM killer scans tasks and encounters a PF_EXITING one, it force-selects that task regardless of the score. The problem is that if that task got stuck waiting for some state the allocation site is holding, the OOM reaper can not move on to the next best victim. Frankly, I don't even know why we check for exiting tasks in the OOM killer. We've tried direct reclaim at least 15 times by the time we decide the system is OOM, there was plenty of time to exit and free memory; and a task might exit voluntarily right after we issue a kill. This is testing pure noise. Remove it. Signed-off-by: Tetsuo Handa Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: David Rientjes Cc: Oleg Nesterov Cc: Hugh Dickins Cc: Andrea Argangeli Cc: Rik van Riel Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 3 --- 1 file changed, 3 deletions(-) commit a1ee1932aa6bea0bb074f5e3ced112664e4637ed Author: Joshua Hunt Date: Thu Mar 17 14:17:23 2016 -0700 watchdog: don't run proc_watchdog_update if new value is same as old While working on a script to restore all sysctl params before a series of tests I found that writing any value into the /proc/sys/kernel/{nmi_watchdog,soft_watchdog,watchdog,watchdog_thresh} causes them to call proc_watchdog_update(). NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. There doesn't appear to be a reason for doing this work every time a write occurs, so only do it when the values change. Signed-off-by: Josh Hunt Acked-by: Don Zickus Reviewed-by: Aaron Tomlin Cc: Ulrich Obergfell Cc: [4.1.x+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/watchdog.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4c11e554fb894b381a3dc47069259d87a2e6ffc9 Author: Aaro Koskinen Date: Thu Mar 17 14:17:20 2016 -0700 drivers/firmware/broadcom/bcm47xx_nvram.c: fix incorrect __ioread32_copy Commit 1f330c327900 ("drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding") switched to use a generic copy function, but failed to notice that the header pointer is updated between the two copies, resulting in bogus data being copied in the latter one. Fix by keeping the old header pointer. The patch fixes totally broken networking on WRT54GL router (both LAN and WLAN interfaces fail to probe). Fixes: 1f330c327900 ("drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding") Signed-off-by: Aaro Koskinen Reviewed-by: Stephen Boyd Cc: Rafal Milecki Cc: Hauke Mehrtens Cc: [4.4.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/firmware/broadcom/bcm47xx_nvram.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b0f84ac352762ed02d7ea9f284942a8cab7f9077 Author: Luis R. Rodriguez Date: Thu Mar 17 14:17:16 2016 -0700 ia64: define ioremap_uc() All architectures now need ioremap_uc(), ia64 seems defines this already through its ioremap_nocache() and it already ensures it *only* uses UC. This is needed since v4.3 to complete an allyesconfig compile on ia64, there were others archs that needed this, and this one seems to have fallen through the cracks. Signed-off-by: Luis R. Rodriguez Reported-by: kbuild test robot Acked-by: Tony Luck Cc: [4.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) commit 1d034e68e2c256640eb1f44bd7dcd89f90806ccf Author: Anna-Maria Gleixner Date: Wed Mar 16 09:25:23 2016 +0100 md/raid5: Cleanup cpu hotplug notifier The raid456_cpu_notify() hotplug callback lacks handling of the CPU_UP_CANCELED case. That means if CPU_UP_PREPARE fails, the scratch buffer is leaked. Add handling for CPU_UP_CANCELED[_FROZEN] hotplug notifier transitions to free the scratch buffer. CC: Shaohua Li CC: linux-raid@vger.kernel.org Signed-off-by: Anna-Maria Gleixner Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 ++ 1 file changed, 2 insertions(+) commit 23ddba80ebe836476bb2fa1f5ef305dd1c63dc0b Author: Shaohua Li Date: Mon Mar 14 11:49:32 2016 -0700 raid10: include bio_end_io_list in nr_queued to prevent freeze_array hang This is the raid10 counterpart of the bug fixed by Nate (raid1: include bio_end_io_list in nr_queued to prevent freeze_array hang) Fixes: 95af587e95(md/raid10: ensure device failure recorded before write request returns) Cc: stable@vger.kernel.org (V4.3+) Cc: Nate Dailey Signed-off-by: Shaohua Li drivers/md/raid10.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ccfc7bf1f09d6190ef86693ddc761d5fe3fa47cb Author: Nate Dailey Date: Mon Feb 29 10:43:58 2016 -0500 raid1: include bio_end_io_list in nr_queued to prevent freeze_array hang If raid1d is handling a mix of read and write errors, handle_read_error's call to freeze_array can get stuck. This can happen because, though the bio_end_io_list is initially drained, writes can be added to it via handle_write_finished as the retry_list is processed. These writes contribute to nr_pending but are not included in nr_queued. If a later entry on the retry_list triggers a call to handle_read_error, freeze array hangs waiting for nr_pending == nr_queued+extra. The writes on the bio_end_io_list aren't included in nr_queued so the condition will never be satisfied. To prevent the hang, include bio_end_io_list writes in nr_queued. There's probably a better way to handle decrementing nr_queued, but this seemed like the safest way to avoid breaking surrounding code. I'm happy to supply the script I used to repro this hang. Fixes: 55ce74d4bfe1b(md/raid1: ensure device failure recorded before write request returns.) Cc: stable@vger.kernel.org (v4.3+) Signed-off-by: Nate Dailey Signed-off-by: Shaohua Li drivers/md/raid1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 48d10bda1f2c69980601a61194015bb0790fb7ab Merge: 96b9b1c ce53bfc Author: Linus Torvalds Date: Thu Mar 17 14:24:26 2016 -0700 Merge tag 'usb-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here is the big USB patchset for 4.6-rc1. The normal mess is here, gadget and xhci fixes and updates, and lots of other driver updates and cleanups as well. Full details are in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'usb-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (266 commits) USB: core: let USB device know device node usb: devio: Add ioctl to disallow detaching kernel USB drivers. usb: gadget: f_acm: Fix configfs attr name usb: udc: lpc32xx: remove USB PLL and USB OTG clock management usb: udc: lpc32xx: remove direct access to clock controller registers usb: udc: lpc32xx: switch to clock prepare/unprepare model usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() usb: gadget: renesas_usb3: Use ARCH_RENESAS usb: dwc2: Fix issues in dwc2_complete_non_isoc_xfer_ddma() usb: dwc2: Add support for Lantiq ARX and XRX SoCs usb: phy: generic: Handle late registration of gadget usb: gadget: bdc_udc: fix race condition in bdc_udc_exit() usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config usb: dwc2: Move host-specific core functions into hcd.c usb: dwc2: Move register save and restore functions usb: dwc2: Use kmem_cache_free() usb: dwc2: host: If using uframe scheduler, end splits better usb: dwc2: host: Totally redo the microframe scheduler usb: dwc2: host: Properly set even/odd frame usb: dwc2: host: Add dwc2_hcd_get_future_frame_number() call ... commit 9da8320bb97768e35f2e64fa7642015271d672eb Author: Max Filippov Date: Mon Mar 14 07:54:16 2016 +0300 xtensa: add test_kc705_hifi variant This variant has HiFi3 coprocessor and is used in sample audio-enabled configuration. Signed-off-by: Max Filippov .../test_kc705_hifi/include/variant/core.h | 531 +++++++++++++++++++++ .../test_kc705_hifi/include/variant/tie-asm.h | 328 +++++++++++++ .../variants/test_kc705_hifi/include/variant/tie.h | 189 ++++++++ 3 files changed, 1048 insertions(+) commit a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff Author: Oliver Neukum Date: Thu Mar 17 14:00:17 2016 -0700 Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/misc/ims-pcu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 902d02db1ff1b0d0075276917a36ba70847798a7 Merge: e6087877 b9c743b Author: Dave Airlie Date: Fri Mar 18 07:16:25 2016 +1000 Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next A few other misc cleanups and bug fixes for 4.6. Highlights: - unify endian handling in powerplay - powerplay fixes - fix a regression in 4.5 on boards with no display connectors - fence cleanups and locking fixes - whitespace cleanups and code refactoring in radeon * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (35 commits) drm/amdgpu/gfx7: add MTYPE definition drm/amdgpu: removing BO_VAs shouldn't be interruptible drm/amd/powerplay: show uvd/vce power gate enablement for tonga. drm/amd/powerplay: show uvd/vce power gate info for fiji drm/amdgpu: use sched fence if possible drm/amdgpu: move ib.fence to job.fence drm/amdgpu: give a fence param to ib_free drm/amdgpu: include the right version of gmc header files for iceland drm/radeon: fix indentation. drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ drm/amdgpu: switch back to 32bit hw fences v2 drm/amdgpu: remove amdgpu_fence_is_signaled drm/amdgpu: drop the extra fence range check v2 drm/amdgpu: signal fences directly in amdgpu_fence_process drm/amdgpu: cleanup amdgpu_fence_wait_empty v2 drm/amdgpu: keep all fences in an RCU protected array v2 drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring drm/amdgpu: RCU protected amd_sched_fence_release drm/amdgpu: RCU protected amdgpu_fence_release drm/amdgpu: merge amdgpu_fence_process and _activity ... commit 2c684d892bb2ee31cc48f4a8b91e86a0f15e82f9 Author: Piet Delaney Date: Mon Mar 14 07:54:15 2016 +0300 xtensa: add Three Core HiFi-2 MX Variant. This variant has coherent cache, is equipped with interrupt distributor and is capable of running SMP linux. Signed-off-by: Piet Delaney Signed-off-by: Max Filippov .../test_mmuhifi_c3/include/variant/core.h | 383 +++++++++++++++++++++ .../test_mmuhifi_c3/include/variant/tie-asm.h | 182 ++++++++++ .../variants/test_mmuhifi_c3/include/variant/tie.h | 140 ++++++++ 3 files changed, 705 insertions(+) commit e6087877794520748f7295212a4c6bdb870122f2 Author: Arnd Bergmann Date: Thu Mar 17 10:02:10 2016 +0100 drm/sti: restore mode_fixup callback Commit 8a2fa38fddd3 removed the mode_fixup because it was empty, but 652353e6e561 modified it to call drm_mode_set_crtcinfo() instead. Both commits are correct, but the merge of the two kept the nonempty version without the reference to it, as shown by the gcc warning: drm/sti/sti_crtc.c:54:13: error: 'sti_crtc_mode_fixup' defined but not used This restores the callback pointer to fix the merge. Signed-off-by: Arnd Bergmann Reverts: 8a2fa38fddd3 ("drm/sti: removed optional dummy crtc mode_fixup function.") Fixes: 652353e6e561 ("drm/sti: set CRTC modesetting parameters") Fixes: cf481068cdd4 ("Merge branch '2016-02-26-st-drm-next' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next") Acked-by: Vincent ABRIOU Signed-off-by: Dave Airlie drivers/gpu/drm/sti/sti_crtc.c | 1 + 1 file changed, 1 insertion(+) commit 96b9b1c95660d4bc5510c5d798d3817ae9f0b391 Merge: 8eee93e a95fc9c Author: Linus Torvalds Date: Thu Mar 17 13:53:25 2016 -0700 Merge tag 'tty-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here's the big tty/serial driver pull request for 4.6-rc1. Lots of changes in here, Peter has been on a tear again, with lots of refactoring and bugs fixes, many thanks to the great work he has been doing. Lots of driver updates and fixes as well, full details in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'tty-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (220 commits) serial: 8250: describe CONFIG_SERIAL_8250_RSA serial: samsung: optimize UART rx fifo access routine serial: pl011: add mark/space parity support serial: sa1100: make sa1100_register_uart_fns a function tty: serial: 8250: add MOXA Smartio MUE boards support serial: 8250: convert drivers to use up_to_u8250p() serial: 8250/mediatek: fix building with SERIAL_8250=m serial: 8250/ingenic: fix building with SERIAL_8250=m serial: 8250/uniphier: fix modular build Revert "drivers/tty/serial: make 8250/8250_ingenic.c explicitly non-modular" Revert "drivers/tty/serial: make 8250/8250_mtk.c explicitly non-modular" serial: mvebu-uart: initial support for Armada-3700 serial port serial: mctrl_gpio: Add missing module license serial: ifx6x60: avoid uninitialized variable use tty/serial: at91: fix bad offset for UART timeout register tty/serial: at91: restore dynamic driver binding serial: 8250: Add hardware dependency to RT288X option TTY, devpts: document pty count limiting tty: goldfish: support platform_device with id -1 drivers: tty: goldfish: Add device tree bindings ... commit 8eee93e2576c303b6071368456dcd6c9a5a021c9 Merge: 1a4ab08 1661753 Author: Linus Torvalds Date: Thu Mar 17 13:47:50 2016 -0700 Merge tag 'char-misc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here is the big char/misc driver update for 4.6-rc1. The majority of the patches here is hwtracing and some new mic drivers, but there's a lot of other driver updates as well. Full details in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'char-misc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (238 commits) goldfish: Fix build error of missing ioremap on UM nvmem: mediatek: Fix later provider initialization nvmem: imx-ocotp: Fix return value of imx_ocotp_read nvmem: Fix dependencies for !HAS_IOMEM archs char: genrtc: replace blacklist with whitelist drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular drivers: char: mem: fix IS_ERROR_VALUE usage char: xillybus: Fix internal data structure initialization pch_phub: return -ENODATA if ROM can't be mapped Drivers: hv: vmbus: Support kexec on ws2012 r2 and above Drivers: hv: vmbus: Support handling messages on multiple CPUs Drivers: hv: utils: Remove util transport handler from list if registration fails Drivers: hv: util: Pass the channel information during the init call Drivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload() Drivers: hv: vmbus: remove code duplication in message handling Drivers: hv: vmbus: avoid wait_for_completion() on crash Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages misc: at24: replace memory_accessor with nvmem_device_read eeprom: 93xx46: extend driver to plug into the NVMEM framework eeprom: at25: extend driver to plug into the NVMEM framework ... commit 1a4ab084afaa8e5405a3e22aca21478ee3ca5d59 Merge: 45cb523 112d125 Author: Linus Torvalds Date: Thu Mar 17 13:38:00 2016 -0700 Merge tag 'driver-core-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Just a few patches this time around for the 4.6-rc1 merge window. Largest is a new firmware driver, but there are some other updates to the driver core in here as well, the shortlog has the details. All have been in linux-next for a while with no reported issues" * tag 'driver-core-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Revert "driver-core: platform: probe of-devices only using list of compatibles" firmware: qemu config needs I/O ports firmware: qemu_fw_cfg.c: fix typo FW_CFG_DATA_OFF driver-core: platform: probe of-devices only using list of compatibles driver-core: platform: fix typo in documentation for multi-driver helper component: remove impossible condition drivers: dma-coherent: simplify dma_init_coherent_memory return value devicetree: update documentation for fw_cfg ARM bindings firmware: create directory hierarchy for sysfs fw_cfg entries firmware: introduce sysfs driver for QEMU's fw_cfg device kobject: export kset_find_obj() for module use driver core: bus: use to_subsys_private and to_device_private_bus driver core: bus: use list_for_each_entry* debugfs: Add stub function for debugfs_create_automount(). kernfs: make kernfs_walk_ns() use kernfs_pr_cont_buf[] commit 45cb5230f862d10209b83e488b20916555d70c55 Merge: 3c0b8d1 c4aec31 Author: Linus Torvalds Date: Thu Mar 17 13:05:09 2016 -0700 Merge tag 'vfio-v4.6-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: "Various enablers for assignment of Intel graphics devices and future support of vGPU devices (Alex Williamson). This includes - Handling the vfio type1 interface as an API rather than a specific implementation, allowing multiple type1 providers. - Capability chains, similar to PCI device capabilities, that allow extending ioctls. Extensions here include device specific regions and sparse mmap descriptions. The former is used to expose non-PCI regions for IGD, including the OpRegion (particularly the Video BIOS Table), and read only PCI config access to the host and LPC bridge as drivers often depend on identifying those devices. Sparse mmaps here are used to describe the MSIx vector table, which vfio has always protected from mmap, but never had an API to explicitly define that protection. In future vGPU support this is expected to allow the description of PCI BARs that may mix direct access and emulated access within a single region. - The ability to expose the shadow ROM as an option ROM as IGD use cases may rely on the ROM even though the physical device does not make use of a PCI option ROM BAR" * tag 'vfio-v4.6-rc1' of git://github.com/awilliam/linux-vfio: vfio/pci: return -EFAULT if copy_to_user fails vfio/pci: Expose shadow ROM as PCI option ROM vfio/pci: Intel IGD host and LCP bridge config space access vfio/pci: Intel IGD OpRegion support vfio/pci: Enable virtual register in PCI config space vfio/pci: Add infrastructure for additional device specific regions vfio: Define device specific region type capability vfio/pci: Include sparse mmap capability for MSI-X table regions vfio: Define sparse mmap capability for regions vfio: Add capability chain helpers vfio: Define capability chains vfio: If an IOMMU backend fails, keep looking vfio/pci: Fix unsigned comparison overflow commit 3c0b8d1c5f334d1fd0c7eafc18bfb4ab0087b165 Merge: 9cc984e 87d9906 Author: Linus Torvalds Date: Thu Mar 17 12:58:11 2016 -0700 Merge tag 'hsi-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "nokia-modem: add N950 and N9 support" * tag 'hsi-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: ssi-protocol: Use handshake logic from n950 HSI: nokia-modem: add n950 and n9 support commit 000a830efd370bf93083c7af484ffd84ab7fb21f Author: Alex Estrin Date: Mon Mar 7 11:35:51 2016 -0800 IB/rdmavt: Post receive for QP in ERR state Accordingly IB Spec post WR to receive queue must complete with error if QP is in Error state. Please refer to C10-42, C10-97.2.1 Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Alex Estrin Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit d0e859c32801f6793790d71dc41a9330da0da371 Author: Mike Marciniszyn Date: Mon Mar 7 11:35:46 2016 -0800 IB/hfi1: Enable adaptive pio by default Set the piothreshold to the agreed upon default of 256B. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47177f1bac9ca2b65eefdc9b0b63d0505bd4e11e Author: Mike Marciniszyn Date: Mon Mar 7 11:35:41 2016 -0800 IB/hfi1: Fix adaptive pio packet corruption The adaptive pio heuristic missed a case that causes a corrupted packet on the wire. The case is if SDMA egress had been chosen for a pio-able packet and then encountered a ring space wait, the packet is queued. The sge cursor had been incremented as part of the packet build out for SDMA. After the send engine restart, the heuristic might now chose pio based on the sdma count being zero and start the mmio copy using the already incremented sge cursor. Fix this by forcing SDMA egress when the SDMA descriptor has already been built. Additionally, the code to wait for a QPs pio count to zero when switching to SDMA was missing. Add it. There is also an issue with UD QPs, in that the different SLs can pick a different egress send context. For now, just insure the UD/GSI always go through SDMA. Reviewed-by: Vennila Megavannan Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit cef504c5c019ea4f59cf3a69e7341b2b34091cda Author: Mike Marciniszyn Date: Mon Mar 7 11:35:35 2016 -0800 IB/hfi1: Fix panic in adaptive pio The following panic occurs while running ib_send_bw -a with adaptive pio turned on: [ 8551.143596] BUG: unable to handle kernel NULL pointer dereference at (null) [ 8551.152986] IP: [] pio_wait.isra.21+0x34/0x190 [hfi1] [ 8551.160926] PGD 80db21067 PUD 80bb45067 PMD 0 [ 8551.166431] Oops: 0000 [#1] SMP [ 8551.276725] task: ffff880816bf15c0 ti: ffff880812ac0000 task.ti: ffff880812ac0000 [ 8551.285705] RIP: 0010:[] pio_wait.isra.21+0x34/0x190 [hfi1] [ 8551.296462] RSP: 0018:ffff880812ac3b58 EFLAGS: 00010282 [ 8551.303029] RAX: 000000000000002d RBX: 0000000000000000 RCX: 0000000000000800 [ 8551.311633] RDX: ffff880812ac3c08 RSI: 0000000000000000 RDI: ffff8800b6665e40 [ 8551.320228] RBP: ffff880812ac3ba0 R08: 0000000000001000 R09: ffffffffa09039a0 [ 8551.328820] R10: ffff880817a0c000 R11: 0000000000000000 R12: ffff8800b6665e40 [ 8551.337406] R13: ffff880817a0c000 R14: ffff8800b6665800 R15: ffff8800b6665e40 [ 8551.355640] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8551.362674] CR2: 0000000000000000 CR3: 000000080abe8000 CR4: 00000000001406e0 [ 8551.371262] Stack: [ 8551.374119] ffff880812ac3bf0 ffff88080cf54010 ffff880800000800 ffff880812ac3c08 [ 8551.383036] ffff8800b6665800 ffff8800b6665e40 0000000000000202 ffffffffa08e7b80 [ 8551.391941] 00000001007de431 ffff880812ac3bc8 ffffffffa0904645 ffff8800b6665800 [ 8551.400859] Call Trace: [ 8551.404214] [] ? hfi1_del_timers_sync+0x30/0x30 [hfi1] [ 8551.412417] [] hfi1_verbs_send+0x215/0x330 [hfi1] [ 8551.420154] [] hfi1_do_send+0x166/0x350 [hfi1] [ 8551.427618] [] rvt_post_send+0x533/0x6a0 [rdmavt] [ 8551.435367] [] ib_uverbs_post_send+0x30f/0x530 [ib_uverbs] [ 8551.443999] [] ib_uverbs_write+0x117/0x380 [ib_uverbs] [ 8551.452269] [] ? sock_recvmsg+0x3b/0x50 [ 8551.459071] [] ? sock_read_iter+0x92/0xe0 [ 8551.466068] [] __vfs_write+0x37/0x100 [ 8551.472692] [] ? rw_verify_area+0x52/0xd0 [ 8551.479682] [] vfs_write+0xa2/0x1a0 [ 8551.486089] [] ? do_audit_syscall_entry+0x66/0x70 [ 8551.493891] [] SyS_write+0x55/0xc0 [ 8551.500220] [] entry_SYSCALL_64_fastpath+0x12/0x71 [ 8551.531284] RIP [] pio_wait.isra.21+0x34/0x190 [hfi1] [ 8551.539508] RSP [ 8551.544110] CR2: 0000000000000000 The priv s_sendcontext pointer was not setup properly. Fix with this patch by using the s_sendcontext and eliminating its send engine use. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 2 ++ drivers/staging/rdma/hfi1/verbs.c | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) commit 60df29581f67e06791a176641c774515ec1634e5 Author: Mike Marciniszyn Date: Mon Mar 7 11:35:30 2016 -0800 IB/hfi1: Fix PIO wakeup timing hole There is a timing hole if there had been greater than PIO_WAIT_BATCH_SIZE waiters. This code will dispatch the first batch but leave the others in the queue. If the restarted waiters don't in turn wait on a buffer, there is a hang. Fix by forcing a return when the QP queue is non-empty. Reviewed-by: Vennila Megavannan Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/pio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5326dfbf005ca8589d709209a81d145c5b87b23d Author: Mike Marciniszyn Date: Mon Mar 7 11:35:24 2016 -0800 IB/hfi1: Fix ordering of trace for accuracy The postitioning of the sdma ibhdr trace was causing an extra trace message when the tx send returned -EBUSY. Move the trace to just before the return and handle negative return values to avoid any trace. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1db78eeebee7cde877194ddc8691f192e6279609 Author: Mike Marciniszyn Date: Mon Mar 7 11:35:19 2016 -0800 IB/hfi1: Add unique trace point for pio and sdma send This allows for separately enabling pio and sdma tracepoints to cut the volume of trace information. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/trace.h | 10 +++++++++- drivers/staging/rdma/hfi1/verbs.c | 8 ++++---- 3 files changed, 14 insertions(+), 6 deletions(-) commit ef6d8c4ec86f03b1e40791a804c746e5efacaf86 Author: Mike Marciniszyn Date: Mon Mar 7 11:35:14 2016 -0800 IB/hfi1: Fix issues with qp_stats print The changes are to aid in coorelating trace information with QPs between the trace and qp_stats information Such changes include adds a space after QP and clarifying that the second QP is actually the remote QP. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef086c0d5dd9a151578c72b6f257e5b0e77d65eb Author: Mike Marciniszyn Date: Mon Mar 7 11:35:08 2016 -0800 IB/hfi1: Report pid in qp_stats to aid debug Tracking user/QP ownership is needed to debug issues with user ULPs like OpenMPI. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 1 + drivers/staging/rdma/hfi1/qp.c | 5 +++-- include/rdma/rdmavt_qp.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 2243472e9d98c3ca0cb735f96ad48a7b59bdb34d Author: Easwar Hariharan Date: Mon Mar 7 11:35:03 2016 -0800 IB/hfi1: Improve LED beaconing The current LED beaconing code is unclear and uses the timer handler to turn off the timer. This patch simplifies the code by removing the special semantics of timeon = timeoff = 0 being interpreted as a request to turn off the beaconing. Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 59 ++++++++++++++++---------------------- drivers/staging/rdma/hfi1/hfi.h | 10 ++----- drivers/staging/rdma/hfi1/mad.c | 20 ++++++------- 3 files changed, 38 insertions(+), 51 deletions(-) commit 831464ce4b74eaec723bad51ea48fe3879732f66 Author: Kaike Wan Date: Sat Mar 5 08:50:49 2016 -0800 IB/hfi1: Don't call cond_resched in atomic mode when sending packets This patch fixed the problem where the driver might reschedule in atomic mode when sending packets. This is due to the fact that the call to cond_resched() in hfi1_do_send() might occur in atomic mode and a check is required to avoid the warning message: "kernel: BUG: scheduling while atomic: swapper/2/0/0x10000100." Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/ruc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 528ee9fbf0244406a76cb5e37406eef303b09a46 Author: Dean Luick Date: Sat Mar 5 08:50:43 2016 -0800 IB/hfi1: Add adaptive cacheless verbs copy The kernel memcpy is faster than a cacheless copy. However, if too much of the L3 cache is overwritten by one-time copies then overall bandwidth suffers. Implement an adaptive scheme where full page copies are tracked and if the number of unique entries are larger than a threshold, verbs will use a cacheless copy. Tracked entries are gradually cleaned, allowing memcpy to resume once the larger copies have stopped. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 6 ++ drivers/staging/rdma/hfi1/verbs.c | 185 +++++++++++++++++++++++++++++++++++++- drivers/staging/rdma/hfi1/verbs.h | 22 +++++ 3 files changed, 211 insertions(+), 2 deletions(-) commit 8fefef125ed4b9347068d782aa5439f3da3dca32 Author: Jubin John Date: Sat Mar 5 08:50:38 2016 -0800 IB/hfi1: Handle host handshake timeout Host handshake timeout can occur during the verify capability state. This is a LNI related failure and should be handled in the same way as other LNI failures. Reviewed-by: Dean Luick Reviewed-by: Easwar Hariharan Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 3 ++- drivers/staging/rdma/hfi1/chip.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit c9c8ea3d47ebe025c3bca692e729f4c2e634c9a8 Author: Dean Luick Date: Sat Mar 5 08:50:33 2016 -0800 IB/hfi1: Add ASIC flag view/clear Different OSes using parts of the same hardware may leave cross-device flags set. Export a debugfs file to view and clear these flags if needed. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/debugfs.c | 125 ++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit ae993e7fba05c6159e1af1dc504bade46a94eb47 Author: Dean Luick Date: Sat Mar 5 08:50:27 2016 -0800 IB/hfi1: Hold i2c resource across debugfs open/close External i2c firmware updates are done in multiple steps and cannot have other things done in between. For debugfs files, acquire the resource on open and release it on close. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/debugfs.c | 145 ++++++++++++++++++++++++++++++------ 1 file changed, 124 insertions(+), 21 deletions(-) commit b0506f4c56d66f4a8413eaeb57212cf8166e30e9 Author: Dean Luick Date: Sat Mar 5 08:50:22 2016 -0800 IB/hfi1: Reduce hardware mutex timeout The hardware mutex is now held only long enough to set or clear flags. Reduce the timeout to something more reasonable. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a8f28ca3daa61dc48046b4f1fa73139fb47bbfe Author: Dean Luick Date: Sat Mar 5 08:50:17 2016 -0800 IB/hfi1: Remove unused HFI1_DO_INIT_ASIC flag The flag HFI1_DO_INIT_ASIC flag is no longer used. Remove the flag and the code that sets it. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 12 ------------ drivers/staging/rdma/hfi1/hfi.h | 1 - 2 files changed, 13 deletions(-) commit a453698b52dbfb248d23331450c638eaa3219025 Author: Dean Luick Date: Sat Mar 5 08:50:11 2016 -0800 IB/hfi1: Change thermal init to use resource reservation Use the resource reservation system to flag that the ASIC thermal has been initialized. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 765a6fac9132da203347525032bb40b1e9055104 Author: Dean Luick Date: Sat Mar 5 08:50:06 2016 -0800 IB/hfi1: Change QSFP functions to use resource reservation Remove the mutex guarding each operation in favor the ASIC resource acquire/release. Push the resource acquire/release, above each operation call to allow exclusive access across multiple operations. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 20 +++++-- drivers/staging/rdma/hfi1/chip.h | 3 + drivers/staging/rdma/hfi1/debugfs.c | 22 +++++-- drivers/staging/rdma/hfi1/hfi.h | 14 ++++- drivers/staging/rdma/hfi1/init.c | 1 - drivers/staging/rdma/hfi1/platform.c | 26 ++++++--- drivers/staging/rdma/hfi1/qsfp.c | 108 +++++++++++++++++++++++------------ drivers/staging/rdma/hfi1/qsfp.h | 4 ++ 8 files changed, 142 insertions(+), 56 deletions(-) commit 576531fde8473333322905ea09fd5cfd14ce91ef Author: Dean Luick Date: Sat Mar 5 08:50:01 2016 -0800 IB/hfi1: Change SBus handling to use resource reservation The SBus resource includes SBUS, PCIE, and THERM registers. Change SBus handling to use the new ASIC resource reservation system. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 9 +++++-- drivers/staging/rdma/hfi1/chip.h | 3 +++ drivers/staging/rdma/hfi1/firmware.c | 46 +++++++++++++++++++----------------- drivers/staging/rdma/hfi1/pcie.c | 13 ++++++---- 4 files changed, 42 insertions(+), 29 deletions(-) commit 60c708285c0d3877a78dd8ede24238bc68c09651 Author: Dean Luick Date: Sat Mar 5 08:49:55 2016 -0800 IB/hfi1: Change EPROM handling to use resource reservation Change EPROM handling to use the new ASIC resource reservation system. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/eprom.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit a2ee27a4552505db5967630abcc3a90340e0d824 Author: Dean Luick Date: Sat Mar 5 08:49:50 2016 -0800 IB/hfi1: Add ASIC resource reservation functions The ASIC block is a shared hardware resource between two devices on the chip. Add functions to acquire and release these resources in a way that is safe for both multiple users on the same OS and multiple users on different OSes, while holding the hardware mutex as little as possible. Reservations are noted in a scratch register in the shared region. There are two types of reservations: per-HFI dynamic and permanent. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 2 + drivers/staging/rdma/hfi1/chip.h | 30 ++++++ drivers/staging/rdma/hfi1/firmware.c | 187 +++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) commit 78eb129d47f553e6f0607c393ebf4e9851edd73e Author: Dean Luick Date: Sat Mar 5 08:49:45 2016 -0800 IB/hfi1: Add shared ASIC structure Create a shared structure to exist between devices that share the same ASIC. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 28 +++++++++++++++++++++++++--- drivers/staging/rdma/hfi1/hfi.h | 9 +++++++++ drivers/staging/rdma/hfi1/init.c | 20 ++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) commit 3afb6f637e8edd68cee35b5c432c176f57fd712f Author: Dean Luick Date: Sat Mar 5 08:49:39 2016 -0800 IB/hfi1: Remove ASIC block clear The ASIC block is shared between two HFIs. Individual devices should not initialize registers there. Retain the power-on values. Individual users set registers as needed with one exception. Clear sbus fast mode on "slow" calls. Reviewed-by: Mitko Haralanov Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 88 ------------------------------------ drivers/staging/rdma/hfi1/firmware.c | 3 ++ 2 files changed, 3 insertions(+), 88 deletions(-) commit 2b8b34a948d063c4e803105ec0a3e8d27bd97c19 Author: Harish Chegondi Date: Sat Mar 5 08:49:34 2016 -0800 IB/hfi1: Replace kmalloc and memcpy with a kmemdup This change was recommended by Coccinelle tool when I ran the command: -bash-4.2$ make coccicheck MODE=patch M=drivers/infiniband/hw/hfi1/ Reviewed-by: Jubin John Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/efivar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bf640096e670a35e3a7ba1336216664f89a2bcf1 Author: Harish Chegondi Date: Sat Mar 5 08:49:29 2016 -0800 IB/hfi1: Move constant to the right in bitwise operations Implement changes recommended by the Coccinelle tool to move constant to the right in bitwise operations -bash-4.2$ make coccicheck MODE=report M=drivers/infiniband/hw/hfi1/ drivers/infiniband/hw/hfi1/pio.c:765:4-16: Move constant to right. drivers/infiniband/hw/hfi1/rc.c:2503:19-29: Move constant to right. drivers/infiniband/hw/hfi1/chip.c:9813:11-22: Move constant to right. drivers/infiniband/hw/hfi1/chip.c:14468:29-40: Move constant to right. Reviewed-by: Jubin John Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 +++--- drivers/staging/rdma/hfi1/pio.c | 4 ++-- drivers/staging/rdma/hfi1/rc.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 42d6ec19c918cb5bc6d14769e24240dce8f81687 Author: Harish Chegondi Date: Sat Mar 5 08:49:24 2016 -0800 IB/hfi1: Add the break statement that was removed in an earlier patch The break statement was unintentionally removed in this patch commit 41ca419abc0ca7ee65d765408cdc1a7fed2897a3 ("staging/rdma/hfi1: Remove hfi1 MR and hfi1 specific qp type") Reviewed-by: Mike Marciniszyn Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/ruc.c | 1 + 1 file changed, 1 insertion(+) commit 9cc984e4bc089cd21b715b92ffe2d2bda0bb1d1a Merge: b5b131c 0df6e32 Author: Linus Torvalds Date: Thu Mar 17 12:50:55 2016 -0700 Merge tag 'for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset changes from Sebastian Reichel: - add types for USB Type C and PD chargers - add act8945a charger driver - add ACPI/DT bindings for goldfish-battery - add support for versatile reset controller - misc fixes * tag 'for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (24 commits) power: pm2301-charger: use __maybe_unused to hide pm functions power: ipaq-micro-battery: use __maybe_unused to hide pm functions power_supply: 88pm860x_charger: do not pass NULL to power_supply_put jz4740-battery: Correct voltage change check power_supply: lp8788-charger: initialize boolean 'found' goldfish: Enable ACPI-based enumeration for goldfish battery power: goldfish_battery: add devicetree bindings power: act8945a: add charger driver for ACT8945A power: add documentation for ACT8945A's charger DT bindings ARM: dts: n900: Rename isp1704 to isp1707 to match correct name power_supply: bq27xxx_battery: Add of modalias and match table when CONFIG_OF is enabled power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled power_supply: bq2415x_charger: Do not add acpi modalias when CONFIG_ACPI is not enabled power_supply: isp1704_charger: Add compatible of match for nxp,isp1707 power_supply: isp1704_charger: Error messages when probe fail power_supply: Add types for USB Type C and PD chargers power: bq24735-charger: add 'ti,external-control' option power: bq24735-charger: document 'ti,external-control' option power: bq24735-charger: fix failed i2c with ac-detect power: reset: Fix dependencies for !HAS_IOMEM archs ... commit b15d53d009558d14c4f394a6d1fa2039c7f45c43 Author: David Hildenbrand Date: Mon Feb 29 09:19:24 2016 +0100 sched/preempt, sh: kmap_coherent relies on disabled preemption kmap_coherent needs disabled preemption to not schedule in the critical section, just like kmap_coherent on mips and kmap_atomic in general. Fixes: 8222dbe21e79 "sched/preempt, mm/fault: Decouple preemption from the page fault logic" Reported-by: Hans Verkuil Signed-off-by: David Hildenbrand Tested-by: Hans Verkuil Signed-off-by: Rich Felker arch/sh/mm/kmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 044b81f872169e9549b47ea2b6c94491e6d5f305 Author: Rich Felker Date: Mon Feb 15 18:30:50 2016 +0000 sh: add SMP method selection to device tree pseudo-board Allow selection of plat_smp_ops based on the enable-method cpu property from device tree and provide dummy ops for booting with a device tree that does not enable SMP. Signed-off-by: Rich Felker arch/sh/boards/of-generic.c | 89 +++++++++++++++++++++++++++++++++++++++++++-- arch/sh/include/asm/smp.h | 10 +++++ 2 files changed, 96 insertions(+), 3 deletions(-) commit 7480e0aabd5f9e6c3e3b72ed206e89284e90f11f Author: Rich Felker Date: Sat Jan 23 00:45:41 2016 +0000 sh: add device tree support and generic board using device tree Add a new pseudo-board, within the existing SH boards/machine-vectors framework, which does not represent any actual hardware but instead requires all hardware to be described by the device tree blob provided by the boot loader. Changes made are thus non-invasive and do not risk breaking support for legacy boards. New hardware, including the open-hardware J2 and associated SoC devices, will use device free from the outset. Legacy SH boards can transition to device tree once all their hardware has device tree bindings, driver support for device tree, and a dts file for the board. It is intented that, once all boards are supported in the new framework, the existing machine-vectors framework should be removed and the new device tree setup code integrated directly. Signed-off-by: Rich Felker Documentation/devicetree/booting-without-of.txt | 13 +++ arch/sh/boards/Kconfig | 15 ++++ arch/sh/boards/Makefile | 2 + arch/sh/boards/of-generic.c | 113 ++++++++++++++++++++++++ arch/sh/kernel/head_32.S | 13 +++ arch/sh/kernel/setup.c | 27 ++++++ 6 files changed, 183 insertions(+) commit 45624ac38926c8c2f1a63b4a39e7b1997743e1b3 Author: Rich Felker Date: Fri Feb 12 22:05:11 2016 +0000 sh: remove arch-specific localtimer and use generic one The code being removed was copied from arm, where the corresponding code was removed in 2013. The only functional change should be that the rating of the dummy local timer changes from 400 to 100. Signed-off-by: Rich Felker arch/sh/Kconfig | 1 + arch/sh/kernel/Makefile | 1 - arch/sh/kernel/localtimer.c | 60 --------------------------------------------- arch/sh/kernel/smp.c | 16 ++++++------ 4 files changed, 8 insertions(+), 70 deletions(-) commit 5f2cb34d034fab41dfaabb4403af6e83e04f30df Author: Rich Felker Date: Fri Feb 12 22:11:55 2016 +0000 sh: make MMU-specific SMP code conditional on CONFIG_MMU This is a prerequisite for adding NOMMU SMP support. Signed-off-by: Rich Felker arch/sh/kernel/smp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3623d138213aedf0e2c89720f6a3cd0e164cb310 Author: Rich Felker Date: Thu Dec 17 01:04:25 2015 +0000 sh: provide unified syscall trap compatible with all SH models Historically SH-2 Linux (and originally uClinux) used a syscall calling convention incompatible with the established SH-3/4 Linux ABI. This choice was made because the trap range used by the existing ABI, 0x10-0x17, overlaps with the hardware exception/interrupt trap range reserved by SH-2, and in particular, with the SH-2A divide-by-zero and division-overflow exceptions. Despite the documented syscall convention using the low bits of the trap number to signal the number of arguments the kernel should expect, no version of the kernel has ever used this information, nor is it useful; all of the registers need to be saved anyway. Therefore, it is possible to pick a new trap number, 0x1f, that is both supported by all existing SH-3/4 kernels and unassigned as a hardware trap in the SH-2 range. This makes it possible to produce SH-2 application binaries that are forwards-compatible with running on SH-3/4 kernels and to treat SH as a unified platform with varying ISA support levels rather than multiple gratuitously-incompatible platforms. This patch adjusts the range checking SH-2 and SH-2A kernels make for the syscall trap to accept the range 0x1f-0x2f rather than just 0x20-0x2f. As a result, trap 0x1f now acts as a syscall for all SH models. Signed-off-by: Rich Felker arch/sh/kernel/cpu/sh2/entry.S | 8 ++++---- arch/sh/kernel/cpu/sh2a/entry.S | 8 ++++---- arch/sh/kernel/entry-common.S | 21 +++++++++++++++------ 3 files changed, 23 insertions(+), 14 deletions(-) commit 940d4113f3306e07a1f86541489b686d1a979d54 Author: Yoshinori Sato Date: Sat Jun 20 14:02:19 2015 +0900 sh: New gcc support New gcc (4.8 or later) used new shift helper functions. So we need added new helper to private libgcc. Signed-off-by: Yoshinori Sato Signed-off-by: Rich Felker arch/sh/kernel/sh_ksyms_32.c | 3 +++ arch/sh/lib/ashlsi3.S | 35 ++++++++++++++++++++++++++--------- arch/sh/lib/ashrsi3.S | 33 ++++++++++++++++++++++++--------- arch/sh/lib/lshrsi3.S | 34 +++++++++++++++++++++++++--------- 4 files changed, 78 insertions(+), 27 deletions(-) commit 2af7967a8c1cfe647d6a222be2d2e393025dcd6e Author: Yoshinori Sato Date: Mon Mar 7 22:41:45 2016 +0900 sh: Disable trace for kernel uncompressing. Signed-off-by: Yoshinori Sato Signed-off-by: Rich Felker arch/sh/boot/compressed/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea17c9d868c153baa2e2ac10184e293ac7589d93 Author: Stephen Boyd Date: Wed Jan 27 15:36:54 2016 -0800 sh: Use generic clkdev.h header The generic header file is almost equivalent to the SH one. The only difference is that the SH one supports allocating clkdev lookups early using bootmem allocators instead of the slabs. From what I can tell using visual inspection, the slab is initialized before any clkdev allocation is made under arch/sh. So let's remove the arch specific clkdev.h header and use the generic one instead. Signed-off-by: Stephen Boyd Signed-off-by: Rich Felker arch/sh/include/asm/Kbuild | 1 + arch/sh/include/asm/clkdev.h | 33 --------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) commit b5b131c7473e17275debcdf1c226f452dc3876ed Merge: c7eec38 896e041 Author: Linus Torvalds Date: Thu Mar 17 12:34:54 2016 -0700 Merge tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This is smallish update with minor changes to core and new driver and usual updates. Nothing super exciting here.. - We have made slave address as physical to enable driver to do the mapping. - We now expose the maxburst for slave dma as new capability so clients can know this and program accordingly - addition of device synchronize callbacks on omap and edma. - pl330 updates to support DMAFLUSHP for Rockchip platforms. - Updates and improved sg handling in Xilinx VDMA driver. - New hidma qualcomm dma driver, though some bits are still in progress" * tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (40 commits) dmaengine: IOATDMA: revise channel reset workaround on CB3.3 platforms dmaengine: add Qualcomm Technologies HIDMA channel driver dmaengine: add Qualcomm Technologies HIDMA management driver dmaengine: hidma: Add Device Tree binding dmaengine: qcom_bam_dma: move to qcom directory dmaengine: tegra: Move of_device_id table near to its user dmaengine: xilinx_vdma: Remove unnecessary variable initializations dmaengine: sirf: use __maybe_unused to hide pm functions dmaengine: rcar-dmac: clear pertinence number of channels dmaengine: sh: shdmac: don't open code of_device_get_match_data() dmaengine: tegra: don't open code of_device_get_match_data() dmaengine: qcom_bam_dma: Make driver work for BE dmaengine: sun4i: support module autoloading dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo dmaengine: xilinx_vdma: Use readl_poll_timeout instead of do while loop's dmaengine: xilinx_vdma: Simplify spin lock handling dmaengine: xilinx_vdma: Fix issues with non-parking mode dmaengine: xilinx_vdma: Improve SG engine handling dmaengine: pl330: fix to support the burst mode dmaengine: make slave address physical ... commit c7eec380e85a427983782df744f0fb745d867170 Merge: 37aa731 69ae989 Author: Linus Torvalds Date: Thu Mar 17 12:24:55 2016 -0700 Merge tag 'rproc-v4.6' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "New driver for controlling ST's remote processors and a couple of minor fixes. Also includes the addition of myself as co-maintainer" Acked-by: Ohad Ben-Cohen * tag 'rproc-v4.6' of git://github.com/andersson/remoteproc: MAINTAINERS: Add co-maintainer for remoteproc subsystems remoteproc: Supply controller driver for ST's Remote Processors remoteproc: debugfs: Add ability to boot remote processor using debugfs remoteproc: dt: Provide bindings for ST's Remote Processor Controller driver remoteproc: debugfs: Return error on invalid 'count' value remoteproc/wkup_m3: Use MODULE_DEVICE_TABLE to export alias remoteproc: report error if resource table doesn't exist commit 37aa7319cd81a0eb587e552b0ec7e88c03853bf7 Merge: bb7aeae abfa6cd Author: Linus Torvalds Date: Thu Mar 17 12:09:35 2016 -0700 Merge tag 'docs-for-linus' of git://git.lwn.net/linux Pul documentation update from Jon Corbet: "Another relatively boring cycle for the docs tree: typo fixes, translation updates, etc" * tag 'docs-for-linus' of git://git.lwn.net/linux: modsign: Fix documentation on module signing enforcement parameter. Doc: nfs: Fix typos in Documentation/filesystems/nfs Documentation: kselftest: Remove duplicate word doc: fix grammar Documentation: Howto: Fixed subtitles style Doc: ARM: Fix a typo in clksrc-change-registers.awk Documentation/ko_KR: update maintainer information Documentation: Fix int/unsigned int comparison Documentation: Chinese translation of arm64/silicon-errata.txt Documentation:Update Documentation/zh_CN/arm64/booting.txt Documentation: HOWTO: remove obsolete info about regression postings Doc: ja_JP: Fix a typo in HOWTO Doc: i2c: Fix typo in Documentation/i2c Doc: DocBook: Fix a typo in device-drivers.tmpl Remove "arch" usage in Documentation/features/list-arch.sh README: cosmetic fixes Documentation/CodingStyle: add space before parenthesis in example macro SubmittingPatches: fix spelling of "git send-email" commit 40cf446b9482bd2c681b60062b34cc47c78342f8 Author: Christoph Hellwig Date: Fri Mar 4 20:46:14 2016 +0100 nfs4.h: add SCSI layout definitions Based on draft-ietf-nfsv4-scsi-layout-05 after the WG last call. Signed-off-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/nfs4.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a6ab1e8126d205238defbb55d23661a3a5c6a0d8 Author: NeilBrown Date: Fri Mar 4 17:20:13 2016 +1100 sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race sunrpc_cache_pipe_upcall() can detect a race if CACHE_PENDING is no longer set. In this case it aborts the queuing of the upcall. However it has already taken a new counted reference on "h" and doesn't "put" it, even though it frees the data structure holding the reference. So let's delay the "cache_get" until we know we need it. Fixes: f9e1aedc6c79 ("sunrpc/cache: remove races with queuing an upcall.") Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields net/sunrpc/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 956ccef3c97662c4ba07da9a19e4e62d3e286a8a Author: Sudip Mukherjee Date: Mon Mar 7 15:40:03 2016 +0530 nfsd: recover: fix memory leak nfsd4_cltrack_grace_start() will allocate the memory for grace_start but when we returned due to error we missed freeing it. Signed-off-by: Sudip Mukherjee Signed-off-by: J. Bruce Fields fs/nfsd/nfs4recover.c | 1 + 1 file changed, 1 insertion(+) commit 2596e07a3ed5a5f4d8b89be316c2b704d6f5dc5f Author: Arnd Bergmann Date: Thu Mar 17 18:23:40 2016 +0100 regmap: fix documentation to match code The regmap binding talks about one thing, which is register endianess, and it gets almost every aspect of it wrong. This replaces the current text of the file with a version that makes more sense and that matches what we implement now. Signed-off-by: Arnd Bergmann Fixes: a06c488da0b0 ("regmap: Add explict native endian flag to DT bindings") Fixes: 275876e208e2 ("regmap: Add the DT binding documentation for endianness") Signed-off-by: Mark Brown .../devicetree/bindings/regmap/regmap.txt | 59 +++++++--------------- 1 file changed, 19 insertions(+), 40 deletions(-) commit 2f83ace37181e445cab83d1d2a3a1dc88a36a814 Author: Martin Brandenburg Date: Thu Mar 17 13:20:35 2016 -0400 orangefs: put register_chrdev immediately before register_filesystem Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-mod.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit a4c680a027f52e179175fe451c69a55aba748efd Author: Martin Brandenburg Date: Wed Mar 16 14:35:21 2016 -0400 orangefs: remove paranoia in orangefs_set_inode Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/inode.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 02a5cc537dfa222583b6b6c17451a67816fce9f5 Author: Martin Brandenburg Date: Wed Mar 16 14:01:43 2016 -0400 orangefs: sanitize listxattr and return EIO on impossible values Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5e06664f29c92c8e6b007cdec1f3abf197bc1961 Author: Martin Brandenburg Date: Wed Mar 16 13:54:48 2016 -0400 orangefs: remove unused reference to xattr key length Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 5 ----- 1 file changed, 5 deletions(-) commit bb7aeae3d680c2c777f54274b0270ced0599f33d Merge: 7047737 88a1b56 Author: Linus Torvalds Date: Thu Mar 17 11:33:45 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer updates from James Morris: "There are a bunch of fixes to the TPM, IMA, and Keys code, with minor fixes scattered across the subsystem. IMA now requires signed policy, and that policy is also now measured and appraised" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (67 commits) X.509: Make algo identifiers text instead of enum akcipher: Move the RSA DER encoding check to the crypto layer crypto: Add hash param to pkcs1pad sign-file: fix build with CMS support disabled MAINTAINERS: update tpmdd urls MODSIGN: linux/string.h should be #included to get memcpy() certs: Fix misaligned data in extra certificate list X.509: Handle midnight alternative notation in GeneralizedTime X.509: Support leap seconds Handle ISO 8601 leap seconds and encodings of midnight in mktime64() X.509: Fix leap year handling again PKCS#7: fix unitialized boolean 'want' firmware: change kernel read fail to dev_dbg() KEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert KEYS: Reserve an extra certificate symbol for inserting without recompiling modsign: hide openssl output in silent builds tpm_tis: fix build warning with tpm_tis_resume ima: require signed IMA policy ima: measure and appraise the IMA policy itself ima: load policy using path ... commit 70477371dc350746d10431d74f0f213a8d59924c Merge: 09fd671 3407420 Author: Linus Torvalds Date: Thu Mar 17 11:22:54 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: "Here is the crypto update for 4.6: API: - Convert remaining crypto_hash users to shash or ahash, also convert blkcipher/ablkcipher users to skcipher. - Remove crypto_hash interface. - Remove crypto_pcomp interface. - Add crypto engine for async cipher drivers. - Add akcipher documentation. - Add skcipher documentation. Algorithms: - Rename crypto/crc32 to avoid name clash with lib/crc32. - Fix bug in keywrap where we zero the wrong pointer. Drivers: - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver. - Add PIC32 hwrng driver. - Support BCM6368 in bcm63xx hwrng driver. - Pack structs for 32-bit compat users in qat. - Use crypto engine in omap-aes. - Add support for sama5d2x SoCs in atmel-sha. - Make atmel-sha available again. - Make sahara hashing available again. - Make ccp hashing available again. - Make sha1-mb available again. - Add support for multiple devices in ccp. - Improve DMA performance in caam. - Add hashing support to rockchip" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits) crypto: qat - remove redundant arbiter configuration crypto: ux500 - fix checks of error code returned by devm_ioremap_resource() crypto: atmel - fix checks of error code returned by devm_ioremap_resource() crypto: qat - Change the definition of icp_qat_uof_regtype hwrng: exynos - use __maybe_unused to hide pm functions crypto: ccp - Add abstraction for device-specific calls crypto: ccp - CCP versioning support crypto: ccp - Support for multiple CCPs crypto: ccp - Remove check for x86 family and model crypto: ccp - memset request context to zero during import lib/mpi: use "static inline" instead of "extern inline" lib/mpi: avoid assembler warning hwrng: bcm63xx - fix non device tree compatibility crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode. crypto: qat - The AE id should be less than the maximal AE number lib/mpi: Endianness fix crypto: rockchip - add hash support for crypto engine in rk3288 crypto: xts - fix compile errors crypto: doc - add skcipher API documentation crypto: doc - update AEAD AD handling ... commit 1a0ce16d713679be86a023f7bd0f9c54f2c07e8a Author: Mike Marshall Date: Thu Mar 17 13:24:34 2016 -0400 Orangefs: adjust unwind on module init failure. Signed-off-by: Mike Marshall fs/orangefs/orangefs-mod.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b9c743b85dc378510ef0e5ebe3c2e4ac1495c410 Author: Flora Cui Date: Mon Oct 12 10:12:03 2015 +0800 drm/amdgpu/gfx7: add MTYPE definition Signed-off-by: Flora Cui Reviewed-by: Jammy Zhou Reviewed-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/gca/gfx_7_2_enum.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 35264f6f1c582e01d0b4628acb314232e60b41ee Author: Christian König Date: Thu Mar 17 17:14:10 2016 +0100 drm/amdgpu: removing BO_VAs shouldn't be interruptible Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d27d49410ea6452679c533d812704de6b9f76021 Author: Rex Zhu Date: Tue Mar 1 17:04:12 2016 +0800 drm/amd/powerplay: show uvd/vce power gate enablement for tonga. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 66f4854c347b96c9fca3d9ce3eaabc6567e84006 Author: Rex Zhu Date: Tue Mar 1 17:02:51 2016 +0800 drm/amd/powerplay: show uvd/vce power gate info for fiji Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 676d8c24f3e825484085d10fc1768cab46ed5166 Author: Monk Liu Date: Thu Mar 17 13:57:09 2016 +0800 drm/amdgpu: use sched fence if possible when preemption feature lands, the SA bo should rely on sched fence, because hw fence will be invalid after its job preempted or skipped. Signed-off-by: Monk Liu Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 73cfa5f5cec3f4b99185d3535928dee6d01ba2f6 Author: Monk Liu Date: Thu Mar 17 13:48:13 2016 +0800 drm/amdgpu: move ib.fence to job.fence Signed-off-by: Monk Liu Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 ++ drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + 10 files changed, 16 insertions(+), 6 deletions(-) commit cc55c45db5e2c97445d4663d45348a0fc27bf9ad Author: Monk Liu Date: Thu Mar 17 10:47:07 2016 +0800 drm/amdgpu: give a fence param to ib_free thus amdgpu_ib_free() can hook sched fence to SA manager in later patches. BTW: for amdgpu_free_job(), it should only fence_put() the fence of the last ib once, so fix it as well in this patch. Signed-off-by: Monk Liu Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.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 +- 8 files changed, 12 insertions(+), 10 deletions(-) commit 16a8a49be1b878ef6dd5d1663d456e254e54ae3d Author: Ken Wang Date: Thu Mar 17 17:26:57 2016 +0800 drm/amdgpu: include the right version of gmc header files for iceland Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc897c95e91451271cd707ee0f71022b9b201ce9 Author: Gerald Schaefer Date: Thu Mar 17 15:00:04 2016 +0100 s390/mm: handle PTE-mapped tail pages in fast gup With the THP refcounting rework it is possible to see THP compound tail pages mapped with PTEs during a THP split. This needs to be considered when using page_cache_get_speculative(), which will always fail on tail pages because ->_count is always zero. commit 7aef4172 "mm: handle PTE-mapped tail pages in gerneric fast gup implementaiton" fixed it for the generic fast gup code by using compound_head(page) instead of page, but not for s390. This patch is a 1:1 adaption of commit 7aef4172 for the s390 fast gup code. Without this fix, gup will fall back to the slow path or fail in the unlikely scenario that we hit a THP under splitting in-between the page table split and the compound page split. Cc: stable@vger.kernel.org # v4.5 Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/mm/gup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c67f5db82027ba6d2ea4ac9176bc45996a03ae6a Author: Paolo Abeni Date: Thu Mar 17 15:44:00 2016 +0100 virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() This gives small but noticeable rx performance improvement (2-3%) and will allow exploiting future napi improvement. Signed-off-by: Paolo Abeni Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 222bde03881c470de8aa4ca8e58f5950c2b84d12 Author: Takashi Iwai Date: Thu Mar 17 14:48:13 2016 +0100 ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug The recent change in HD-audio HDMI/DP codec driver for allowing the dynamic PCM binding introduced a new spec->pcm_mutex. One of the protected area by this mutex is hdmi_present_sense(). As reported by Intel CI tests, unfortunately, the new mutex causes a deadlock when the hotplug/unplug is triggered during the codec is in runtime suspend. The buggy code path is like the following: hdmi_unsol_event() -> ... -> hdmi_present_sense() ==> ** here taking pcm_mutex -> hdmi_present_sense_via_verbs() -> snd_hda_power_up_pm() -> ... (runtime resume calls) -> generic_hdmi_resume() -> hdmi_present_sense() ==> ** here taking pcm_mutex again! As we can see here, the problem is that the mutex is taken before snd_hda_power_up_pm() call that triggers the runtime resume. That is, the obvious solution is to move the power up/down call outside the mutex; it is exactly what this patch provides. The patch also clarifies why this bug wasn't caught beforehand. We used to have the i915 audio component for hotplug for all Intel chips, and in that code path, there is no power up required but the information is taken directly from the graphics side. However, we recently switched back to the old method for some old Intel chips due to regressions, and now the deadlock issue is surfaced. Fixes: a76056f2e57e ('ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug') Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 83c742c344c08c2bbe338d45c6ec63110e9d5e3d Author: Shawn Lin Date: Wed Mar 16 18:15:47 2016 +0800 mmc: block: fix ABI regression of mmc_blk_ioctl If mmc_blk_ioctl returns -EINVAL, blkdev_ioctl continues to work without returning err to user-space. But now we check CAP_SYS_RAWIO firstly, so we return -EPERM to blkdev_ioctl, which make blkdev_ioctl return -EPERM to user-space directly. So this will break all the ioctl with BLKROSET. Now we find Android-adb suffer it for the following log: remount of /system failed; couldn't make block device writable: Operation not permitted openat(AT_FDCWD, "/dev/block/platform/ff420000.dwmmc/by-name/system", O_RDONLY) = 3 ioctl(3, BLKROSET, 0) = -1 EPERM (Operation not permitted) Fixes: a5f5774c55a2 ("mmc: block: Add new ioctl to send multi commands") Cc: stable@vger.kernel.org Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 93c77d2999b09f2084b033ea6489915e0104ad9c Author: Brent Taylor Date: Sun Mar 13 00:25:31 2016 -0600 mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config Using an at91sam9g20ek development board with DTS configuration may trigger a kernel panic because of a NULL pointer dereference exception, while configuring DMA. Let's fix this by adding a check for pdata before dereferencing it. Signed-off-by: Brent Taylor Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0747eb81c1d106b1408d60452af75cd17a67621 Author: Shawn Lin Date: Mon Mar 14 12:41:33 2016 +0800 mmc: core: remove redundant memset of sdio_read_cccr When initializing sdio card, we get struct mmc_card from mmc_alloc_card which allocates it by kzalloc. So we don't need another memset while reading cccr. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio.c | 2 -- 1 file changed, 2 deletions(-) commit 0076c71e37cc9f3f0b1c0c83f9f26f31a47222b0 Author: Shawn Lin Date: Sat Mar 12 00:35:45 2016 +0800 mmc: core: remove redundant memset of mmc_decode_cid When initializing sd or sdio card, we get struct mmc_card from mmc_alloc_card which allocates it by kzalloc. So we don't need another memset while decoding cid. Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 2 -- 1 file changed, 2 deletions(-) commit 96466fcb6c2a19da5c7abe38433688a5b73648c1 Author: Brian Norris Date: Mon Mar 7 15:36:39 2016 -0800 mmc: of_mmc_spi: fix unused warning drivers/mmc/host/of_mmc_spi.c: In function 'mmc_spi_get_pdata': drivers/mmc/host/of_mmc_spi.c:77:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret = -EINVAL; ^ Signed-off-by: Brian Norris Signed-off-by: Ulf Hansson drivers/mmc/host/of_mmc_spi.c | 2 -- 1 file changed, 2 deletions(-) commit 91aa366109e801ef4755096248d7c66136f6e380 Author: Shawn Lin Date: Mon Mar 7 23:39:19 2016 +0800 mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan This patch adds Generic PHY access for sdhci-of-arasan. Driver can get PHY handler from dt-binding, and power-on/init the PHY. Currently, it's just mandatory for arasan,sdhci-5.1. Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 57 +++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) commit 278d09624eda94d82ff385b1c40ecc3db99c73d3 Author: Shawn Lin Date: Mon Mar 7 23:39:08 2016 +0800 mmc: sdhci-of-arasan: fix missing sdhci_pltfm_free for err handling Currently, some err handling of sdhci_arasan_probe return directly without calling sdhci_pltfm_free. This patch fixes them. Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 842750488de659ffd12a28e5f5328c9f15ea08e1 Author: Shawn Lin Date: Mon Mar 7 23:38:56 2016 +0800 mmc: sdhci-of-arasan: remove disable clk_ahb from sdhci_arasan_resume We don't really need disable clk_ahb when failing to resume. Otherwise we may take risk of bus error for accessing register without clk_ahb. Signed-off-by: Shawn Lin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-arasan.c | 1 - 1 file changed, 1 deletion(-) commit 18e8d812dd93e90e470c62938291f7f9a4bed6f0 Author: Shawn Lin Date: Mon Mar 7 23:38:42 2016 +0800 Documentation: bindings: add description of phy for sdhci-of-arasan This patch adds phys and phy-names for sdhci-of-arasan as required properties for arasan,sdhci-5.1, and details the example as well. Signed-off-by: Shawn Lin Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/arasan,sdhci.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 995136247915c5cee633d55ba23f6eebf67aa567 Author: Adrian Hunter Date: Mon Mar 7 13:33:55 2016 +0200 mmc: sdhci: Fix override of timeout clk wrt max_busy_timeout Normally the timeout clock frequency is read from the capabilities register. It is also possible to set the value prior to calling sdhci_add_host() in which case that value will override the capabilities register value. However that was being done after calculating max_busy_timeout so that max_busy_timeout was being calculated using the wrong value of timeout_clk. Fix that by moving the override before max_busy_timeout is calculated. The result is that the max_busy_timeout and max_discard increase for BSW devices so that, for example, the time for mkfs.ext4 on a 64GB eMMC drops from about 1 minute 40 seconds to about 20 seconds. Note, in the future, the capabilities setting will be tidied up and this override won't be used anymore. However this fix is needed for stable. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0743bbf0bc9028f9057703940e0fa96215949a38 Author: Wang Hongcheng Date: Mon Mar 14 13:44:33 2016 +0800 mmc: mmci: Remove unnecessary header file The header file asm/sizes.h is unnecessary, let's remove it. This also allows to compile under X86 arch. Signed-off-by: Wang Hongcheng Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 1 - 1 file changed, 1 deletion(-) commit 70cce2af73f1a37b00e8c8147325c8aca9d58ebe Author: Philip Elcan Date: Thu Mar 3 11:38:46 2016 -0500 mmc: sdhci-acpi: add QCOM controllers This adds the HIDs for Qualcomm Technologies Inc SDHC controllers: QCOM8051: non-removable device that does not support 1.8v QCOM8052: non-removable device that does support 1.8v Signed-off-by: Philip Elcan Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e5c63d91cdf6a0d02f080bc8ab5b75c6e280a046 Author: Lucas Stach Date: Mon Feb 29 21:56:25 2016 +0100 mmc: tegra: implement memcomp pad calibration The Tegra30+ SDMMC module has memcomp pads that are used to automatically find and set the correct drive strength settings to the sdmmc pads. The calibration needs to be manually kicked off when the card signal voltage is changed, after the card clock is supplied again. Signed-off-by: Lucas Stach Acked-by: Adrian Hunter [Ulf: Rebased to fix a trivial compile error] Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 47 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) commit fac49ce575cd86dc5e91049f274750923dfb6840 Author: Nicolas Boichat Date: Thu Mar 3 18:19:45 2016 +0800 mmc: mediatek: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch We've introduced a new helper in the MMC core: mmc_regulator_set_vqmmc(). Let's use this in mtk-sd. Using this new helper has some advantages: 1. We get the mmc_regulator_set_vqmmc() behavior of trying to match VQMMC and VMMC when the signal voltage is 3.3V. This ensures max compatibility. 2. We get rid of a few more warnings when probing unsupported voltages. 3. We get rid of some non-mediatek specific code in mtk-sd. Signed-off-by: Nicolas Boichat Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit f9bab9d2b169a9e80c1a710b19d792974787e899 Author: Nicolas Boichat Date: Thu Mar 3 18:19:44 2016 +0800 mmc: mediatek: Change signal voltage error to dev_dbg() In commit ceae98f20e36 ("mmc: core: Try other signal levels during power up") we can see that there are times when it's valid to try several signal voltages. Don't print an ugly error in the logs when that happens. Signed-off-by: Nicolas Boichat Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49312c1f3287b052af518bdfe06dbb317defc9d4 Author: Simon Horman Date: Wed Feb 24 11:39:33 2016 +0900 mmc: sh_mmcif, tmio: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3491b69045b1926a198ba70dc1296ca253f2fbdd Author: Lucas Stach Date: Mon Feb 29 21:56:24 2016 +0100 mmc: tegra: properly disable card clock The new code to do the clock rate setting externally to the SDMMC module has a shortcut to not propagate changes with a 0 rate to the CAR by simply bailing out. This breaks proper cutting of the card clock. Fix it by directly calling the correct sdhci function. Fixes: a8e326a911d3 "mmc: tegra: implement module external clock change" Signed-off-by: Lucas Stach Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f0217441839c258b82dd83ee15082666d6ab9c2 Author: Takashi Sakamoto Date: Thu Mar 17 21:14:36 2016 +0900 ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation In control compatibility layer, when no elements are found by ELEM_READ/ELEM_WRITE ioctl commands, ENXIO is returned. On the other hand, in core implementation, ENOENT is returned. This is not good for ALSA ctl applications. This commit changes the return value from the compatibility layer so that the same value is returned. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/core/control_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1c9b9ff2420c0d8c25924be312bc422bf9dc056 Merge: c14022b ad8ddc5 3b65428 af2e628 d3e69b9 5f66872 1adf904 1d1b564 f9a82c2 f620516 Author: Jiri Kosina Date: Thu Mar 17 13:51:54 2016 +0100 Merge branches 'for-4.5/upstream-fixes', 'for-4.6/cmedia', 'for-4.6/i2c-hid', 'for-4.6/logitech', 'for-4.6/multitouch', 'for-4.6/penmount', 'for-4.6/sony', 'for-4.6/thingm', 'for-4.6/upstream' and 'for-4.6/wacom' into for-linus commit 91d37211769510ae0b4747045d8f81d3b9dd4278 Author: Heiko Carstens Date: Thu Mar 17 12:47:12 2016 +0100 s390: add DEBUG_RODATA support git commit d2aa1acad22f ("mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings") adds a bogus warning to the console which states that s390 does not support kernel memory protection. This however is not true. We do support that since a couple of years however in a different way than the author of the above named patch expected. To get rid of the misleading message implement the mark_rodata_ro function and emit a message which states the amount of memory which was write protected already earlier. This is the same what parisc currently does. We currently do not support the kernel parameter "rodata=off" which would allow to write to the rodata section again. However since we have this feature since years without any problems there is no reason to add support for this. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 3 +++ arch/s390/mm/init.c | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit df9ceff906abf5edc284c11ac899b3b3f32b4dd3 Author: Kees Cook Date: Thu Mar 17 12:45:33 2016 +0100 s390: disable postinit-readonly for now This is a temporary fix to let lkdtm run again on s390, though it'll still fail the ro_after_init tests. Until rodata and ro_after_init sections can be split on s390, disable special handling of ro_after_init. Signed-off-by: Kees Cook Reported-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cache.h | 3 +++ 1 file changed, 3 insertions(+) commit 59a9ed5f87b6e396aed1f6bf7d6496f7ba66c37a Author: Stefan Haberland Date: Tue Feb 23 10:15:27 2016 +0100 s390/dasd: reorder lcu and device lock Reorder lcu and device lock to get rid of the error-prone trylock mechanism. The locking order is lcu lock -> device lock. This protects against changes to the lcu device lists and enables us to iterate over the devices, take the cdev lock and make changes to the device structures. The complicated part is the summary unit check handler that gets an interrupt on one device of the lcu that leads to structural changes of the whole lcu itself. This work needs to be done even if devices on the lcu disappear. So a device independent worker is used. The old approach tried to update some lcu structures and set up the lcu worker in the interrupt context with the device lock held. But this forced the lock order "cdev lock -> lcu lock" that made it hard to have the lcu lock held and iterate over all devices and change them. The new approach is to schedule a device specific worker that gets out of the interrupt context and rid of the device lock for summary unit checks. This worker is able to take the lcu lock and schedule the lcu worker that updates all devices. The time between interrupt and worker execution is no problem because the devices in the lcu reject all I/O in this time with an appropriate error. The dasd driver can deal with this situation and re-drive the I/O later on. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_alias.c | 226 ++++++++++------------------------------ drivers/s390/block/dasd_eckd.c | 38 +++++-- drivers/s390/block/dasd_eckd.h | 3 +- drivers/s390/block/dasd_int.h | 2 + 4 files changed, 86 insertions(+), 183 deletions(-) commit 1e3c1dd15dd30232458e35128fd062b788b1c9e4 Author: Anna-Maria Gleixner Date: Fri Mar 11 11:52:38 2016 +0100 s390/cpum_sf: Fix cpu hotplug notifier transitions The cpumf_pmu_notfier() hotplug callback lacks handling of the CPU_DOWN_FAILED case. That means, if CPU_DOWN_PREPARE failes, the PMC of the CPU is not setup again. Furthermore the CPU_ONLINE_FROZEN case will never be processed because of masking the switch expression with CPU_TASKS_FROZEN. Add handling for CPU_DOWN_FAILED transition to setup the PMC of the CPU. Remove CPU_ONLINE_FROZEN case. Signed-off-by: Anna-Maria Gleixner Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a987884295891f18fddf9c76d7d47c9486701560 Author: Anna-Maria Gleixner Date: Fri Mar 11 11:52:37 2016 +0100 s390/cpum_cf: Fix missing cpu hotplug notifier transition The cpumf_pmu_notfier() hotplug callback lacks handling of the CPU_DOWN_FAILED case. That means, if CPU_DOWN_PREPARE failes, the PMC of the CPU is not setup again. Add handling for CPU_DOWN_FAILED transition to setup the PMC of the CPU. Signed-off-by: Anna-Maria Gleixner Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf.c | 1 + 1 file changed, 1 insertion(+) commit 667a490bdb6e27db0887d2ca515b907d6aa87118 Author: Alexey Brodkin Date: Thu Mar 17 12:41:52 2016 +0300 ARC: [plat-axs10x] add Ethernet PHY description in .dts Commit e34d65696d2e ("stmmac: create of compatible mdio bus for stmmac driver") broke DW GMAC functionality on ARC AXS10x boards: That's what happens on eth0 up: --------------------------->8------------------------ | libphy: PHY stmmac-0:ffffffff not found | eth0: Could not attach to PHY | stmmac_open: Cannot attach to PHY (error: -19) --------------------------->8------------------------ Simplest solution is to add PHY description in board's .dts. And so we do here. Signed-off-by: Alexey Brodkin Cc: Rob Herring Cc: Phil Reid Cc: David S. Miller Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: stable@vger.kernel.org # 4.5 Reviewed-by: Sergei Shtylyov Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 26cf9cc5d88e008eac517c8bfa44a2fdbfd6a674 Author: Kefeng Wang Date: Wed Mar 16 15:35:33 2016 +0800 arc: use of_platform_default_populate() to populate default bus Use helper of_platform_default_populate() in linux/of_platform when possible, instead of calling of_platform_populate() with the default match table. Signed-off-by: Kefeng Wang Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d48794bb3bf7d7e421204a8cc3bd5c95ffc609b Author: Mihai Mihalache Date: Wed Mar 16 08:21:12 2016 -0700 regulator: gpio: check return value of of_get_named_gpio At boot time the regulator driver can be initialized before the gpio, in which case the call to of_get_named_gpio will return EPROBE_DEFER. This value is silently passed to regulator_register which will return success, although the gpio is not registered (regulator_ena_gpio_request not called) as the value passed is detected as invalid. The gpio_regulator_probe will therefore succeed win no gpio requested. Signed-off-by: Mihai Mihalache Reviewed-by: Hans Holmberg Signed-off-by: Mark Brown drivers/regulator/gpio-regulator.c | 2 ++ 1 file changed, 2 insertions(+) commit cd8dd41a33264a4602539711f76670c2a1f4d007 Author: Sascha Hauer Date: Thu Mar 17 09:21:50 2016 +0100 spi: imx: Fix possible NULL pointer deref transfer could be NULL in spi_imx_can_dma() when it's called from spi_imx_setupxfer() with a NULL transfer. Test for a NULL pointer before dereferencing it. Signed-off-by: Sascha Hauer Cc: Dan Carpenter Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 793c7f9212fdb7bea5e017427e750afa11217c29 Author: Knut Wohlrab Date: Tue Mar 15 14:24:36 2016 +0100 spi: imx: only do necessary changes to ECSPIx_CONFIGREG If the SPI chip select (CS) for a dedicated channel is done manually by the used higher device driver, the CS may be active while writing to ECSPIx_CONFIGREG. To prevent unwanted clock edges when selecting the clock mode, only do the necessary changes to the i.MX SPI configuration register and leave not selected channels untouched. To prevent unwanted clock edges on first use, an empty dummy transmission shall be done by the initialization procedure of the device driver of this channel. This will set the clock mode to the correct state. Signed-off-by: Knut Wohlrab Signed-off-by: Dirk Behme Acked-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit dfe97ad30e8c038261663a18b9e04b8b5bc07bea Author: Boris BREZILLON Date: Thu Mar 17 10:47:10 2016 +0100 crypto: marvell/cesa - forward devm_ioremap_resource() error code Forward devm_ioremap_resource() error code instead of returning -ENOMEM. Signed-off-by: Boris Brezillon Reported-by: Russell King - ARM Linux Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Cc: # 4.2+ Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0ef51067cb4fa51867ede1bac1d58b3dfb42f31 Author: Boris BREZILLON Date: Thu Mar 17 10:21:35 2016 +0100 crypto: marvell/cesa - initialize hash states ->export() might be called before we have done an update operation, and in this case the ->state field is left uninitialized. Put the correct default value when initializing the request. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/hash.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7850c91b175d765f09cea3a02a20c7779c79c11d Author: Boris BREZILLON Date: Thu Mar 17 10:21:34 2016 +0100 crypto: marvell/cesa - fix memory leak Crypto requests are not guaranteed to be finalized (->final() call), and can be freed at any moment, without getting any notification from the core. This can lead to memory leaks of the ->cache buffer. Make this buffer part of the request object, and allocate an extra buffer from the DMA cache pool when doing DMA operations. As a side effect, this patch also fixes another bug related to cache allocation and DMA operations. When the core allocates a new request and import an existing state, a cache buffer can be allocated (depending on the state). The problem is, at that very moment, we don't know yet whether the request will use DMA or not, and since everything is likely to be initialized to zero, mv_cesa_ahash_alloc_cache() thinks it should allocate a buffer for standard operation. But when mv_cesa_ahash_free_cache() is called, req->type has been set to CESA_DMA_REQ in the meantime, thus leading to an invalind dma_pool_free() call (the buffer passed in argument has not been allocated from the pool). Signed-off-by: Boris Brezillon Reported-by: Gregory CLEMENT Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.h | 3 +- drivers/crypto/marvell/hash.c | 86 +++++++++---------------------------------- 2 files changed, 20 insertions(+), 69 deletions(-) commit 03a6f29000fdc13adc2bb2e22efd07a51d334154 Author: Gary R Hook Date: Wed Mar 16 09:02:26 2016 -0500 crypto: ccp - fix lock acquisition code This patch simplifies an unneeded read-write lock. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d1558f4e95cb14b0fff5c0b839c15a21f7e8aed0 Author: Herbert Xu Date: Wed Mar 16 17:06:01 2016 +0800 eCryptfs: Use skcipher and shash eCryptfs: Fix null pointer dereference on kzalloc error path The conversion to skcipher and shash added a couple of null pointer dereference bugs on the kzalloc failure path. This patch fixes them. Fixes: 3095e8e366b4 ("eCryptfs: Use skcipher and shash") Reported-by: Dan Carpenter Signed-off-by: Herbert Xu fs/ecryptfs/keystore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c511eaaa7851cda0657b2d5a401d33cf4dba52ad Author: Vineet Gupta Date: Thu Mar 17 15:00:59 2016 +0530 ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build linux-next for 4.6-rc1 timeline reported ARC build failures !THP | arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined [enabled by default] | arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined [enabled by default] | arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined [enabled by default] Turns out that commit ("mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range") triggered the issue while the problem was in ARC code where THP specific helpers were not guarded with #ifdef. Signed-off-by: Vineet Gupta arch/arc/include/asm/tlbflush.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 215276c0147ef49bc07692ca68bae35a30a64b9a Author: Steffen Klassert Date: Mon Feb 22 10:56:45 2016 +0100 xfrm: Reset encapsulation field of the skb before transformation The inner headers are invalid after a xfrm transformation. So reset the skb encapsulation field to ensure nobody tries to access the inner headers. Signed-off-by: Steffen Klassert net/xfrm/xfrm_output.c | 3 +++ 1 file changed, 3 insertions(+) commit 6ad3122a08e3a9c2148873665752e87cf4f393cc Author: Steffen Klassert Date: Mon Feb 22 10:40:07 2016 +0100 flowcache: Avoid OOM condition under preasure We can hit an OOM condition if we are under presure because we can not free the entries in gc_list fast enough. So add a counter for the not yet freed entries in the gc_list and refuse new allocations if the value is too high. Signed-off-by: Steffen Klassert include/net/netns/xfrm.h | 1 + net/core/flow.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit c29016cf41fe9fa994a5ecca607cf5f1cd98801e Author: Andy Lutomirski Date: Wed Mar 16 14:14:22 2016 -0700 x86/iopl: Fix iopl capability check on Xen PV iopl(3) is supposed to work if iopl is already 3, even if unprivileged. This didn't work right on Xen PV. Fix it. Reviewewd-by: Jan Beulich Signed-off-by: Andy Lutomirski Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Vrabel Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jan Beulich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/8ce12013e6e4c0a44a97e316be4a6faff31bd5ea.1458162709.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/ioport.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit b7a584598aea7ca73140cb87b40319944dd3393f Author: Andy Lutomirski Date: Wed Mar 16 14:14:21 2016 -0700 x86/iopl/64: Properly context-switch IOPL on Xen PV On Xen PV, regs->flags doesn't reliably reflect IOPL and the exit-to-userspace code doesn't change IOPL. We need to context switch it manually. I'm doing this without going through paravirt because this is specific to Xen PV. After the dust settles, we can merge this with the 32-bit code, tidy up the iopl syscall implementation, and remove the set_iopl pvop entirely. Fixes XSA-171. Reviewewd-by: Jan Beulich Signed-off-by: Andy Lutomirski Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Vrabel Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jan Beulich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/693c3bd7aeb4d3c27c92c622b7d0f554a458173c.1458162709.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/xen/hypervisor.h | 2 ++ arch/x86/kernel/process_64.c | 12 ++++++++++++ arch/x86/xen/enlighten.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) commit b08983015cdddca7e41c95f5054e2a8fb222a264 Author: Andy Lutomirski Date: Wed Mar 16 14:14:20 2016 -0700 selftests/x86: Add an iopl test This exercises two cases that are known to be buggy on Xen PV right now. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Vrabel Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jan Beulich Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/61afe904c95c92abb29cd075b51e10e7feb0f774.1458162709.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/iopl.c | 135 +++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 1 deletion(-) commit 7e545d6eca20ce8ef7f66a63146cbff82b2ba760 Author: Jessica Yu Date: Wed Mar 16 20:55:39 2016 -0400 livepatch/module: remove livepatch module notifier Remove the livepatch module notifier in favor of directly enabling and disabling patches to modules in the module loader. Hard-coding the function calls ensures that ftrace_module_enable() is run before klp_module_coming() during module load, and that klp_module_going() is run before ftrace_release_mod() during module unload. This way, ftrace and livepatch code is run in the correct order during the module load/unload sequence without dependence on the module notifier call chain. Signed-off-by: Jessica Yu Reviewed-by: Petr Mladek Acked-by: Josh Poimboeuf Acked-by: Rusty Russell Signed-off-by: Jiri Kosina include/linux/livepatch.h | 13 ++++ kernel/livepatch/core.c | 147 ++++++++++++++++++++++------------------------ kernel/module.c | 10 ++++ 3 files changed, 94 insertions(+), 76 deletions(-) commit 4c973d1620ae08f5cbe27644c5f5b974c8f594ec Author: Jessica Yu Date: Wed Mar 16 20:55:38 2016 -0400 modules: split part of complete_formation() into prepare_coming_module() Put all actions in complete_formation() that are performed after module->state is set to MODULE_STATE_COMING into a separate function prepare_coming_module(). This split prepares for the removal of the livepatch module notifiers in favor of hard-coding function calls to klp_module_{coming,going} in the module loader. The complete_formation -> prepare_coming_module split will also make error handling easier since we can jump to the appropriate error label to do any module GOING cleanup after all the COMING-actions have completed. Signed-off-by: Jessica Yu Reviewed-by: Josh Poimboeuf Reviewed-by: Petr Mladek Acked-by: Rusty Russell Signed-off-by: Jiri Kosina kernel/module.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 00f526850151e91fdad0896a1436341687ad2582 Merge: cbf8b5a d89abe2 Author: Ingo Molnar Date: Thu Mar 17 09:44:57 2016 +0100 Merge branch 'x86/cleanups' into x86/urgent Pull in some merge window leftovers. Signed-off-by: Ingo Molnar commit ccbd805aa934dd1b863ef115a9c55f119b2388cf Author: Linus Walleij Date: Thu Mar 17 09:36:09 2016 +0100 Revert "Share upstreaming patches" This reverts commit a101ad945113be3d7f283a181810d76897f0a0d6. README.md | 2 -- 1 file changed, 2 deletions(-) commit bf4703fdd166fffd5b2e4c42d2ebbf708b94748e Author: Irina Tirdea Date: Sun Mar 13 02:33:30 2016 +0200 ACPI / property: fix data node parsing in acpi_get_next_subnode() When an ACPI node has both ACPI device nodes and ACPI data nodes, acpi_get_next_subnode() will return the ACPI data nodes of its last parsed child. To avoid that, make acpi_get_next_subnode() go back to the original ACPI device object when all of the device node children of it have been found already. Signed-off-by: Irina Tirdea [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 1 + 1 file changed, 1 insertion(+) commit f5eda99ee6c0c3e85be9d6f20685151514d5102f Author: Wang Hongcheng Date: Fri Mar 11 17:28:23 2016 +0800 ACPI / APD: Add device HID for future AMD UART controller Add device HID AMDI0020 to match the AMD ACPI Vendor ID (AMDI) as registered in http://www.uefi.org/acpi_id_list, and the UART controller on future AMD paltform will use the HID instead of AMD0020. Signed-off-by: Wang Hongcheng Acked-by: Ken Xue Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 1 + 1 file changed, 1 insertion(+) commit e132b9b3bc7f19e9b158e42b323881d5dee5ecf3 Author: Rik van Riel Date: Wed Mar 16 12:14:00 2016 -0400 cpuidle: menu: use high confidence factors only when considering polling The menu governor uses five different factors to pick the idle state: - the user configured latency_req - the time until the next timer (next_timer_us) - the typical sleep interval, as measured recently - an estimate of sleep time by dividing next_timer_us by an observed factor - a load corrected version of the above, divided again by load Only the first three items are known with enough confidence that we can use them to consider polling, instead of an actual CPU idle state, because the cost of being wrong about polling can be excessive power use. The latter two are used in the menu governor's main selection loop, and can result in choosing a shallower idle state when the system is expected to be busy again soon. This pushes a busy system in the "performance" direction of the performance<>power tradeoff, when choosing between idle states, but stays more strictly on the "power" state when deciding between polling and C1. Signed-off-by: Rik van Riel Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/menu.c | 42 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 18 deletions(-) commit 09fd671ccb2475436bd5f597f751ca4a7d177aea Merge: bace3db 13aa38e Author: Linus Torvalds Date: Wed Mar 16 18:37:20 2016 -0700 Merge tag 'fbdev-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: - Miscallaneous small fixes to various fbdev drivers - Remove fb_rotate, which was never used - pmag fb improvements * tag 'fbdev-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (21 commits) xen kconfig: don't "select INPUT_XEN_KBDDEV_FRONTEND" video: fbdev: sis: remove unused variable drivers/video: make fbdev/sunxvr2500.c explicitly non-modular drivers/video: make fbdev/sunxvr1000.c explicitly non-modular drivers/video: make fbdev/sunxvr500.c explicitly non-modular video: exynos: fix modular build fbdev: da8xx-fb: fix videomodes of lcd panels fbdev: kill fb_rotate video: fbdev: bt431: Correct cursor format control macro video: fbdev: pmag-ba-fb: Optimize Bt455 colormap addressing video: fbdev: pmag-ba-fb: Fix and rework Bt455 colormap handling video: fbdev: bt455: Remove unneeded colormap helpers for cursor support video: fbdev: pmag-aa-fb: Report video timings video: fbdev: pmag-aa-fb: Enable building as a module video: fbdev: pmag-aa-fb: Adapt to current APIs video: fbdev: pmag-ba-fb: Fix the lower margin size fbdev: sh_mobile_lcdc: Use ARCH_RENESAS fbdev: n411: check return value fbdev: exynos: fix IS_ERR_VALUE usage video: Use bool instead int pointer for get_opt_bool() argument ... commit 02113ba93ea414b7113d64e42b87dc0720e3e578 Author: Jon Hunter Date: Tue Mar 15 11:33:40 2016 +0000 PM / clk: Add support for obtaining clocks from device-tree The PM clocks framework requires clients to pass either a con-id or a valid clk pointer in order to add a clock to a device. Add a new function of_pm_clk_add_clks() to allows device clocks to be retrieved from device-tree and populated for a given device. Note that it is not necessary to make the compilation of this new function dependent upon CONFIG_OF because there are stubs functions for the device-tree APIs used. In order to handle errors encountered when adding clocks from device-tree, add a function pm_clk_remove_clk() to remove any clocks (using a pointer to the clk structure) that have been added successfully before the error occurred. Signed-off-by: Jon Hunter Acked-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki drivers/base/power/clock_ops.c | 89 ++++++++++++++++++++++++++++++++++++++++++ include/linux/pm_clock.h | 9 +++++ 2 files changed, 98 insertions(+) commit 027b6934aaa3a7eff90598980aca992b5f1f1e2e Author: Geert Uytterhoeven Date: Mon Mar 14 16:29:02 2016 +0100 PM / devfreq: Spelling s/frequnecy/frequency/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki drivers/devfreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bace3db5da970c4d4f80a1ffa988ec66c7f6a8f5 Merge: 8759957 8331c05 Author: Linus Torvalds Date: Wed Mar 16 18:27:32 2016 -0700 Merge tag 'media/v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Added support for some new video formats - mn88473 DVB frontend driver got promoted from staging - several improvements at the VSP1 driver - several cleanups and improvements at the Media Controller - added Media Controller support to snd-usb-audio. Currently, enabled only for au0828-based V4L2/DVB boards - Several improvements at nuvoton-cir: it now supports wake up codes - Add media controller support to em28xx and saa7134 drivers - coda driver now accepts NXP distributed firmware files - Some legacy SoC camera drivers will be moving to staging, as they're outdated and nobody so far is willing to fix and convert them to use the current media framework - As usual, lots of cleanups, improvements and new board additions. * tag 'media/v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (381 commits) media: au0828 disable tuner to demod link in au0828_media_device_register() [media] touptek: cast char types on %x printk [media] touptek: don't DMA at the stack [media] mceusb: use %*ph for small buffer dumps [media] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links [media] v4l: vsp1: Check if an entity is a subdev with the right function [media] hide unused functions for !MEDIA_CONTROLLER [media] em28xx: fix Terratec Grabby AC97 codec detection [media] media: add prefixes to interface types [media] media: rc: nuvoton: switch attribute wakeup_data to text [media] v4l2-ioctl: fix YUV422P pixel format description [media] media: fix null pointer dereference in v4l_vb2q_enable_media_source() [media] v4l2-mc.h: fix yet more compiler errors [media] staging/media: add missing TODO files [media] media.h: always start with 1 for the audio entities [media] sound/usb: Use meaninful names for goto labels [media] v4l2-mc.h: fix compiler warnings [media] media: au0828 audio mixer isn't connected to decoder [media] sound/usb: Use Media Controller API to share media resources [media] dw2102: add support for TeVii S662 ... commit 8759957b77ac1b5b5bdfac5ba049789107e85190 Merge: 6968e6f 4890116 Author: Linus Torvalds Date: Wed Mar 16 17:45:56 2016 -0700 Merge tag 'libnvdimm-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: - Asynchronous address range scrub: Given the capacities of next generation persistent memory devices a scrub operation to find all poison may take 10s of seconds. We want this scrub work to be done asynchronously with the rest of system initialization, so we move it out of line from the NFIT probing, i.e. acpi_nfit_add(). - Clear poison: ACPI 6.1 introduces the ability to send "clear error" commands to the ACPI0012:00 device representing the root of an "nvdimm bus". Similar to relocating a bad block on a disk, this support clears media errors in response to a write. - Persistent memory resource tracking: A persistent memory range may be designated as simply "reserved" by platform firmware in the efi/e820 memory map. Later when the NFIT driver loads it discovers that the range is "Persistent Memory". The NFIT bus driver inserts a resource to advertise that "persistent" attribute in the system resource tree for /proc/iomem and kernel-internal usages. - Miscellaneous cleanups and fixes: Workaround section misaligned pmem ranges when allocating a struct page memmap, fix handling of the read-only case in the ioctl path, and clean up block device major number allocation. * tag 'libnvdimm-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (26 commits) libnvdimm, pmem: clear poison on write libnvdimm, pmem: fix kmap_atomic() leak in error path nvdimm/btt: don't allocate unused major device number nvdimm/blk: don't allocate unused major device number pmem: don't allocate unused major device number ACPI: Change NFIT driver to insert new resource resource: Export insert_resource and remove_resource resource: Add remove_resource interface resource: Change __request_region to inherit from immediate parent libnvdimm, pmem: fix ia64 build, use PHYS_PFN nfit, libnvdimm: clear poison command support libnvdimm, pfn: 'resource'-address and 'size' attributes for pfn devices libnvdimm, pmem: adjust for section collisions with 'System RAM' libnvdimm, pmem: fix 'pfn' support for section-misaligned namespaces libnvdimm: Fix security issue with DSM IOCTL. libnvdimm: Clean-up access mode check. tools/testing/nvdimm: expand ars unit testing nfit: disable userspace initiated ars during scrub nfit: scrub and register regions in a workqueue nfit, libnvdimm: async region scrub workqueue ... commit 6968e6f8329d014920331dd2cf166ccd474b5299 Merge: cae8da0 98dbc9c Author: Linus Torvalds Date: Wed Mar 16 17:26:37 2016 -0700 Merge tag 'dm-4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Most attention this cycle went to optimizing blk-mq request-based DM (dm-mq) that is used exclussively by DM multipath: - A stable fix for dm-mq that eliminates excessive context switching offers the biggest performance improvement (for both IOPs and throughput). - But more work is needed, during the next cycle, to reduce spinlock contention in DM multipath on large NUMA systems. - A stable fix for a NULL pointer seen when DM stats is enabled on a DM multipath device that must requeue an IO due to path failure. - A stable fix for DM snapshot to disallow the COW and origin devices from being identical. This amounts to graceful failure in the face of userspace error because these devices shouldn't ever be identical. - Stable fixes for DM cache and DM thin provisioning to address crashes seen if/when their respective metadata device experiences failures that cause the transition to 'fail_io' mode. - The DM cache 'mq' policy is now an alias for the 'smq' policy. The 'smq' policy proved to be consistently better than 'mq'. As such 'mq', with all its complex user-facing tunables, has been eliminated. - Improve DM thin provisioning to consistently return -ENOSPC once the thin-pool's data volume is out of space. - Improve DM core to properly handle error propagation if bio_integrity_clone() fails in clone_bio(). - Other small cleanups and improvements to DM core. * tag 'dm-4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (41 commits) dm: fix rq_end_stats() NULL pointer in dm_requeue_original_request() dm thin: consistently return -ENOSPC if pool has run out of data space dm cache: bump the target version dm cache: make sure every metadata function checks fail_io dm: add missing newline between DM_DEBUG_BLOCK_STACK_TRACING and DM_BUFIO dm cache policy smq: clarify that mq registration failure was for 'mq' dm: return error if bio_integrity_clone() fails in clone_bio() dm thin metadata: don't issue prefetches if a transaction abort has failed dm snapshot: disallow the COW and origin devices from being identical dm cache: make the 'mq' policy an alias for 'smq' dm: drop unnecessary assignment of md->queue dm: reorder 'struct mapped_device' members to fix alignment and holes dm: remove dummy definition of 'struct dm_table' dm: add 'dm_numa_node' module parameter dm thin metadata: remove needless newline from subtree_dec() DMERR message dm mpath: cleanup reinstate_path() et al based on code review dm mpath: remove __pgpath_busy forward declaration, rename to pgpath_busy dm mpath: switch from 'unsigned' to 'bool' for flags where appropriate dm round robin: use percpu 'repeat_count' and 'current_path' dm path selector: remove 'repeat_count' return from .select_path hook ... commit cae8da047b165aaf334fd87020c2ea7ee020c41c Merge: 7bb7a74 a7dee8f Author: Linus Torvalds Date: Wed Mar 16 17:16:22 2016 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This pull includes driver updates from the usual suspects (stex, hpsa, ncr5380, scsi_dh, qla2xxx, be2iscsi, hisi_sas, cxlflash, aacraid, mp3sas, megaraid_sas, ibmvscsi, ufs) plus an assortment of miscellaneous fixes. The major user visible change of this pull is that we've moved from monotonically increasing host number to an ida allocated one (meaning the numbers get re-used) because someone managed to wrap the count in an iscsi system. We don't believe there will be any adverse consequences of this" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (230 commits) MAINTAINERS: use new email address for James Bottomley mpt3sas: Remove unnecessary synchronize_irq() before free_irq() sg: fix dxferp in from_to case cxlflash: Increase cmd_per_lun for better throughput cxlflash: Fix to avoid unnecessary scan with internal LUNs cxlflash: Reorder user context initialization cxlflash: Simplify attach path error cleanup cxlflash: Split out context initialization cxlflash: Unmap problem state area before detaching master context cxlflash: Simplify PCI registration scsi: storvsc: fix SRB_STATUS_ABORTED handling be2iscsi: set the boot_kset pointer to NULL in case of failure sd: Fix discard granularity when LBPRZ=1 be2iscsi: Remove unnecessary synchronize_irq() before free_irq() scsi_sysfs: call 'device_add' after attaching device handler scsi_dh_emc: update 'access_state' field scsi_dh_rdac: update 'access_state' field scsi_dh_alua: update 'access_state' field scsi_dh_alua: use common definitions for ALUA state scsi: Add 'access_state' and 'preferred_path' attribute ... commit 7bb7a74886ce1f88d727ba46faa05edcdbacc192 Merge: 63e3027 c988cab Author: Linus Torvalds Date: Wed Mar 16 17:10:17 2016 -0700 Merge branch 'stable/for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft Pull iscsi_ibft update from Konrad Rzeszutek Wilk: "A simple patch that had been rattling around in SuSE repo" * 'stable/for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft: iscsi_ibft: Add prefix-len attr and display netmask commit b4ab9d76b9e4a2ef36821b93b4cee48e3e68fe93 Merge: e8e56ff b7d3e3d Author: David S. Miller Date: Wed Mar 16 19:55:42 2016 -0400 Merge branch 'thunderx-mdio-fixes' David Daney says: ==================== net/phy: Fixes for Cavium Thunder MDIO code. Previous patch set: commit 5fc7cf179449 ("net: thunderx: Cleanup PHY probing code.") commit 1eefee901fca ("phy: mdio-octeon: Refactor into two files/modules") commit 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Had several problems. We try to fix them here. ==================== Signed-off-by: David S. Miller commit b7d3e3d3d21a09f8e45043d548224000a8efe06a Author: David Daney Date: Mon Mar 14 17:30:39 2016 -0700 net: thunderx: Don't leak phy device references on -EPROBE_DEFER condition. It is possible, although unlikely, that probing will find the phy_device for the first LMAC of a thunder BGX device, but then need to fail with -EPROBE_DEFER on a subsequent LMAC. In this case, we need to call put_device() on each of the phy_devices that were obtained, but will be unused due to returning -EPROBE_DEFER. Also, since we can break out of the probing loop early, we need to explicitly call of_node_put() outside of the loop. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 26 +++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 9277a4f875adbeeb6209c0a3e3cf04c752522b2e Author: David Daney Date: Mon Mar 14 17:30:38 2016 -0700 net: cavium: For Kconfig THUNDER_NIC_BGX, select MDIO_THUNDER. Previously we selected MDIO_OCTEON, which after creating the Thunder specific MDIO bus driver is much less useful. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/cavium/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7091f01e8cf6989e63c4eacb59b654fcff057901 Author: David Daney Date: Mon Mar 14 17:30:37 2016 -0700 phy: mdio-cavium: Add missing MODULE_* annotations. When the code was factored out of mdio-octeon.c, the MODULE_DESCRIPTION, MODULE_AUTHOR and MODULE_LICENSE annotations were inadvertently omitted. Restore them so that we don't get kernel taint warnings upon module loading. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/phy/mdio-cavium.c | 4 ++++ 1 file changed, 4 insertions(+) commit e8e56ffd9d2973398b60ece1f1bebb8d67b4d032 Author: Guillaume Nault Date: Mon Mar 14 21:17:16 2016 +0100 ppp: ensure file->private_data can't be overridden Locking ppp_mutex must be done before dereferencing file->private_data, otherwise it could be modified before ppp_unattached_ioctl() takes the lock. This could lead ppp_unattached_ioctl() to override ->private_data, thus leaking reference to the ppp_file previously pointed to. v2: lock all ppp_ioctl() instead of just checking private_data in ppp_unattached_ioctl(), to avoid ambiguous behaviour. Fixes: f3ff8a4d80e8 ("ppp: push BKL down into the driver") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit c8f5d29899901cea94bf4b8cf721e1b83e51174e Merge: 793cf87 af671e7 Author: David S. Miller Date: Wed Mar 16 19:28:07 2016 -0400 Merge branch 'arc_emac-next' Caesar Wang says: ==================== arc_emac: fixes the emac issues and cleanup emac drivers This series patches are based on kernel 4.5-rc7+ version. Linux version 4.5.0-rc7-next-20160311+ (wxt@nb) (...) #45 SMP Sun Mar 13 16:17:56 The history patch in here: Patch-v1: https://lkml.org/lkml/2016/3/11/209 Patch-v2: https://lkml.org/lkml/2016/3/13/39 Verified on kylin board with my github. https://github.com/Caesar-github/rockchip/tree/kylin/next That's verified on kylin board with ubuntu os. This series patches are built all pass with Mr.robot on https://github.com/Caesar-github/linux/tree/build-emac-v3 How to test and verify? You can refer to the following wiki document. http://rockchip.wikidot.com/linux-develop-guide bootup log: [ 1.264740] rockchip_emac 10200000.ethernet: no regulator found [ 1.270908] rockchip_emac 10200000.ethernet: ARC EMAC detected with id: 0x7fd02 [ 1.278362] rockchip_emac 10200000.ethernet: IRQ is 29 [ 1.283747] rockchip_emac 10200000.ethernet: MAC address is now 06:5d:61:c7:39:41 [ 1.291314] rockchip_emac 10200000.ethernet: GPIO lookup for consumer phy-reset [ 1.291333] rockchip_emac 10200000.ethernet: using device tree for GPIO lookup [ 1.663155] rockchip_emac 10200000.ethernet: connected to Generic PHY phy with id 0xffffc816 [ 8.863448] rockchip_emac 10200000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off root@localhost:/# busybox ping www.baidu.com PING www.baidu.com (14.215.177.38): 56 data bytes 64 bytes from 14.215.177.38: seq=0 ttl=48 time=35.046 ms 64 bytes from 14.215.177.38: seq=1 ttl=48 time=35.095 ms 64 bytes from 14.215.177.38: seq=2 ttl=48 time=34.203 ms 64 bytes from 14.215.177.38: seq=3 ttl=48 time=38.516 ms ... --- 1) This series has 6 patches: (1--->9) net: arc_emac: make the rockchip emac document more compatible net: arc_emac: add phy reset is optional for device tree net: arc_emac: support the phy reset for emac driver net: arc: trivial: cleanup the emac driver clk: rockchip: add node-id for rk3036 emac hclk clk: rockchip: associate the rk3036 HCLK_EMAC clock-id clk: rockchip: add clock-id for rk3036 emac pll source clock clk: rockchip: associate SCLK_MAC_PLL and disable reparenting on rk3036 ARM: dts: rockchip: add support emac for RK3036 2) This series patches have the following descriptions: Hi Rob, David: PATCH[1/9-2/9]: ====> net: arc_emac: make the rockchip emac document more compatible net: arc_emac: add phy reset is optional for device tree The patches change the rockchip emac document for more compatible and Add the phy reset property for document. --- Hi David PATCH[3/9]: ====> net: arc_emac: support the phy reset for emac driver The emac didn't work on kylin board since in some case the clocks parent changed. The kylin hardware connects the phy reset pin, we should use it with real world. As the previous patch discuss on https://patchwork.kernel.org/patch/8186801/ And as sergei/Heiko suggestions on https://patchwork.kernel.org/patch/8564571/ --- Hi David PATCH[4/9]: ====> net: arc: trivial: cleanup the emac driver The first time to look the emac drivers, I think that have to cleanup the drivers with scripts. Although it's the trivial things, in order to be more read. --- Hi Heiko,Michael,Stephen: PATCH[5/9-8/9]: ====> clk: rockchip: rk3036: fix and add node id for emac clock Four-part from https://patchwork.kernel.org/patch/8564581/ clk: rockchip: add node-id for rk3036 emac hclk clk: rockchip: associate the rk3036 HCLK_EMAC clock-id clk: rockchip: add clock-id for rk3036 emac pll source clock clk: rockchip: associate SCLK_MAC_PLL and disable reparenting on rk3036 Add the emac needed clocks for rk3036 SoCs --- Hi Heiko: PATCH[9/9]: ====> ARM: dts: rockchip: add support emac for RK3036 Add the emac needed main info for rk3036 dts. --- Thanks your reviewing! :) Changes in v3: - %s/he/the - Add the Cc people - As Sergei comments, the original name is better, so %s/reset-gpios/phy-reset-gpios - Add the Cc people. - Caused the build error since the missing include head file. - %s/reset/phy-reset to match the device tree. - Add the Cc people - Add the Cc people. - Add the Cc people. - Add the Cc people. - Add the Cc people. - Add the Cc people. - rename reset-gpio to phy-reset-gpios. - change the commit. - remove the pcfg_output_high, that's really not needed for emac. - Add the Cc people. - Fixes the 'zhengxing' to 'Xing Zheng'. Changes in v2: - change the commit and remove the repeat the name 'rockchip'. - %s/phy-reset-gpios/reset-gpios - As the pervious version, Sergei and Heiko comments on https://patchwork.kernel.org/patch/8564571/. - Nevermind, add signed-off since Heiko the original patch, refer the Heiko's test patch on https://github.com/mmind/linux-rockchip/commit/a943c588783438ff1c508dfa8c79f1709aa5775e :) - As the robot notice the build error since overflow in implicit constant conversion. - rename phy-reset-gpio to reset-gpios. ==================== Signed-off-by: David S. Miller commit af671e7bd96bc9bde623b0e6f75bfa4269c2c57f Author: Xing Zheng Date: Mon Mar 14 16:02:00 2016 +0800 ARM: dts: rockchip: add to support emac for rk3036 SoCs This patch adds the emac device node for rk3036 SoCs. We need to let mac clock under the DPLL which is able to provide the accurate 50MHz what mac_ref need, since that will cause some unstable things if the cpufreq is working. Signed-off-by: Xing Zheng Signed-off-by: Caesar Wang Cc: linux-rockchip@lists.infradead.org Cc: Xing Zheng Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: David S. Miller arch/arm/boot/dts/rk3036-evb.dts | 14 ++++++++++++++ arch/arm/boot/dts/rk3036-kylin.dts | 14 ++++++++++++++ arch/arm/boot/dts/rk3036.dtsi | 39 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) commit 2c6fae2501d87ca94b5249df38797f02d4e39add Author: Heiko Stuebner Date: Mon Mar 14 16:01:59 2016 +0800 clk: rockchip: associate SCLK_MAC_PLL and disable reparenting on rk3036 The emac needs constant and very specific rate but the possible PLL-sources are very limited, so we expect the PLL source to be set manually on per board and don't want it to get changed in an automatic way later. So add the necessary clock-id and disable reparenting on set_rate calls. Signed-off-by: Heiko Stuebner Cc: Michael Turquette Cc: Heiko Stuebner Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Signed-off-by: Caesar Wang Signed-off-by: David S. Miller drivers/clk/rockchip/clk-rk3036.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7e180222b973a0b363564b281a314276cb2b594 Author: Xing Zheng Date: Mon Mar 14 16:01:58 2016 +0800 clk: rockchip: add clock-id for rk3036 emac pll source clock Suitable PLLs for the emac on the rk3036 are difficult to find and one of them is the (continuously changing) APLL. So in most cases it will be necessary to select a PLL manually. So add a clock-id for it. Signed-off-by: Xing Zheng Signed-off-by: Caesar Wang Cc: Xing Zheng Cc: Michael Turquette Cc: Heiko Stuebner Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: David S. Miller include/dt-bindings/clock/rk3036-cru.h | 1 + 1 file changed, 1 insertion(+) commit e764b93924b47cd53b818c1cf8708a35bdfbb83d Author: Xing Zheng Date: Mon Mar 14 16:01:57 2016 +0800 clk: rockchip: associate the rk3036 HCLK_EMAC clock-id Associate the new clock id the clock. Signed-off-by: Xing Zheng Signed-off-by: Caesar Wang Cc: Xing Zheng Cc: Michael Turquette Cc: Heiko Stuebner Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: David S. Miller drivers/clk/rockchip/clk-rk3036.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb781c8e2a370d67acf7b8a8826e6f5e3ae1d7c6 Author: Xing Zheng Date: Mon Mar 14 16:01:56 2016 +0800 clk: rockchip: add node-id for rk3036 emac hclk Add the node-id for the emac hclk to the binding header. Signed-off-by: Xing Zheng Signed-off-by: Caesar Wang Cc: Xing Zheng Cc: Michael Turquette Cc: Heiko Stuebner Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: David S. Miller include/dt-bindings/clock/rk3036-cru.h | 1 + 1 file changed, 1 insertion(+) commit 663713eb477b9b916426124d6f5d5c5e9db919cf Author: Caesar Wang Date: Mon Mar 14 16:01:55 2016 +0800 net: arc: trivial: cleanup the emac driver This patch will make the driver more readability The emac has the error and warnings if you run 'scripts/checkpatch.pl -f --subjective xxx' to check. Let's clean up such trivial details. Signed-off-by: Caesar Wang Cc: Jiri Kosina Cc: "David S. Miller" Cc: Alexander Kochetkov Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac.h | 54 +++++++++++++++++--------------- drivers/net/ethernet/arc/emac_main.c | 35 ++++++++++----------- drivers/net/ethernet/arc/emac_mdio.c | 2 +- drivers/net/ethernet/arc/emac_rockchip.c | 41 +++++++++++++++++------- 4 files changed, 75 insertions(+), 57 deletions(-) commit 1bddd96cba03da0a14b3e5144e98c9a6ff17e983 Author: Caesar Wang Date: Mon Mar 14 16:01:54 2016 +0800 net: arc_emac: support the phy reset for emac driver This patch adds to support the emac phy reset. Different boards may require different phy reset duration. Add property phy-reset-duration for emac driver, so that the boards that need a longer reset duration can specify it in their device tree. Signed-off-by: Heiko Stuebner Signed-off-by: Caesar Wang Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: Alexander Kochetkov Cc: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac.h | 6 ++++++ drivers/net/ethernet/arc/emac_mdio.c | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 8700eee6271c932b2747a6b157655f546c27e7ad Author: Caesar Wang Date: Mon Mar 14 16:01:53 2016 +0800 net: arc_emac: add phy reset is optional for device tree This patch adds the following property for arc_emac. 1) phy-reset-gpios: The phy-reset-gpio is an optional property for arc emac device tree boot. Change the binding document to match the driver code. 2) phy-reset-duration: Different boards may require different phy reset duration. Add property phy-reset-duration for device tree probe, so that the boards that need a longer reset duration can specify it in their device tree. Anyway, we can add the above property for arc emac. Signed-off-by: Caesar Wang Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Sergei Shtylyov Cc; Alexander Kochetkov Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/arc_emac.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 434242cd6080dde0103d3b4f28daec5c742c465e Author: Caesar Wang Date: Mon Mar 14 16:01:52 2016 +0800 net: arc_emac: make the rockchip emac document more compatible Add the rk3036 SoCs to match driver for document since the emac driver has supported the rk3036 SoCs. This patch adds the rk3036/rk3066/rk3188 SoCS to compatible for rockchip emac ducument. Also, that will suit for other SoCs in the future. Signed-off-by: Caesar Wang Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Alexander Kochetkov Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/emac_rockchip.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 793cf87de9d1a62dc9079c3ec5fcc01cfc62fafb Author: Ben Hutchings Date: Mon Mar 14 01:05:38 2016 +0000 ethtool: Set cmd field in ETHTOOL_GLINKSETTINGS response to wrong nwords When the ETHTOOL_GLINKSETTINGS implementation finds that userland is using the wrong number of words of link mode bitmaps (or is trying to find out the right numbers) it sets the cmd field to 0 in the response structure. This is inconsistent with the implementation of every other ethtool command, so let's remove that inconsistency before it gets into a stable release. Fixes: 3f1ac7a700d03 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller net/core/ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aa40426a4a23dfd9ca4c1c0f777b8c57e5070fd Author: Sangwon Jee Date: Wed Mar 16 12:33:05 2016 -0700 Input: melfas_mip4 - add hw_version sysfs attribute Add hw_version sysfs attribute for retrieving hardware information from firmware. Signed-off-by: Sangwon Jee Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit ad846aa52ca7b7ec6b99a8b13c4ce0bbe7b15b7f Author: Sergei Shtylyov Date: Mon Mar 14 01:09:53 2016 +0300 sh_eth: do not call netif_start_queue() from sh_eth_dev_init() Iff sh_eth_phy_start() call fails in sh_eth_open(), the netif_start_queue() call done by sh_eth_dev_init() is not undone. In order to deal with that, stop calling netif_start_queue() from there, so that it can be called only when the device is fully opened and sh_eth_dev_init() only deals with the hardware initialization, symmetrically to sh_eth_dev_exit()... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d78a1f08458f8118cf42154e55a3006cc17502bc Author: Yuval Mintz Date: Sun Mar 13 21:21:48 2016 +0200 bnx2x: don't wait for Tx completion on recovery When driver has hit a parity event, HW can no longer write to host memory. As a result, Tx completions cannot be written to the host SB memory, and waiting for Tx completions eventually timeout. As driver is willing to delay as much as 1-2 seconds per Tx queue for its draining and this delay is sequential, the time to recover might greatly lengthen needlessly in case the recovery is done under multi-connection traffic. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 489ce5f441e4094a3419d7e8e29fd756b7f391d4 Author: Nicholas Mc Guire Date: Sun Mar 13 11:48:24 2016 +0100 sctp: consolidate local_bh_disable/enable + spin_lock/unlock to _bh variant local_bh_disable() + spin_lock() is equivalent to spin_lock_bh(), same for the unlock/enable case, so replace the calls by the appropriate wrappers. Signed-off-by: Nicholas Mc Guire Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 06e1c170c332dca755f389a99671912ff405698c Author: Josh Poimboeuf Date: Wed Mar 16 10:03:36 2016 -0500 livepatch: Update maintainers Seth and Vojtech are no longer active maintainers of livepatch, so remove them in favor of Jessica and Miroslav. Also add Petr as a designated reviewer. [jikos@kernel.org: Petr is the only one affected who hasn't provided his Ack by the time this patch has been applied, as he is offline curently; but I hereby assert that I've talked to him and he's OK with this change] Signed-off-by: Josh Poimboeuf Acked-by: Seth Jennings Acked-by: Jessica Yu Acked-by: Miroslav Benes Acked-by: Vojtech Pavlik Signed-off-by: Jiri Kosina MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cf481068cdd430a22425d7712c8deeb25efdedc1 Merge: 9f443bf 52807ae Author: Dave Airlie Date: Thu Mar 17 08:27:51 2016 +1000 Merge branch '2016-02-26-st-drm-next' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next Here are sti patches for drm-next. It brings: - The support of the atomic_check for the planes and minor fixes for planes - The support of the vendor specific infoframe for HDMI and the support of 2 HDMI properties related to the connector - The support of the DVO solving panel detection issue and timing issue. - The support of debugfs for connectors, encoders, crtcs and planes. * '2016-02-26-st-drm-next' of http://git.linaro.org/people/benjamin.gaignard/kernel: (36 commits) drm/sti: use u32 to store DMA addresses drm: sti: remove sti_gem_prime_export hack drm/sti: add debugfs fps_show/fps_get mechanism for planes drm/sti: add debugfs entries for TVOUT encoders drm/sti: add debugfs entries for MIXER crtc drm/sti: add debugfs entries for VID plane drm/sti: add debugfs entries for HQVDP plane drm/sti: add debugfs entries for GDP planes drm/sti: add debugfs entries for CURSOR plane drm/sti: add debugfs entries for HDA connector drm/sti: add debugfs entries for DVO connector drm/sti: add debugfs entries for HDMI connector drm/sti: add hdmi_mode property for HDMI connector drm/sti: add colorspace property to the HDMI connector drm/sti: add HDMI vendor specific infoframe drm/sti: reset infoframe transmission when HDMI is stopped drm/sti: HDMI infoframe transmission mode not take into account drm/sti: reset HD DACS when HDA connector is created drm/sti: fix dvo data_enable signal drm/sti: adjust delay for DVO ... commit 9f443bf53b5699835e0132d62d1e6c99a1eaeee8 Merge: 70a09f3 00b7c4f Author: Dave Airlie Date: Thu Mar 17 08:25:04 2016 +1000 Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more fixes and cleanups for 4.6: - DCE code cleanups - HDP flush/invalidation fixes - GPUVM fixes - switch to drm_vblank_[on|off] - PX fixes - misc bug fixes * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (50 commits) drm/amdgpu: split pipeline sync out of SDMA vm_flush() as well drm/amdgpu: Revert "add mutex for ba_va->valids/invalids" drm/amdgpu: Revert "add lock for interval tree in vm" drm/amdgpu: Revert "add spin lock to protect freed list in vm (v3)" drm/amdgpu: reserve the PD during unmap and remove drm/amdgpu: Fix two bugs in amdgpu_vm_bo_split_mapping drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards. MAINTAINERS: update radeon entry to include amdgpu as well drm/amdgpu: disable runtime pm on PX laptops without dGPU power control drm/radeon: disable runtime pm on PX laptops without dGPU power control drm/amd/amdgpu: Fix indentation in do_set_base() (DCEv8) drm/amd/amdgpu: make afmt_init cleanup if alloc fails (DCEv8) drm/amd/amdgpu: Move config init flag to bottom of sw_init (DCEv8) drm/amd/amdgpu: Don't proceed into audio_fini if audio is disabled (DCEv8) drm/amd/amdgpu: Fix identation in do_set_base() (DCEv10) drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10) drm/amd/amdgpu: Move initialized flag to bottom of sw_init (DCEv10) drm/amd/amdgpu: Don't proceed in audio_fini if disabled (DCEv10) drm/amd/amdgpu: Fix indentation in dce_v11_0_crtc_do_set_base() drm/amd/amdgpu: Make afmt_init() cleanup if alloc fails (DCEv11) ... commit 70a09f36d02584fe0025fa14a5cbf276240b2fd4 Merge: 189df01 5476aa4 Author: Dave Airlie Date: Thu Mar 17 08:12:31 2016 +1000 Merge tag 'vmwgfx-next-160316' of git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2016-03-16 * tag 'vmwgfx-next-160316' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Bump driver minor drm/vmwgfx: Allow the UPDATE_LAYOUT ioctl from control nodes drm/vmwgfx: Send a hotplug event at master_set drm/vmwgfx: Default to explicit crtc placement for screen targets and screen objects drm/vmwgfx: Calculate the cursor position based on the crtc gui origin drm/vmwgfx: Add connector properties to switch between explicit and implicit placement drm/vmwgfx: Add suggested screen x and y connector properties drm/vmwgfx: Add implicit framebuffer checks to the screen target code drm/vmwgfx: Break out implicit fb code drm/vmwgfx: Rework screen target page flips v2 drm/vmwgfx: Fix screen object page flips for large framebuffers drm/vmwgfx: Fix a screen object framebuffer dirty corner case drm/vmwgfx: Add DXGenMips support commit 189df01d1cf27b88b3c41f9378453178f76925a8 Merge: 5e2368a 94669e6 Author: Dave Airlie Date: Thu Mar 17 08:11:31 2016 +1000 Merge tag 'drm-intel-next-fixes-2016-03-16' of http://anongit.freedesktop.org/git/drm-intel into drm-next * tag 'drm-intel-next-fixes-2016-03-16' of http://anongit.freedesktop.org/git/drm-intel: drm/i915: Handle -EDEADLK in drm_atomic_commit from load-detect. commit 5e2368a3bbb36d24c038d87d61ebf291e4be5197 Merge: 0e5dc9a c8a3b2a Author: Dave Airlie Date: Thu Mar 17 08:09:44 2016 +1000 Merge tag 'drm/panel/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux into drm-next drm/panel: Changes for v4.6-rc1 This contains a refactoring of parts of the DSI core to allow creating DSI devices from non-DSI control busses (i.e. I2C, SPI, ...). Other than that there's support for a couple of new panels as well as a few cleanup patches. * tag 'drm/panel/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux: drm/bridge: Make (pre/post) enable/disable callbacks optional drm/panel: simple: Add URT UMSH-8596MD-xT panels support dt-bindings: Add URT UMSH-8596MD-xT panel bindings of: Add United Radiant Technology Corporation vendor prefix drm/panel: simple: Support for LG lp120up1 panel dt-bindings: Add LG lp120up1 panel bindings drm/panel: simple: Fix g121x1_l03 hsync/vsync polarity drm/dsi: Get DSI host by DT device node drm/dsi: Add routine to unregister a DSI device drm/dsi: Try to match non-DT DSI devices drm/dsi: Use mipi_dsi_device_register_full() for DSI device creation drm/dsi: Check for CONFIG_OF when defining of_mipi_dsi_device_add() commit 0e5dc9a8ee2f10b5d6c793675e9942c526e52411 Merge: 86d65b7 341917f Author: Dave Airlie Date: Thu Mar 17 08:08:57 2016 +1000 Merge tag 'drm/tegra/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v4.6-rc1 Only two cleanups this time around. One fixes reference counting of device tree nodes, the other changes the return value of a function from an unsigned int to an int to reflect that it will return error codes. * tag 'drm/tegra/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux: gpu: host1x: Use a signed return type for do_relocs() gpu: host1x: bus: Add missing of_node_put() commit 3cf8bb1ad1b8266ae12a0fbdfa79cdbdc2168a3f Author: Jérome Glisse Date: Wed Mar 16 12:56:45 2016 +0100 drm/radeon: fix indentation. I hate doing this but it hurts my eyes to go over code that does not comply with indentation rules. Only thing that is not only space change is in atom.c all other files are space indentation issues. Acked-by: Christian König Signed-off-by: Jérôme Glisse Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atom.c | 7 +- drivers/gpu/drm/radeon/atombios_crtc.c | 6 +- drivers/gpu/drm/radeon/atombios_dp.c | 4 +- drivers/gpu/drm/radeon/btc_dpm.c | 41 +++--- drivers/gpu/drm/radeon/ci_dpm.c | 42 +++--- drivers/gpu/drm/radeon/ci_smc.c | 8 +- drivers/gpu/drm/radeon/cik.c | 6 +- drivers/gpu/drm/radeon/cypress_dpm.c | 8 +- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/evergreen_cs.c | 32 ++--- drivers/gpu/drm/radeon/evergreen_hdmi.c | 2 +- drivers/gpu/drm/radeon/kv_dpm.c | 4 +- drivers/gpu/drm/radeon/ni.c | 4 +- drivers/gpu/drm/radeon/ni_dpm.c | 170 ++++++++++++------------ drivers/gpu/drm/radeon/r600.c | 8 +- drivers/gpu/drm/radeon/r600_cs.c | 20 +-- drivers/gpu/drm/radeon/r600_dpm.c | 6 +- drivers/gpu/drm/radeon/r600_hdmi.c | 4 +- drivers/gpu/drm/radeon/radeon_atombios.c | 6 +- drivers/gpu/drm/radeon/radeon_device.c | 8 +- drivers/gpu/drm/radeon/radeon_display.c | 6 +- drivers/gpu/drm/radeon/radeon_fb.c | 6 +- drivers/gpu/drm/radeon/radeon_ib.c | 4 +- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 92 ++++++------- drivers/gpu/drm/radeon/radeon_object.c | 6 +- drivers/gpu/drm/radeon/radeon_pm.c | 2 +- drivers/gpu/drm/radeon/radeon_semaphore.c | 4 +- drivers/gpu/drm/radeon/radeon_uvd.c | 8 +- drivers/gpu/drm/radeon/radeon_vce.c | 22 +-- drivers/gpu/drm/radeon/radeon_vm.c | 19 +-- drivers/gpu/drm/radeon/rs780_dpm.c | 2 +- drivers/gpu/drm/radeon/rv6xx_dpm.c | 18 +-- drivers/gpu/drm/radeon/rv740_dpm.c | 16 +-- drivers/gpu/drm/radeon/rv770_dpm.c | 46 +++---- drivers/gpu/drm/radeon/si.c | 44 +++--- drivers/gpu/drm/radeon/si_dpm.c | 98 +++++++------- drivers/gpu/drm/radeon/sumo_dpm.c | 6 +- drivers/gpu/drm/radeon/trinity_dpm.c | 24 ++-- drivers/gpu/drm/radeon/vce_v2_0.c | 2 +- 39 files changed, 407 insertions(+), 406 deletions(-) commit 60123300db80b17251b4de5e98c63e288c6f7b46 Author: Eric Huang Date: Tue Mar 15 17:00:22 2016 -0400 drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ Set the UVD and VCE DPM flags otherwise UVD and VCE DPM won't get enabled. Reviewed-by: Alex Deucher Signed-off-by: Eric Huang Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 +++++ 1 file changed, 5 insertions(+) commit 742c085fa86345ae9de259c7f15c652322da4e83 Author: Christian König Date: Mon Mar 14 15:46:06 2016 +0100 drm/amdgpu: switch back to 32bit hw fences v2 We don't need to extend them to 64bits any more, so avoid the extra overhead. v2: update commit message. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 49 ++++++++++++------------------- 2 files changed, 21 insertions(+), 32 deletions(-) commit 480d0bf07ecf27da0a5f12774d9642072c364fa9 Author: Christian König Date: Mon Mar 14 15:23:11 2016 +0100 drm/amdgpu: remove amdgpu_fence_is_signaled It's just overhead to check the fence value when we signal them directly anyway. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 91cc6418a0ea14633bdc1d2ea91d174fc1e9187d Author: Christian König Date: Mon Mar 14 14:49:33 2016 +0100 drm/amdgpu: drop the extra fence range check v2 Amdgpu doesn't support using scratch registers for fences any more. So we won't see values like 0xdeadbeef as fence value any more. v2: reschedule timer even if no change detected Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 --- 1 file changed, 3 deletions(-) commit 4a7d74f1763edd96badba1fe1c99f07ddf0376a6 Author: Christian König Date: Mon Mar 14 14:29:46 2016 +0100 drm/amdgpu: signal fences directly in amdgpu_fence_process Because of the scheduler we need to signal all fences immediately anyway, so try to avoid the waitqueue overhead. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 97 ++++++++++--------------------- 2 files changed, 31 insertions(+), 68 deletions(-) commit f09c2be4d4804963f18417abd5b51bc8a8330851 Author: Christian König Date: Sun Mar 13 19:37:01 2016 +0100 drm/amdgpu: cleanup amdgpu_fence_wait_empty v2 Just wait for last fence instead of waiting for the sequence manually. v2: don't use amdgpu_sched_jobs for the mask Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 69 +++++++------------------------ 1 file changed, 15 insertions(+), 54 deletions(-) commit c89377d10a11e5d8be11525f220dc624574c1aa5 Author: Christian König Date: Sun Mar 13 19:19:48 2016 +0100 drm/amdgpu: keep all fences in an RCU protected array v2 Just keep all HW fences in a RCU protected array as a first step to replace the wait queue. v2: update commit message, move fixes into separate patch. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 32 ++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) commit e6151a08bbb3c85cd0b23813432690939e143131 Author: Christian König Date: Tue Mar 15 14:52:26 2016 +0100 drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring Make this a parameter instead of using the global variable directly. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 189e0fb763045aecc39c43100cd489c8756f3413 Author: Christian König Date: Tue Mar 15 13:58:14 2016 +0100 drm/amdgpu: RCU protected amd_sched_fence_release Fences must be freed RCU protected, otherwise the reservation_object_*_rcu() functions can run into problems. Signed-off-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/scheduler/sched_fence.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit b44135351a3a5cfc60f5b6729445311c2d5e141c Author: Christian König Date: Tue Mar 15 13:40:17 2016 +0100 drm/amdgpu: RCU protected amdgpu_fence_release Fences must be freed RCU protected, otherwise the reservation_object_*_rcu() functions can run into problems. Signed-off-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit ca08e04d5642c429ec891fa17bf379be988dea6b Author: Christian König Date: Fri Mar 11 17:57:56 2016 +0100 drm/amdgpu: merge amdgpu_fence_process and _activity No need to keep the two separate any more. Signed-off-by: Christian König Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit d9713ef6b99e43b93bf8e73fc210d2925322eacc Author: Christian König Date: Fri Mar 11 17:49:58 2016 +0100 drm/amdgpu: cleanup amdgpu_fence_activity The comment about the loop counter was never valid, even when you have multiple threads this loop only runs as long as the sequence increases. Signed-off-by: Christian König Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 35 +++---------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) commit 63e30271b04c712c684c07567401b61b10d094d4 Merge: 277edba 6e6f498 Author: Linus Torvalds Date: Wed Mar 16 14:45:55 2016 -0700 Merge tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "PCI changes for v4.6: Enumeration: - Disable IO/MEM decoding for devices with non-compliant BARs (Bjorn Helgaas) - Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs (Bjorn Helgaas Resource management: - Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED (Bjorn Helgaas) - Don't assign or reassign immutable resources (Bjorn Helgaas) - Don't enable/disable ROM BAR if we're using a RAM shadow copy (Bjorn Helgaas) - Set ROM shadow location in arch code, not in PCI core (Bjorn Helgaas) - Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs (Bjorn Helgaas) - ia64: Use ioremap() instead of open-coded equivalent (Bjorn Helgaas) - ia64: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas) - MIPS: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas) - Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY (Bjorn Helgaas) - Don't leak memory if sysfs_create_bin_file() fails (Bjorn Helgaas) - rcar: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi) - designware: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi) Virtualization: - Wait for up to 1000ms after FLR reset (Alex Williamson) - Support SR-IOV on any function type (Kelly Zytaruk) - Add ACS quirk for all Cavium devices (Manish Jaggi) AER: - Rename pci_ops_aer to aer_inj_pci_ops (Bjorn Helgaas) - Restore pci_ops pointer while calling original pci_ops (David Daney) - Fix aer_inject error codes (Jean Delvare) - Use dev_warn() in aer_inject (Jean Delvare) - Log actual error causes in aer_inject (Jean Delvare) - Log aer_inject error injections (Jean Delvare) VPD: - Prevent VPD access for buggy devices (Babu Moger) - Move pci_read_vpd() and pci_write_vpd() close to other VPD code (Bjorn Helgaas) - Move pci_vpd_release() from header file to pci/access.c (Bjorn Helgaas) - Remove struct pci_vpd_ops.release function pointer (Bjorn Helgaas) - Rename VPD symbols to remove unnecessary "pci22" (Bjorn Helgaas) - Fold struct pci_vpd_pci22 into struct pci_vpd (Bjorn Helgaas) - Sleep rather than busy-wait for VPD access completion (Bjorn Helgaas) - Update VPD definitions (Hannes Reinecke) - Allow access to VPD attributes with size 0 (Hannes Reinecke) - Determine actual VPD size on first access (Hannes Reinecke) Generic host bridge driver: - Move structure definitions to separate header file (David Daney) - Add pci_host_common_probe(), based on gen_pci_probe() (David Daney) - Expose pci_host_common_probe() for use by other drivers (David Daney) Altera host bridge driver: - Fix altera_pcie_link_is_up() (Ley Foon Tan) Cavium ThunderX host bridge driver: - Add PCIe host driver for ThunderX processors (David Daney) - Add driver for ThunderX-pass{1,2} on-chip devices (David Daney) Freescale i.MX6 host bridge driver: - Add DT bindings to configure PHY Tx driver settings (Justin Waters) - Move imx6_pcie_reset_phy() near other PHY handling functions (Lucas Stach) - Move PHY reset into imx6_pcie_establish_link() (Lucas Stach) - Remove broken Gen2 workaround (Lucas Stach) - Move link up check into imx6_pcie_wait_for_link() (Lucas Stach) Freescale Layerscape host bridge driver: - Add "fsl,ls2085a-pcie" compatible ID (Yang Shi) Intel VMD host bridge driver: - Attach VMD resources to parent domain's resource tree (Jon Derrick) - Set bus resource start to 0 (Keith Busch) Microsoft Hyper-V host bridge driver: - Add fwnode_handle to x86 pci_sysdata (Jake Oshins) - Look up IRQ domain by fwnode_handle (Jake Oshins) - Add paravirtual PCI front-end for Microsoft Hyper-V VMs (Jake Oshins) NVIDIA Tegra host bridge driver: - Add pci_ops.{add,remove}_bus() callbacks (Thierry Reding) - Implement ->{add,remove}_bus() callbacks (Thierry Reding) - Remove unused struct tegra_pcie.num_ports field (Thierry Reding) - Track bus -> CPU mapping (Thierry Reding) - Remove misleading PHYS_OFFSET (Thierry Reding) Renesas R-Car host bridge driver: - Depend on ARCH_RENESAS, not ARCH_SHMOBILE (Simon Horman) Synopsys DesignWare host bridge driver: - ARC: Add PCI support (Joao Pinto) - Add generic dw_pcie_wait_for_link() (Joao Pinto) - Add default link up check if sub-driver doesn't override (Joao Pinto) - Add driver for prototyping kits based on ARC SDP (Joao Pinto) TI Keystone host bridge driver: - Defer probing if devm_phy_get() returns -EPROBE_DEFER (Shawn Lin) Xilinx AXI host bridge driver: - Use of_pci_get_host_bridge_resources() to parse DT (Bharat Kumar Gogada) - Remove dependency on ARM-specific struct hw_pci (Bharat Kumar Gogada) - Don't call pci_fixup_irqs() on Microblaze (Bharat Kumar Gogada) - Update Zynq binding with Microblaze node (Bharat Kumar Gogada) - microblaze: Support generic Xilinx AXI PCIe Host Bridge IP driver (Bharat Kumar Gogada) Xilinx NWL host bridge driver: - Add support for Xilinx NWL PCIe Host Controller (Bharat Kumar Gogada) Miscellaneous: - Check device_attach() return value always (Bjorn Helgaas) - Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h (Bjorn Helgaas) - Remove includes of empty asm-generic/pci-bridge.h (Bjorn Helgaas) - ARM64: Remove generated include of asm-generic/pci-bridge.h (Bjorn Helgaas) - Remove empty asm-generic/pci-bridge.h (Bjorn Helgaas) - Remove includes of asm/pci-bridge.h (Bjorn Helgaas) - Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h (Bjorn Helgaas) - unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition (Bjorn Helgaas) - Cleanup pci/pcie/Kconfig whitespace (Andreas Ziegler) - Include pci/hotplug Kconfig directly from pci/Kconfig (Bjorn Helgaas) - Include pci/pcie/Kconfig directly from pci/Kconfig (Bogicevic Sasa) - frv: Remove stray pci_{alloc,free}_consistent() declaration (Christoph Hellwig) - Move pci_dma_* helpers to common code (Christoph Hellwig) - Add PCI_CLASS_SERIAL_USB_DEVICE definition (Heikki Krogerus) - Add QEMU top-level IDs for (sub)vendor & device (Robin H. Johnson) - Fix broken URL for Dell biosdevname (Naga Venkata Sai Indubhaskar Jupudi)" * tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (94 commits) PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition PCI: designware: Add driver for prototyping kits based on ARC SDP PCI: designware: Add default link up check if sub-driver doesn't override PCI: designware: Add generic dw_pcie_wait_for_link() PCI: Cleanup pci/pcie/Kconfig whitespace PCI: Simplify pci_create_attr() control flow PCI: Don't leak memory if sysfs_create_bin_file() fails PCI: Simplify sysfs ROM cleanup PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource MIPS: Loongson 3: Use temporary struct resource * to avoid repetition ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource ia64/PCI: Use ioremap() instead of open-coded equivalent ia64/PCI: Use temporary struct resource * to avoid repetition PCI: Clean up pci_map_rom() whitespace PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices PCI: thunder: Add PCIe host driver for ThunderX processors PCI: generic: Expose pci_host_common_probe() for use by other drivers PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe() ... commit 277edbabf6fece057b14fb6db5e3a34e00f42f42 Merge: 271ecc5 0d571b6 Author: Linus Torvalds Date: Wed Mar 16 14:10:53 2016 -0700 Merge tag 'pm+acpi-4.6-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI updates from Rafael Wysocki: "This time the majority of changes go into cpufreq and they are significant. First off, the way CPU frequency updates are triggered is different now. Instead of having to set up and manage a deferrable timer for each CPU in the system to evaluate and possibly change its frequency periodically, cpufreq governors set up callbacks to be invoked by the scheduler on a regular basis (basically on utilization updates). The "old" governors, "ondemand" and "conservative", still do all of their work in process context (although that is triggered by the scheduler now), but intel_pstate does it all in the callback invoked by the scheduler with no need for any additional asynchronous processing. Of course, this eliminates the overhead related to the management of all those timers, but also it allows the cpufreq governor code to be simplified quite a bit. On top of that, the common code and data structures used by the "ondemand" and "conservative" governors are cleaned up and made more straightforward and some long-standing and quite annoying problems are addressed. In particular, the handling of governor sysfs attributes is modified and the related locking becomes more fine grained which allows some concurrency problems to be avoided (particularly deadlocks with the core cpufreq code). In principle, the new mechanism for triggering frequency updates allows utilization information to be passed from the scheduler to cpufreq. Although the current code doesn't make use of it, in the works is a new cpufreq governor that will make decisions based on the scheduler's utilization data. That should allow the scheduler and cpufreq to work more closely together in the long run. In addition to the core and governor changes, cpufreq drivers are updated too. Fixes and optimizations go into intel_pstate, the cpufreq-dt driver is updated on top of some modification in the Operating Performance Points (OPP) framework and there are fixes and other updates in the powernv cpufreq driver. Apart from the cpufreq updates there is some new ACPICA material, including a fix for a problem introduced by previous ACPICA updates, and some less significant changes in the ACPI code, like CPPC code optimizations, ACPI processor driver cleanups and support for loading ACPI tables from initrd. Also updated are the generic power domains framework, the Intel RAPL power capping driver and the turbostat utility and we have a bunch of traditional assorted fixes and cleanups. Specifics: - Redesign of cpufreq governors and the intel_pstate driver to make them use callbacks invoked by the scheduler to trigger CPU frequency evaluation instead of using per-CPU deferrable timers for that purpose (Rafael Wysocki). - Reorganization and cleanup of cpufreq governor code to make it more straightforward and fix some concurrency problems in it (Rafael Wysocki, Viresh Kumar). - Cleanup and improvements of locking in the cpufreq core (Viresh Kumar). - Assorted cleanups in the cpufreq core (Rafael Wysocki, Viresh Kumar, Eric Biggers). - intel_pstate driver updates including fixes, optimizations and a modification to make it enable enable hardware-coordinated P-state selection (HWP) by default if supported by the processor (Philippe Longepe, Srinivas Pandruvada, Rafael Wysocki, Viresh Kumar, Felipe Franciosi). - Operating Performance Points (OPP) framework updates to improve its handling of voltage regulators and device clocks and updates of the cpufreq-dt driver on top of that (Viresh Kumar, Jon Hunter). - Updates of the powernv cpufreq driver to fix initialization and cleanup problems in it and correct its worker thread handling with respect to CPU offline, new powernv_throttle tracepoint (Shilpasri Bhat). - ACPI cpufreq driver optimization and cleanup (Rafael Wysocki). - ACPICA updates including one fix for a regression introduced by previos changes in the ACPICA code (Bob Moore, Lv Zheng, David Box, Colin Ian King). - Support for installing ACPI tables from initrd (Lv Zheng). - Optimizations of the ACPI CPPC code (Prashanth Prakash, Ashwin Chaugule). - Support for _HID(ACPI0010) devices (ACPI processor containers) and ACPI processor driver cleanups (Sudeep Holla). - Support for ACPI-based enumeration of the AMBA bus (Graeme Gregory, Aleksey Makarov). - Modification of the ACPI PCI IRQ management code to make it treat 255 in the Interrupt Line register as "not connected" on x86 (as per the specification) and avoid attempts to use that value as a valid interrupt vector (Chen Fan). - ACPI APEI fixes related to resource leaks (Josh Hunt). - Removal of modularity from a few ACPI drivers (BGRT, GHES, intel_pmic_crc) that cannot be built as modules in practice (Paul Gortmaker). - PNP framework update to make it treat ACPI_RESOURCE_TYPE_SERIAL_BUS as a valid resource type (Harb Abdulhamid). - New device ID (future AMD I2C controller) in the ACPI driver for AMD SoCs (APD) and in the designware I2C driver (Xiangliang Yu). - Assorted ACPI cleanups (Colin Ian King, Kaiyen Chang, Oleg Drokin). - cpuidle menu governor optimization to avoid a square root computation in it (Rasmus Villemoes). - Fix for potential use-after-free in the generic device properties framework (Heikki Krogerus). - Updates of the generic power domains (genpd) framework including support for multiple power states of a domain, fixes and debugfs output improvements (Axel Haslam, Jon Hunter, Laurent Pinchart, Geert Uytterhoeven). - Intel RAPL power capping driver updates to reduce IPI overhead in it (Jacob Pan). - System suspend/hibernation code cleanups (Eric Biggers, Saurabh Sengar). - Year 2038 fix for the process freezer (Abhilash Jindal). - turbostat utility updates including new features (decoding of more registers and CPUID fields, sub-second intervals support, GFX MHz and RC6 printout, --out command line option), fixes (syscall jitter detection and workaround, reductioin of the number of syscalls made, fixes related to Xeon x200 processors, compiler warning fixes) and cleanups (Len Brown, Hubert Chrzaniuk, Chen Yu)" * tag 'pm+acpi-4.6-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (182 commits) tools/power turbostat: bugfix: TDP MSRs print bits fixing tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump tools/power turbostat: call __cpuid() instead of __get_cpuid() tools/power turbostat: indicate SMX and SGX support tools/power turbostat: detect and work around syscall jitter tools/power turbostat: show GFX%rc6 tools/power turbostat: show GFXMHz tools/power turbostat: show IRQs per CPU tools/power turbostat: make fewer systems calls tools/power turbostat: fix compiler warnings tools/power turbostat: add --out option for saving output in a file tools/power turbostat: re-name "%Busy" field to "Busy%" tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding tools/power turbostat: Intel Xeon x200: fix erroneous bclk value tools/power turbostat: allow sub-sec intervals ACPI / APEI: ERST: Fixed leaked resources in erst_init ACPI / APEI: Fix leaked resources intel_pstate: Do not skip samples partially intel_pstate: Remove freq calculation from intel_pstate_calc_busy() intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance() ... commit cfe02a8a973e7e5f66926b8ae38dfce404b19e29 Author: Arnd Bergmann Date: Tue Mar 15 00:21:06 2016 +0100 cgroup: avoid false positive gcc-6 warning When all subsystems are disabled, gcc notices that cgroup_subsys_enabled_key is a zero-length array and that any access to it must be out of bounds: In file included from ../include/linux/cgroup.h:19:0, from ../kernel/cgroup.c:31: ../kernel/cgroup.c: In function 'cgroup_add_cftypes': ../kernel/cgroup.c:261:53: error: array subscript is above array bounds [-Werror=array-bounds] return static_key_enabled(cgroup_subsys_enabled_key[ssid]); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ../include/linux/jump_label.h:271:40: note: in definition of macro 'static_key_enabled' static_key_count((struct static_key *)x) > 0; \ ^ We should never call the function in this particular case, so this is not a bug. In order to silence the warning, this adds an explicit check for the CGROUP_SUBSYS_COUNT==0 case. Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo kernel/cgroup.c | 3 +++ 1 file changed, 3 insertions(+) commit 2b021cbf3cb6208f0d40fd2f1869f237934340ed Author: Tejun Heo Date: Tue Mar 15 20:43:04 2016 -0400 cgroup: ignore css_sets associated with dead cgroups during migration Before 2e91fa7f6d45 ("cgroup: keep zombies associated with their original cgroups"), all dead tasks were associated with init_css_set. If a zombie task is requested for migration, while migration prep operations would still be performed on init_css_set, the actual migration would ignore zombie tasks. As init_css_set is always valid, this worked fine. However, after 2e91fa7f6d45, zombie tasks stay with the css_set it was associated with at the time of death. Let's say a task T associated with cgroup A on hierarchy H-1 and cgroup B on hiearchy H-2. After T becomes a zombie, it would still remain associated with A and B. If A only contains zombie tasks, it can be removed. On removal, A gets marked offline but stays pinned until all zombies are drained. At this point, if migration is initiated on T to a cgroup C on hierarchy H-2, migration path would try to prepare T's css_set for migration and trigger the following. WARNING: CPU: 0 PID: 1576 at kernel/cgroup.c:474 cgroup_get+0x121/0x160() CPU: 0 PID: 1576 Comm: bash Not tainted 4.4.0-work+ #289 ... Call Trace: [] dump_stack+0x4e/0x82 [] warn_slowpath_common+0x78/0xb0 [] warn_slowpath_null+0x15/0x20 [] cgroup_get+0x121/0x160 [] link_css_set+0x7b/0x90 [] find_css_set+0x3bc/0x5e0 [] cgroup_migrate_prepare_dst+0x89/0x1f0 [] cgroup_attach_task+0x157/0x230 [] __cgroup_procs_write+0x2b7/0x470 [] cgroup_tasks_write+0xc/0x10 [] cgroup_file_write+0x30/0x1b0 [] kernfs_fop_write+0x13c/0x180 [] __vfs_write+0x23/0xe0 [] vfs_write+0xa4/0x1a0 [] SyS_write+0x44/0xa0 [] entry_SYSCALL_64_fastpath+0x12/0x6f It doesn't make sense to prepare migration for css_sets pointing to dead cgroups as they are guaranteed to contain only zombies which are ignored later during migration. This patch makes cgroup destruction path mark all affected css_sets as dead and updates the migration path to ignore them during preparation. Signed-off-by: Tejun Heo Fixes: 2e91fa7f6d45 ("cgroup: keep zombies associated with their original cgroups") Cc: stable@vger.kernel.org # v4.4+ include/linux/cgroup-defs.h | 3 +++ kernel/cgroup.c | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit 1425075e7272faaa3629a1e2df679c0ba4cf55d3 Merge: 849dc324 2fa8f88 Author: Trond Myklebust Date: Wed Mar 16 16:24:36 2016 -0400 Merge tag 'nfs-rdma-4.6-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma NFS: NFSoRDMA Client Side Changes These patches include several bugfixes and cleanups for the NFSoRDMA client. This includes bugfixes for NFS v4.1, proper RDMA_ERROR handling, and fixes from the recent workqueue swicchover. These patches also switch xprtrdma to use the new CQ API Signed-off-by: Anna Schumaker * tag 'nfs-rdma-4.6-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma: (787 commits) xprtrdma: Use new CQ API for RPC-over-RDMA client send CQs xprtrdma: Use an anonymous union in struct rpcrdma_mw xprtrdma: Use new CQ API for RPC-over-RDMA client receive CQs xprtrdma: Serialize credit accounting again xprtrdma: Properly handle RDMA_ERROR replies rpcrdma: Add RPCRDMA_HDRLEN_ERR xprtrdma: Do not wait if ib_post_send() fails xprtrdma: Segment head and tail XDR buffers on page boundaries xprtrdma: Clean up dprintk format string containing a newline xprtrdma: Clean up physical_op_map() xprtrdma: Clean up unused RPCRDMA_INLINE_PAD_THRESH macro commit d1ed3ba4e3d76b4ebec239c64f990c26d7935700 Author: Guenter Roeck Date: Tue Mar 8 18:46:13 2016 -0800 watchdog: Ensure that wdd is not dereferenced if NULL Smatch rightfully complains that wdd is dereferenced in the watchdog release function after being checked for NULL. Also make sure that it is not accessed outside mutex protection to avoid use-after-free problems. Fixes: e6c71e84e4c0 ("watchdog: Introduce WDOG_HW_RUNNING flag") Reported-by: Dan Carpenter Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 11d7aba9ceb726d86aaaca3eb5f7d79de38989c5 Author: Guenter Roeck Date: Sun Feb 28 13:12:20 2016 -0800 watchdog: imx2: Convert to use infrastructure triggered keepalives The watchdog infrastructure now supports handling watchdog keepalive if the watchdog is running while the watchdog device is closed. Convert the driver to use this infrastructure. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/imx2_wdt.c | 74 ++++++++------------------------------------- 1 file changed, 13 insertions(+), 61 deletions(-) commit f29a72c24ad4927027e77e4eed431a61bc8335b2 Author: Guenter Roeck Date: Sun Feb 28 13:12:19 2016 -0800 watchdog: dw_wdt: Convert to use watchdog infrastructure Convert driver to use watchdog infrastructure. This includes infrastructure support to handle watchdog keepalive if the watchdog is running while the watchdog device is closed. Signed-off-by: Guenter Roeck Tested-by: Douglas Anderson Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 1 + drivers/watchdog/dw_wdt.c | 323 +++++++++++++++++----------------------------- 2 files changed, 117 insertions(+), 207 deletions(-) commit 15013ad813f6544be8e79afc23672745950d59bc Author: Guenter Roeck Date: Sun Feb 28 13:12:18 2016 -0800 watchdog: Add support for minimum time between heartbeats Some watchdogs require a minimum time between heartbeats. Examples are the watchdogs in DA9062 and AT91SAM9x. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 3 +++ drivers/watchdog/watchdog_dev.c | 15 +++++++++++++++ include/linux/watchdog.h | 3 +++ 3 files changed, 21 insertions(+) commit d0684c8a9354953efdea214b437445c00743cf49 Author: Guenter Roeck Date: Sun Feb 28 13:12:17 2016 -0800 watchdog: Make stop function optional Not all hardware watchdogs can be stopped. The driver for such watchdogs would typically only set the WATCHDOG_HW_RUNNING flag in its stop function. Make the stop function optional and set WATCHDOG_HW_RUNNING in the watchdog core if it is not provided. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 20 ++++++++++++-------- drivers/watchdog/watchdog_core.c | 2 +- drivers/watchdog/watchdog_dev.c | 6 +++++- 3 files changed, 18 insertions(+), 10 deletions(-) commit ee142889e32f564f9b5e57b68b06693ec5473074 Author: Guenter Roeck Date: Sun Feb 28 13:12:16 2016 -0800 watchdog: Introduce WDOG_HW_RUNNING flag The WDOG_HW_RUNNING flag is expected to be set by watchdog drivers if the hardware watchdog is running. If the flag is set, the watchdog subsystem will ping the watchdog even if the watchdog device is closed. The watchdog driver stop function is now optional and may be omitted if the watchdog can not be stopped. If stopping the watchdog is not possible but the driver implements a stop function, it is responsible to set the WDOG_HW_RUNNING flag in its stop function. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 22 +++++++---- drivers/watchdog/watchdog_dev.c | 52 +++++++++++++++++++------- include/linux/watchdog.h | 10 +++++ 3 files changed, 64 insertions(+), 20 deletions(-) commit 664a39236e718f9f03fa73fc01006da9ced04efc Author: Guenter Roeck Date: Sun Feb 28 13:12:15 2016 -0800 watchdog: Introduce hardware maximum heartbeat in watchdog core Introduce an optional hardware maximum heartbeat in the watchdog core. The hardware maximum heartbeat can be lower than the maximum timeout. Drivers can set the maximum hardware heartbeat value in the watchdog data structure. If the configured timeout exceeds the maximum hardware heartbeat, the watchdog core enables a timer function to assist sending keepalive requests to the watchdog driver. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 19 +++- drivers/watchdog/watchdog_dev.c | 129 +++++++++++++++++++++++-- include/linux/watchdog.h | 28 ++++-- 3 files changed, 158 insertions(+), 18 deletions(-) commit fb32e9b9deeb5df2913deb7d2ae8c36f4f66ecf3 Author: Guenter Roeck Date: Sun Feb 28 13:12:14 2016 -0800 watchdog: Make set_timeout function optional For some watchdogs, the watchdog driver handles timeout changes without explicitly setting any registers. In this situation, the watchdog driver might only set the 'timeout' variable but do nothing else. This can as well be handled by the infrastructure, so make the set_timeout callback optional. If WDIOF_SETTIMEOUT is configured but the .set_timeout callback is not available, update the timeout variable in the infrastructure code. Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 5 +++++ drivers/watchdog/watchdog_dev.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit e21f56219bf636b4abd15a0b076a1c5cba381501 Author: Sylvain Lemieux Date: Fri Mar 4 13:44:10 2016 -0500 arm: lpc32xx: remove restart handler Remove the restart handler from "mach-lpc32xx"; this functionality is now available in the pnx4008 watchdog driver. Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck arch/arm/mach-lpc32xx/common.c | 15 --------------- arch/arm/mach-lpc32xx/common.h | 1 - 2 files changed, 16 deletions(-) commit 0a25345743aeae19ae61bd28b588cd4cb9f0123c Author: Sylvain Lemieux Date: Fri Mar 4 13:44:09 2016 -0500 arm: lpc32xx: phy3250 remove restart hook Remove the restart hook assignment from phy3250; this functionality is now managed by the pnx4008 watchdog driver. Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck arch/arm/mach-lpc32xx/phy3250.c | 1 - 1 file changed, 1 deletion(-) commit 247dcad5c0361fdae06903f3b10855ba0381802d Author: Sylvain Lemieux Date: Fri Mar 4 13:44:08 2016 -0500 watchdog: pnx4008: restart: support "cmd" from userspace Added support to verify if a "cmd" is passed from the userspace program rebooting the system; - if a valid "cmd" is available, handle it; - If the received "cmd" is not supported, use the default reboot mode. Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 25b286c02defa26b136818b17909789102225aa8 Author: Sylvain Lemieux Date: Fri Mar 4 13:44:07 2016 -0500 watchdog: pnx4008: add support for soft reset Add support for explicit soft reset using the reboot mode. The default reboot mode behavior is unchanged; you can overwrite the default reboot type in the board specific file "DT_MACHINE_START" definition using the "reboot_mode" parameter. Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 4ed5443d9175f4b6008ca18601672c812a1fe93b Author: Sylvain Lemieux Date: Fri Mar 4 13:44:06 2016 -0500 watchdog: pnx4008: add restart handler Add restart handler capability to the driver; the restart handler implementation was taken from "mach-lpc32xx" ("lpc23xx_restart" function). Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 43eec2f50c65bd469989a4dab8c1b5e14d87db84 Author: Sylvain Lemieux Date: Fri Mar 4 13:44:05 2016 -0500 watchdog: pnx4008: update logging during power-on There is no need to add the driver name in the text to display on the console during the power-on: pnx4008-watchdog 4003c000.watchdog: PNX4008 Watchdog Timer: heartbeat 19 sec Signed-off-by: Sylvain Lemieux Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 84b84bcf4f718b7b9f5296d4068025fea801a0e1 Author: Wolfram Sang Date: Thu Mar 3 09:24:12 2016 +0100 watchdog: tangox_wdt: test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate, so we should check the result before using it as a divisor. For this, refactor the code to use a central error path. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/tangox_wdt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit ccc8208d0855a5b02a4fc49c141b6f1dbf282304 Author: Wolfram Sang Date: Wed Mar 2 23:33:36 2016 +0100 watchdog: atlas7_wdt: test clock rate to avoid division by 0 The clk API may return 0 on clk_get_rate, so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/atlas7_wdt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 882dec1ff125e9020157d27672ec11c2fdfb82c2 Author: Javier Martinez Canillas Date: Tue Mar 1 13:45:17 2016 -0300 watchdog: s3c2410_wdt: Add max and min timeout values The watchdog maximum timeout value is determined by the number of bits for the interval timer counter, its source clock frequency, the number of bits of the prescaler and maximum divider value. This can be calculated with the following equation: max_timeout = counter / (freq / (max_prescale + 1) / max_divider) Setting a maximum timeout value will allow the watchdog core to refuse user-space calls to the WDIOC_SETTIMEOUT ioctl that sets not supported timeout values. For example, systemd tries to set a timeout of 10 minutes on reboot to ensure that the machine will be rebooted even if a reboot failed. This leads to the following error message on an Exynos5422 Odroid XU4 board: [ 147.986045] s3c2410-wdt 101d0000.watchdog: timeout 600 too big Reported-by: Krzysztof Kozlowski Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 57d2caaabfc744692e36ff83b508d7c52c70e36f Author: Fu Wei Date: Mon Feb 29 16:46:50 2016 +0800 Watchdog: introduce ARM SBSA watchdog driver According to Server Base System Architecture (SBSA) specification, the SBSA Generic Watchdog has two stage timeouts: the first signal (WS0) is for alerting the system by interrupt, the second one (WS1) is a real hardware reset. More details about the hardware specification of this device: ARM DEN0029B - Server Base System Architecture (SBSA) This driver can operate ARM SBSA Generic Watchdog as a single stage watchdog or a two stages watchdog, it's set up by the module parameter "action". In the single stage mode, when the timeout is reached, your system will be reset by WS1. The first signal (WS0) is ignored. In the two stages mode, when the timeout is reached, the first signal (WS0) will trigger panic. If the system is getting into trouble and cannot be reset by panic or restart properly by the kdump kernel(if supported), then the second stage (as long as the first stage) will be reached, system will be reset by WS1. This function can help administrator to backup the system context info by panic console output or kdump. This driver bases on linux kernel watchdog framework, so it can get timeout from module parameter and FDT at the driver init stage. Signed-off-by: Fu Wei Reviewed-by: Graeme Gregory Tested-by: Pratyush Anand Acked-by: Timur Tabi Reviewed-by: Mathieu Poirier Tested-by: Suravee Suthikulpanit Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 20 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sbsa_gwdt.c | 408 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 429 insertions(+) commit 849dc3244c916545790bfb9055625a3719061c92 Author: Jeff Layton Date: Wed Feb 24 15:28:29 2016 -0500 nfs4: nfs4_ff_layout_prepare_ds should return NULL if connection failed I hit the following oops out of the blue while testing with flexfiles: BUG: unable to handle kernel NULL pointer dereference at 00000000000000e8 IP: [] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles] PGD 44031067 PUD 5062d067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: nfsv3 nfs_layout_flexfiles tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas nfsd auth_rpcgss nfs_acl lockd grace sunrpc 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 bonding ipmi_devintf ipmi_msghandler snd_hda_codec_generic virtio_balloon ppdev snd_hda_intel snd_hda_controller snd_hda_codec iosf_mbi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_core parport_pc snd_hwdep parport snd_seq snd_seq_device snd_pcm snd_timer acpi_cpufreq snd soundcore i2c_piix4 xfs libcrc32c joydev virtio_net virtio_console qxl drm_kms_helper ttm crc32c_intel drm virtio_pci serio_raw ata_generic virtio_ring virtio pata_acpi CPU: 0 PID: 19138 Comm: test5 Not tainted 4.1.9-100.pd.90.el7.x86_64 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014 task: ffff88007b70cf00 ti: ffff88004cc44000 task.ti: ffff88004cc44000 RIP: 0010:[] [] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles] RSP: 0018:ffff88004cc47890 EFLAGS: 00010246 RAX: 0000000000000003 RBX: ffff880050932300 RCX: ffff88006978f488 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88003e0e8540 RBP: ffff88004cc47908 R08: 0000000000000000 R09: 0000000000000000 R10: ffff88007ff8c758 R11: 0000000000000005 R12: ffff88003e0e8540 R13: 0000000000000000 R14: ffff88006978f488 R15: ffff88004431cc80 FS: 00007fea40c7c740(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000e8 CR3: 0000000044318000 CR4: 00000000000406f0 Stack: ffffffffa048c934 ffff880050932310 0000000100000001 ffff88006978f510 ffff88006978f3c8 ffff88003e56cd90 ffff88004cc479d0 00000020a052aff0 000000000004b000 ffff88004cc47908 ffff880050932300 ffff88004cc479d0 Call Trace: [] ? ff_layout_write_pagelist+0x64/0x220 [nfs_layout_flexfiles] [] pnfs_generic_pg_writepages+0xaf/0x1b0 [nfsv4] [] nfs_pageio_doio+0x27/0x60 [nfs] [] nfs_pageio_complete_mirror+0x54/0xa0 [nfs] [] nfs_pageio_complete+0x2d/0x90 [nfs] [] nfs_writepage_locked+0x8d/0xe0 [nfs] [] ? page_referenced_one+0x1a0/0x1a0 [] nfs_wb_single_page+0xf7/0x190 [nfs] [] nfs_launder_page+0x41/0x90 [nfs] [] invalidate_inode_pages2_range+0x340/0x3a0 [] invalidate_inode_pages2+0x17/0x20 [] nfs_release+0x9e/0xb0 [nfs] [] nfs_file_release+0x3d/0x60 [nfs] [] __fput+0xdc/0x1e0 [] ____fput+0xe/0x10 [] task_work_run+0xa7/0xe0 [] get_signal+0x565/0x600 [] ? __filemap_fdatawrite_range+0x65/0x90 [] do_signal+0x37/0x730 [] ? nfs4_file_fsync+0x81/0x150 [nfsv4] [] ? vfs_fsync_range+0x3b/0xb0 [] ? __audit_syscall_exit+0x1e6/0x280 [] do_notify_resume+0x5f/0xa0 [] int_signal+0x12/0x17 Code: 48 8b 40 70 8b 00 83 f8 03 74 20 83 f8 04 75 13 55 48 89 ce 48 89 d7 48 89 e5 e8 14 0f 0e 00 5d c3 66 90 0f 0b 66 0f 1f 44 00 00 <48> 8b 82 e8 00 00 00 c3 66 66 66 66 90 55 48 89 e5 41 57 41 56 RIP [] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles] RSP CR2: 00000000000000e8 When the DS connection attempt fails, nfs4_ff_layout_prepare_ds marks it for the error but then just returns the ds as if it were usable. The comments though say: /* Upon return, either ds is connected, or ds is NULL */ Ensure that we set the return pointer to NULL in the event that the connection attempt fails. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 ++ 1 file changed, 2 insertions(+) commit 95d9f6c3edd60aab1bb163f081262645f8bb8dc0 Author: Christoph Hellwig Date: Wed Mar 2 17:35:55 2016 +0100 nfs: remove nfs_inode_dio_wait Just call inode_dio_wait directly instead of through a pointless wrapper. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust fs/nfs/file.c | 4 ++-- fs/nfs/inode.c | 2 +- fs/nfs/internal.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) commit 4ff79bc7098fab71e5957d48d31d2036c234e506 Author: Christoph Hellwig Date: Wed Mar 2 17:35:54 2016 +0100 nfs: remove nfs4_file_fsync The only difference to nfs_file_fsync is the call to pnfs_sync_inode. But pnfs_sync_inode is just an inline that calls a pNFS layout driver method if CONFIG_PNFS is designed, and thus can be called just fine from the core NFS module. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust fs/nfs/file.c | 8 +++++--- fs/nfs/internal.h | 2 +- fs/nfs/nfs4file.c | 33 +-------------------------------- 3 files changed, 7 insertions(+), 36 deletions(-) commit 271ecc5253e2b317d729d366560789cd7f93836c Merge: aa6865d 63c0622 Author: Linus Torvalds Date: Wed Mar 16 11:51:08 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge first patch-bomb from Andrew Morton: - some misc things - ofs2 updates - about half of MM - checkpatch updates - autofs4 update * emailed patches from Andrew Morton : (120 commits) autofs4: fix string.h include in auto_dev-ioctl.h autofs4: use pr_xxx() macros directly for logging autofs4: change log print macros to not insert newline autofs4: make autofs log prints consistent autofs4: fix some white space errors autofs4: fix invalid ioctl return in autofs4_root_ioctl_unlocked() autofs4: fix coding style line length in autofs4_wait() autofs4: fix coding style problem in autofs4_get_set_timeout() autofs4: coding style fixes autofs: show pipe inode in mount options kallsyms: add support for relative offsets in kallsyms address table kallsyms: don't overload absolute symbol type for percpu symbols x86: kallsyms: disable absolute percpu symbols on !SMP checkpatch: fix another left brace warning checkpatch: improve UNSPECIFIED_INT test for bare signed/unsigned uses checkpatch: warn on bare unsigned or signed declarations without int checkpatch: exclude asm volatile from complex macro check mm: memcontrol: drop unnecessary lru locking from mem_cgroup_migrate() mm: migrate: consolidate mem_cgroup_migrate() calls mm/compaction: speed up pageblock_pfn_to_page() when zone is contiguous ... commit 082eaa50838c6b70a8244f8b01d7ed7d686f84db Merge: d2ad9cc a82268b 3021376 dafb558 Author: Doug Ledford Date: Wed Mar 16 13:57:43 2016 -0400 Merge branches 'nes', 'cxgb4' and 'iwpm' into k.o/for-4.6 commit aa6865d836418eb2ba888a4cb1318a28e9aa2e0c Merge: 72aafdf efbec13 Author: Linus Torvalds Date: Wed Mar 16 10:53:26 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix misspellings in comments. m68k: Use conventional function parameters for do_sigreturn zorro: Use kobj_to_dev() commit 6e4de8660a54aad084534332f4708fe4a743c058 Author: Faisal Latif Date: Wed Jan 20 13:40:16 2016 -0600 i40iw: changes for build of i40iw module MAINTAINERS, Kconfig, and Makefile to build i40iw module Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford MAINTAINERS | 10 ++++++++++ drivers/infiniband/Kconfig | 1 + drivers/infiniband/hw/Makefile | 1 + 3 files changed, 12 insertions(+) commit 16666b4ac3b3639e1fa674a0288dc5878ca67d68 Author: Faisal Latif Date: Wed Jan 20 13:40:15 2016 -0600 i40iw: Kconfig and Makefile for iwarp module Kconfig and Makefile needed to build iwarp module. Changes since v2: moved from Kbuild to Makefile Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/Kconfig | 7 +++++++ drivers/infiniband/hw/i40iw/Makefile | 9 +++++++++ 2 files changed, 16 insertions(+) commit 4097351a47c588aeb50649da32213634563b1fe2 Author: Faisal Latif Date: Wed Jan 20 13:40:14 2016 -0600 i40iw: virtual channel handling files i40iw_vf.[ch] and i40iw_virtchnl[ch] are used for virtual channel support for iWARP VF module. Changes since v2: code cleanup Acked-by: Anjali Singhai Jain Acked-by: Shannon Nelson Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_vf.c | 85 +++ drivers/infiniband/hw/i40iw/i40iw_vf.h | 62 +++ drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 748 +++++++++++++++++++++++++++ drivers/infiniband/hw/i40iw/i40iw_virtchnl.h | 124 +++++ 4 files changed, 1019 insertions(+) commit 280cfc4b74e6d584cd368498742ad0e3c04c3ac9 Author: Faisal Latif Date: Wed Jan 20 13:40:13 2016 -0600 i40iw: user kernel shared files i40iw_user.h and i40iw_uk.c are used by both user library as well as kernel requests. Acked-by: Anjali Singhai Jain Acked-by: Shannon Nelson Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_uk.c | 1204 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/i40iw/i40iw_user.h | 442 +++++++++++ 2 files changed, 1646 insertions(+) commit e7d184ea5498f400631037444d67bf04714d293e Author: Faisal Latif Date: Wed Jan 20 13:40:12 2016 -0600 i40iw: add X722 register file X722 Hardware registers defines for iWARP component. Acked-by: Anjali Singhai Jain Acked-by: Shannon Nelson Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_register.h | 1030 ++++++++++++++++++++++++++ 1 file changed, 1030 insertions(+) commit 89517b5517d7f9ebc10f1cadc611437dc3c9940b Author: Faisal Latif Date: Wed Jan 20 13:40:11 2016 -0600 i40iw: add hardware related header files header files for hardware accesses Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_d.h | 1713 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/i40iw/i40iw_p.h | 106 ++ drivers/infiniband/hw/i40iw/i40iw_type.h | 1312 +++++++++++++++++++++++ 3 files changed, 3131 insertions(+) commit 86dbcd0f12e95df6a2cfe8bc883768946e68e2aa Author: Faisal Latif Date: Wed Jan 20 13:40:10 2016 -0600 i40iw: add file to handle cqp calls i40iw_ctrl.c provides for hardware wqe support and cqp. Changes since v2: cleanup coccinelle error reported by Julia Lawall Changes since v1: reported by Christoph Hellwig's review -remove unnecessary casts Acked-by: Anjali Singhai Jain Acked-by: Shannon Nelson Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 4743 ++++++++++++++++++++++++++++++ 1 file changed, 4743 insertions(+) commit 8d8cd0bf67982a2b400ca3fd5d6807b834f6a38e Author: Faisal Latif Date: Fri Feb 26 09:18:01 2016 -0600 i40iw: use shared code for port mapper Removei/change for port mapper code which has been moved to iwcm. Signed-off-by: Mustafa Ismail Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 427 +++++------------------------- drivers/infiniband/hw/i40iw/i40iw_hw.c | 20 +- drivers/infiniband/hw/i40iw/i40iw_main.c | 20 -- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 + 4 files changed, 76 insertions(+), 394 deletions(-) commit dafb5587178afe8abf85f3ae91bbc88de9e54782 Author: Faisal Latif Date: Fri Feb 26 09:18:05 2016 -0600 iwpm: crash fix for large connections test During large connection test, there is a crash at wake_up() in the callback as waitq is not yet initialized. Callback can happen before iwpm_wait_complete_req() is called to initialize waitq. To resolve, using signaling semaphore instead of waitq. Signed-off-by: Mustafa Ismail Reviewed-by: Tatyana E Nikolova Signed-off-by: Faisal Latif Reviewed-by: Steve Wise Tested-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/iwpm_msg.c | 10 +++++----- drivers/infiniband/core/iwpm_util.c | 14 +++++++------- drivers/infiniband/core/iwpm_util.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) commit c1340e8aa628d65bcb5c5b7e332bde8a17851ebf Author: Steve Wise Date: Fri Feb 26 09:18:04 2016 -0600 iw_cxgb3: support for iWARP port mapping Now with the new iWARP port mapping service in the iwcm, it is trivial to add cxgb3 support. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_cm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 170003c894d93332e1b4162aa06864ad83eb302d Author: Steve Wise Date: Fri Feb 26 09:18:03 2016 -0600 iw_cxgb4: remove port mapper related code Now that most of the port mapper code been moved to iwcm, we can remove it from iw_cxgb4. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 220 +++++++-------------------------- drivers/infiniband/hw/cxgb4/device.c | 67 +++------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 42 ------- 3 files changed, 65 insertions(+), 264 deletions(-) commit 6a0dde89cc346588f7f610dbc0d75e100f9cb568 Author: Faisal Latif Date: Fri Feb 26 09:18:02 2016 -0600 iw_nes: remove port mapper related code Now that most of the port mapper code been moved to iwcm, we can remove it from port mapper service user drivers. Signed-off-by: Mustafa Ismail Signed-off-by: Tatyana E. Nikolova Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes.c | 25 --- drivers/infiniband/hw/nes/nes_cm.c | 351 ++++++++-------------------------- drivers/infiniband/hw/nes/nes_cm.h | 11 +- drivers/infiniband/hw/nes/nes_verbs.c | 2 + 4 files changed, 80 insertions(+), 309 deletions(-) commit b493d91d333e867a043f7ff1397bcba6e2d0dda2 Author: Faisal Latif Date: Fri Feb 26 09:18:00 2016 -0600 iwcm: common code for port mapper moved port mapper related code from drivers into common code Signed-off-by: Mustafa Ismail Signed-off-by: Tatyana E. Nikolova Signed-off-by: Faisal Latif Reviewed-by: Steve Wise Tested-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/iwcm.c | 190 ++++++++++++++++++++++++++++++++----- drivers/infiniband/core/iwpm_msg.c | 2 +- include/rdma/iw_cm.h | 6 +- include/uapi/rdma/rdma_netlink.h | 4 +- 4 files changed, 172 insertions(+), 30 deletions(-) commit 72aafdf01d826ad9e6fbd52bf689be937679f5d6 Merge: 1c8e85b 80c544de Author: Linus Torvalds Date: Wed Mar 16 10:47:45 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - Add the CPU id for the new z13s machine - Add a s390 specific XOR template for RAID-5 checksumming based on the XC instruction. Remove all other alternatives, XC is always faster - The merge of our four different stack tracers into a single one - Tidy up the code related to page tables, several large inline functions are now out-of-line. Bloat-o-meter reports ~11K text size reduction - A binary interface for the priviledged CLP instruction to retrieve the hardware view of the installed PCI functions - Improvements for the dasd format code - Bug fixes and cleanups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (31 commits) s390/pci: enforce fmb page boundary rule s390: fix floating pointer register corruption (again) s390/cpumf: add missing lpp magic initialization s390: Fix misspellings in comments s390/mm: split arch/s390/mm/pgtable.c s390/mm: uninline pmdp_xxx functions from pgtable.h s390/mm: uninline ptep_xxx functions from pgtable.h s390/pci: add ioctl interface for CLP s390: Use pr_warn instead of pr_warning s390/dasd: remove casts to dasd_*_private s390/dasd: Refactor dasd format functions s390/dasd: Simplify code in format logic s390/dasd: Improve dasd format code s390/percpu: remove this_cpu_cmpxchg_double_4 s390/cpumf: Improve guest detection heuristics s390/fault: merge report_user_fault implementations s390/dis: use correct escape sequence for '%' character s390/kvm: simplify set_guest_storage_key s390/oprofile: add z13/z13s model numbers s390: add z13s model number to z13 elf platform ... commit d2ad9cc75963714d04d4596c226a499765950dbf Merge: 76b0640 35d19011 318d311 95f60bb Author: Doug Ledford Date: Wed Mar 16 13:38:28 2016 -0400 Merge branches 'mlx4', 'mlx5' and 'ocrdma' into k.o/for-4.6 commit 1c8e85b17ac0707c7732081e94cadc5f89986e5f Merge: 10dc374 392c517 Author: Linus Torvalds Date: Wed Mar 16 10:09:30 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 Pull AVR32 updates from Hans-Christian Egtvedt. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: avr32: fix asm operand constraint in cmpxchg() avr32: wire up copy_file_range syscall commit 5f8d498d4364f544fee17125787a47553db02afa Author: Dmitry V. Levin Date: Thu Mar 19 11:10:54 2015 +0000 vfs: show_vfsstat: do not ignore errors from show_devname method Explicitly check show_devname method return code and bail out in case of an error. This fixes regression introduced by commit 9d4d65748a5c. Cc: stable@vger.kernel.org Signed-off-by: Dmitry V. Levin Signed-off-by: Al Viro fs/proc_namespace.c | 2 ++ 1 file changed, 2 insertions(+) commit 10dc3747661bea9215417b659449bb7b8ed3df2c Merge: 047486d f958ee7 Author: Linus Torvalds Date: Wed Mar 16 09:55:35 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "One of the largest releases for KVM... Hardly any generic changes, but lots of architecture-specific updates. ARM: - VHE support so that we can run the kernel at EL2 on ARMv8.1 systems - PMU support for guests - 32bit world switch rewritten in C - various optimizations to the vgic save/restore code. PPC: - enabled KVM-VFIO integration ("VFIO device") - optimizations to speed up IPIs between vcpus - in-kernel handling of IOMMU hypercalls - support for dynamic DMA windows (DDW). s390: - provide the floating point registers via sync regs; - separated instruction vs. data accesses - dirty log improvements for huge guests - bugfixes and documentation improvements. x86: - Hyper-V VMBus hypercall userspace exit - alternative implementation of lowest-priority interrupts using vector hashing (for better VT-d posted interrupt support) - fixed guest debugging with nested virtualizations - improved interrupt tracking in the in-kernel IOAPIC - generic infrastructure for tracking writes to guest memory - currently its only use is to speedup the legacy shadow paging (pre-EPT) case, but in the future it will be used for virtual GPUs as well - much cleanup (LAPIC, kvmclock, MMU, PIT), including ubsan fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (217 commits) KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch KVM: x86: disable MPX if host did not enable MPX XSAVE features arm64: KVM: vgic-v3: Only wipe LRs on vcpu exit arm64: KVM: vgic-v3: Reset LRs at boot time arm64: KVM: vgic-v3: Do not save an LR known to be empty arm64: KVM: vgic-v3: Save maintenance interrupt state only if required arm64: KVM: vgic-v3: Avoid accessing ICH registers KVM: arm/arm64: vgic-v2: Make GICD_SGIR quicker to hit KVM: arm/arm64: vgic-v2: Only wipe LRs on vcpu exit KVM: arm/arm64: vgic-v2: Reset LRs at boot time KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty KVM: arm/arm64: vgic-v2: Move GICH_ELRSR saving to its own function KVM: arm/arm64: vgic-v2: Save maintenance interrupt state only if required KVM: arm/arm64: vgic-v2: Avoid accessing GICH registers KVM: s390: allocate only one DMA page per VM KVM: s390: enable STFLE interpretation only if enabled for the guest KVM: s390: wake up when the VCPU cpu timer expires KVM: s390: step the VCPU timer while in enabled wait KVM: s390: protect VCPU cpu timer with a seqcount KVM: s390: step VCPU cpu timer during kvm_run ioctl ... commit 36e7972c0d3f8819a5d9335c36c5dcd168cd2b72 Author: Vinod Koul Date: Wed Mar 16 21:51:31 2016 +0530 ASoC: Intel: Skylake: remove call to pci_dev_put The PCI bus takes pci_dev_get() and pci_dev_put() is also there. So no need for drivers to invoke these. In SKL driver we were calling pci_dev_put() only which is not right, so remove this Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 1 - 1 file changed, 1 deletion(-) commit 047486d8e7c2a7e8d75b068b69cb67b47364f5d4 Merge: 9256d5a 7cc5a5d Author: Linus Torvalds Date: Wed Mar 16 08:36:55 2016 -0700 Merge tag 'edac_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - Altera: L2 cache and On-Chip RAM support (Thor Thayer). - EDAC: Workqueue handling cleanups (Borislav Petkov). - Xgene: Register bus error handling (Loc Ho). - Misc small fixes. * tag 'edac_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: ARM: socfpga: Enable OCRAM ECC on startup ARM: socfpga: Enable L2 cache ECC on startup ARM: dts: Add Altera L2 Cache and OCRAM EDAC entries EDAC, altera: Add Altera L2 cache and OCRAM support EDAC: Use edac_debugfs_remove_recursive() in edac_debugfs_exit() EDAC, mpc85xx: Silence unused variable warning EDAC: Cleanup/sync workqueue functions EDAC: Kill workqueue setup/teardown functions EDAC: Balance workqueue setup and teardown arm64: Update the APM X-Gene EDAC node with the RB register resource EDAC, xgene: Add missing SoC register bus error handling Documentation, EDAC: Update xgene binding for missing register bus EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr() commit 8cf3968ccb4e6768425ed3e26124e690046cc023 Author: Dan Carpenter Date: Wed Mar 16 10:42:13 2016 +0300 ALSA: mixart: silence an uninitialized variable warning We could print the uninitialized value of "stat" in the error message. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/pci/mixart/mixart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f6fc056e899bd0144a08da5cacaecbe8997cd74 Author: J. Bruce Fields Date: Wed Mar 2 16:36:21 2016 -0800 nfsd: fix deadlock secinfo+readdir compound nfsd_lookup_dentry exits with the parent filehandle locked. fh_put also unlocks if necessary (nfsd filehandle locking is probably too lenient), so it gets unlocked eventually, but if the following op in the compound needs to lock it again, we can deadlock. A fuzzer ran into this; normal clients don't send a secinfo followed by a readdir in the same compound. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) commit 118472ab8532e55f48395ef5764b354fe48b1d73 Author: Keith Busch Date: Thu Feb 18 09:57:48 2016 -0700 NVMe: Expose ns wwid through single sysfs entry The method to uniquely identify a namespace depends on the controller's specification revision level and implemented capabilities. This patch has the driver figure this out and exports the unique string through a single 'wwid' attribute so the user doesn't have this burden. The longest namespace unique identifier is used if available. If not available, the driver will concat the controller's vendor, serial, and model with the namespace ID. The specification provides this as a unique indentifier. Signed-off-by: Keith Busch Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 26 ++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + 2 files changed, 27 insertions(+) commit 742f992708dff0ada8b426228900ffb009c7167b Author: Ashish Samant Date: Mon Mar 14 21:57:35 2016 -0700 fuse: return patrial success from fuse_direct_io() If a user calls writev/readv in direct io mode with partially valid data in the iovec array such that any vector other than the first one in the array contains invalid data, we currently return the error for the invalid iovec. Instead, we should return the number of bytes already written/read and not the error as we do in the non direct_io case. Reported-by: Alexey Kodanev Signed-off-by: Ashish Samant Signed-off-by: Miklos Szeredi fs/fuse/file.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 341917fe2b62876599315a537b8e248e31bd1366 Author: Markus Elfring Date: Sat Dec 19 12:48:31 2015 +0100 gpu: host1x: Use a signed return type for do_relocs() The return type "unsigned int" was used by the do_relocs() function despite the fact that it will eventually return a negative error code. Use a signed integer instead to accomodate for error codes. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Thierry Reding drivers/gpu/host1x/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93ec302976c902a77f3163e192d73b0006e3575c Author: Amitoj Kaur Chawla Date: Sun Jan 24 22:02:10 2016 +0530 gpu: host1x: bus: Add missing of_node_put() for_each_child_of_node() performs an of_node_get() on each iteration, so to break out of the loop an of_node_put() is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression n; @@ for_each_child_of_node(..., n) { ... when != of_node_put(n) when != e = n ( return n; | + of_node_put(n); ? return ...; ) ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3539699c03a6a349ffb8a2ac83ec40d6a981b2d6 Author: Phil Reid Date: Tue Mar 15 15:46:30 2016 +0800 gpio: mcp23s08: Fix clearing of interrupt. The mcp23s18 is configurable on clearing the interrupt on either reading INTCAP or GPIO. Since driver reads INTCAP in IRQ and not the GPIO reg need to set control byte for this mode. Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-mcp23s08.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1cfab8f8b397f7d95ad43f72ed9a1fa7d26e210e Author: Geert Uytterhoeven Date: Mon Mar 14 16:24:12 2016 +0100 gpiolib: Fix comment referring to gpio_*() in gpiod_*() Fixes: 79a9becda8940deb ("gpiolib: export descriptor-based GPIO interface") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e0a8604f1300cefab4aeafe214fc57954a7b4487 Author: Geert Uytterhoeven Date: Fri Mar 11 17:31:27 2016 +0100 gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit pca953x_gpio_set_multiple() divides by 4 to convert from longs to bytes, which assumes a 32-bit platform, and is not correct on 64-bit platforms. Use "sizeof(...)" instead to fix this. Cc: stable@vger.kernel.org Fixes: b4818afeacbd8182 ("gpio: pca953x: Add set_multiple to allow multiple bits to be set in one write.") Signed-off-by: Geert Uytterhoeven Acked-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e5f7e3121429c7b1ce6d759150b5bf936ddd2080 Author: Matthias Brugger Date: Fri Mar 4 11:59:58 2016 +0100 gpio: xgene: Fix kconfig for standby GIPO contoller The standby GPIO controller can be used as a interrupt controller. Select GPIOLIB_IRQCHIP when compiling this driver. Otherwise we get a compilation error: drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe': drivers/gpio/gpio-xgene-sb.c:312:10: error: 'struct gpio_chip' has no member named 'irqdomain' priv->gc.irqdomain = priv->irq_domain; ^ scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1 Fixes: 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interrupt controller" Signed-off-by: Matthias Brugger Acked-by: Quan Nguyen Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a Author: Takashi Iwai Date: Tue Mar 15 15:20:58 2016 +0100 ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity of iface and altsetting index is checked as well. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 Cc: Signed-off-by: Takashi Iwai sound/usb/clock.c | 2 ++ sound/usb/endpoint.c | 3 +++ sound/usb/mixer_quirks.c | 4 ++++ sound/usb/pcm.c | 2 ++ 4 files changed, 11 insertions(+) commit 902eb7fd1e4af3ac69b9b30f8373f118c92b9729 Author: Takashi Iwai Date: Tue Mar 15 12:14:49 2016 +0100 ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk() Just a minor code cleanup: unify the error paths. Signed-off-by: Takashi Iwai sound/usb/quirks.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0f886ca12765d20124bd06291c82951fd49a33be Author: Takashi Iwai Date: Tue Mar 15 12:09:10 2016 +0100 ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the accesses. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125 Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bcdc9f260bdce09913db1464be9817170d51044a Author: Magnus Damm Date: Tue Feb 16 13:06:41 2016 +0900 mmc: mmc_spi: Add Card Detect comments and fix CD GPIO case This patch fixes the MMC SPI driver from doing polling card detect when a CD GPIO that supports interrupts is specified using the gpios DT property. Without this patch the DT node below results in the following output: spi_gpio: spi-gpio { /* SD2 @ CN12 */ compatible = "spi-gpio"; #address-cells = <1>; #size-cells = <0>; gpio-sck = <&gpio6 16 GPIO_ACTIVE_HIGH>; gpio-mosi = <&gpio6 17 GPIO_ACTIVE_HIGH>; gpio-miso = <&gpio6 18 GPIO_ACTIVE_HIGH>; num-chipselects = <1>; cs-gpios = <&gpio6 21 GPIO_ACTIVE_LOW>; status = "okay"; spi@0 { compatible = "mmc-spi-slot"; reg = <0>; voltage-ranges = <3200 3400>; spi-max-frequency = <25000000>; gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; /* CD */ }; }; # dmesg | grep mmc mmc_spi spi32766.0: SD/MMC host mmc0, no WP, no poweroff, cd polling mmc0: host does not support reading read-only switch, assuming write-enable mmc0: new SDHC card on SPI mmcblk0: mmc0:0000 SU04G 3.69 GiB mmcblk0: p1 With this patch applied the "cd polling" portion above disappears. Signed-off-by: Magnus Damm Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Ulf Hansson drivers/mmc/host/mmc_spi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7bf037d6ac4768e228e337afd7b6c6d98f947f9f Author: Jon Hunter Date: Fri Feb 26 09:34:17 2016 +0000 mmc: tegra: Disable UHS-I modes for tegra114 SD card support for Tegra114 started failing after commit a8e326a911d3 ("mmc: tegra: implement module external clock change") was merged. This commit was part of a series to enable UHS-I modes for Tegra. To workaround this problem for now, disable UHS-I modes for Tegra114 by separating the soc data structures for Tegra114 and Tegra124 so that UHS-I is still enabled for Tegra124 but not Tegra114. Fixes: a8e326a911d3 ("mmc: tegra: implement module external clock change") Signed-off-by: Jon Hunter Reviewed-by: Lucas Stach Acked-by: Thierry Reding Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f9a82c2054bcdebdf81a63c26a3b41197bb6070a Author: Slava Bacherikov Date: Fri Mar 11 18:57:24 2016 +0200 HID: microsoft: Add ID for MS Wireless Comfort Keyboard Microsoft Wireless Comfort Keyboard has vendor specific My Favorites 1-5 keys. Linux already supports this buttons on other MS keyboards by MS_ERGONOMY quirk. So apply MS_ERGONOMY quirk to USB PID 0x00e3 (Microsoft Wireless Optical Desktop Receiver 3.0A). After this My Favorites 1..5 keys will be reported as KEY_F14..KEY_F15 events. Signed-off-by: Slava Bacherikov Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-microsoft.c | 2 ++ 3 files changed, 4 insertions(+) commit 5b2fe89856b2d0faaaea9e4b4b2c4920de7a600c Author: Vinod Koul Date: Tue Mar 15 16:39:27 2016 +0530 ASoC: Intel: Skylake: Call i915 exit last The Skylake driver uses i915 component APIs to talk to display. On remove we should free up by invoking snd_hdac_i915_exit() but that should be last thing in remove routine, so move it to last in skl_free() Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 077411e5eb8872736fdc5f3e7277719160918dde Author: Vinod Koul Date: Tue Mar 15 16:39:26 2016 +0530 ASoC: Intel: Skylake: Unmap the address last In Skylake destructor we unmap the hardware address and then free links and streams. The stream free accesses hardware to write to registers and predictably causes oops. So change the order and unmap last in destructor. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3f7f8489e25b180cf8de8a3ae3896b3f18fc4aa5 Author: Vinod Koul Date: Tue Mar 15 16:39:25 2016 +0530 ASoC: Intel: Skylake: Freeup properly on skl_dsp_free We are supposed to freeup the Code loader DMA allocation and ensure all interrupts are disabled before we disable dsp cores. So invoke these to ensure DSP shuts down properly. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7373f481dc4098a844a756201e98341bc56baaa2 Author: Vinod Koul Date: Tue Mar 15 16:39:24 2016 +0530 ASoC: Intel: Skylake: free codec objects on removal On driver removal we should ask the core to remove the device objects as well, so invoke snd_hdac_ext_bus_device_remove() in remove. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4a6c5e6a8d29e4d33858227db9179e91aa8a7407 Author: Vinod Koul Date: Tue Mar 15 16:39:23 2016 +0530 ALSA: hda: use list macro for parsing on cleanup It is always better to use list_for_each_entry_safe() while doing cleanup. So use this instead of open coding this in list in snd_hdac_stream_free_all() Signed-off-by: Jeeja KP Acked-by: Takashi Iwai Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/hda/ext/hdac_ext_stream.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0343b2f4e4a52c907d7676ce3159e0b5e7f0301c Author: Mika Westerberg Date: Tue Jan 26 14:17:49 2016 +0200 mfd: intel-lpss: Pass I2C configuration via properties on BXT I2C host controller need to be configured properly in order to meet I2C timings specified in the I2C protocol specification. Some Intel Broxton based machines do not have this information in the ACPI namespace (or the boot firmware does not support ACPI at all) so we use build-in device properties instead. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss-acpi.c | 12 ++++++++++++ drivers/mfd/intel-lpss-pci.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit 2609e4daaaff930548e35793d46ae079d39fb722 Author: Christoph Fritz Date: Thu Feb 25 15:47:48 2016 +0100 mfd: imx6sx: Add PCIe register definitions for iomuxc gpr This patch adds macros to define masks and bits for imx6sx PCIe registers. This is based on a patch by Richard Zhu. Signed-off-by: Christoph Fritz Signed-off-by: Lee Jones include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 5 +++++ 1 file changed, 5 insertions(+) commit dcdf11739d768febbfb7ecf5388761cce1f48ffc Author: Arnd Bergmann Date: Wed Mar 2 16:58:57 2016 +0100 mfd: ipaq-micro: Use __maybe_unused to hide pm functions The ipaq-micro driver uses SET_SYSTEM_SLEEP_PM_OPS() to remove the reference to its resume function, but does not use an #ifdef around the definition, so we get a build warning: drivers/mfd/ipaq-micro.c:379:12: error: 'micro_resume' defined but not used [-Werror=unused-function] This adds a __maybe_unused annotation so the compiler knows it can silently drop it instead of warning. Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/ipaq-micro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95a6f715bcab610237530d266f8d8f752af6cd6f Author: Javier Martinez Canillas Date: Fri Feb 12 01:30:16 2016 -0300 mfd: max77686: Add max77802 to I2C device ID table The max77686 MFD driver supports both the Maxim 77686 and Maxim 77802 PMICs but only the OF device table contains entries for both devices. The max77802 entry is missing in the I2C device ID table which isn't a problem currently since the driver only supports DT but it will be needed if the driver is changed to be built as a module since the I2C core always reports a I2C modalias uevent so auto-load will not work. Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/max77686.c | 1 + 1 file changed, 1 insertion(+) commit 7f8ada1a84313383eff97b357515a5a0df31b321 Author: Javier Martinez Canillas Date: Fri Feb 12 01:30:19 2016 -0300 mfd: max77686: Export OF module alias information When the device is registered via OF, the OF table is used to match the driver instead of the I2C device ID table but the entries in the latter are used as aliasses to load the module if the driver was not built-in. This is because the I2C core always reports an I2C module alias instead of an OF one but that could change so it is better to always export it. Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/max77686.c | 1 + 1 file changed, 1 insertion(+) commit a52e46ce9c3f847925707a601dc10e9af943bc26 Author: Javier Martinez Canillas Date: Fri Feb 12 01:30:18 2016 -0300 mfd: max77686: Allow driver to be built as a module The driver's Kconfig symbol is a boolean but nothing prevents the driver to be built as a module instead of built-in. It is true that most system integrators will choose the latter but the config should not restrict it. Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b273c5e0b65a98003e6fde6bf2eeba15d1ce8cf4 Author: Linus Walleij Date: Sun Feb 14 14:07:07 2016 +0100 mfd: stmpe: Add the proper PWM resources This adds the PWM resources to the STMPE MFD driver, so that it can properly grab and use them. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 5c1488906f852473b4d7837c3e33e411e0eb6910 Author: Maciej S. Szmigiero Date: Sun Jan 31 23:00:06 2016 +0100 mfd: tps65090: Set regmap config reg counts properly Regmap config max_register field should contain number of device last register, however num_reg_defaults_raw field should be set to register count instead (usually one register more than max_register). tps65090 driver had both of these fields set to the same value, fix this by introducing separate defines for max register number and total count of registers. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Lee Jones drivers/mfd/tps65090.c | 5 ++--- include/linux/mfd/tps65090.h | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 8c037e0c8eaa7dcb3a190b9be841ee81edb865ff Author: Philipp Zabel Date: Fri Jan 29 09:42:19 2016 +0100 mfd: syscon: Return ENOTSUPP instead of ENOSYS when disabled When CONFIG_MFD_SYSCON is disabled, have the function stubs return ENOTSUPP to indicate the syscon functionality is not available. There are currently no callers that depend on the ENOSYS return value. This patchfixes a checkpatch warning: WARNING: ENOSYS means 'invalid syscall nr' and nothing else Signed-off-by: Philipp Zabel Signed-off-by: Lee Jones include/linux/mfd/syscon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9b7ba7954fa8df6e021ee4bef084ed10eba2c2b Author: Maciej S. Szmigiero Date: Sun Jan 31 22:56:59 2016 +0100 mfd: as3711: Set regmap config reg counts properly Regmap config max_register field should contain number of device last register, however num_reg_defaults_raw field should be set to register count instead (usually one register more than max_register). as3711 driver had both of these fields set to the same value, fix this by introducing separate defines for max register number and total count of registers. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Lee Jones drivers/mfd/as3711.c | 4 ++-- include/linux/mfd/as3711.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit a862dc3ea793256a1364991f52e68198a2c5f27d Author: Maciej S. Szmigiero Date: Sun Jan 31 22:58:41 2016 +0100 mfd: rc5t583: Set regmap config reg counts properly Regmap config max_register field should contain number of device last register, however num_reg_defaults_raw field should be set to register count instead (usually one register more than max_register). rc5t583 driver had both of these fields set to the same value, fix this by introducing separate defines for max register number and total count of registers. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Lee Jones drivers/mfd/rc5t583.c | 4 ++-- include/linux/mfd/rc5t583.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 99f0fd540f53985443f36f96c0da209665e2dbfa Author: Andrew F. Davis Date: Sat Feb 6 10:12:10 2016 -0600 gpio: tps65086: Add GPO driver for the TPS65086 PMIC Add support for the TPS65086 PMIC GPOs. TPS65086 has four configurable GPOs that can be used for several purposes. These are output only. Signed-off-by: Andrew F. Davis Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-tps65086.c | 139 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) commit e1d9a10918396ae26dd5181d454c793ff17c9ded Author: Javier Martinez Canillas Date: Wed Feb 10 13:50:18 2016 -0300 mfd: mt6397: Add platform device ID table The platform bus_type .match callback attempts to match the platform device name with an entry on the .id_table if provided and fallbacks to match with the driver's name if a table is not provided. Using a platform device ID to match is more explicit, allows the driver to support more than one device and also the MODULE_DEVICE_TABLE macro can be used to export the module aliases information instead of the MODULE_ALIAS. Signed-off-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0e5df61d26f2ad609eb5a699b9ab587564ccd65f Author: Steve Twiss Date: Wed Feb 10 17:35:07 2016 +0000 mfd: da9063: Fix missing volatile registers in the core regmap_range volatile lists Add an updated set of registers listed in the core regmap_range volatile ranges defined for the DA9063. These new registers contain bits that cannot be considered under the full control of software. Under various conditions the hardware will set and/or automatically clear bit(s) contained in these registers. When using a cached version of regmap, the volatility of these registers must be identified otherwise the regmap operations may not ensure the registers are explicitly altered. As well as updating the list of volatile registers, this change will fix a corner case discovered in the DA9063 ONKEY which is used by the DA9063 core. In the ONKEY case, the CONTROL_B register is now listed as volatile in the regmap_range because it contains the bit field NONKEY_LOCK. This bit can be altered by hardware, in which case regmap must be notified of its ability to be manpiulated outside of software control. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9063-i2c.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 44760cf3bf0a29da8f5cc271698c8772b8f79673 Author: John Crispin Date: Wed Jan 27 12:47:38 2016 +0100 mfd: mt6397: Add MT6323 support to MT6397 driver Signed-off-by: John Crispin Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 20 ++ include/linux/mfd/mt6323/core.h | 36 ++++ include/linux/mfd/mt6323/registers.h | 408 +++++++++++++++++++++++++++++++++++ 3 files changed, 464 insertions(+) commit 1d2c25ed4558cc591072e43e16118f08f7eeb206 Author: John Crispin Date: Wed Jan 27 12:47:37 2016 +0100 mfd: mt6397: Add support for different Slave types Signed-off-by: John Crispin Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 58 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 17 deletions(-) commit feec4799ac4d214abd62e2bdfccb3ca9c5801d2f Author: John Crispin Date: Wed Jan 27 12:47:36 2016 +0100 mfd: mt6397: int_con and int_status may vary in location MT6323 has the INT_CON and INT_STATUS located at a different position. Make the registers locations configurable. Signed-off-by: John Crispin Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 27 +++++++++++++++++---------- include/linux/mfd/mt6397/core.h | 2 ++ 2 files changed, 19 insertions(+), 10 deletions(-) commit daf5ae7850448ddf6aa4168334814ff3d8641fc1 Author: John Crispin Date: Wed Jan 27 12:47:35 2016 +0100 dt-bindings: mfd: Add bindings for the MediaTek MT6323 PMIC Signed-off-by: John Crispin Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mt6397.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bf742a53ce1eaca26849e22b013a9523621f8db5 Author: Steve Twiss Date: Mon Feb 1 16:09:38 2016 +0000 mfd: da9062: Fix missing volatile registers in the core regmap_range volatile lists Add an updated set of registers listed in the core regmap_range volatile ranges defined for the DA9062. These new registers contain bits that cannot be considered under the full control of software. Under various conditions the hardware will set and/or automatically clear bit(s) contained in these registers. When using a cached version of regmap, the volatility of these registers must be identified otherwise the regmap operations may not ensure the registers are explicitly altered. As well as updating the list of volatile registers, this change will fix a corner case discovered in the DA9063 ONKEY which is used by the DA9062 core. In the ONKEY case, the CONTROL_B register is now listed as volatile in the regmap_range because it contains the bit field NONKEY_LOCK. This bit can be altered by hardware, in which case regmap must be notified of its ability to be manpiulated outside of software control. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/da9062-core.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 2cd9ad0c5f5455f02815024229c1cb44d8ae636f Author: Wenyou Yang Date: Fri Feb 5 11:36:30 2016 +0800 mfd: Add documentation for ACT8945A DT bindings The Active-semi ACT8945A PMIC is a Multi-Function Device, it has two subdevices: - Regulator - Charger This patch adds documentation for ACT8945A DT bindings. Signed-off-by: Wenyou Yang Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/act8945a.txt | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit b25c6b7d2801f33b0fc2072d7b9bfbda3682bd86 Author: Wenyou Yang Date: Fri Feb 5 11:36:29 2016 +0800 mfd: act8945a: Add Active-semi ACT8945A PMIC MFD driver This patch adds support for the Active-semi ACT8945A PMIC. It is a Multi Function Device with the following subdevices: - Regulator - Charger It is interfaced to the host controller using I2C interface, ACT8945A is a child device of the I2C. Signed-off-by: Wenyou Yang Reviewed-by: Krzysztof Kozlowski Acked-by: Peter Korsgaard Signed-off-by: Lee Jones drivers/mfd/Kconfig | 11 ++++++ drivers/mfd/Makefile | 1 + drivers/mfd/act8945a.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) commit f4bcf5a29d57fe515b8eb6c612090376086b5f79 Author: Tomeu Vizoso Date: Fri Feb 5 14:32:56 2016 +0100 mfd: cros_ec: Small kerneldoc fix s/cros_ec_register/cros_ec_query_all Signed-off-by: Tomeu Vizoso Signed-off-by: Lee Jones include/linux/mfd/cros_ec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4d34c94ff287f999c420de6facf1b7524b918c0 Author: Charles Keepax Date: Tue Feb 9 10:52:01 2016 +0000 mfd: arizona: Remove duplicate select of MFD_CORE MFD_ARIZONA_I2C and MFD_ARIZONA_SPI both select MFD_ARIZONA and all three of those select MFD_CORE, this makes the selects of MFD_CORE in MFD_ARIZONA_I2C and MFD_ARIZONA_SPI redundant, so we remove them. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 21aca3bf0d00465aa37a385098ab7ac2fe2412bb Author: Charles Keepax Date: Tue Feb 9 10:52:00 2016 +0000 mfd: cs47l24: Fix defaults array based on testing My automated test is back and now can check defaults against the actual hardware. This patch updates the defaults array for the differences detected and removes a couple of completely unused registers. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/cs47l24-tables.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 9edd83c782257c4ad23f5e89102a9ea3f24b7a7f Author: Charles Keepax Date: Tue Feb 9 10:51:59 2016 +0000 mfd: wm8998: Fix defaults array based on testing My automated test is back and now can check defaults against the actual hardware. This patch updates the defaults array for the differences detected and removes a couple of completely unused registers. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm8998-tables.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 516c95f0b0a8814bf982bc71c7e083d9a8057596 Author: Charles Keepax Date: Tue Feb 9 10:51:58 2016 +0000 mfd: wm5102: Fix defaults array based on testing My automated test is back and now can check defaults against the actual hardware. This patch updates the defaults array for the differences detected and removes a couple of completely unused registers. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm5102-tables.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 036fa859cd9b9195853eae81295689c515451c58 Author: Charles Keepax Date: Tue Feb 9 10:51:57 2016 +0000 mfd: wm5110: Fix defaults array based on testing My automated test is back and now can check defaults against the actual hardware. This patch updates the defaults array for the differences detected and removes a couple of completely unused registers. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm5110-tables.c | 82 ++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 45 deletions(-) commit 5dbd47840a1f4b31bf2acaacfb85d95a7038fe4c Author: Charles Keepax Date: Tue Feb 9 10:52:02 2016 +0000 mfd: arizona: Update small typo in Arizona SPI Kconfig The help text had a copy and paste error and refers to I2C in the SPI section. This patch corrects this typo. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c131045d5b074bcb749421c4b3f11f0655bdc0b6 Author: Philipp Zabel Date: Fri Jan 29 10:30:16 2016 +0100 mfd: syscon: Make syscon_regmap_config const syscon_regmap_config can be made const if syscon_probe() creates a local copy on the stack, just like syscon_register() does. Signed-off-by: Philipp Zabel Signed-off-by: Lee Jones drivers/mfd/syscon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ca668f0edfae65438c3f0a3ad5d3e59e3515915f Author: Philipp Zabel Date: Fri Jan 29 10:35:51 2016 +0100 mfd: syscon: Set regmap max_register in of_syscon_register Determine the regmap max_register configuration from the io resource size and the reg-io-width device tree property. Signed-off-by: Philipp Zabel Acked-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/syscon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a7e46317722ccdac6ae3bdb9476a1ec21b7aab6d Author: Arnd Bergmann Date: Mon Jan 25 17:02:24 2016 +0100 mfd: db8500: Avoid uninitialized variable reference The prcmu_config_clkout() function ensures that the 'clkout' argument can only be '0' or '1' using an appropriate BUG_ON(), so the compiler should know that the div_mask, mask, and bits variables are always initialized later on. However, it doesn't understand this in gcc-5.2 and produces a false positive warning instead: drivers/mfd/db8500-prcmu.c: In function 'prcmu_config_clkout': drivers/mfd/db8500-prcmu.c:762:10: error: 'div_mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (val & div_mask) { ^ drivers/mfd/db8500-prcmu.c:769:13: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] if ((val & mask & ~div_mask) != bits) { ^ drivers/mfd/db8500-prcmu.c:757:7: error: 'bits' may be used uninitialized in this function [-Werror=maybe-uninitialized] Replacing the switch() statement with an equivalent if() lets gcc figure this out reliably and avoids the warnings. Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/db8500-prcmu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b45b719ee03162eb54772c30a6474d57b41b6b54 Author: Andrew F. Davis Date: Mon Jan 25 09:50:11 2016 -0600 mfd: tps65086: Add driver for the TPS65086 PMIC Add support for the TPS65912 device. It provides communication through I2C and contains the following components: - Regulators - Load switches - GPO controller Signed-off-by: Andrew F. Davis Signed-off-by: Lee Jones drivers/mfd/Kconfig | 13 ++++ drivers/mfd/Makefile | 1 + drivers/mfd/tps65086.c | 149 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/tps65086.h | 117 +++++++++++++++++++++++++++++++++ 4 files changed, 280 insertions(+) commit a85b9e0b3ccf4a90cd42f41fdfff1fc91513720c Author: Andrew F. Davis Date: Mon Jan 25 09:50:10 2016 -0600 Documentation: tps65086: Add DT bindings for the TPS65086 PMIC The TPS65086 PMIC contains several regulators and a GPO controller. Add bindings for the TPS65086 PMIC. Signed-off-by: Andrew F. Davis Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/tps65086.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit af139d5592bc812e7a1997727172ddba3e6be968 Author: Arnd Bergmann Date: Tue Mar 15 22:42:50 2016 +0100 ASoC: rt5616: add I2C dependency The rt5616 codec registers itself as an i2c driver, but can be enabled even when i2c is turned off, which leads to a build error: codecs/rt5616.c:1419:1: error: data definition has no type or storage class [-Werror] module_i2c_driver(rt5616_i2c_driver); This adds an explicit Kconfig dependency, like the other codec drivers. Signed-off-by: Arnd Bergmann Fixes: 288bc356a881 ("ASoC: rt5616: allow to build with CONFIG_SND_SOC_RT5616") Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cbf8b5a2b649a501758291cb4d4ba1e5711771ba Author: Tony Luck Date: Mon Mar 14 15:33:39 2016 -0700 x86/mm, x86/mce: Fix return type/value for memcpy_mcsafe() Returning a 'bool' was very unpopular. Doubly so because the code was just wrong (returning zero for true, one for false; great for shell programming, not so good for C). Change return type to "int". Keep zero as the success indicator because it matches other similar code and people may be more comfortable writing: if (memcpy_mcsafe(to, from, count)) { printk("Sad panda, copy failed\n"); ... } Make the failure return value -EFAULT for now. Reported by: Mika Penttilä Signed-off-by: Tony Luck Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dan Williams Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: mika.penttila@nextfour.com Fixes: 92b0729c34ca ("x86/mm, x86/mce: Add memcpy_mcsafe()") Link: http://lkml.kernel.org/r/695f14233fa7a54fcac4406c706d7fec228e3f4c.1457993040.git.tony.luck@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/string_64.h | 4 ++-- arch/x86/lib/memcpy_64.S | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit ba4e06d68ea4fd2be401d7226c68941892d6bbaf Merge: 743146d 710d60c Author: Ingo Molnar Date: Wed Mar 16 09:01:55 2016 +0100 Merge branch 'linus' into x86/urgent, to pick up dependencies for a fix Signed-off-by: Ingo Molnar commit d367cef0a7f0c6ee86e997c0cb455b21b3c6b9ba Author: Matt Fleming Date: Mon Mar 14 10:33:01 2016 +0000 x86/mm/pat: Fix boot crash when 1GB pages are not supported by the CPU Scott reports that with the new separate EFI page tables he's seeing the following error on boot, caused by setting reserved bits in the page table structures (fault code is PF_RSVD | PF_PROT), swapper/0: Corrupted page table at address 17b102020 PGD 17b0e5063 PUD 1400000e3 Bad pagetable: 0009 [#1] SMP On first inspection the PUD is using a 1GB page size (_PAGE_PSE) and looks fine but that's only true if support for 1GB PUD pages ("pdpe1gb") is present in the CPU. Scott's Intel Celeron N2820 does not have that feature and so the _PAGE_PSE bit is reserved. Fix this issue by making the 1GB mapping code in conditional on "cpu_has_gbpages". This issue didn't come up in the past because the required mapping for the faulting address (0x17b102020) will already have been setup by the kernel in early boot before we got to efi_map_regions(), but we no longer use the standard kernel page tables during EFI calls. Reported-by: Scott Ashcroft Tested-by: Scott Ashcroft Signed-off-by: Matt Fleming Acked-by: Borislav Petkov Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ben Hutchings Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Matthew Garrett Cc: Peter Zijlstra Cc: Raphael Hertzog Cc: Roger Shimizu Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1457951581-27353-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e525a8622a10f714c755038e07e86d06d880b8a2 Merge: 710d60c 65f95ff Author: Ingo Molnar Date: Wed Mar 16 08:24:34 2016 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/urgent Pull memory barriers documentation updates from Paul E. McKenney. Signed-off-by: Ingo Molnar commit 5476aa46ff0377229f780c42e77b7e7e756040c7 Author: Thomas Hellstrom Date: Mon Mar 14 14:41:08 2016 +0100 drm/vmwgfx: Bump driver minor signals availability of resolutionKMS support Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclar Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86d65b7e7a0c927d07d18605c276d0f142438ead Author: Arnd Bergmann Date: Mon Mar 14 15:24:10 2016 +0100 nouveau: fix nv40_perfctr_next() cleanup regression gcc-6 warns about code in the nouveau driver that is obviously silly: drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c: In function 'nv40_perfctr_next': drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c:62:19: warning: self-comparison always evaluats to false [-Wtautological-compare] if (pm->sequence != pm->sequence) { The behavior was accidentally introduced in a patch described as "This is purely preparation for upcoming commits, there should be no code changes here.". As far as I can tell, that was true for the rest of that patch except for this one function, which has been changed to a NOP. This patch restores the original behavior. Signed-off-by: Arnd Bergmann Fixes: 8c1aeaa13954 ("drm/nouveau/pm: cosmetic changes") Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9256d5a308c95a50c6e85d682492ae1f86a70f9b Merge: 13f6f62 7296c33 Author: Linus Torvalds Date: Tue Mar 15 22:04:53 2016 -0700 Merge tag 'leds_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "LED core improvements: - Fix misleading comment after workqueue removal from drivers - Avoid error message when a USB LED device is unplugged - Add helpers for calling brightness_set(_blocking) LED triggers: - Simplify led_trigger_store by using sysfs_streq() LED class drivers improvements: - Improve wording and formatting in a comment: lp3944 - Fix return value check in create_gpio_led(): leds-gpio - Use GPIOF_OUT_INIT_LOW instead of hardcoded zero: leds-gpio - Use devm_led_classdev_register(): leds-lm3533, leds-lm3533, leds-lp8788, leds-wm831x-status, leds-s3c24xx, leds-s3c24xx, leds-max8997. New LED class driver: - Add driver for the ISSI IS31FL32xx family of LED controllers. Device Tree documentation: - of: Add vendor prefixes for Integrated Silicon Solutions Inc. (issi) and Si-En Technology (si-en). - DT: Add common bindings for Si-En Technology SN3216/18 and IS31FL32xx family of LED controllers, since they seem to be the same hardware, just rebranded" * tag 'leds_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: triggers: simplify led_trigger_store leds: max8997: Use devm_led_classdev_register leds: da903x: Use devm_led_classdev_register leds: s3c24xx: Use devm_led_classdev_register leds: wm831x-status: Use devm_led_classdev_register leds: lp8788: Use devm_led_classdev_register leds: 88pm860x: Use devm_led_classdev_register leds: Add SN3218 and SN3216 support to the IS31FL32XX driver of: Add vendor prefix for Si-En Technology leds: Add driver for the ISSI IS31FL32xx family of LED controllers DT: leds: Add binding for the ISSI IS31FL32xx family of LED controllers DT: Add vendor prefix for Integrated Silicon Solutions Inc. leds: lm3533: Use devm_led_classdev_register leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero leds: core: add helpers for calling brightness_set(_blocking) leds: leds-gpio: Fix return value check in create_gpio_led() leds: lp3944: improve wording and formatting in a comment leds: core: avoid error message when a USB LED device is unplugged leds: core: fix misleading comment after workqueue removal from drivers commit 13f6f62f61b4d3d5f45bed889128bb7ff3fda5ed Merge: f0718ce cee2cc2 Author: Linus Torvalds Date: Tue Mar 15 21:58:58 2016 -0700 Merge tag 'rtc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Core: - New sysfs interface to set and read clock offset - Drivers can now be both I2C and SPI (see pcf2127 and ds3232) New drivers: - Alphascale ASM9260 - Epson RX6110SA - Maxim max20024 and max77620 (in max77686) - Microchip PIC32 - NXP pcf2129 (in pcf2127) Subsystem wide cleanups: - remove IRQF_EARLY_RESUME when unecessary Drivers: - ds1307: clock output, temperature sensor and wakeup-source support - ds1685: actually spin forever in poweroff error path - ds3232: many cleanups - ds3234: merged in ds3232 - hym8563: fix invalid year calculation - max77686: many cleanups - max77802 merged in max77686 - pcf2123: cleanups and offset support - pcf85063: cleanups - pcf8523: propely handle oscillator stop bit - rv3029: many cleanups, trickle charger and temperature sensor support - rv8803: convert spin_lock to mutex_lock - rx8025: many fixes - vr41xx: restore alarm_irq_enable" * tag 'rtc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (86 commits) rtc: pcf2127: add pcf2129 device id rtc: pcf2127: add support for spi interface rtc: pcf2127: convert to use regmap rtc: rv3029: Add thermometer hwmon support rtc: rv3029: Add update_bits helper for eeprom access rtc: ds1685: actually spin forever in poweroff error path rtc: hym8563: fix invalid year calculation rtc: ds3232: use rtc->ops_lock to protect alarm operations rtc: ds3232: fix issue when irq is shared several devices rtc: ds3232: remove unused UIE code rtc: ds3232: add register access error checks rtc: ds3232: fix read on /dev/rtc after RTC_AIE_ON rtc: merge ds3232 and ds3234 rtc: ds3232: convert to use regmap rtc: pxa: fix Kconfig indentation rtc: rv3029: Add device tree property for trickle charger rtc: rv3029: Add functions for EEPROM access rtc: rv3029: Add i2c register update-bits helper rtc: rv3029: Add missing register definitions rtc: rv3029: Add "rv3029" I2C device id ... commit f0718cea471265fe69017191429979ba1a54b9e0 Merge: 555f816 630300d Author: Linus Torvalds Date: Tue Mar 15 21:44:47 2016 -0700 Merge tag 'hwmon-for-linus-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - New drivers for NSA320 and LTC2990 - Added support for ADM1278 to adm1275 driver - Added support for ncpXXxh103 to ntc_thermistor driver - Renamed vexpress hwmon implementation - Minor cleanups and improvements * tag 'hwmon-for-linus-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: Create an NSA320 hardware monitoring driver hwmon: Define binding for the nsa320-hwmon driver hwmon: (adm1275) Add support for ADM1278 hwmon: (ntc_thermistor) Add support for ncpXXxh103 Doc: hwmon: Fix typo "montoring" in hwmon ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel ARM: dts: Change iio_hwmon nodes to use hypen in node names hwmon: (iio_hwmon) Allow the driver to accept hypen in device tree node names hwmon: Add LTC2990 sensor driver hwmon: (vexpress) rename vexpress hwmon implementation commit 555f8160b2c36dfa071c043b54d4b1edca7e07b4 Merge: b7aae4a 768e666 Author: Linus Torvalds Date: Tue Mar 15 21:34:35 2016 -0700 Merge tag 'regulator-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been an extremely quiet release for the regulator API, aside from bugfixes and small enhancements the only thing that really stands out are the new drivers for Action Semiconductors ACT8945A, HiSilicon HI665x, and the Maxim MAX20024 and MAX77620" * tag 'regulator-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (46 commits) regulator: pwm: Add support to have multiple instance of pwm regulator regulator: pwm: Fix calculation of voltage-to-duty cycle regulator: of: Use of_property_read_u32() for reading min/max regulator: pv88060: fix incorrect clear of event register regulator: pv88090: fix incorrect clear of event register regulator: max77620: Add support to configure active-discharge regulator: core: Add support for active-discharge configuration regulator: helper: Add helper to configure active-discharge using regmap regulator: core: Add support for active-discharge configuration regulator: DT: Add DT property for active-discharge configuration regulator: act8865: Specify fixed voltage of 3.3V for ACT8600's REG9 regulator: act8865: Rename platform_data field to init_data regulator: act8865: Remove "static" from local variable ASoC: cs4271: add regulator consumer support regulator: max77620: Remove duplicate module alias regulator: max77620: Eliminate duplicate code regulator: max77620: Remove unused fields regulator: core: fix crash in error path of regulator_register regulator: core: Request GPIO before creating sysfs entries regulator: gpio: don't print error on EPROBE_DEFER ... commit 6e669f085d595cb6053920832c89f1a13067db44 Author: Cyril Bur Date: Wed Mar 16 13:29:30 2016 +1100 powerpc: Fix unrecoverable SLB miss during restore_math() Commit 70fe3d9 "powerpc: Restore FPU/VEC/VSX if previously used" introduces a call to restore_math() late in the syscall return path, after MSR_RI has been cleared. The MSR_RI flag is used to indicate whether the kernel can take another exception or not. A cleared MSR_RI flag indicates that the kernel cannot. Unfortunately when a machine is under SLB pressure an SLB miss can occur in restore_math() which (with MSR_RI cleared) leads to an unrecoverable exception. Unrecoverable exception 4100 at c0000000000088d8 cpu 0x0: Vector: 4100 at [c0000003fa473b20] pc: c0000000000088d8: .load_vr_state+0x70/0x110 lr: c00000000000f710: .restore_math+0x130/0x188 sp: c0000003fa473da0 msr: 9000000002003030 current = 0xc0000007f876f180 paca = 0xc00000000fff0000 softe: 0 irq_happened: 0x01 pid = 1944, comm = K08umountfs [link register ] c00000000000f710 .restore_math+0x130/0x188 [c0000003fa473da0] c0000003fa473e30 (unreliable) [c0000003fa473e30] c000000000007b6c system_call+0x84/0xfc The clearing of MSR_RI is actually an optimisation to avoid multiple MSR writes, what must be disabled are interrupts. See comment in entry_64.S: /* * For performance reasons we clear RI the same time that we * clear EE. We only need to clear RI just before we restore r13 * below, but batching it with EE saves us one expensive mtmsrd call. * We have to be careful to restore RI if we branch anywhere from * here (eg syscall_exit_work). */ At the point of calling restore_math() r13 has not been restored, as such, the quick fix of turning MSR_RI back on for the call to restore_math() will eliminate the occurrence of an unrecoverable exception. We'd like to do a better fix in future. Fixes: 70fe3d980f5f ("powerpc: Restore FPU/VEC/VSX if previously used") Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2e098dcee6208a690f73e11feb29d181cae7d978 Author: Christophe Leroy Date: Tue Mar 15 14:07:49 2016 +0100 powerpc/8xx: Fix do_mtspr_cpu6() build on older compilers GCC < 4.9 is unable to build this, saying: arch/powerpc/mm/8xx_mmu.c:139:2: error: memory input 1 is not directly addressable Change the one-element array into a simple variable to avoid this. Fixes: 1458dd951f7c ("powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro") Signed-off-by: Christophe Leroy Cc: Scott Wood Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg_8xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b081251ef6d6d7cf06448deeb3d9860b636358f5 Author: Michael Ellerman Date: Tue Mar 15 20:30:20 2016 +1100 powerpc/rcpm: Fix build break when SMP=n Add an include of asm/smp.h to fix a build break when SMP=n: arch/powerpc/sysdev/fsl_rcpm.c:32:2: error: implicit declaration of function 'get_hard_smp_processor_id' Fixes: d17799f9c10e ("powerpc/rcpm: add RCPM driver") Signed-off-by: Michael Ellerman arch/powerpc/sysdev/fsl_rcpm.c | 1 + 1 file changed, 1 insertion(+) commit b7aae4a9d02a1f9fdeb183cd5da95e00aae5c93e Merge: ff280e3 d25263d Author: Linus Torvalds Date: Tue Mar 15 21:22:26 2016 -0700 Merge tag 'regmap-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This has been a very busy release for regmap, not just in cleaning up the mess we got ourselves into with the endianness handling but also in other areas too: - Fixes for the endianness handling so that we now explicitly default to little endian (the code used to do this by accident). This fixes handling of explictly specified endianness on big endian systems. - Optimisation of the implementation of register striding. - A refectoring of the _update_bits() code to reduce duplication. - Fixes and enhancements for the interrupt implementation which make it easier to use in a wider range of systems" * tag 'regmap-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (28 commits) regmap: irq: add devm apis for regmap_{add,del}_irq_chip regmap: replace regmap_write_bits() regmap: irq: Enable irq retriggering for nested irqs regmap: add regmap_fields_force_xxx() macros regmap: add regmap_field_force_xxx() macros regmap: merge regmap_fields_update_bits() into macro regmap: merge regmap_fields_write() into macro regmap: add regmap_fields_update_bits_base() regmap: merge regmap_field_update_bits() into macro regmap: merge regmap_field_write() into macro regmap: add regmap_field_update_bits_base() regmap: merge regmap_update_bits_check_async() into macro regmap: merge regmap_update_bits_check() into macro regmap: merge regmap_update_bits_async() into macro regmap: merge regmap_update_bits() into macro regmap: add regmap_update_bits_base() regcache: flat: Introduce register strider order regcache: Introduce the index parsing API by stride order regmap: core: Introduce register stride order regmap: irq: add devm apis for regmap_{add,del}_irq_chip ... commit 7a25d91214cb22e642b9ed6e4434bfaf74adad28 Author: Scott Wood Date: Tue Mar 15 01:47:38 2016 -0500 powerpc/book3e-64: Use hardcoded mttmr opcode This preserves the ability to build using older binutils (reportedly <= 2.22). Fixes: 6becef7ea04a ("powerpc/mpc85xx: Add CPU hotplug support for E6500") Signed-off-by: Scott Wood Cc: chenhui.zhao@freescale.com Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_64.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ff280e3639548fc8c366f6e4bd471e715ac590c7 Merge: 5ca5446 c508709 Author: Linus Torvalds Date: Tue Mar 15 21:07:33 2016 -0700 Merge tag 'spi-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Not the biggest set of changes for SPI but a bit of a pickup in activity on the core: - Support for memory mapped read from flash devices via a SPI controller. - The beginnings of a message rewriting framework in the core which should in time allow us to support transforming messages to work around the limits of controllers or optimise the performance for controllers transparently to calling drivers. - Updates to the PXA2xx, the main functional change being to improve the ACPI support. - A new driver for the Analog Devices AXI SPI engine" * tag 'spi-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (66 commits) spi: Add gfp parameter to kernel-doc to fix build warning spi: Fix htmldocs build error due struct spi_replaced_transfers spi: rockchip: covert rsd_nsecs to u32 type spi: rockchip: header file cleanup spi: xilinx: Add devicetree binding for spi-xilinx spi: respect the maximum segment size of DMA device spi: rockchip: check requesting dma channel with EPROBE_DEFER spi: rockchip: migrate to dmaengine_terminate_async spi: rockchip: check return value of dmaengine_prep_slave_sg spi: core: Fix deadlock when sending messages spi/rockchip: fix endian mode for 16-bit transfers spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs spi: pxa2xx: Use newer more explicit DMAengine terminate API spi: pxa2xx: Add support for Intel Broxton B-Step spi: lp-8841: return correct error code from probe spi: imx: drop bogus tests for rx/tx bufs in DMA transfer spi: imx: set MX51_ECSPI_CTRL_SMC bit in setup function spi: imx: make some register defines simpler spi: imx: remove unnecessary bit clearing in mx51_ecspi_config spi: imx: add support for all SPI word width for DMA ... commit c5a9d1f30c066b7922a5f66b8c03a263d2f06a8c Author: Arnd Bergmann Date: Mon Mar 14 23:46:55 2016 +0100 mailbox: rockchip: avoid 64-bit division The newly added rockchip mailbox driver causes a bug in the ARM allyesconfig build because of a division of a resource_size_t variable that may be 64 bit wide: drivers/mailbox/built-in.o: In function `rockchip_mbox_probe': :(.text+0x6614): undefined reference to `__aeabi_uldivmod' This adds a cast to size_t, which turns it into a 32-bit division in this case. This is safe because we know that we cannot possibly map a resource that is longer than what a pointer contains, and in practice it will be very short instead. Signed-off-by: Arnd Bergmann Signed-off-by: Jassi Brar drivers/mailbox/rockchip-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ca5446ec5ba5e79a6f271cd026bb153d6850fcc Merge: 710d60c 3c177a1 Author: Linus Torvalds Date: Tue Mar 15 20:23:13 2016 -0700 Merge tag 'pinctrl-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "An almost purely driver related set of changes with no major changes to the framework, only one patch adding an unlocked version of the pinctrl_find_gpio_range_from_pin() library call. New drivers: - ST Microelectronics STM32 MCU support: this is a non-MMU low-end platform for IoT things (etc). - Microchip PIC32 MCU support: same story as for STM32. New subdrivers: - Allwinner SunXi H3 R_PIO controller support. - Qualcomm IPQ4019 support. - MediaTek MT2701 and MT7623. - Allwinner A64 Non-critical fixes: - gpio_disable_free() for the Vybrid. - pinctrl single: use a separate lockdep class. Misc: - Substantial cleanups and rewrites for the Super-H PFC driver and subdrivers. - Various fixes and cleanups, especially Paul Gortmakers work to make nonmodular drivers nonmodular" * tag 'pinctrl-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (75 commits) pinctrl: single: Use a separate lockdep class drivers: pinctrl: add driver for Allwinner A64 SoC pinctrl: Broadcom Northstar2 pinctrl device tree bindings pinctrl: amlogic: Make driver independent from two-domain configuration pinctrl: amlogic: Separate some pin functions for Meson8 / Meson8b pinctrl: at91: use __maybe_unused to hide pm functions pinctrl: sh-pfc: core: don't open code of_device_get_match_data() pinctrl: uniphier: rename CONFIG options and file names pinctrl: sunxi: make A80 explicitly non-modular pinctrl: stm32: make explicitly non-modular pinctrl: sh-pfc: make explicitly non-modular pinctrl: meson: make explicitly non-modular pinctrl: pinctrl-mt6397 driver explicitly non-modular pinctrl: sunxi: does not need module.h pinctrl: pxa2xx: export symbols pinctrl: sunxi: Change mux setting on PI irq pins pinctrl: sunxi: Remove non existing irq's pinctrl: imx: attach iomuxc device to gpr syscon pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing pinctrl: lpc1850-scu: document nxp,gpio-pin-interrupt ... commit 4d3ac6662452060721599a3392bc2f524af984cb Author: Vladimir Zapolskiy Date: Sun Mar 6 03:21:35 2016 +0200 clk: bcm2835: fix check of error code returned by devm_ioremap_resource() The change fixes potential oops while accessing iomem on invalid address, if devm_ioremap_resource() fails due to some reason. The devm_ioremap_resource() function returns ERR_PTR() and never returns NULL, which makes useless a following check for NULL. Signed-off-by: Vladimir Zapolskiy Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates") Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835-aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8087b5b90b2aa0a307e57e1a209a91d60da268b Author: Simon Horman Date: Tue Mar 8 09:48:55 2016 +0900 clk: renesas: div6: use RENESAS for #define Name the #define guarding compilation of this header __RENESAS_CLK_DIV6_H__ rather than __SHMOBILE_CLK_DIV6_H__. This is a follow-up to renaming the directory in which this file lives from shmobile to renesas which is in turn part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/renesas/clk-div6.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09c32427c9e9e861e5aeaf9e08ba0b4a3cfca917 Author: Simon Horman Date: Tue Mar 8 09:42:07 2016 +0900 clk: renesas: Rename header file renesas.h This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Along with the above mentioned Kconfig changes it seems appropriate to also rename files. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd arch/arm/mach-shmobile/pm-rmobile.c | 2 +- arch/arm/mach-shmobile/setup-r8a7778.c | 2 +- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +- drivers/clk/renesas/clk-mstp.c | 2 +- drivers/clk/renesas/clk-r8a73a4.c | 2 +- drivers/clk/renesas/clk-r8a7740.c | 2 +- drivers/clk/renesas/clk-r8a7778.c | 2 +- drivers/clk/renesas/clk-r8a7779.c | 2 +- drivers/clk/renesas/clk-rcar-gen2.c | 2 +- drivers/clk/renesas/clk-rz.c | 2 +- drivers/clk/renesas/clk-sh73a0.c | 2 +- include/linux/clk/renesas.h | 35 ++++++++++++++++++++++++++++++++ include/linux/clk/shmobile.h | 35 -------------------------------- 14 files changed, 47 insertions(+), 47 deletions(-) commit 1a4be38a3a46898fee61b3ec1631d273dd66fcf2 Merge: c51e034 c1f415c Author: Dave Airlie Date: Wed Mar 16 11:09:26 2016 +1000 Merge tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel into drm-next * tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel: (27 commits) drm: atomic helper: do not unreference error pointer drm/edid: Extract SADs properly from multiple audio data blocks drm: fix blob pointer check drm: introduce pipe color correction properties drm/atomic: Clean up update_connector_routing. drm/atomic: Clean up steal_encoder, v2. drm/atomic: Handle encoder assignment conflicts in a separate check, v3. drm/atomic: Handle encoder stealing from set_config better. drm/atomic: Always call steal_encoder, v2. drm/ast: removed optional dummy crtc mode_fixup function. drm/bochs: removed optional dummy crtc mode_fixup function. drm/fsl-dcu: removed optional dummy crtc mode_fixup function. drm/virtio: removed optional dummy crtc mode_fixup function. drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function. drm/atmel-hlcdc: remove optional dummy crtc mode_fixup function. drm/sti: removed optional dummy crtc mode_fixup function. drm/shmobile: removed optional dummy crtc mode_fixup function. drm/msm/mdp: removed optional dummy crtc mode_fixup function. drm/omapdrm: removed optional dummy crtc mode_fixup function. drm/rcar-du: removed optional dummy crtc mode_fixup function. ... commit c51e034fedb002fcd0c012864d79d131cd629369 Merge: 55f6fca 93fce95 Author: Dave Airlie Date: Wed Mar 16 11:09:00 2016 +1000 Merge tag 'drm-amdkfd-next-fixes-2016-03-15' of git://people.freedesktop.org/~gabbayo/linux into drm-next * tag 'drm-amdkfd-next-fixes-2016-03-15' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers() commit 55f6fca3be37539fbb0a455deae400e04b968cdd Author: Tomi Valkeinen Date: Tue Mar 15 14:55:53 2016 +0200 drm/omap: fix panel/encoder probes The recent changes which removed platform data support from panels & encoders had a few mistakes, causing probes of DVI connector and DSI command mode panels to fail every time due to missing '!'. Fix the if()s. Signed-off-by: Tomi Valkeinen Reported-by: Laurent Pinchart Signed-off-by: Dave Airlie drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4d2508a55990c9b0fc1afb2c2cc5636712fd30f7 Author: Arnd Bergmann Date: Tue Mar 15 16:46:12 2016 -0700 ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props gcc-6.0 notices that the use of the property_entry in this file that was recently introduced cannot work right, as we initialize the wrong field: raumfeld.c:387:3: error: the address of 'raumfeld_rotary_encoder_steps' will always evaluate as 'true' [-Werror=address] DEV_PROP_U32, 1, &raumfeld_rotary_encoder_steps, }, ^~~~~~~~~~~~ raumfeld.c:389:3: error: the address of 'raumfeld_rotary_encoder_axis' will always evaluate as 'true' [-Werror=address] DEV_PROP_U32, 1, &raumfeld_rotary_encoder_axis, }, ^~~~~~~~~~~~ raumfeld.c:391:3: error: the address of 'raumfeld_rotary_encoder_relative_axis' will always evaluate as 'true' [-Werror=address] DEV_PROP_U32, 1, &raumfeld_rotary_encoder_relative_axis, }, ^~~~~~~~~~~~ The problem appears to stem from relying on an old definition of 'struct property', but it has changed several times since the code could have last been correct. This changes the code to use the PROPERTY_ENTRY_INTEGER() macro instead, which works fine for the current definition and is a safer way of doing the initialization. Signed-off-by: Arnd Bergmann Fixes: a9e340dce3c3 ("Input: rotary_encoder - move away from platform data structure") Signed-off-by: Dmitry Torokhov arch/arm/mach-pxa/raumfeld.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 63c06227a22b098a3849c5c99e836aea161ca0d7 Author: Ian Kent Date: Tue Mar 15 14:58:47 2016 -0700 autofs4: fix string.h include in auto_dev-ioctl.h Since including linux/string.h will now do the right thing remove the conditional check. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/auto_dev-ioctl.h | 5 ----- 1 file changed, 5 deletions(-) commit 8a78d59304102d36a0cd9b4d81e8e48087ffafd2 Author: Ian Kent Date: Tue Mar 15 14:58:45 2016 -0700 autofs4: use pr_xxx() macros directly for logging Use the standard pr_xxx() log macros directly for log prints instead of the AUTOFS_XXX() macros. Signed-off-by: Ian Kent Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 15 ++++----------- fs/autofs4/dev-ioctl.c | 26 +++++++++++++------------- fs/autofs4/expire.c | 24 ++++++++++++------------ fs/autofs4/inode.c | 22 +++++++++++----------- fs/autofs4/root.c | 32 ++++++++++++++++---------------- fs/autofs4/waitq.c | 24 ++++++++++++------------ 6 files changed, 68 insertions(+), 75 deletions(-) commit 90967c87e3383c6b8400803ed8e28f2903e279ec Author: Ian Kent Date: Tue Mar 15 14:58:42 2016 -0700 autofs4: change log print macros to not insert newline Common kernel coding practice is to include the newline of log prints within the log text rather than hidden away in a macro. To avoid introducing inconsistencies as changes are made change the log macros to not include the newline. Signed-off-by: Ian Kent Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 6 +++--- fs/autofs4/dev-ioctl.c | 14 +++++++------- fs/autofs4/expire.c | 24 ++++++++++++------------ fs/autofs4/inode.c | 16 ++++++++-------- fs/autofs4/root.c | 26 +++++++++++++------------- fs/autofs4/waitq.c | 12 ++++++------ 6 files changed, 49 insertions(+), 49 deletions(-) commit cab49f9ed880be69fd8f6a3419347a368ff0ec32 Author: Ian Kent Date: Tue Mar 15 14:58:39 2016 -0700 autofs4: make autofs log prints consistent Use the pr_*() print in AUTOFS_*() macros instead of printks and include the module name in log message macros. Also use the AUTOFS_*() macros everywhere instead of raw printks. Signed-off-by: Ian Kent Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 6 +++--- fs/autofs4/dev-ioctl.c | 2 +- fs/autofs4/inode.c | 12 ++++++------ fs/autofs4/waitq.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) commit 0266725ad4ee0f8fcf2ee73be8e68c4adbf2ac79 Author: Ian Kent Date: Tue Mar 15 14:58:36 2016 -0700 autofs4: fix some white space errors Fix some white space format errors. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 1 - fs/autofs4/inode.c | 2 +- fs/autofs4/root.c | 8 ++++---- fs/autofs4/waitq.c | 3 +-- include/uapi/linux/auto_fs.h | 2 +- include/uapi/linux/auto_fs4.h | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) commit e3cd8067c1cd686fed2fe75f6cf98c62fc6ff57e Author: Ian Kent Date: Tue Mar 15 14:58:33 2016 -0700 autofs4: fix invalid ioctl return in autofs4_root_ioctl_unlocked() The return from an ioctl if an invalid ioctl is passed in should be EINVAL not ENOSYS. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3f67a988c595e1fd5808008cea098a66cfadb9b Author: Ian Kent Date: Tue Mar 15 14:58:30 2016 -0700 autofs4: fix coding style line length in autofs4_wait() The need for this is questionable but checkpatch.pl complains about the line length and it's a straightfoward change. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/waitq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit aa330ddc5393acd32b227918650536070e3a9e54 Author: Ian Kent Date: Tue Mar 15 14:58:28 2016 -0700 autofs4: fix coding style problem in autofs4_get_set_timeout() Refactor autofs4_get_set_timeout() to eliminate coding style error. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit e9a7c2f1a548f34bcaa7640094201e8b29247940 Author: Ian Kent Date: Tue Mar 15 14:58:25 2016 -0700 autofs4: coding style fixes Try and make the coding style completely consistent throughtout the autofs module and inline with kernel coding style recommendations. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/autofs_i.h | 55 ++++++++++++------------ fs/autofs4/dev-ioctl.c | 28 ++++++++----- fs/autofs4/expire.c | 60 ++++++++++++++------------ fs/autofs4/init.c | 10 ++--- fs/autofs4/inode.c | 25 ++++++----- fs/autofs4/root.c | 95 +++++++++++++++++++++++------------------- fs/autofs4/symlink.c | 11 ++--- fs/autofs4/waitq.c | 49 ++++++++++++---------- include/linux/auto_dev-ioctl.h | 1 - include/linux/auto_fs.h | 10 ++--- include/uapi/linux/auto_fs.h | 19 ++++----- include/uapi/linux/auto_fs4.h | 15 ++----- 12 files changed, 190 insertions(+), 188 deletions(-) commit c83aa55d0bb7ec5b07fdf2346af66bc33ba3cb3d Author: Stanislav Kinsburskiy Date: Tue Mar 15 14:58:22 2016 -0700 autofs: show pipe inode in mount options This is required for CRIU (Checkpoint Restart In Userspace) to migrate a mount point when write end in user space is closed. Below is a brief description of the problem. To migrate a non-catatonic autofs mount point, one has to restore the control pipe between kernel and autofs master process. One of the autofs masters is systemd, which closes pipe write end after passing it to the kernel with mount call. To be able to restore the systemd control pipe one has to know which read pipe end in systemd corresponds to the write pipe end in the kernel. The pipe "fd" in mount options is not enough because it was closed and probably replaced by some other descriptor. Thus, some other attribute is required to be able to find the read pipe end. The best attribute to use to find the correct pipe end is inode number becuase it's unique for the whole system and can't be reused while the autofs mount exists. This attribute can also be used to recognize a situation where an autofs mount has no master (no process with specified "pgrp" or no file descriptor with "pipe_ino", specified in autofs mount options). Signed-off-by: Stanislav Kinsburskiy Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2213e9a66bb87d8344a1256b4ef568220d9587fb Author: Ard Biesheuvel Date: Tue Mar 15 14:58:19 2016 -0700 kallsyms: add support for relative offsets in kallsyms address table Similar to how relative extables are implemented, it is possible to emit the kallsyms table in such a way that it contains offsets relative to some anchor point in the kernel image rather than absolute addresses. On 64-bit architectures, it cuts the size of the kallsyms address table in half, since offsets between kernel symbols can typically be expressed in 32 bits. This saves several hundreds of kilobytes of permanent .rodata on average. In addition, the kallsyms address table is no longer subject to dynamic relocation when CONFIG_RELOCATABLE is in effect, so the relocation work done after decompression now doesn't have to do relocation updates for all these values. This saves up to 24 bytes (i.e., the size of a ELF64 RELA relocation table entry) per value, which easily adds up to a couple of megabytes of uncompressed __init data on ppc64 or arm64. Even if these relocation entries typically compress well, the combined size reduction of 2.8 MB uncompressed for a ppc64_defconfig build (of which 2.4 MB is __init data) results in a ~500 KB space saving in the compressed image. Since it is useful for some architectures (like x86) to retain the ability to emit absolute values as well, this patch also adds support for capturing both absolute and relative values when KALLSYMS_ABSOLUTE_PERCPU is in effect, by emitting absolute per-cpu addresses as positive 32-bit values, and addresses relative to the lowest encountered relative symbol as negative values, which are subtracted from the runtime address of this base symbol to produce the actual address. Support for the above is enabled by default for all architectures except IA-64 and Tile-GX, whose symbols are too far apart to capture in this manner. Signed-off-by: Ard Biesheuvel Tested-by: Guenter Roeck Reviewed-by: Kees Cook Tested-by: Kees Cook Cc: Heiko Carstens Cc: Michael Ellerman Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Benjamin Herrenschmidt Cc: Michal Marek Cc: Rusty Russell Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 18 +++++++++++ kernel/kallsyms.c | 42 ++++++++++++++++++++------ scripts/kallsyms.c | 79 ++++++++++++++++++++++++++++++++++++++++++------- scripts/link-vmlinux.sh | 4 +++ scripts/namespace.pl | 2 ++ 5 files changed, 126 insertions(+), 19 deletions(-) commit 8c996940b3be9c3ac40ce558c270817e1722a95b Author: Ard Biesheuvel Date: Tue Mar 15 14:58:15 2016 -0700 kallsyms: don't overload absolute symbol type for percpu symbols Commit c6bda7c988a5 ("kallsyms: fix percpu vars on x86-64 with relocation") overloaded the 'A' (absolute) symbol type to signify that a symbol is not subject to dynamic relocation. However, the original A type does not imply that at all, and depending on the version of the toolchain, many A type symbols are emitted that are in fact relative to the kernel text, i.e., if the kernel is relocated at runtime, these symbols should be updated as well. For instance, on sparc32, the following symbols are emitted as absolute (kindly provided by Guenter Roeck): f035a420 A _etext f03d9000 A _sdata f03de8c4 A jiffies f03f8860 A _edata f03fc000 A __init_begin f041bdc8 A __init_text_end f0423000 A __bss_start f0423000 A __init_end f044457d A __bss_stop f044457d A _end On x86_64, similar behavior can be observed: ffffffff81a00000 A __end_rodata_hpage_align ffffffff81b19000 A __vvar_page ffffffff81d3d000 A _end Even if only a couple of them pass the symbol range check that results in them to be taken into account for the final kallsyms symbol table, it is obvious that 'A' does not mean the symbol does not need to be updated at relocation time, and overloading its meaning to signify that is perhaps not a good idea. So instead, add a new percpu_absolute member to struct sym_entry, and when --absolute-percpu is in effect, use it to record symbols whose addresses should be emitted as final values rather than values that still require relocation at runtime. That way, we can drop the check against the 'A' type. Signed-off-by: Ard Biesheuvel Tested-by: Guenter Roeck Reviewed-by: Kees Cook Tested-by: Kees Cook Cc: Heiko Carstens Cc: Michael Ellerman Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Benjamin Herrenschmidt Cc: Michal Marek Acked-by: Rusty Russell Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/kallsyms.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 4d5d5664c9008c30ade92a56f722223d251883d7 Author: Ard Biesheuvel Date: Tue Mar 15 14:58:12 2016 -0700 x86: kallsyms: disable absolute percpu symbols on !SMP scripts/kallsyms.c has a special --absolute-percpu command line option which deals with the zero based per cpu offsets that are used when building for SMP on x86_64. This means that the option should only be passed in that case, so add a Kconfig symbol with the correct predicate, and use that instead. Signed-off-by: Ard Biesheuvel Tested-by: Guenter Roeck Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Rusty Russell Cc: Heiko Carstens Cc: Michael Ellerman Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Benjamin Herrenschmidt Cc: Michal Marek Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 4 ++++ scripts/link-vmlinux.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 6b8c69e4384b0bcf1936c2137804840212daaf69 Author: Geyslan G. Bem Date: Tue Mar 15 14:58:09 2016 -0700 checkpatch: fix another left brace warning This patch escapes a regex that uses left brace. Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped left brace in regex is deprecated, passed through in regex;" Comment from regcomp.c in Perl source: "Currently we don't warn when the lbrace is at the start of a construct. This catches it in the middle of a literal string, or when it's the first thing after something like "\b"." This works as a complement to 4e5d56bd ("checkpatch: fix left brace warning"). Signed-off-by: Geyslan G. Bem Signed-off-by: Joe Perches Suggested-by: Peter Senna Tschudin Cc: Eddie Kovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 207a8e8465f91dc5ab12151ee36db3d509a4928a Author: Joe Perches Date: Tue Mar 15 14:58:06 2016 -0700 checkpatch: improve UNSPECIFIED_INT test for bare signed/unsigned uses Improve the test to allow casts to (unsigned) or (signed) to be found and fixed if desired. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit a1ce18e4f941d2039aa3bdeee17db968919eac2f Author: Joe Perches Date: Tue Mar 15 14:58:03 2016 -0700 checkpatch: warn on bare unsigned or signed declarations without int Kernel style prefers "unsigned int " over "unsigned " and "signed int " over "signed ". Emit a warning for these simple signed/unsigned declarations. Fix it too if desired. Signed-off-by: Joe Perches Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 42e152931deba7500e756c39e8e2df2e244860f2 Author: Joe Perches Date: Tue Mar 15 14:58:01 2016 -0700 checkpatch: exclude asm volatile from complex macro check asm volatile and all its variants like __asm__ __volatile__ ("") are reported as errors with "Macros with with complex values should be enclosed in parentheses". Make an exception for these asm volatile macro definitions by converting the "asm volatile" to "asm_volatile" so it appears as a single function call and the error isn't reported. Signed-off-by: Joe Perches Reported-by: Jeff Merkey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) commit 9cf7666ace654cc50f815e95f0415e3fcdd6fcfe Author: Johannes Weiner Date: Tue Mar 15 14:57:58 2016 -0700 mm: memcontrol: drop unnecessary lru locking from mem_cgroup_migrate() Migration accounting in the memory controller used to have to handle both oldpage and newpage being on the LRU already; fuse's page cache replacement used to pass a recycled newpage that had been uncharged but not freed and removed from the LRU, and the memcg migration code used to uncharge oldpage to "pass on" the existing charge to newpage. Nowadays, pages are no longer uncharged when truncated from the page cache, but rather only at free time, so if a LRU page is recycled in page cache replacement it'll also still be charged. And we bail out of the charge transfer altogether in that case. Tell commit_charge() that we know newpage is not on the LRU, to avoid taking the zone->lru_lock unnecessarily from the migration path. But also, oldpage is no longer uncharged inside migration. We only use oldpage for its page->mem_cgroup and page size, so we don't care about its LRU state anymore either. Remove any mention from the kernel doc. Signed-off-by: Johannes Weiner Suggested-by: Hugh Dickins Acked-by: Vladimir Davydov Acked-by: Michal Hocko Cc: Mateusz Guzik Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 74485cf2bc85d2a10c3653fff4fe956db67ce2a9 Author: Johannes Weiner Date: Tue Mar 15 14:57:54 2016 -0700 mm: migrate: consolidate mem_cgroup_migrate() calls Rather than scattering mem_cgroup_migrate() calls all over the place, have a single call from a safe place where every migration operation eventually ends up in - migrate_page_copy(). Signed-off-by: Johannes Weiner Suggested-by: Hugh Dickins Acked-by: Vladimir Davydov Acked-by: Michal Hocko Cc: Mateusz Guzik Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7cf91a98e607c2f935dbcc177d70011e95b8faff Author: Joonsoo Kim Date: Tue Mar 15 14:57:51 2016 -0700 mm/compaction: speed up pageblock_pfn_to_page() when zone is contiguous There is a performance drop report due to hugepage allocation and in there half of cpu time are spent on pageblock_pfn_to_page() in compaction [1]. In that workload, compaction is triggered to make hugepage but most of pageblocks are un-available for compaction due to pageblock type and skip bit so compaction usually fails. Most costly operations in this case is to find valid pageblock while scanning whole zone range. To check if pageblock is valid to compact, valid pfn within pageblock is required and we can obtain it by calling pageblock_pfn_to_page(). This function checks whether pageblock is in a single zone and return valid pfn if possible. Problem is that we need to check it every time before scanning pageblock even if we re-visit it and this turns out to be very expensive in this workload. Although we have no way to skip this pageblock check in the system where hole exists at arbitrary position, we can use cached value for zone continuity and just do pfn_to_page() in the system where hole doesn't exist. This optimization considerably speeds up in above workload. Before vs After Max: 1096 MB/s vs 1325 MB/s Min: 635 MB/s 1015 MB/s Avg: 899 MB/s 1194 MB/s Avg is improved by roughly 30% [2]. [1]: http://www.spinics.net/lists/linux-mm/msg97378.html [2]: https://lkml.org/lkml/2015/12/9/23 [akpm@linux-foundation.org: don't forget to restore zone->contiguous on error path, per Vlastimil] Signed-off-by: Joonsoo Kim Reported-by: Aaron Lu Acked-by: Vlastimil Babka Tested-by: Aaron Lu Cc: Mel Gorman Cc: Rik van Riel Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 6 ---- include/linux/memory_hotplug.h | 3 ++ include/linux/mmzone.h | 2 ++ mm/compaction.c | 43 ----------------------- mm/internal.h | 12 +++++++ mm/memory_hotplug.c | 13 +++++-- mm/page_alloc.c | 78 +++++++++++++++++++++++++++++++++++++++++- 7 files changed, 105 insertions(+), 52 deletions(-) commit e1409c325fdc1fef7b3d8025c51892355f065d15 Author: Joonsoo Kim Date: Tue Mar 15 14:57:48 2016 -0700 mm/compaction: pass only pageblock aligned range to pageblock_pfn_to_page pageblock_pfn_to_page() is used to check there is valid pfn and all pages in the pageblock is in a single zone. If there is a hole in the pageblock, passing arbitrary position to pageblock_pfn_to_page() could cause to skip whole pageblock scanning, instead of just skipping the hole page. For deterministic behaviour, it's better to always pass pageblock aligned range to pageblock_pfn_to_page(). It will also help further optimization on pageblock_pfn_to_page() in the following patch. Signed-off-by: Joonsoo Kim Cc: Aaron Lu Cc: David Rientjes Cc: Mel Gorman Cc: Rik van Riel Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 623446e4dc45b37740268165107cc63abb3022f0 Author: Joonsoo Kim Date: Tue Mar 15 14:57:45 2016 -0700 mm/compaction: fix invalid free_pfn and compact_cached_free_pfn free_pfn and compact_cached_free_pfn are the pointer that remember restart position of freepage scanner. When they are reset or invalid, we set them to zone_end_pfn because freepage scanner works in reverse direction. But, because zone range is defined as [zone_start_pfn, zone_end_pfn), zone_end_pfn is invalid to access. Therefore, we should not store it to free_pfn and compact_cached_free_pfn. Instead, we need to store zone_end_pfn - 1 to them. There is one more thing we should consider. Freepage scanner scan reversely by pageblock unit. If free_pfn and compact_cached_free_pfn are set to middle of pageblock, it regards that sitiation as that it already scans front part of pageblock so we lose opportunity to scan there. To fix-up, this patch do round_down() to guarantee that reset position will be pageblock aligned. Note that thanks to the current pageblock_pfn_to_page() implementation, actual access to zone_end_pfn doesn't happen until now. But, following patch will change pageblock_pfn_to_page() so this patch is needed from now on. Signed-off-by: Joonsoo Kim Acked-by: David Rientjes Acked-by: Vlastimil Babka Cc: Aaron Lu Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5aa174801fc85b4b48a2520b2a50ee78990b7925 Author: Alexander Kuleshov Date: Tue Mar 15 14:57:42 2016 -0700 mm/memblock.c: remove unnecessary memblock_type variable We define struct memblock_type *type in the memblock_add_region() and memblock_reserve_region() functions only for passing it to the memlock_add_range() and memblock_reserve_range() functions. Let's remove these variables and will pass a type directly. Signed-off-by: Alexander Kuleshov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a75e1f637cf137f82cf025321e7a53adeeed7029 Author: Christian Borntraeger Date: Tue Mar 15 14:57:39 2016 -0700 x86: also use debug_pagealloc_enabled() for free_init_pages we want to couple all debugging features with debug_pagealloc_enabled() and not with the config option CONFIG_DEBUG_PAGEALLOC. Signed-off-by: Christian Borntraeger Suggested-by: David Rientjes Acked-by: David Rientjes Reviewed-by: Thomas Gleixner Cc: Laura Abbott Cc: Joonsoo Kim Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 10917b8393521b608f26294b3815261d472f7e9b Author: Christian Borntraeger Date: Tue Mar 15 14:57:36 2016 -0700 s390: query dynamic DEBUG_PAGEALLOC setting We can use debug_pagealloc_enabled() to check if we can map the identity mapping with 1MB/2GB pages as well as to print the current setting in dump_stack. Signed-off-by: Christian Borntraeger Reviewed-by: Heiko Carstens Cc: Thomas Gleixner Acked-by: David Rientjes Cc: Laura Abbott Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/dumpstack.c | 6 +++--- arch/s390/mm/vmem.c | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) commit 288cf3c64e4522d28349de5345348574cbe9df83 Author: Christian Borntraeger Date: Tue Mar 15 14:57:33 2016 -0700 x86: query dynamic DEBUG_PAGEALLOC setting We can use debug_pagealloc_enabled() to check if we can map the identity mapping with 2MB pages. We can also add the state into the dump_stack output. The patch does not touch the code for the 1GB pages, which ignored CONFIG_DEBUG_PAGEALLOC. Do we need to fence this as well? Signed-off-by: Christian Borntraeger Reviewed-by: Thomas Gleixner Acked-by: David Rientjes Cc: Laura Abbott Cc: Joonsoo Kim Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/dumpstack.c | 5 ++--- arch/x86/mm/init.c | 7 ++++--- arch/x86/mm/pageattr.c | 14 ++++---------- 3 files changed, 10 insertions(+), 16 deletions(-) commit 8df651c7059e7980f08430d4ebbd134b046657ee Author: Kirill A. Shutemov Date: Tue Mar 15 14:57:30 2016 -0700 thp: cleanup split_huge_page() After one of bugfixes to freeze_page(), we don't have freezed pages in rmap, therefore mapcount of all subpages of freezed THP is zero. And we have assert for that. Let's drop code which deal with non-zero mapcount of subpages. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 88193f7ce6657ec4197b1f26b73b37197373b8e6 Author: Matthew Wilcox Date: Tue Mar 15 14:57:28 2016 -0700 mm: use linear_page_index() in do_fault() do_fault() assumes that PAGE_SIZE is the same as PAGE_CACHE_SIZE. Use linear_page_index() to calculate pgoff in the correct units. Signed-off-by: Matthew Wilcox Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fdf1cdb91b6ab7a8a91df68c384f36b8a0909cab Author: Johannes Weiner Date: Tue Mar 15 14:57:25 2016 -0700 mm: remove unnecessary uses of lock_page_memcg() There are several users that nest lock_page_memcg() inside lock_page() to prevent page->mem_cgroup from changing. But the page lock prevents pages from moving between cgroups, so that is unnecessary overhead. Remove lock_page_memcg() in contexts with locked contexts and fix the debug code in the page stat functions to be okay with the page lock. Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 12 +++++++----- mm/filemap.c | 7 +------ mm/page-writeback.c | 2 -- mm/truncate.c | 3 --- mm/vmscan.c | 4 ---- 5 files changed, 8 insertions(+), 20 deletions(-) commit 62cccb8c8e7a3ca233f49d5e7dcb1557d25465cd Author: Johannes Weiner Date: Tue Mar 15 14:57:22 2016 -0700 mm: simplify lock_page_memcg() Now that migration doesn't clear page->mem_cgroup of live pages anymore, it's safe to make lock_page_memcg() and the memcg stat functions take pages, and spare the callers from memcg objects. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Johannes Weiner Suggested-by: Vladimir Davydov Acked-by: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 18 ++++++++--------- fs/xfs/xfs_aops.c | 7 +++---- include/linux/memcontrol.h | 35 ++++++++++++++++----------------- include/linux/mm.h | 5 ++--- include/linux/pagemap.h | 3 +-- mm/filemap.c | 20 ++++++++----------- mm/memcontrol.c | 23 +++++++++------------- mm/page-writeback.c | 49 ++++++++++++++++++++-------------------------- mm/rmap.c | 16 ++++++--------- mm/truncate.c | 9 ++++----- mm/vmscan.c | 11 +++++------ mm/workingset.c | 9 ++++----- 12 files changed, 88 insertions(+), 117 deletions(-) commit 6a93ca8fde3cfce0f00f02281139a377c83e8d8c Author: Johannes Weiner Date: Tue Mar 15 14:57:19 2016 -0700 mm: migrate: do not touch page->mem_cgroup of live pages Changing a page's memcg association complicates dealing with the page, so we want to limit this as much as possible. Page migration e.g. does not have to do that. Just like page cache replacement, it can forcibly charge a replacement page, and then uncharge the old page when it gets freed. Temporarily overcharging the cgroup by a single page is not an issue in practice, and charging is so cheap nowadays that this is much preferrable to the headache of messing with live pages. The only place that still changes the page->mem_cgroup binding of live pages is when pages move along with a task to another cgroup. But that path isolates the page from the LRU, takes the page lock, and the move lock (lock_page_memcg()). That means page->mem_cgroup is always stable in callers that have the page isolated from the LRU or locked. Lighter unlocked paths, like writeback accounting, can use lock_page_memcg(). [akpm@linux-foundation.org: fix build] [vdavydov@virtuozzo.com: fix lockdep splat] Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Johannes Weiner Cc: Michal Hocko Cc: Greg Thelen Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 4 ++-- include/linux/mm.h | 9 --------- mm/filemap.c | 2 +- mm/memcontrol.c | 13 +++++++------ mm/migrate.c | 15 +++++++++------ mm/shmem.c | 2 +- 6 files changed, 20 insertions(+), 25 deletions(-) commit 23047a96d7cfcfca1a6d026ecaec526ea4803e9e Author: Johannes Weiner Date: Tue Mar 15 14:57:16 2016 -0700 mm: workingset: per-cgroup cache thrash detection Cache thrash detection (see a528910e12ec "mm: thrash detection-based file cache sizing" for details) currently only works on the system level, not inside cgroups. Worse, as the refaults are compared to the global number of active cache, cgroups might wrongfully get all their refaults activated when their pages are hotter than those of others. Move the refault machinery from the zone to the lruvec, and then tag eviction entries with the memcg ID. This makes the thrash detection work correctly inside cgroups. [sergey.senozhatsky@gmail.com: do not return from workingset_activation() with locked rcu and page] Signed-off-by: Johannes Weiner Signed-off-by: Sergey Senozhatsky Reviewed-by: Vladimir Davydov Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 56 ++++++++++++++++++++++++++++---- include/linux/mmzone.h | 13 ++++---- mm/memcontrol.c | 25 --------------- mm/vmscan.c | 18 +++++------ mm/workingset.c | 79 ++++++++++++++++++++++++++++++++++++++++------ 5 files changed, 134 insertions(+), 57 deletions(-) commit 612e44939c3c77245ac80843c0c7876c8cf97282 Author: Johannes Weiner Date: Tue Mar 15 14:57:13 2016 -0700 mm: workingset: eviction buckets for bigmem/lowbit machines For per-cgroup thrash detection, we need to store the memcg ID inside the radix tree cookie as well. However, on 32 bit that doesn't leave enough bits for the eviction timestamp to cover the necessary range of recently evicted pages. The radix tree entry would look like this: [ RADIX_TREE_EXCEPTIONAL(2) | ZONEID(2) | MEMCGID(16) | EVICTION(12) ] 12 bits means 4096 pages, means 16M worth of recently evicted pages. But refaults are actionable up to distances covering half of memory. To not miss refaults, we have to stretch out the range at the cost of how precisely we can tell when a page was evicted. This way we can shave off lower bits from the eviction timestamp until the necessary range is covered. E.g. grouping evictions into 1M buckets (256 pages) will stretch the longest representable refault distance to 4G. This patch implements eviction buckets that are automatically sized according to the available bits and the necessary refault range, in preparation for per-cgroup thrash detection. The maximum actionable distance is currently half of memory, but to support memory hotplug of up to 200% of boot-time memory, we size the buckets to cover double the distance. Beyond that, thrashing won't be detectable anymore. During boot, the kernel will print out the exact parameters, like so: [ 0.113929] workingset: timestamp_bits=12 max_order=18 bucket_order=6 In this example, there are 12 radix entry bits available for the eviction timestamp, to cover a maximum distance of 2^18 pages (this is a 1G machine). Consequently, evictions must be grouped into buckets of 2^6 pages, or 256K. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 162453bfbdf4c0f58cb3058aad9ad8cda1044cda Author: Johannes Weiner Date: Tue Mar 15 14:57:10 2016 -0700 mm: workingset: separate shadow unpacking and refault calculation Per-cgroup thrash detection will need to derive a live memcg from the eviction cookie, and doing that inside unpack_shadow() will get nasty with the reference handling spread over two functions. In preparation, make unpack_shadow() clearly about extracting static data, and let workingset_refault() do all the higher-level handling. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 689c94f03ae251181725fe853b4ffc870f05c7fe Author: Johannes Weiner Date: Tue Mar 15 14:57:07 2016 -0700 mm: workingset: #define radix entry eviction mask This is a compile-time constant, no need to calculate it on refault. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 81f8c3a461d16f0355ced3d56d6d1bb5923207a1 Author: Johannes Weiner Date: Tue Mar 15 14:57:04 2016 -0700 mm: memcontrol: generalize locking for the page->mem_cgroup binding These patches tag the page cache radix tree eviction entries with the memcg an evicted page belonged to, thus making per-cgroup LRU reclaim work properly and be as adaptive to new cache workingsets as global reclaim already is. This should have been part of the original thrash detection patch series, but was deferred due to the complexity of those patches. This patch (of 5): So far the only sites that needed to exclude charge migration to stabilize page->mem_cgroup have been per-cgroup page statistics, hence the name mem_cgroup_begin_page_stat(). But per-cgroup thrash detection will add another site that needs to ensure page->mem_cgroup lifetime. Rename these locking functions to the more generic lock_page_memcg() and unlock_page_memcg(). Since charge migration is a cgroup1 feature only, we might be able to delete it at some point, and these now easy to identify locking sites along with it. Signed-off-by: Johannes Weiner Suggested-by: Vladimir Davydov Acked-by: Vladimir Davydov Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/buffer.c | 14 +++++++------- fs/xfs/xfs_aops.c | 8 ++++---- include/linux/memcontrol.h | 16 +++++++++++----- mm/filemap.c | 12 ++++++------ mm/memcontrol.c | 34 ++++++++++++++-------------------- mm/page-writeback.c | 28 ++++++++++++++-------------- mm/rmap.c | 8 ++++---- mm/truncate.c | 6 +++--- mm/vmscan.c | 8 ++++---- 9 files changed, 67 insertions(+), 67 deletions(-) commit 0db2cb8da89d991762ec2aece45e55ceaee34664 Author: Michal Hocko Date: Tue Mar 15 14:57:01 2016 -0700 mm, vmscan: make zone_reclaimable_pages more precise zone_reclaimable_pages() is used in should_reclaim_retry() which uses it to calculate the target for the watermark check. This means that precise numbers are important for the correct decision. zone_reclaimable_pages uses zone_page_state which can contain stale data with per-cpu diffs not synced yet (the last vmstat_update might have run 1s in the past). Use zone_page_state_snapshot() in zone_reclaimable_pages() instead. None of the current callers is in a hot path where getting the precise value (which involves per-cpu iteration) would cause an unreasonable overhead. Signed-off-by: Michal Hocko Signed-off-by: Tetsuo Handa Suggested-by: David Rientjes Acked-by: David Rientjes Acked-by: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d7206a70af5c094446927b5dea8704f0f96303e3 Author: Naoya Horiguchi Date: Tue Mar 15 14:56:58 2016 -0700 mm/madvise: update comment on sys_madvise() Some new MADV_* advices are not documented in sys_madvise() comment. So let's update it. [akpm@linux-foundation.org: modifications suggested by Michal] Signed-off-by: Naoya Horiguchi Acked-by: Michal Hocko Cc: Minchan Kim Cc: "Kirill A. Shutemov" Cc: Jason Baron Cc: Chen Gong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit cecf257b62e39eab0e802e91c62ae5679673db02 Author: Vladimir Davydov Date: Tue Mar 15 14:56:55 2016 -0700 mm: vmscan: do not clear SHRINKER_NUMA_AWARE if nr_node_ids == 1 Currently, on shrinker registration we clear SHRINKER_NUMA_AWARE if there's the only NUMA node present. The comment states that this will allow us to save some small loop time later. It used to be true when this code was added (see commit 1d3d4437eae1b ("vmscan: per-node deferred work")), but since commit 6b4f7799c6a57 ("mm: vmscan: invoke slab shrinkers from shrink_zone()") it doesn't make any difference. Anyway, running on non-NUMA machine shouldn't make a shrinker NUMA unaware, so zap this hunk. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 8 -------- 1 file changed, 8 deletions(-) commit 703fc13a3f6615e29ce3eb862275d7b58a5d03ba Author: Vitaly Kuznetsov Date: Tue Mar 15 14:56:52 2016 -0700 xen_balloon: support memory auto onlining policy Add support for the newly added kernel memory auto onlining policy to Xen ballon driver. Signed-off-by: Vitaly Kuznetsov Suggested-by: Daniel Kiper Reviewed-by: Daniel Kiper Acked-by: David Vrabel Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: Daniel Kiper Cc: Dan Williams Cc: Tang Chen Cc: David Rientjes Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: Mel Gorman Cc: "K. Y. Srinivasan" Cc: Igor Mammedov Cc: Kay Sievers Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/xen/Kconfig | 23 +++++++++++++++-------- drivers/xen/balloon.c | 11 ++++++++++- 2 files changed, 25 insertions(+), 9 deletions(-) commit 31bc3858ea3ebcc3157b3f5f0e624c5962f5a7a6 Author: Vitaly Kuznetsov Date: Tue Mar 15 14:56:48 2016 -0700 memory-hotplug: add automatic onlining policy for the newly added memory Currently, all newly added memory blocks remain in 'offline' state unless someone onlines them, some linux distributions carry special udev rules like: SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online" to make this happen automatically. This is not a great solution for virtual machines where memory hotplug is being used to address high memory pressure situations as such onlining is slow and a userspace process doing this (udev) has a chance of being killed by the OOM killer as it will probably require to allocate some memory. Introduce default policy for the newly added memory blocks in /sys/devices/system/memory/auto_online_blocks file with two possible values: "offline" which preserves the current behavior and "online" which causes all newly added memory blocks to go online as soon as they're added. The default is "offline". Signed-off-by: Vitaly Kuznetsov Reviewed-by: Daniel Kiper Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: Daniel Kiper Cc: Dan Williams Cc: Tang Chen Cc: David Vrabel Acked-by: David Rientjes Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: Mel Gorman Cc: "K. Y. Srinivasan" Cc: Igor Mammedov Cc: Kay Sievers Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/memory-hotplug.txt | 23 ++++++++++++++++++++--- drivers/base/memory.c | 34 +++++++++++++++++++++++++++++++++- drivers/xen/balloon.c | 2 +- include/linux/memory.h | 3 +++ include/linux/memory_hotplug.h | 4 +++- mm/memory_hotplug.c | 17 +++++++++++++++-- 6 files changed, 75 insertions(+), 8 deletions(-) commit 9cb65bc3b1114004e2ccee5939031325c7bf16e8 Author: Mika Penttilä Date: Tue Mar 15 14:56:45 2016 -0700 mm/memory.c: make apply_to_page_range() more robust Arm and arm64 used to trigger this BUG_ON() - this has now been fixed. But a WARN_ON() here is sufficient to catch future buggy callers. Signed-off-by: Mika Penttilä Reviewed-by: Pekka Enberg Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4355c018c2ba8017592520573e76ad376ad656db Author: Liang Chen Date: Tue Mar 15 14:56:42 2016 -0700 mm/mempolicy.c: skip VM_HUGETLB and VM_MIXEDMAP VMA for lazy mbind VM_HUGETLB and VM_MIXEDMAP vma needs to be excluded to avoid compound pages being marked for migration and unexpected COWs when handling hugetlb fault. Thanks to Naoya Horiguchi for reminding me on these checks. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo Suggested-by: Naoya Horiguchi Acked-by: David Rientjes Cc: SeongJae Park Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0b94f17507dc3a92f091812e5bff890c8845d1a3 Author: Wang Xiaoqiang Date: Tue Mar 15 14:56:39 2016 -0700 mm/memory-failure.c: remove useless "undef"s Remove the useless #undef, since the corresponding #define has already been removed. Signed-off-by: Wang Xiaoqiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 2 -- 1 file changed, 2 deletions(-) commit 23a003bfd23ea9ea0b7756b920e51f64b284b468 Author: Naoya Horiguchi Date: Tue Mar 15 14:56:36 2016 -0700 mm/madvise: pass return code of memory_failure() to userspace Currently the return value of memory_failure() is not passed to userspace when madvise(MADV_HWPOISON) is used. This is inconvenient for test programs that want to know the result of error handling. So let's return it to the caller as we already do in the MADV_SOFT_OFFLINE case. Signed-off-by: Naoya Horiguchi Cc: Chen Gong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5b3810e5c6e1b9a1858464a53b5d72ee050bb918 Author: Vlastimil Babka Date: Tue Mar 15 14:56:33 2016 -0700 mm, sl[au]b: print gfp_flags as strings in slab_out_of_memory() We can now print gfp_flags more human-readable. Make use of this in slab_out_of_memory() for SLUB and SLAB. Also convert the SLAB variant it to pr_warn() along the way. Signed-off-by: Vlastimil Babka Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 10 ++++------ mm/slub.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) commit 1414c7f4f7d72d138fff35f00151d15749b5beda Author: Laura Abbott Date: Tue Mar 15 14:56:30 2016 -0700 mm/page_poisoning.c: allow for zero poisoning By default, page poisoning uses a poison value (0xaa) on free. If this is changed to 0, the page is not only sanitized but zeroing on alloc with __GFP_ZERO can be skipped as well. The tradeoff is that detecting corruption from the poisoning is harder to detect. This feature also cannot be used with hibernation since pages are not guaranteed to be zeroed after hibernation. Credit to Grsecurity/PaX team for inspiring this work Signed-off-by: Laura Abbott Acked-by: Rafael J. Wysocki Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: Michal Hocko Cc: Kees Cook Cc: Mathias Krause Cc: Dave Hansen Cc: Jianyu Zhan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 ++ include/linux/poison.h | 4 ++++ kernel/power/hibernate.c | 17 +++++++++++++++++ mm/Kconfig.debug | 14 ++++++++++++++ mm/page_alloc.c | 11 ++++++++++- mm/page_ext.c | 10 ++++++++-- mm/page_poison.c | 7 +++++-- 7 files changed, 60 insertions(+), 5 deletions(-) commit 8823b1dbc05fab1a8bec275eeae4709257c2661d Author: Laura Abbott Date: Tue Mar 15 14:56:27 2016 -0700 mm/page_poison.c: enable PAGE_POISONING as a separate option Page poisoning is currently set up as a feature if architectures don't have architecture debug page_alloc to allow unmapping of pages. It has uses apart from that though. Clearing of the pages on free provides an increase in security as it helps to limit the risk of information leaks. Allow page poisoning to be enabled as a separate option independent of kernel_map pages since the two features do separate work. Because of how hiberanation is implemented, the checks on alloc cannot occur if hibernation is enabled. The runtime alloc checks can also be enabled with an option when !HIBERNATION. Credit to Grsecurity/PaX team for inspiring this work Signed-off-by: Laura Abbott Cc: Rafael J. Wysocki Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: Michal Hocko Cc: Kees Cook Cc: Mathias Krause Cc: Dave Hansen Cc: Jianyu Zhan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 5 ++ include/linux/mm.h | 9 ++ mm/Kconfig.debug | 25 +++++- mm/Makefile | 2 +- mm/debug-pagealloc.c | 137 ---------------------------- mm/page_alloc.c | 2 + mm/page_poison.c | 173 ++++++++++++++++++++++++++++++++++++ 7 files changed, 214 insertions(+), 139 deletions(-) commit ff8e81163889ac4c7f59e7f7db6377d0c5d8d69c Author: Vlastimil Babka Date: Tue Mar 15 14:56:24 2016 -0700 mm, debug: move bad flags printing to bad_page() Since bad_page() is the only user of the badflags parameter of dump_page_badflags(), we can move the code to bad_page() and simplify a bit. The dump_page_badflags() function is renamed to __dump_page() and can still be called separately from dump_page() for temporary debug prints where page_owner info is not desired. The only user-visible change is that page->mem_cgroup is printed before the bad flags. Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmdebug.h | 3 +-- mm/debug.c | 10 +++------- mm/page_alloc.c | 10 +++++++--- 3 files changed, 11 insertions(+), 12 deletions(-) commit 4e462112e98f9ad6dd62e160f8b14c7df5fed2fc Author: Vlastimil Babka Date: Tue Mar 15 14:56:21 2016 -0700 mm, page_owner: dump page owner info from dump_page() The page_owner mechanism is useful for dealing with memory leaks. By reading /sys/kernel/debug/page_owner one can determine the stack traces leading to allocations of all pages, and find e.g. a buggy driver. This information might be also potentially useful for debugging, such as the VM_BUG_ON_PAGE() calls to dump_page(). So let's print the stored info from dump_page(). Example output: page:ffffea000292f1c0 count:1 mapcount:0 mapping:ffff8800b2f6cc18 index:0x91d flags: 0x1fffff8001002c(referenced|uptodate|lru|mappedtodisk) page dumped because: VM_BUG_ON_PAGE(1) page->mem_cgroup:ffff8801392c5000 page allocated via order 0, migratetype Movable, gfp_mask 0x24213ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD|__GFP_NOWARN|__GFP_NORETRY) [] __alloc_pages_nodemask+0x134/0x230 [] alloc_pages_current+0x88/0x120 [] __page_cache_alloc+0xe6/0x120 [] __do_page_cache_readahead+0xdc/0x240 [] ondemand_readahead+0x135/0x260 [] page_cache_async_readahead+0x6c/0x70 [] generic_file_read_iter+0x3f2/0x760 [] __vfs_read+0xa7/0xd0 page has been migrated, last migrate reason: compaction Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_owner.h | 9 +++++++++ mm/debug.c | 2 ++ mm/page_alloc.c | 1 + mm/page_owner.c | 25 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+) commit 7cd12b4abfd2f8f42414c520bbd051a5b7dc7a8c Author: Vlastimil Babka Date: Tue Mar 15 14:56:18 2016 -0700 mm, page_owner: track and print last migrate reason During migration, page_owner info is now copied with the rest of the page, so the stacktrace leading to free page allocation during migration is overwritten. For debugging purposes, it might be however useful to know that the page has been migrated since its initial allocation. This might happen many times during the lifetime for different reasons and fully tracking this, especially with stacktraces would incur extra memory costs. As a compromise, store and print the migrate_reason of the last migration that occurred to the page. This is enough to distinguish compaction, numa balancing etc. Example page_owner entry after the patch: Page allocated via order 0, mask 0x24200ca(GFP_HIGHUSER_MOVABLE) PFN 628753 type Movable Block 1228 type Movable Flags 0x1fffff80040030(dirty|lru|swapbacked) [] __alloc_pages_nodemask+0x134/0x230 [] alloc_pages_vma+0xb5/0x250 [] shmem_alloc_page+0x61/0x90 [] shmem_getpage_gfp+0x678/0x960 [] shmem_fallocate+0x329/0x440 [] vfs_fallocate+0x140/0x230 [] SyS_fallocate+0x44/0x70 [] entry_SYSCALL_64_fastpath+0x12/0x71 Page has been migrated, last migrate reason: compaction Signed-off-by: Vlastimil Babka Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 6 +++++- include/linux/page_ext.h | 1 + include/linux/page_owner.h | 9 +++++++++ mm/debug.c | 11 +++++++++++ mm/migrate.c | 10 +++++++--- mm/page_owner.c | 17 +++++++++++++++++ 6 files changed, 50 insertions(+), 4 deletions(-) commit d435edca928805074dae005ab9a42d9fa60fc702 Author: Vlastimil Babka Date: Tue Mar 15 14:56:15 2016 -0700 mm, page_owner: copy page owner info during migration The page_owner mechanism stores gfp_flags of an allocation and stack trace that lead to it. During page migration, the original information is practically replaced by the allocation of free page as the migration target. Arguably this is less useful and might lead to all the page_owner info for migratable pages gradually converge towards compaction or numa balancing migrations. It has also lead to inaccuracies such as one fixed by commit e2cfc91120fa ("mm/page_owner: set correct gfp_mask on page_owner"). This patch thus introduces copying the page_owner info during migration. However, since the fact that the page has been migrated from its original place might be useful for debugging, the next patch will introduce a way to track that information as well. Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page_owner.h | 10 +++++++++- mm/migrate.c | 3 +++ mm/page_owner.c | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) commit 7dd80b8af0bcd705a9ef2fa272c082882616a499 Author: Vlastimil Babka Date: Tue Mar 15 14:56:12 2016 -0700 mm, page_owner: convert page_owner_inited to static key CONFIG_PAGE_OWNER attempts to impose negligible runtime overhead when enabled during compilation, but not actually enabled during runtime by boot param page_owner=on. This overhead can be further reduced using the static key mechanism, which this patch does. Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/page_owner.txt | 9 +++++---- include/linux/page_owner.h | 22 ++++++++++------------ mm/page_owner.c | 9 +++++---- mm/vmstat.c | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) commit 60f30350fd69a3e4d5f0f45937d3274c22565134 Author: Vlastimil Babka Date: Tue Mar 15 14:56:08 2016 -0700 mm, page_owner: print migratetype of page and pageblock, symbolic flags The information in /sys/kernel/debug/page_owner includes the migratetype of the pageblock the page belongs to. This is also checked against the page's migratetype (as declared by gfp_flags during its allocation), and the page is reported as Fallback if its migratetype differs from the pageblock's one. t This is somewhat misleading because in fact fallback allocation is not the only reason why these two can differ. It also doesn't direcly provide the page's migratetype, although it's possible to derive that from the gfp_flags. It's arguably better to print both page and pageblock's migratetype and leave the interpretation to the consumer than to suggest fallback allocation as the only possible reason. While at it, we can print the migratetypes as string the same way as /proc/pagetypeinfo does, as some of the numeric values depend on kernel configuration. For that, this patch moves the migratetype_names array from #ifdef CONFIG_PROC_FS part of mm/vmstat.c to mm/page_alloc.c and exports it. With the new format strings for flags, we can now also provide symbolic page and gfp flags in the /sys/kernel/debug/page_owner file. This replaces the positional printing of page flags as single letters, which might have looked nicer, but was limited to a subset of flags, and required the user to remember the letters. Example page_owner entry after the patch: Page allocated via order 0, mask 0x24213ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD|__GFP_NOWARN|__GFP_NORETRY) PFN 520 type Movable Block 1 type Movable Flags 0xfffff8001006c(referenced|uptodate|lru|active|mappedtodisk) [] __alloc_pages_nodemask+0x134/0x230 [] alloc_pages_current+0x88/0x120 [] __page_cache_alloc+0xe6/0x120 [] __do_page_cache_readahead+0xdc/0x240 [] ondemand_readahead+0x135/0x260 [] page_cache_sync_readahead+0x31/0x50 [] generic_file_read_iter+0x453/0x760 [] __vfs_read+0xa7/0xd0 Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 3 +++ mm/page_alloc.c | 13 +++++++++++++ mm/page_owner.c | 24 +++++++----------------- mm/vmstat.c | 13 ------------- 4 files changed, 23 insertions(+), 30 deletions(-) commit a0795cd416d1142117695f932a9690611ae0edbb Author: Vlastimil Babka Date: Tue Mar 15 14:56:05 2016 -0700 mm, oom: print symbolic gfp_flags in oom warning It would be useful to translate gfp_flags into string representation when printing in case of an OOM, especially as the flags have been undergoing some changes recently and the script ./scripts/gfp-translate needs a matching source version to be accurate. Example output: a.out invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|GFP_ZERO), order=0, om_score_adj=0 Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c5c990e8a1fe313a5ab13f069f1410acf932927b Author: Vlastimil Babka Date: Tue Mar 15 14:56:02 2016 -0700 mm, page_alloc: print symbolic gfp_flags on allocation failure It would be useful to translate gfp_flags into string representation when printing in case of an allocation failure, especially as the flags have been undergoing some changes recently and the script ./scripts/gfp-translate needs a matching source version to be accurate. Example output: stapio: page allocation failure: order:9, mode:0x2080020(GFP_ATOMIC) Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b8eceeb99014cf5ae90d7f2c606d36074baa73ae Author: Vlastimil Babka Date: Tue Mar 15 14:55:59 2016 -0700 mm, debug: replace dump_flags() with the new printk formats With the new printk format strings for flags, we can get rid of dump_flags() in mm/debug.c. This also fixes dump_vma() which used dump_flags() for printing vma flags. However dump_flags() did a page-flags specific filtering of bits higher than NR_PAGEFLAGS in order to remove the zone id part. For dump_vma() this resulted in removing several VM_* flags from the symbolic translation. Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/debug.c | 60 ++++++++++++++---------------------------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) commit edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46 Author: Vlastimil Babka Date: Tue Mar 15 14:55:56 2016 -0700 mm, printk: introduce new format string for flags In mm we use several kinds of flags bitfields that are sometimes printed for debugging purposes, or exported to userspace via sysfs. To make them easier to interpret independently on kernel version and config, we want to dump also the symbolic flag names. So far this has been done with repeated calls to pr_cont(), which is unreliable on SMP, and not usable for e.g. sysfs export. To get a more reliable and universal solution, this patch extends printk() format string for pointers to handle the page flags (%pGp), gfp_flags (%pGg) and vma flags (%pGv). Existing users of dump_flag_names() are converted and simplified. It would be possible to pass flags by value instead of pointer, but the %p format string for pointers already has extensions for various kernel structures, so it's a good fit, and the extra indirection in a non-critical path is negligible. [linux@rasmusvillemoes.dk: lots of good implementation suggestions] Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/printk-formats.txt | 18 ++++++++++ lib/test_printf.c | 53 ++++++++++++++++++++++++++++ lib/vsprintf.c | 75 ++++++++++++++++++++++++++++++++++++++++ mm/debug.c | 34 ++++++++++-------- mm/internal.h | 6 ++++ 5 files changed, 172 insertions(+), 14 deletions(-) commit 420adbe9fc1a45187cfa74df9dbfd72272c4e2fa Author: Vlastimil Babka Date: Tue Mar 15 14:55:52 2016 -0700 mm, tracing: unify mm flags handling in tracepoints and printk In tracepoints, it's possible to print gfp flags in a human-friendly format through a macro show_gfp_flags(), which defines a translation array and passes is to __print_flags(). Since the following patch will introduce support for gfp flags printing in printk(), it would be nice to reuse the array. This is not straightforward, since __print_flags() can't simply reference an array defined in a .c file such as mm/debug.c - it has to be a macro to allow the macro magic to communicate the format to userspace tools such as trace-cmd. The solution is to create a macro __def_gfpflag_names which is used both in show_gfp_flags(), and to define the gfpflag_names[] array in mm/debug.c. On the other hand, mm/debug.c also defines translation tables for page flags and vma flags, and desire was expressed (but not implemented in this series) to use these also from tracepoints. Thus, this patch also renames the events/gfpflags.h file to events/mmflags.h and moves the table definitions there, using the same macro approach as for gfpflags. This allows translating all three kinds of mm-specific flags both in tracepoints and printk. Signed-off-by: Vlastimil Babka Reviewed-by: Michal Hocko Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- include/trace/events/btrfs.h | 2 +- include/trace/events/compaction.h | 2 +- include/trace/events/gfpflags.h | 52 ------------ include/trace/events/huge_memory.h | 2 - include/trace/events/kmem.h | 2 +- include/trace/events/mmflags.h | 164 +++++++++++++++++++++++++++++++++++++ include/trace/events/vmscan.h | 2 +- mm/debug.c | 88 +++----------------- tools/perf/builtin-kmem.c | 2 +- 10 files changed, 181 insertions(+), 137 deletions(-) commit 14e0a214d62d284ff40b1fd7d687cb66fca9fc67 Author: Vlastimil Babka Date: Tue Mar 15 14:55:49 2016 -0700 tools, perf: make gfp_compact_table up to date When updating tracing's show_gfp_flags() I have noticed that perf's gfp_compact_table is also outdated. Fill in the missing flags and place a note in gfp.h to increase chance that future updates are synced. Convert the __GFP_X flags from "GFP_X" to "__GFP_X" strings in line with the previous patch. Signed-off-by: Vlastimil Babka Acked-by: David Rientjes Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- tools/perf/builtin-kmem.c | 47 ++++++++++++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 20 deletions(-) commit 1f7866b4aebd19e2525775083279e171b36783a4 Author: Vlastimil Babka Date: Tue Mar 15 14:55:45 2016 -0700 mm, tracing: make show_gfp_flags() up to date The show_gfp_flags() macro provides human-friendly printing of gfp flags in tracepoints. However, it is somewhat out of date and missing several flags. This patches fills in the missing flags, and distinguishes properly between GFP_ATOMIC and __GFP_ATOMIC which were both translated to "GFP_ATOMIC". More generally, all __GFP_X flags which were previously printed as GFP_X, are now printed as __GFP_X, since ommiting the underscores results in output that doesn't actually match the source code, and can only lead to confusion. Where both variants are defined equal (e.g. _DMA and _DMA32), the variant without underscores are preferred. Also add a note in gfp.h so hopefully future changes will be synced better. __GFP_MOVABLE is defined twice in include/linux/gfp.h with different comments. Leave just the newer one, which was intended to replace the old one. Signed-off-by: Vlastimil Babka Reviewed-by: Michal Hocko Acked-by: David Rientjes Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 6 ++++- include/trace/events/gfpflags.h | 53 ++++++++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 23 deletions(-) commit 20f6e03a40ba536dfc7c6f83dd894d994aeb39f3 Author: Vlastimil Babka Date: Tue Mar 15 14:55:42 2016 -0700 tracepoints: move trace_print_flags definitions to tracepoint-defs.h The following patch will need to declare array of struct trace_print_flags in a header. To prevent this header from pulling in all of RCU through trace_events.h, move the struct trace_print_flags{_64} definitions to the new lightweight tracepoint-defs.h header. Signed-off-by: Vlastimil Babka Acked-by: David Rientjes Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Joonsoo Kim Cc: Minchan Kim Cc: Sasha Levin Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/trace_events.h | 10 ---------- include/linux/tracepoint-defs.h | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit ebded02788b5d7c7600f8cff26ae07896d568649 Author: Mel Gorman Date: Tue Mar 15 14:55:39 2016 -0700 mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read In the generic read paths the kernel looks up a page in the page cache and if it's up to date, it is used. If not, the page lock is acquired to wait for IO to complete and then check the page. If multiple processes are waiting on IO, they all serialise against the lock and duplicate the checks. This is unnecessary. The page lock in itself does not give any guarantees to the callers about the page state as it can be immediately truncated or reclaimed after the page is unlocked. It's sufficient to wait_on_page_locked and then continue if the page is up to date on wakeup. It is possible that a truncated but up-to-date page is returned but the reference taken during read prevents it disappearing underneath the caller and the data is still valid if PageUptodate. The overall impact is small as even if processes serialise on the lock, the lock section is tiny once the IO is complete. Profiles indicated that unlock_page and friends are generally a tiny portion of a read-intensive workload. An artificial test was created that had instances of dd access a cache-cold file on an ext4 filesystem and measure how long the read took. paralleldd 4.4.0 4.4.0 vanilla avoidlock Amean Elapsd-1 5.28 ( 0.00%) 5.15 ( 2.50%) Amean Elapsd-4 5.29 ( 0.00%) 5.17 ( 2.12%) Amean Elapsd-7 5.28 ( 0.00%) 5.18 ( 1.78%) Amean Elapsd-12 5.20 ( 0.00%) 5.33 ( -2.50%) Amean Elapsd-21 5.14 ( 0.00%) 5.21 ( -1.41%) Amean Elapsd-30 5.30 ( 0.00%) 5.12 ( 3.38%) Amean Elapsd-48 5.78 ( 0.00%) 5.42 ( 6.21%) Amean Elapsd-79 6.78 ( 0.00%) 6.62 ( 2.46%) Amean Elapsd-110 9.09 ( 0.00%) 8.99 ( 1.15%) Amean Elapsd-128 10.60 ( 0.00%) 10.43 ( 1.66%) The impact is small but intuitively, it makes sense to avoid unnecessary calls to lock_page. Signed-off-by: Mel Gorman Reviewed-by: Jan Kara Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 32b635298ff4e991d8d8f64dc23782b02eec29c3 Author: Mel Gorman Date: Tue Mar 15 14:55:36 2016 -0700 mm: filemap: remove redundant code in do_read_cache_page do_read_cache_page and __read_cache_page duplicate page filler code when filling the page for the first time. This patch simply removes the duplicate logic. Signed-off-by: Mel Gorman Reviewed-by: Jan Kara Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) commit 07061aab2f750bbf61337b922aa8a245b5da85e1 Author: Andreas Ziegler Date: Tue Mar 15 14:55:33 2016 -0700 mm: fix two typos in comments for to_vmem_altmap() Commit 4b94ffdc4163 ("x86, mm: introduce vmem_altmap to augment vmemmap_populate()"), introduced the to_vmem_altmap() function. The comments in this function contain two typos (one misspelling of the Kconfig option CONFIG_SPARSEMEM_VMEMMAP, and one missing letter 'n'), let's fix them up. Signed-off-by: Andreas Ziegler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea6eabb05b26bd3d6f60b29b77a03bc61479fc0f Author: Christian Borntraeger Date: Tue Mar 15 14:55:30 2016 -0700 mm/debug_pagealloc: ask users for default setting of debug_pagealloc Since commit 031bc5743f158 ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") CONFIG_DEBUG_PAGEALLOC is by default not adding any page debugging. This resulted in several unnoticed bugs, e.g. https://lkml.kernel.org/g/<569F5E29.3090107@de.ibm.com> or https://lkml.kernel.org/g/<56A20F30.4050705@de.ibm.com> as this behaviour change was not even documented in Kconfig. Let's provide a new Kconfig symbol that allows to change the default back to enabled, e.g. for debug kernels. This also makes the change obvious to kernel packagers. Let's also change the Kconfig description for CONFIG_DEBUG_PAGEALLOC, to indicate that there are two stages of overhead. Signed-off-by: Christian Borntraeger Cc: Joonsoo Kim Cc: Peter Zijlstra Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig.debug | 18 ++++++++++++++++-- mm/page_alloc.c | 6 +++++- 2 files changed, 21 insertions(+), 3 deletions(-) commit d59b1087a98e402ed9a7cc577f4da435f9a555f5 Author: Andrey Ryabinin Date: Tue Mar 15 14:55:27 2016 -0700 mm/page-writeback: fix dirty_ratelimit calculation Calculation of dirty_ratelimit sometimes is not correct. E.g. initial values of dirty_ratelimit == INIT_BW and step == 0, lead to the following result: UBSAN: Undefined behaviour in ../mm/page-writeback.c:1286:7 shift exponent 25600 is too large for 64-bit type 'long unsigned int' The fix is straightforward - make step 0 if the shift exponent is too big. Signed-off-by: Andrey Ryabinin Cc: Wu Fengguang Cc: Tejun Heo Cc: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b72d0ffb5dbc4070089b36230b98687ca4577cbc Author: Andrew Morton Date: Tue Mar 15 14:55:25 2016 -0700 mm/page_alloc.c: rework code layout in memmap_init_zone() This function is getting full of weird tricks to avoid word-wrapping. Use a goto to eliminate a tab stop then use the new space Cc: Taku Izumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 79 +++++++++++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 41 deletions(-) commit 342332e6a925e9ed015e5465062c38d2b86ec8f9 Author: Taku Izumi Date: Tue Mar 15 14:55:22 2016 -0700 mm/page_alloc.c: introduce kernelcore=mirror option This patch extends existing "kernelcore" option and introduces kernelcore=mirror option. By specifying "mirror" instead of specifying the amount of memory, non-mirrored (non-reliable) region will be arranged into ZONE_MOVABLE. [akpm@linux-foundation.org: fix build with CONFIG_HAVE_MEMBLOCK_NODE_MAP=n] Signed-off-by: Taku Izumi Tested-by: Sudeep Holla Cc: Tony Luck Cc: Xishi Qiu Cc: KAMEZAWA Hiroyuki Cc: Mel Gorman Cc: Dave Hansen Cc: Matt Fleming Cc: Arnd Bergmann Cc: Steve Capper Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 12 +++- mm/page_alloc.c | 114 ++++++++++++++++++++++++++++++++++-- 2 files changed, 119 insertions(+), 7 deletions(-) commit d91749c1dda71a7030c054a5ab8dc5419bc6730b Author: Taku Izumi Date: Tue Mar 15 14:55:18 2016 -0700 mm/page_alloc.c: calculate zone_start_pfn at zone_spanned_pages_in_node() Xeon E7 v3 based systems supports Address Range Mirroring and UEFI BIOS complied with UEFI spec 2.5 can notify which ranges are mirrored (reliable) via EFI memory map. Now Linux kernel utilize its information and allocates boot time memory from reliable region. My requirement is: - allocate kernel memory from mirrored region - allocate user memory from non-mirrored region In order to meet my requirement, ZONE_MOVABLE is useful. By arranging non-mirrored range into ZONE_MOVABLE, mirrored memory is used for kernel allocations. My idea is to extend existing "kernelcore" option and introduces kernelcore=mirror option. By specifying "mirror" instead of specifying the amount of memory, non-mirrored region will be arranged into ZONE_MOVABLE. Earlier discussions are at: https://lkml.org/lkml/2015/10/9/24 https://lkml.org/lkml/2015/10/15/9 https://lkml.org/lkml/2015/11/27/18 https://lkml.org/lkml/2015/12/8/836 For example, suppose 2-nodes system with the following memory range: node 0 [mem 0x0000000000001000-0x000000109fffffff] node 1 [mem 0x00000010a0000000-0x000000209fffffff] and the following ranges are marked as reliable (mirrored): [0x0000000000000000-0x0000000100000000] [0x0000000100000000-0x0000000180000000] [0x0000000800000000-0x0000000880000000] [0x00000010a0000000-0x0000001120000000] [0x00000017a0000000-0x0000001820000000] If you specify kernelcore=mirror, ZONE_NORMAL and ZONE_MOVABLE are arranged like bellow: - node 0: ZONE_NORMAL : [0x0000000100000000-0x00000010a0000000] ZONE_MOVABLE: [0x0000000180000000-0x00000010a0000000] - node 1: ZONE_NORMAL : [0x00000010a0000000-0x00000020a0000000] ZONE_MOVABLE: [0x0000001120000000-0x00000020a0000000] In overlapped range, pages to be ZONE_MOVABLE in ZONE_NORMAL are treated as absent pages, and vice versa. This patch (of 2): Currently each zone's zone_start_pfn is calculated at free_area_init_core(). However zone's range is fixed at the time when invoking zone_spanned_pages_in_node(). This patch changes how each zone->zone_start_pfn is calculated in zone_spanned_pages_in_node(). Signed-off-by: Taku Izumi Cc: Tony Luck Cc: Xishi Qiu Cc: KAMEZAWA Hiroyuki Cc: Mel Gorman Cc: Dave Hansen Cc: Matt Fleming Cc: Arnd Bergmann Cc: Steve Capper Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) commit 02c43638ec46fffd0c54b0d10819e36e0bc622f7 Author: Andrew Morton Date: Tue Mar 15 14:55:15 2016 -0700 fs/mpage.c:mpage_readpages(): use lru_to_page() helper Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/mpage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d86bd1bece6fc41d59253002db5441fe960a37f6 Author: Joonsoo Kim Date: Tue Mar 15 14:55:12 2016 -0700 mm/slub: support left redzone SLUB already has a redzone debugging feature. But it is only positioned at the end of object (aka right redzone) so it cannot catch left oob. Although current object's right redzone acts as left redzone of next object, first object in a slab cannot take advantage of this effect. This patch explicitly adds a left red zone to each object to detect left oob more precisely. Background: Someone complained to me that left OOB doesn't catch even if KASAN is enabled which does page allocation debugging. That page is out of our control so it would be allocated when left OOB happens and, in this case, we can't find OOB. Moreover, SLUB debugging feature can be enabled without page allocator debugging and, in this case, we will miss that OOB. Before trying to implement, I expected that changes would be too complex, but, it doesn't look that complex to me now. Almost changes are applied to debug specific functions so I feel okay. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 1 + mm/slub.c | 100 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 72 insertions(+), 29 deletions(-) commit 149daaf3a02c020ddae64668c3a1bd0c4f314d6a Author: Laura Abbott Date: Tue Mar 15 14:55:09 2016 -0700 slub: relax CMPXCHG consistency restrictions When debug options are enabled, cmpxchg on the page is disabled. This is because the page must be locked to ensure there are no false positives when performing consistency checks. Some debug options such as poisoning and red zoning only act on the object itself. There is no need to protect other CPUs from modification on only the object. Allow cmpxchg to happen with poisoning and red zoning are set on a slab. Credit to Mathias Krause for the original work which inspired this series Signed-off-by: Laura Abbott Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Kees Cook Cc: Mathias Krause Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit becfda68abca673d61d5cc953e8e099816db99d9 Author: Laura Abbott Date: Tue Mar 15 14:55:06 2016 -0700 slub: convert SLAB_DEBUG_FREE to SLAB_CONSISTENCY_CHECKS SLAB_DEBUG_FREE allows expensive consistency checks at free to be turned on or off. Expand its use to be able to turn off all consistency checks. This gives a nice speed up if you only want features such as poisoning or tracing. Credit to Mathias Krause for the original work which inspired this series Signed-off-by: Laura Abbott Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Kees Cook Cc: Mathias Krause Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/slub.txt | 4 +- include/linux/slab.h | 2 +- mm/slab.h | 5 ++- mm/slub.c | 94 +++++++++++++++++++++++++++++------------------ tools/vm/slabinfo.c | 2 +- 5 files changed, 66 insertions(+), 41 deletions(-) commit 804aa132d341cc5838b710e62de02d62e6ad0185 Author: Laura Abbott Date: Tue Mar 15 14:55:02 2016 -0700 slub: fix/clean free_debug_processing return paths Since commit 19c7ff9ecd89 ("slub: Take node lock during object free checks") check_object has been incorrectly returning success as it follows the out label which just returns the node. Thanks to refactoring, the out and fail paths are now basically the same. Combine the two into one and just use a single label. Credit to Mathias Krause for the original work which inspired this series Signed-off-by: Laura Abbott Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Kees Cook Cc: Mathias Krause Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 282acb436176db665b6d61688ca5885a09cbdace Author: Laura Abbott Date: Tue Mar 15 14:54:59 2016 -0700 slub: drop lock at the end of free_debug_processing This series takes the suggestion of Christoph Lameter and only focuses on optimizing the slow path where the debug processing runs. The two main optimizations in this series are letting the consistency checks be skipped and relaxing the cmpxchg restrictions when we are not doing consistency checks. With hackbench -g 20 -l 1000 averaged over 100 runs: Before slub_debug=P mean 15.607 variance .086 stdev .294 After slub_debug=P mean 10.836 variance .155 stdev .394 This still isn't as fast as what is in grsecurity unfortunately so there's still work to be done. Profiling ___slab_alloc shows that 25-50% of time is spent in deactivate_slab. I haven't looked too closely to see if this is something that can be optimized. My plan for now is to focus on getting all of this merged (if appropriate) before digging in to another task. This patch (of 4): Currently, free_debug_processing has a comment "Keep node_lock to preserve integrity until the object is actually freed". In actuallity, the lock is dropped immediately in __slab_free. Rather than wait until __slab_free and potentially throw off the unlikely marking, just drop the lock in __slab_free. This also lets free_debug_processing take its own copy of the spinlock flags rather than trying to share the ones from __slab_free. Since there is no use for the node afterwards, change the return type of free_debug_processing to return an int like alloc_debug_processing. Credit to Mathias Krause for the original work which inspired this series [akpm@linux-foundation.org: fix build] Signed-off-by: Laura Abbott Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Kees Cook Cc: Mathias Krause Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit f68f8dddb5e9101b5bddb4d61ba0d81e4f9e0040 Author: Joonsoo Kim Date: Tue Mar 15 14:54:56 2016 -0700 mm/slab: re-implement pfmemalloc support Current implementation of pfmemalloc handling in SLAB has some problems. 1) pfmemalloc_active is set to true when there is just one or more pfmemalloc slabs in the system, but it is cleared when there is no pfmemalloc slab in one arbitrary kmem_cache. So, pfmemalloc_active could be wrongly cleared. 2) Search to partial and free list doesn't happen when non-pfmemalloc object are not found in cpu cache. Instead, allocating new slab happens and it is not optimal. 3) Even after sk_memalloc_socks() is disabled, cpu cache would keep pfmemalloc objects tagged with SLAB_OBJ_PFMEMALLOC. It isn't cleared if sk_memalloc_socks() is disabled so it could cause problem. 4) If cpu cache is filled with pfmemalloc objects, it would cause slow down non-pfmemalloc allocation. To me, current pointer tagging approach looks complex and fragile so this patch re-implement whole thing instead of fixing problems one by one. Design principle for new implementation is that 1) Don't disrupt non-pfmemalloc allocation in fast path even if sk_memalloc_socks() is enabled. It's more likely case than pfmemalloc allocation. 2) Ensure that pfmemalloc slab is used only for pfmemalloc allocation. 3) Don't consider performance of pfmemalloc allocation in memory deficiency state. As a result, all pfmemalloc alloc/free in memory tight state will be handled in slow-path. If there is non-pfmemalloc free object, it will be returned first even for pfmemalloc user in fast-path so that performance of pfmemalloc user isn't affected in normal case and pfmemalloc objects will be kept as long as possible. Signed-off-by: Joonsoo Kim Tested-by: Mel Gorman Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 284 +++++++++++++++++++++++++------------------------------------- 1 file changed, 116 insertions(+), 168 deletions(-) commit 70f75067b15659bb03404e75eded41011c67dc57 Author: Joonsoo Kim Date: Tue Mar 15 14:54:53 2016 -0700 mm/slab: avoid returning values by reference Returing values by reference is bad practice. Instead, just use function return value. Signed-off-by: Joonsoo Kim Suggested-by: Christoph Lameter Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit b03a017bebc403d40aa53a092e79b3020786537d Author: Joonsoo Kim Date: Tue Mar 15 14:54:50 2016 -0700 mm/slab: introduce new slab management type, OBJFREELIST_SLAB SLAB needs an array to manage freed objects in a slab. It is only used if some objects are freed so we can use free object itself as this array. This requires additional branch in somewhat critical lock path to check if it is first freed object or not but that's all we need. Benefits is that we can save extra memory usage and reduce some computational overhead by allocating a management array when new slab is created. Code change is rather complex than what we can expect from the idea, in order to handle debugging feature efficiently. If you want to see core idea only, please remove '#if DEBUG' block in the patch. Although this idea can apply to all caches whose size is larger than management array size, it isn't applied to caches which have a constructor. If such cache's object is used for management array, constructor should be called for it before that object is returned to user. I guess that overhead overwhelm benefit in that case so this idea doesn't applied to them at least now. For summary, from now on, slab management type is determined by following logic. 1) if management array size is smaller than object size and no ctor, it becomes OBJFREELIST_SLAB. 2) if management array size is smaller than leftover, it becomes NORMAL_SLAB which uses leftover as a array. 3) if OFF_SLAB help to save memory than way 4), it becomes OFF_SLAB. It allocate a management array from the other cache so memory waste happens. 4) others become NORMAL_SLAB. It uses dedicated internal memory in a slab as a management array so it causes memory waste. In my system, without enabling CONFIG_DEBUG_SLAB, Almost caches become OBJFREELIST_SLAB and NORMAL_SLAB (using leftover) which doesn't waste memory. Following is the result of number of caches with specific slab management type. TOTAL = OBJFREELIST + NORMAL(leftover) + NORMAL + OFF /Before/ 126 = 0 + 60 + 25 + 41 /After/ 126 = 97 + 12 + 15 + 2 Result shows that number of caches that doesn't waste memory increase from 60 to 109. I did some benchmarking and it looks that benefit are more than loss. Kmalloc: Repeatedly allocate then free test /Before/ [ 0.286809] 1. Kmalloc: Repeatedly allocate then free test [ 1.143674] 100000 times kmalloc(32) -> 116 cycles kfree -> 78 cycles [ 1.441726] 100000 times kmalloc(64) -> 121 cycles kfree -> 80 cycles [ 1.815734] 100000 times kmalloc(128) -> 168 cycles kfree -> 85 cycles [ 2.380709] 100000 times kmalloc(256) -> 287 cycles kfree -> 95 cycles [ 3.101153] 100000 times kmalloc(512) -> 370 cycles kfree -> 117 cycles [ 3.942432] 100000 times kmalloc(1024) -> 413 cycles kfree -> 156 cycles [ 5.227396] 100000 times kmalloc(2048) -> 622 cycles kfree -> 248 cycles [ 7.519793] 100000 times kmalloc(4096) -> 1102 cycles kfree -> 452 cycles /After/ [ 1.205313] 100000 times kmalloc(32) -> 117 cycles kfree -> 78 cycles [ 1.510526] 100000 times kmalloc(64) -> 124 cycles kfree -> 81 cycles [ 1.827382] 100000 times kmalloc(128) -> 130 cycles kfree -> 84 cycles [ 2.226073] 100000 times kmalloc(256) -> 177 cycles kfree -> 92 cycles [ 2.814747] 100000 times kmalloc(512) -> 286 cycles kfree -> 112 cycles [ 3.532952] 100000 times kmalloc(1024) -> 344 cycles kfree -> 141 cycles [ 4.608777] 100000 times kmalloc(2048) -> 519 cycles kfree -> 210 cycles [ 6.350105] 100000 times kmalloc(4096) -> 789 cycles kfree -> 391 cycles In fact, I tested another idea implementing OBJFREELIST_SLAB with extendable linked array through another freed object. It can remove memory waste completely but it causes more computational overhead in critical lock path and it seems that overhead outweigh benefit. So, this patch doesn't include it. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 86 insertions(+), 8 deletions(-) commit 10b2e9e8e808bd30e1f4018a36366d07b0abd12f Author: Joonsoo Kim Date: Tue Mar 15 14:54:47 2016 -0700 mm/slab: factor out debugging initialization in cache_init_objs() cache_init_objs() will be changed in following patch and current form doesn't fit well for that change. So, before doing it, this patch separates debugging initialization. This would cause two loop iteration when debugging is enabled, but, this overhead seems too light than debug feature itself so effect may not be visible. This patch will greatly simplify changes in cache_init_objs() in following patch. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit d8410234db6a1bb05408ba2f0e3fd6b04ef626a3 Author: Joonsoo Kim Date: Tue Mar 15 14:54:44 2016 -0700 mm/slab: factor out slab list fixup code Slab list should be fixed up after object is detached from the slab and this happens at two places. They do exactly same thing. They will be changed in the following patch, so, to reduce code duplication, this patch factor out them and make it common function. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 3217fd9bdf0017bd0847939f67d52a9c71d8fc56 Author: Joonsoo Kim Date: Tue Mar 15 14:54:41 2016 -0700 mm/slab: make criteria for off slab determination robust and simple To become an off slab, there are some constraints to avoid bootstrapping problem and recursive call. This can be avoided differently by simply checking that corresponding kmalloc cache is ready and it's not a off slab. It would be more robust because static size checking can be affected by cache size change or architecture type but dynamic checking isn't. One check 'freelist_cache->size > cachep->size / 2' is added to check benefit of choosing off slab, because, now, there is no size constraint which ensures enough advantage when selecting off slab. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 45 +++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) commit f3a3c320d54eea39a419fd539f5b0e9c74517b0a Author: Joonsoo Kim Date: Tue Mar 15 14:54:38 2016 -0700 mm/slab: do not change cache size if debug pagealloc isn't possible We can fail to setup off slab in some conditions. Even in this case, debug pagealloc increases cache size to PAGE_SIZE in advance and it is waste because debug pagealloc cannot work for it when it isn't the off slab. To improve this situation, this patch checks first that this cache with increased size is suitable for off slab. It actually increases cache size when it is suitable for off-slab, so possible waste is removed. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 158e319bba59e890c3920ce6d827c188287bae84 Author: Joonsoo Kim Date: Tue Mar 15 14:54:35 2016 -0700 mm/slab: clean up cache type determination Current cache type determination code is open-code and looks not understandable. Following patch will introduce one more cache type and it would make code more complex. So, before it happens, this patch abstracts these codes. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 105 ++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 34 deletions(-) commit 832a15d209cd260180407bde1af18965b21623f3 Author: Joonsoo Kim Date: Tue Mar 15 14:54:33 2016 -0700 mm/slab: align cache size first before determination of OFF_SLAB candidate Finding suitable OFF_SLAB candidate is more related to aligned cache size rather than original size. Same reasoning can be applied to the debug pagealloc candidate. So, this patch moves up alignment fixup to proper position. From that point, size is aligned so we can remove some alignment fixups. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 2e6b3602168797fd4d80d86d208c4ba8fcfa3b8b Author: Joonsoo Kim Date: Tue Mar 15 14:54:30 2016 -0700 mm/slab: put the freelist at the end of slab page Currently, the freelist is at the front of slab page. This requires extra space to meet object alignment requirement. If we put the freelist at the end of a slab page, objects could start at page boundary and will be at correct alignment. This is possible because freelist has no alignment constraint itself. This gives us two benefits: It removes extra memory space for the freelist alignment and remove complex calculation at cache initialization step. I can't think notable drawback here. I mentioned that this would reduce extra memory space, but, this benefit is rather theoretical because it can be applied to very few cases. Following is the example cache type that can get benefit from this change. size align num before after 32 8 124 4100 4092 64 8 63 4103 4095 88 8 46 4102 4094 272 8 15 4103 4095 408 8 10 4098 4090 32 16 124 4108 4092 64 16 63 4111 4095 32 32 124 4124 4092 64 32 63 4127 4095 96 32 42 4106 4074 before means whole size for objects and aligned freelist before applying patch and after shows the result of this patch. Since before is more than 4096, number of object should decrease and memory waste happens. Anyway, this patch removes complex calculation so looks beneficial to me. [akpm@linux-foundation.org: fix kerneldoc] Signed-off-by: Joonsoo Kim Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 90 ++++++++++++++++----------------------------------------------- 1 file changed, 22 insertions(+), 68 deletions(-) commit 249247b6f8ee362189a2f2bf598a14ff6c95fb4c Author: Joonsoo Kim Date: Tue Mar 15 14:54:27 2016 -0700 mm/slab: remove object status buffer for DEBUG_SLAB_LEAK Now, we don't use object status buffer in any setup. Remove it. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit d31676dfde257cb2b3e52d4e657d8ad2251e4d49 Author: Joonsoo Kim Date: Tue Mar 15 14:54:24 2016 -0700 mm/slab: alternative implementation for DEBUG_SLAB_LEAK DEBUG_SLAB_LEAK is a debug option. It's current implementation requires status buffer so we need more memory to use it. And, it cause kmem_cache initialization step more complex. To remove this extra memory usage and to simplify initialization step, this patch implement this feature with another way. When user requests to get slab object owner information, it marks that getting information is started. And then, all free objects in caches are flushed to corresponding slab page. Now, we can distinguish all freed object so we can know all allocated objects, too. After collecting slab object owner information on allocated objects, mark is checked that there is no free during the processing. If true, we can be sure that our information is correct so information is returned to user. Although this way is rather complex, it has two important benefits mentioned above. So, I think it is worth changing. There is one drawback that it takes more time to get slab object owner information but it is just a debug option so it doesn't matter at all. To help review, this patch implements new way only. Following patch will remove useless code. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab_def.h | 3 ++ mm/slab.c | 85 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 66 insertions(+), 22 deletions(-) commit 40b44137971c2e5865a78f9f7de274449983ccb5 Author: Joonsoo Kim Date: Tue Mar 15 14:54:21 2016 -0700 mm/slab: clean up DEBUG_PAGEALLOC processing code Currently, open code for checking DEBUG_PAGEALLOC cache is spread to some sites. It makes code unreadable and hard to change. This patch cleans up this code. The following patch will change the criteria for DEBUG_PAGEALLOC cache so this clean-up will help it, too. [akpm@linux-foundation.org: fix build with CONFIG_DEBUG_PAGEALLOC=n] Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 12 ++++--- mm/slab.c | 97 +++++++++++++++++++++++++++--------------------------- 2 files changed, 57 insertions(+), 52 deletions(-) commit 40323278b557a5909bbecfa181c91a3af7afbbe3 Author: Joonsoo Kim Date: Tue Mar 15 14:54:18 2016 -0700 mm/slab: use more appropriate condition check for debug_pagealloc debug_pagealloc debugging is related to SLAB_POISON flag rather than FORCED_DEBUG option, although FORCED_DEBUG option will enable SLAB_POISON. Fix it. Signed-off-by: Joonsoo Kim Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a307ebd468e0b97c203f5a99a56a6017e4d1991a Author: Joonsoo Kim Date: Tue Mar 15 14:54:15 2016 -0700 mm/slab: activate debug_pagealloc in SLAB when it is actually enabled Signed-off-by: Joonsoo Kim Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 260b61dd46ed07f517e4059ab9881402cbd6a385 Author: Joonsoo Kim Date: Tue Mar 15 14:54:12 2016 -0700 mm/slab: remove the checks for slab implementation bug Some of "#if DEBUG" are for reporting slab implementation bug rather than user usecase bug. It's not really needed because slab is stable for a quite long time and it makes code too dirty. This patch remove it. Signed-off-by: Joonsoo Kim Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) commit 6fb924304ac35f1ab9f3abe73527efcd5156131f Author: Joonsoo Kim Date: Tue Mar 15 14:54:09 2016 -0700 mm/slab: remove useless structure define It is obsolete so remove it. Signed-off-by: Joonsoo Kim Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 12c61fe9b763812adac44522100527caf534462e Author: Joonsoo Kim Date: Tue Mar 15 14:54:06 2016 -0700 mm/slab: fix stale code comment This patchset implements a new freed object management way, that is, OBJFREELIST_SLAB. Purpose of it is to reduce memory overhead in SLAB. SLAB needs a array to manage freed objects in a slab. If there is leftover after objects are packed into a slab, we can use it as a management array, and, in this case, there is no memory waste. But, in the other cases, we need to allocate extra memory for a management array or utilize dedicated internal memory in a slab for it. Both cases causes memory waste so it's not good. With this patchset, freed object itself can be used for a management array. So, memory waste could be reduced. Detailed idea and numbers are described in last patch's commit description. Please refer it. In fact, I tested another idea implementing OBJFREELIST_SLAB with extendable linked array through another freed object. It can remove memory waste completely but it causes more computational overhead in critical lock path and it seems that overhead outweigh benefit. So, this patchset doesn't include it. I will attach prototype just for a reference. This patch (of 16): We use freelist_idx_t type for free object management whose size would be smaller than size of unsigned int. Fix it. Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f706d6820d3ea776d6b3fc0c1de9f81eb0d021b Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:54:03 2016 -0700 mm: fix some spelling Fix up trivial spelling errors, noticed while reading the code. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 2 +- include/linux/slab.h | 2 +- mm/slab.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ca257195511d536308700548de008b51729221eb Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:54:00 2016 -0700 mm: new API kfree_bulk() for SLAB+SLUB allocators This patch introduce a new API call kfree_bulk() for bulk freeing memory objects not bound to a single kmem_cache. Christoph pointed out that it is possible to implement freeing of objects, without knowing the kmem_cache pointer as that information is available from the object's page->slab_cache. Proposing to remove the kmem_cache argument from the bulk free API. Jesper demonstrated that these extra steps per object comes at a performance cost. It is only in the case CONFIG_MEMCG_KMEM is compiled in and activated runtime that these steps are done anyhow. The extra cost is most visible for SLAB allocator, because the SLUB allocator does the page lookup (virt_to_head_page()) anyhow. Thus, the conclusion was to keep the kmem_cache free bulk API with a kmem_cache pointer, but we can still implement a kfree_bulk() API fairly easily. Simply by handling if kmem_cache_free_bulk() gets called with a kmem_cache NULL pointer. This does increase the code size a bit, but implementing a separate kfree_bulk() call would likely increase code size even more. Below benchmarks cost of alloc+free (obj size 256 bytes) on CPU i7-4790K @ 4.00GHz, no PREEMPT and CONFIG_MEMCG_KMEM=y. Code size increase for SLAB: add/remove: 0/0 grow/shrink: 1/0 up/down: 74/0 (74) function old new delta kmem_cache_free_bulk 660 734 +74 SLAB fastpath: 87 cycles(tsc) 21.814 sz - fallback - kmem_cache_free_bulk - kfree_bulk 1 - 103 cycles 25.878 ns - 41 cycles 10.498 ns - 81 cycles 20.312 ns 2 - 94 cycles 23.673 ns - 26 cycles 6.682 ns - 42 cycles 10.649 ns 3 - 92 cycles 23.181 ns - 21 cycles 5.325 ns - 39 cycles 9.950 ns 4 - 90 cycles 22.727 ns - 18 cycles 4.673 ns - 26 cycles 6.693 ns 8 - 89 cycles 22.270 ns - 14 cycles 3.664 ns - 23 cycles 5.835 ns 16 - 88 cycles 22.038 ns - 14 cycles 3.503 ns - 22 cycles 5.543 ns 30 - 89 cycles 22.284 ns - 13 cycles 3.310 ns - 20 cycles 5.197 ns 32 - 88 cycles 22.249 ns - 13 cycles 3.420 ns - 20 cycles 5.166 ns 34 - 88 cycles 22.224 ns - 14 cycles 3.643 ns - 20 cycles 5.170 ns 48 - 88 cycles 22.088 ns - 14 cycles 3.507 ns - 20 cycles 5.203 ns 64 - 88 cycles 22.063 ns - 13 cycles 3.428 ns - 20 cycles 5.152 ns 128 - 89 cycles 22.483 ns - 15 cycles 3.891 ns - 23 cycles 5.885 ns 158 - 89 cycles 22.381 ns - 15 cycles 3.779 ns - 22 cycles 5.548 ns 250 - 91 cycles 22.798 ns - 16 cycles 4.152 ns - 23 cycles 5.967 ns SLAB when enabling MEMCG_KMEM runtime: - kmemcg fastpath: 130 cycles(tsc) 32.684 ns (step:0) 1 - 148 cycles 37.220 ns - 66 cycles 16.622 ns - 66 cycles 16.583 ns 2 - 141 cycles 35.510 ns - 51 cycles 12.820 ns - 58 cycles 14.625 ns 3 - 140 cycles 35.017 ns - 37 cycles 9.326 ns - 33 cycles 8.474 ns 4 - 137 cycles 34.507 ns - 31 cycles 7.888 ns - 33 cycles 8.300 ns 8 - 140 cycles 35.069 ns - 25 cycles 6.461 ns - 25 cycles 6.436 ns 16 - 138 cycles 34.542 ns - 23 cycles 5.945 ns - 22 cycles 5.670 ns 30 - 136 cycles 34.227 ns - 22 cycles 5.502 ns - 22 cycles 5.587 ns 32 - 136 cycles 34.253 ns - 21 cycles 5.475 ns - 21 cycles 5.324 ns 34 - 136 cycles 34.254 ns - 21 cycles 5.448 ns - 20 cycles 5.194 ns 48 - 136 cycles 34.075 ns - 21 cycles 5.458 ns - 21 cycles 5.367 ns 64 - 135 cycles 33.994 ns - 21 cycles 5.350 ns - 21 cycles 5.259 ns 128 - 137 cycles 34.446 ns - 23 cycles 5.816 ns - 22 cycles 5.688 ns 158 - 137 cycles 34.379 ns - 22 cycles 5.727 ns - 22 cycles 5.602 ns 250 - 138 cycles 34.755 ns - 24 cycles 6.093 ns - 23 cycles 5.986 ns Code size increase for SLUB: function old new delta kmem_cache_free_bulk 717 799 +82 SLUB benchmark: SLUB fastpath: 46 cycles(tsc) 11.691 ns (step:0) sz - fallback - kmem_cache_free_bulk - kfree_bulk 1 - 61 cycles 15.486 ns - 53 cycles 13.364 ns - 57 cycles 14.464 ns 2 - 54 cycles 13.703 ns - 32 cycles 8.110 ns - 33 cycles 8.482 ns 3 - 53 cycles 13.272 ns - 25 cycles 6.362 ns - 27 cycles 6.947 ns 4 - 51 cycles 12.994 ns - 24 cycles 6.087 ns - 24 cycles 6.078 ns 8 - 50 cycles 12.576 ns - 21 cycles 5.354 ns - 22 cycles 5.513 ns 16 - 49 cycles 12.368 ns - 20 cycles 5.054 ns - 20 cycles 5.042 ns 30 - 49 cycles 12.273 ns - 18 cycles 4.748 ns - 19 cycles 4.758 ns 32 - 49 cycles 12.401 ns - 19 cycles 4.821 ns - 19 cycles 4.810 ns 34 - 98 cycles 24.519 ns - 24 cycles 6.154 ns - 24 cycles 6.157 ns 48 - 83 cycles 20.833 ns - 21 cycles 5.446 ns - 21 cycles 5.429 ns 64 - 75 cycles 18.891 ns - 20 cycles 5.247 ns - 20 cycles 5.238 ns 128 - 93 cycles 23.271 ns - 27 cycles 6.856 ns - 27 cycles 6.823 ns 158 - 102 cycles 25.581 ns - 30 cycles 7.714 ns - 30 cycles 7.695 ns 250 - 107 cycles 26.917 ns - 38 cycles 9.514 ns - 38 cycles 9.506 ns SLUB when enabling MEMCG_KMEM runtime: - kmemcg fastpath: 71 cycles(tsc) 17.897 ns (step:0) 1 - 85 cycles 21.484 ns - 78 cycles 19.569 ns - 75 cycles 18.938 ns 2 - 81 cycles 20.363 ns - 45 cycles 11.258 ns - 44 cycles 11.076 ns 3 - 78 cycles 19.709 ns - 33 cycles 8.354 ns - 32 cycles 8.044 ns 4 - 77 cycles 19.430 ns - 28 cycles 7.216 ns - 28 cycles 7.003 ns 8 - 101 cycles 25.288 ns - 23 cycles 5.849 ns - 23 cycles 5.787 ns 16 - 76 cycles 19.148 ns - 20 cycles 5.162 ns - 20 cycles 5.081 ns 30 - 76 cycles 19.067 ns - 19 cycles 4.868 ns - 19 cycles 4.821 ns 32 - 76 cycles 19.052 ns - 19 cycles 4.857 ns - 19 cycles 4.815 ns 34 - 121 cycles 30.291 ns - 25 cycles 6.333 ns - 25 cycles 6.268 ns 48 - 108 cycles 27.111 ns - 21 cycles 5.498 ns - 21 cycles 5.458 ns 64 - 100 cycles 25.164 ns - 20 cycles 5.242 ns - 20 cycles 5.229 ns 128 - 155 cycles 38.976 ns - 27 cycles 6.886 ns - 27 cycles 6.892 ns 158 - 132 cycles 33.034 ns - 30 cycles 7.711 ns - 30 cycles 7.728 ns 250 - 130 cycles 32.612 ns - 38 cycles 9.560 ns - 38 cycles 9.549 ns Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 9 +++++++++ mm/slab.c | 5 ++++- mm/slab_common.c | 8 ++++++-- mm/slub.c | 21 ++++++++++++++++++--- 4 files changed, 37 insertions(+), 6 deletions(-) commit e6cdb58d1c8307f66039b04203e378d89938281c Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:56 2016 -0700 slab: implement bulk free in SLAB allocator This patch implements the free side of bulk API for the SLAB allocator kmem_cache_free_bulk(), and concludes the implementation of optimized bulk API for SLAB allocator. Benchmarked[1] cost of alloc+free (obj size 256 bytes) on CPU i7-4790K @ 4.00GHz, with no debug options, no PREEMPT and CONFIG_MEMCG_KMEM=y but no active user of kmemcg. SLAB single alloc+free cost: 87 cycles(tsc) 21.814 ns with this optimized config. bulk- Current fallback - optimized SLAB bulk 1 - 102 cycles(tsc) 25.747 ns - 41 cycles(tsc) 10.490 ns - improved 59.8% 2 - 94 cycles(tsc) 23.546 ns - 26 cycles(tsc) 6.567 ns - improved 72.3% 3 - 92 cycles(tsc) 23.127 ns - 20 cycles(tsc) 5.244 ns - improved 78.3% 4 - 90 cycles(tsc) 22.663 ns - 18 cycles(tsc) 4.588 ns - improved 80.0% 8 - 88 cycles(tsc) 22.242 ns - 14 cycles(tsc) 3.656 ns - improved 84.1% 16 - 88 cycles(tsc) 22.010 ns - 13 cycles(tsc) 3.480 ns - improved 85.2% 30 - 89 cycles(tsc) 22.305 ns - 13 cycles(tsc) 3.303 ns - improved 85.4% 32 - 89 cycles(tsc) 22.277 ns - 13 cycles(tsc) 3.309 ns - improved 85.4% 34 - 88 cycles(tsc) 22.246 ns - 13 cycles(tsc) 3.294 ns - improved 85.2% 48 - 88 cycles(tsc) 22.121 ns - 13 cycles(tsc) 3.492 ns - improved 85.2% 64 - 88 cycles(tsc) 22.052 ns - 13 cycles(tsc) 3.411 ns - improved 85.2% 128 - 89 cycles(tsc) 22.452 ns - 15 cycles(tsc) 3.841 ns - improved 83.1% 158 - 89 cycles(tsc) 22.403 ns - 14 cycles(tsc) 3.746 ns - improved 84.3% 250 - 91 cycles(tsc) 22.775 ns - 16 cycles(tsc) 4.111 ns - improved 82.4% Notice it is not recommended to do very large bulk operation with this bulk API, because local IRQs are disabled in this period. [1] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/mm/slab_bulk_test01.c Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 7b0501dd6b1862a83c5c1c65beadce99014b97a4 Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:53 2016 -0700 slab: avoid running debug SLAB code with IRQs disabled for alloc_bulk Move the call to cache_alloc_debugcheck_after() outside the IRQ disabled section in kmem_cache_alloc_bulk(). When CONFIG_DEBUG_SLAB is disabled the compiler should remove this code. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 2a777eac173a53b33f2f7dbed2b61a1f5eb0b531 Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:50 2016 -0700 slab: implement bulk alloc in SLAB allocator This patch implements the alloc side of bulk API for the SLAB allocator. Further optimization are still possible by changing the call to __do_cache_alloc() into something that can return multiple objects. This optimization is left for later, given end results already show in the area of 80% speedup. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit d5e3ed66d6f260b3bb68cb5cf0fe79777e8febf0 Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:47 2016 -0700 slab: use slab_post_alloc_hook in SLAB allocator shared with SLUB Reviewers notice that the order in slab_post_alloc_hook() of kmemcheck_slab_alloc() and kmemleak_alloc_recursive() gets swapped compared to slab.c / SLAB allocator. Also notice memset now occurs before calling kmemcheck_slab_alloc() and kmemleak_alloc_recursive(). I assume this reordering of kmemcheck, kmemleak and memset is okay because this is the order they are used by the SLUB allocator. This patch completes the sharing of alloc_hook's between SLUB and SLAB. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 0142eae3ae15b9b9f0ae2a8e68e3c8dc347a2394 Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:44 2016 -0700 mm: kmemcheck skip object if slab allocation failed In the SLAB allocator kmemcheck_slab_alloc() is guarded against being called in case the object is NULL. In SLUB allocator this NULL pointer invocation can happen, which seems like an oversight. Move the NULL pointer check into kmemcheck code (kmemcheck_slab_alloc) so the check gets moved out of the fastpath, when not compiled with CONFIG_KMEMCHECK. This is a step towards sharing post_alloc_hook between SLUB and SLAB, because slab_post_alloc_hook() does not perform this check before calling kmemcheck_slab_alloc(). Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemcheck.c | 3 +++ 1 file changed, 3 insertions(+) commit 011eceaf0ad54e0916df8593ffc27b9f73d89fcf Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:41 2016 -0700 slab: use slab_pre_alloc_hook in SLAB allocator shared with SLUB Deduplicate code in SLAB allocator functions slab_alloc() and slab_alloc_node() by using the slab_pre_alloc_hook() call, which is now shared between SLUB and SLAB. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit fab9963a69dbd71304357dbfe4ec5345f14cebdd Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:38 2016 -0700 mm: fault-inject take over bootstrap kmem_cache check Remove the SLAB specific function slab_should_failslab(), by moving the check against fault-injection for the bootstrap slab, into the shared function should_failslab() (used by both SLAB and SLUB). This is a step towards sharing alloc_hook's between SLUB and SLAB. This bootstrap slab "kmem_cache" is used for allocating struct kmem_cache objects to the allocator itself. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fault-inject.h | 5 ++--- mm/failslab.c | 12 +++++++++--- mm/slab.c | 12 ++---------- mm/slab.h | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) commit 11c7aec2a9b4e685bbf6a15148e7841b3525fc0c Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:35 2016 -0700 mm/slab: move SLUB alloc hooks to common mm/slab.h First step towards sharing alloc_hook's between SLUB and SLAB allocators. Move the SLUB allocators *_alloc_hook to the common mm/slab.h for internal slab definitions. Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/slub.c | 54 ------------------------------------------------------ 2 files changed, 62 insertions(+), 54 deletions(-) commit 376bf125ac781d32e202760ed7deb1ae4ed35d31 Author: Jesper Dangaard Brouer Date: Tue Mar 15 14:53:32 2016 -0700 slub: clean up code for kmem cgroup support to kmem_cache_free_bulk This change is primarily an attempt to make it easier to realize the optimizations the compiler performs in-case CONFIG_MEMCG_KMEM is not enabled. Performance wise, even when CONFIG_MEMCG_KMEM is compiled in, the overhead is zero. This is because, as long as no process have enabled kmem cgroups accounting, the assignment is replaced by asm-NOP operations. This is possible because memcg_kmem_enabled() uses a static_key_false() construct. It also helps readability as it avoid accessing the p[] array like: p[size - 1] which "expose" that the array is processed backwards inside helper function build_detached_freelist(). Lastly this also makes the code more robust, in error case like passing NULL pointers in the array. Which were previously handled before commit 033745189b1b ("slub: add missing kmem cgroup support to kmem_cache_free_bulk"). Fixes: 033745189b1b ("slub: add missing kmem cgroup support to kmem_cache_free_bulk") Signed-off-by: Jesper Dangaard Brouer Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit dec63a4dec2d6d01346fd5d96062e67c0636852b Author: Arnd Bergmann Date: Tue Mar 15 14:53:29 2016 -0700 paride: make 'verbose' parameter an 'int' again gcc-6.0 found an ancient bug in the paride driver, which had a "module_param(verbose, bool, 0);" since before 2.6.12, but actually uses it to accept '0', '1' or '2' as arguments: drivers/block/paride/pd.c: In function 'pd_init_dev_parms': drivers/block/paride/pd.c:298:29: warning: comparison of constant '1' with boolean expression is always false [-Wbool-compare] #define DBMSG(msg) ((verbose>1)?(msg):NULL) In 2012, Rusty did a cleanup patch that also changed the type of the variable to 'bool', which introduced what is now a gcc warning. This changes the type back to 'int' and adapts the module_param() line instead, so it should work as documented in case anyone ever cares about running the ancient driver with debugging. Fixes: 90ab5ee94171 ("module_param: make bool parameters really bool (drivers & misc)") Signed-off-by: Arnd Bergmann Rusty Russell Cc: Tim Waugh Cc: Sudip Mukherjee Cc: Jens Axboe Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/paride/pd.c | 4 ++-- drivers/block/paride/pt.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0d9c51a6e1df4651379b8fca8a7a96595cd9988a Author: San Mehat Date: Tue Mar 15 14:53:26 2016 -0700 block: partition: add partition specific uevent callbacks for partition info This patch has been carried in the Android tree for quite some time and is one of the few patches required to get a mainline kernel up and running with an exsiting Android userspace. So I wanted to submit it for review and consideration if it should be merged. For partitions, add new uevent parameters 'PARTN' which specifies the partitions index in the table, and 'PARTNAME', which specifies PARTNAME specifices the partition name of a partition device. Android's userspace uses this for creating device node links from the partition name and number, ie: /dev/block/platform/soc/by-name/system or /dev/block/platform/soc/by-num/p1 One can see its usage here: https://android.googlesource.com/platform/system/core/+/master/init/devices.cpp#355 and https://android.googlesource.com/platform/system/core/+/master/init/devices.cpp#494 [john.stultz@linaro.org: dropped NPARTS and reworded commit message for context] Signed-off-by: Dima Zavin Signed-off-by: John Stultz Cc: Jens Axboe Cc: Rom Lemarchand Cc: Android Kernel Team Cc: Jeff Moyer Cc: Cc: Kees Cook Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/partition-generic.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8d67d3c2444fd3bb787cc6c27053717c01155966 Author: Jun Piao Date: Tue Mar 15 14:53:23 2016 -0700 ocfs2/dlm: fix a variable overflow problem in dlmdomain.c In dlm_send_join_cancels(), node is defined with type unsigned int, but initialized with -1, this will lead variable overflow. Although this won't cause any runtime problem, the code looks a little uncoordinated. Signed-off-by: Jun Piao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 814ce69432bffdd0533fda28deea5dcfba153d17 Author: Jiufei Xue Date: Tue Mar 15 14:53:20 2016 -0700 ocfs2: fix a tiny race that leads file system read-only when o2hb detect a node down, it first set the dead node to recovery map and create ocfs2rec which will replay journal for dead node. o2hb thread then call dlm_do_local_recovery_cleanup() to delete the lock for dead node. After the lock of dead node is gone, locks for other nodes can be granted and may modify the meta data without replaying journal of the dead node. The detail is described as follows. N1 N2 N3(master) modify the extent tree of inode, and commit dirty metadata to journal, then goes down. o2hb thread detects N1 goes down, set recovery map and delete the lock of N1. dlm_thread flush ast for the lock of N2. do not detect the death of N1, so recovery map is empty. read inode from disk without replaying the journal of N1 and modify the extent tree of the inode that N1 had modified. ocfs2rec recover the journal of N1. The modification of N2 is lost. The modification of N1 and N2 are not serial, and it will lead to read-only file system. We can set recovery_waiting flag to the lock resource after delete the lock for dead node to prevent other node from getting the lock before dlm recovery. After dlm recovery, the recovery map on N2 is not empty, ocfs2_inode_lock_full_nested() will wait for ocfs2 recovery. Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 5 ++++- fs/ocfs2/dlm/dlmmaster.c | 3 ++- fs/ocfs2/dlm/dlmrecovery.c | 8 ++++++++ fs/ocfs2/dlm/dlmthread.c | 6 ++++-- 4 files changed, 18 insertions(+), 4 deletions(-) commit d277f33eda000ca03b1497fcf1c9e2ec33adf4c6 Author: xuejiufei Date: Tue Mar 15 14:53:17 2016 -0700 ocfs2/dlm: return EINVAL when the lockres on migration target is in DROPPING_REF state If master migrate this lock resource to node when it happened to purge it, a new lock resource will be created and inserted into hash list. If then master goes down, the lock resource being purged is recovered, so there exist two lock resource with different owner. So return error to master if the lock resource is in DROPPING state, master will retry to migrate this lock resource. Signed-off-by: xuejiufei Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Reviewed-by: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 8c0343968163dc3536e56268026f475b1bbf61b4 Author: xuejiufei Date: Tue Mar 15 14:53:14 2016 -0700 ocfs2/dlm: clear DROPPING_REF flag when the master goes down If the master goes down after return in-progress for deref message. The lock resource on non-master node can not be purged. Clear the DROPPING_REF flag and recovery it. Signed-off-by: xuejiufei Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Reviewed-by: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 842b90b62461d0848bd56ad776117d15a5fa95c0 Author: xuejiufei Date: Tue Mar 15 14:53:11 2016 -0700 ocfs2/dlm: return in progress if master can not clear the refmap bit right now Master returns in-progress to non-master node when it can not clear the refmap bit right now. And non-master node will not purge the lock resource until receiving deref done message. Signed-off-by: xuejiufei Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Reviewed-by: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 5 +++++ fs/ocfs2/dlm/dlmmaster.c | 8 +++++--- fs/ocfs2/dlm/dlmthread.c | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) commit 60d663cb527340c87c6cb98842e90a43243e1607 Author: xuejiufei Date: Tue Mar 15 14:53:08 2016 -0700 ocfs2/dlm: add DEREF_DONE message This series of patches is to fix the dis-order issue of setting/clearing refmap bit described below. Node 1 Node 2(master) dlmlock dlm_do_master_request dlm_master_request_handler -> dlm_lockres_set_refmap_bit dlmlock succeed dlmunlock succeed dlm_purge_lockres dlm_deref_handler -> find lock resource is in DLM_LOCK_RES_SETREF_INPROG state, so dispatch a deref work dlm_purge_lockres succeed. call dlmlock again dlm_do_master_request dlm_master_request_handler -> dlm_lockres_set_refmap_bit deref work trigger, call dlm_lockres_clear_refmap_bit to clear Node 1 from refmap dlm_purge_lockres succeed dlm_send_remote_lock_request return DLM_IVLOCKID because the lockres is not exist BUG if the lockres is $RECOVERY This series of patches add a new message to keep the order of set and clear. Other nodes can purge the lock resource only after the refmap bit on master is cleared. This patch is to add DEREF_DONE message and corresponding handler. Node can purge the lock resource after receiving this message. As a new message is added, so increase the minor number of dlm protocol version. Signed-off-by: xuejiufei Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Reviewed-by: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 12 +++++ fs/ocfs2/dlm/dlmdomain.c | 11 ++++- fs/ocfs2/dlm/dlmmaster.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 1 deletion(-) commit 39b29af03049421139656818f45b8ca7e12db3fa Author: Joseph Qi Date: Tue Mar 15 14:53:05 2016 -0700 ocfs2/dlm: fix a typo in dlmcommon.h Refer to cluster/tcp.h, NET_MAX_PAYLOAD_BYTES is a typo for O2NET_MAX_PAYLOAD_BYTES. Since currently DLM_MIG_LOCKRES_RESERVED is not actually used, it won't cause any problem. But we'd better correct it for further use. Signed-off-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfd97a0320d338b2fce422adeddd512466ef2390 Author: jiangyiwen Date: Tue Mar 15 14:53:01 2016 -0700 ocfs2: use spinlock_irqsave() to downconvert lock in ocfs2_osb_dump() Commit a75e9ccabd92 ("ocfs2: use spinlock irqsave for downconvert lock") missed an unmodified place in ocfs2_osb_dump(), so it still exists a deadlock scenario. ocfs2_wake_downconvert_thread ocfs2_rw_unlock ocfs2_dio_end_io dio_complete ..... bio_endio req_bio_endio .... scsi_io_completion blk_done_softirq __do_softirq do_softirq irq_exit do_IRQ ocfs2_osb_dump cat /sys/kernel/debug/ocfs2/${uuid}/fs_state This patch still uses spin_lock_irqsave() - replace spin_lock() to solve this situation. Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4d548f61d61fcaa5b5e14b8d250de9604bdb61bf Author: jiangyiwen Date: Tue Mar 15 14:52:58 2016 -0700 ocfs2/cluster: replace the interrupt safe spinlocks with common ones There actually no hardware or software interrupts in the context which using o2hb_live_lock, so we don't need to worry about race conditions caused by irq/softirq with spinlock held. Turning off irq is not good for system performance after all. Just replace them with a non interrupt safe function. Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit e928f35061a6f3ead993b230b01d9ca6b4f495ca Author: Sudip Mukherjee Date: Tue Mar 15 14:52:55 2016 -0700 blackfin: define dummy pgprot_writecombine for !MMU blackfin allmodconfig build fails with the error: ../sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap': ../sound/core/pcm_native.c:3386:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration] area->vm_page_prot = pgprot_writecombine(area->vm_page_prot); ^ ../sound/core/pcm_native.c:3386:22: error: incompatible types when assigning to type 'pgprot_t {aka struct }' from type 'int' area->vm_page_prot = pgprot_writecombine(area->vm_page_prot); ^ When !MMU, asm-generic will not define default pgprot_writecombine, so blackfin needs to define it by itself. The patch idea is from commit 65b9ab888cd7 ("arch/c6x/include/asm/pgtable.h: define dummy pgprot_writecombine for !MMU") Signed-off-by: Sudip Mukherjee Cc: Steven Miao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/blackfin/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) commit 3701dc815117e0317f6fcf062ff8a28cd171ce44 Author: Sudip Mukherjee Date: Tue Mar 15 14:52:52 2016 -0700 m32r: mm: fix build warning While building we are getting warnings: arch/m32r/mm/init.c:63:17: warning: unused variable 'low' arch/m32r/mm/init.c:62:17: warning: unused variable 'max_dma' max_dma and low are only used if CONFIG_MMU is defined. Lets declare the variables inside the #ifdef. Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/mm/init.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 25528213fe9f75f4e286f08d35a73ca2bb634a50 Author: Peter Zijlstra Date: Tue Mar 15 14:52:49 2016 -0700 tags: Fix DEFINE_PER_CPU expansions $ make tags GEN tags ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name pattern "\1" ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name pattern "\1" ctags: Warning: kernel/locking/lockdep.c:151: null expansion of name pattern "\1" ctags: Warning: kernel/rcu/rcutorture.c:133: null expansion of name pattern "\1" ctags: Warning: kernel/rcu/rcutorture.c:135: null expansion of name pattern "\1" ctags: Warning: kernel/workqueue.c:323: null expansion of name pattern "\1" ctags: Warning: net/ipv4/syncookies.c:53: null expansion of name pattern "\1" ctags: Warning: net/ipv6/syncookies.c:44: null expansion of name pattern "\1" ctags: Warning: net/rds/page.c:45: null expansion of name pattern "\1" Which are all the result of the DEFINE_PER_CPU pattern: scripts/tags.sh:200: '/\ Acked-by: David S. Miller Acked-by: Rafael J. Wysocki Cc: Tejun Heo Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/acpi/processor_idle.c | 4 ++-- drivers/xen/events/events_2l.c | 5 +++-- kernel/locking/lockdep.c | 3 +-- kernel/rcu/rcutorture.c | 6 ++---- kernel/workqueue.c | 3 +-- net/ipv4/syncookies.c | 3 +-- net/ipv6/syncookies.c | 3 +-- net/rds/page.c | 4 ++-- 8 files changed, 13 insertions(+), 18 deletions(-) commit e6fd1fb3b5b58fcfa8e546c69d9cb64aa2c5c9b8 Author: Geliang Tang Date: Tue Mar 15 14:52:46 2016 -0700 init/main.c: use list_for_each_entry() Use list_for_each_entry() instead of list_for_each() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 245f0db0de926601353776085e6f6a4c974c5615 Merge: 24672bd b562e44 Author: Dmitry Torokhov Date: Tue Mar 15 16:54:45 2016 -0700 Merge tag 'v4.5' into next Merge with Linux 4.5 to get PROPERTY_ENTRY_INTEGER() that is needed to fix pxa/raumfeld rotary encoder properties. commit 24672bdfb357b91bed0ea8d432241bf7bdefc8a8 Author: Dan Carpenter Date: Tue Mar 15 16:45:07 2016 -0700 Input: synaptics-rmi4 - using logical instead of bitwise AND There is a typo so we have && instead of &. Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11') Signed-off-by: Dan Carpenter Acked-by: Andrew Duggan Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98347a7d8a93ef8a01c8d1946a2059f38f73b239 Author: Valentin Rothberg Date: Tue Mar 15 09:21:00 2016 +0100 drivers:block: cpqarray clean up Commit d436641439e0 ("cpqarray: remove it from the kernel") removes the Kconfig option BLK_CPQ_DA and cpqarray. Remove the dead build rule in the Makefile. Signed-off-by: Valentin Rothberg Signed-off-by: Jens Axboe drivers/block/Makefile | 1 - 1 file changed, 1 deletion(-) commit b86c75fda662506fe6e55d61994482fb4a704f5f Merge: a7dee8f cdc43ae Author: James Bottomley Date: Tue Mar 15 15:35:03 2016 -0700 Merge remote-tracking branch 'mkp-scsi/4.6/scsi-queue' into misc commit a7dee8f45fa2948b74d8e84ba24e435c87fd0acf Merge: 7ee7895 5ecee0a Author: James Bottomley Date: Tue Mar 15 15:24:44 2016 -0700 Merge branch 'fixes' into misc commit 4c9462b434f299097ac49ef2bf1f7321699fe109 Author: Stephen Boyd Date: Tue Mar 1 11:00:14 2016 -0800 clk: max77{686,802}: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Reviewed-by: Javier Martinez Canillas Signed-off-by: Stephen Boyd drivers/clk/clk-max77686.c | 3 --- drivers/clk/clk-max77802.c | 2 -- 2 files changed, 5 deletions(-) commit ac82a8b5073631940b989c973f77fbaddd2526d0 Author: Stephen Boyd Date: Tue Mar 1 11:00:05 2016 -0800 clk: versatile: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Cc: Pawel Moll Acked-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 2 +- drivers/clk/versatile/clk-impd1.c | 3 +-- drivers/clk/versatile/clk-realview.c | 8 +++----- drivers/clk/versatile/clk-vexpress-osc.c | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) commit 1295e36a488efdad9b21eb0aeabfd0b23a87a313 Author: Stephen Boyd Date: Fri Mar 4 09:18:41 2016 -0800 clk: sunxi: Remove use of variable length array Using an array allocated on the stack may lead to stack overflows and other problems so let's move the allocation to the heap instead. This silences the following checker warning as well. drivers/clk/sunxi/clk-sun8i-mbus.c:36:29: warning: Variable length array is used Cc: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-sun8i-mbus.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5e4298be45e83ecdffaabb370eea9396889b07f1 Author: Bart Van Assche Date: Tue Dec 15 16:38:22 2015 +0100 brd: Fix discard request processing Avoid that discard requests with size => PAGE_SIZE fail with -EIO. Refuse discard requests if the discard size is not a multiple of the page size. Fixes: 2dbe54957636 ("brd: Refuse improperly aligned discard requests") Signed-off-by: Bart Van Assche Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Robert Elliot Cc: stable # v4.4+ Signed-off-by: Jens Axboe drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea8daa7b97842aab8507b5b5b1e3226cf2d514a6 Author: Daniel Wagner Date: Tue Mar 8 09:29:09 2016 +0100 kbuild: Add option to turn incompatible pointer check into error With the introduction of the simple wait API we have two very similar APIs in the kernel. For example wake_up() and swake_up() is only one character away. Although the compiler will warn happily the wrong usage it keeps on going an even links the kernel. Thomas and Peter would rather like to see early missuses reported as error early on. In a first attempt we tried to wrap all swait and wait calls into a macro which has an compile time type assertion. The result was pretty ugly and wasn't able to catch all wrong usages. woken_wake_function(), autoremove_wake_function() and wake_bit_function() are assigned as function pointers. Wrapping them with a macro around is not possible. Prefixing them with '_' was also not a real option because there some users in the kernel which do use them as well. All in all this attempt looked to intrusive and too ugly. An alternative is to turn the pointer type check into an error which catches wrong type uses. Obviously not only the swait/wait ones. That isn't a bad thing either. Signed-off-by: Daniel Wagner Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Michal Marek Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 710d60cbf1b312a8075a2158cbfbbd9c66132dcc Merge: df2e37c d10ef6f Author: Linus Torvalds Date: Tue Mar 15 13:50:29 2016 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull cpu hotplug updates from Thomas Gleixner: "This is the first part of the ongoing cpu hotplug rework: - Initial implementation of the state machine - Runs all online and prepare down callbacks on the plugged cpu and not on some random processor - Replaces busy loop waiting with completions - Adds tracepoints so the states can be followed" More detailed commentary on this work from an earlier email: "What's wrong with the current cpu hotplug infrastructure? - Asymmetry The hotplug notifier mechanism is asymmetric versus the bringup and teardown. This is mostly caused by the notifier mechanism. - Largely undocumented dependencies While some notifiers use explicitely defined notifier priorities, we have quite some notifiers which use numerical priorities to express dependencies without any documentation why. - Control processor driven Most of the bringup/teardown of a cpu is driven by a control processor. While it is understandable, that preperatory steps, like idle thread creation, memory allocation for and initialization of essential facilities needs to be done before a cpu can boot, there is no reason why everything else must run on a control processor. Before this patch series, bringup looks like this: Control CPU Booting CPU do preparatory steps kick cpu into life do low level init sync with booting cpu sync with control cpu bring the rest up - All or nothing approach There is no way to do partial bringups. That's something which is really desired because we waste e.g. at boot substantial amount of time just busy waiting that the cpu comes to life. That's stupid as we could very well do preparatory steps and the initial IPI for other cpus and then go back and do the necessary low level synchronization with the freshly booted cpu. - Minimal debuggability Due to the notifier based design, it's impossible to switch between two stages of the bringup/teardown back and forth in order to test the correctness. So in many hotplug notifiers the cancel mechanisms are either not existant or completely untested. - Notifier [un]registering is tedious To [un]register notifiers we need to protect against hotplug at every callsite. There is no mechanism that bringup/teardown callbacks are issued on the online cpus, so every caller needs to do it itself. That also includes error rollback. What's the new design? The base of the new design is a symmetric state machine, where both the control processor and the booting/dying cpu execute a well defined set of states. Each state is symmetric in the end, except for some well defined exceptions, and the bringup/teardown can be stopped and reversed at almost all states. So the bringup of a cpu will look like this in the future: Control CPU Booting CPU do preparatory steps kick cpu into life do low level init sync with booting cpu sync with control cpu bring itself up The synchronization step does not require the control cpu to wait. That mechanism can be done asynchronously via a worker or some other mechanism. The teardown can be made very similar, so that the dying cpu cleans up and brings itself down. Cleanups which need to be done after the cpu is gone, can be scheduled asynchronously as well. There is a long way to this, as we need to refactor the notion when a cpu is available. Today we set the cpu online right after it comes out of the low level bringup, which is not really correct. The proper mechanism is to set it to available, i.e. cpu local threads, like softirqd, hotplug thread etc. can be scheduled on that cpu, and once it finished all booting steps, it's set to online, so general workloads can be scheduled on it. The reverse happens on teardown. First thing to do is to forbid scheduling of general workloads, then teardown all the per cpu resources and finally shut it off completely. This patch series implements the basic infrastructure for this at the core level. This includes the following: - Basic state machine implementation with well defined states, so ordering and prioritization can be expressed. - Interfaces to [un]register state callbacks This invokes the bringup/teardown callback on all online cpus with the proper protection in place and [un]installs the callbacks in the state machine array. For callbacks which have no particular ordering requirement we have a dynamic state space, so that drivers don't have to register an explicit hotplug state. If a callback fails, the code automatically does a rollback to the previous state. - Sysfs interface to drive the state machine to a particular step. This is only partially functional today. Full functionality and therefor testability will be achieved once we converted all existing hotplug notifiers over to the new scheme. - Run all CPU_ONLINE/DOWN_PREPARE notifiers on the booting/dying processor: Control CPU Booting CPU do preparatory steps kick cpu into life do low level init sync with booting cpu sync with control cpu wait for boot bring itself up Signal completion to control cpu In a previous step of this work we've done a full tree mechanical conversion of all hotplug notifiers to the new scheme. The balance is a net removal of about 4000 lines of code. This is not included in this series, as we decided to take a different approach. Instead of mechanically converting everything over, we will do a proper overhaul of the usage sites one by one so they nicely fit into the symmetric callback scheme. I decided to do that after I looked at the ugliness of some of the converted sites and figured out that their hotplug mechanism is completely buggered anyway. So there is no point to do a mechanical conversion first as we need to go through the usage sites one by one again in order to achieve a full symmetric and testable behaviour" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) cpu/hotplug: Document states better cpu/hotplug: Fix smpboot thread ordering cpu/hotplug: Remove redundant state check cpu/hotplug: Plug death reporting race rcu: Make CPU_DYING_IDLE an explicit call cpu/hotplug: Make wait for dead cpu completion based cpu/hotplug: Let upcoming cpu bring itself fully up arch/hotplug: Call into idle with a proper state cpu/hotplug: Move online calls to hotplugged cpu cpu/hotplug: Create hotplug threads cpu/hotplug: Split out the state walk into functions cpu/hotplug: Unpark smpboot threads from the state machine cpu/hotplug: Move scheduler cpu_online notifier to hotplug core cpu/hotplug: Implement setup/removal interface cpu/hotplug: Make target state writeable cpu/hotplug: Add sysfs state interface cpu/hotplug: Hand in target state to _cpu_up/down cpu/hotplug: Convert the hotplugged cpu work to a state machine cpu/hotplug: Convert to a state machine for the control processor cpu/hotplug: Add tracepoints ... commit df2e37c814d51692803245fcbecca360d4882e96 Merge: 8a284c0 8e7fe26 Author: Linus Torvalds Date: Tue Mar 15 12:48:48 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: "The 4.6 pile of irq updates contains: - Support for IPI irqdomains to support proper integration of IPIs to and from coprocessors. The first user of this new facility is MIPS. The relevant MIPS patches come with the core to avoid merge ordering issues and have been acked by Ralf. - A new command line option to set the default interrupt affinity mask at boot time. - Support for some more new ARM and MIPS interrupt controllers: tango, alpine-msix and bcm6345-l1 - Two small cleanups for x86/apic which we merged into irq/core to avoid yet another branch in x86 with two tiny commits. - The usual set of updates, cleanups in drivers/irqchip. Mostly in the area of ARM-GIC, arada-37-xp and atmel chips. Nothing outstanding here" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits) irqchip/irq-alpine-msi: Release the correct domain on error irqchip/mxs: Fix error check of of_io_request_and_map() irqchip/sunxi-nmi: Fix error check of of_io_request_and_map() genirq: Export IRQ functions for module use irqchip/gic/realview: Support more RealView DCC variants Documentation/bindings: Document the Alpine MSIX driver irqchip: Add the Alpine MSIX interrupt controller irqchip/gic-v3: Always return IRQ_SET_MASK_OK_DONE in gic_set_affinity irqchip/gic-v3-its: Mark its_init() and its children as __init irqchip/gic-v3: Remove gic_root_node variable from the ITS code irqchip/gic-v3: ACPI: Add redistributor support via GICC structures irqchip/gic-v3: Add ACPI support for GICv3/4 initialization irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver x86/apic: Deinline _flat_send_IPI_mask, save ~150 bytes x86/apic: Deinline __default_send_IPI_*, save ~200 bytes dt-bindings: interrupt-controller: Add SoC-specific compatible string to Marvell ODMI irqchip/mips-gic: Add new DT property to reserve IPIs MIPS: Delete smp-gic.c MIPS: Make smp CMP, CPS and MT use the new generic IPI functions MIPS: Add generic SMP IPI support ... commit 8a284c062ec923c924c79e3b1b5199b8d72904fc Merge: 208de21 6436257 Author: Linus Torvalds Date: Tue Mar 15 12:13:56 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: "The timer department delivers this time: - Support for cross clock domain timestamps in the core code plus a first user. That allows more precise timestamping for PTP and later for audio and other peripherals. The ptp/e1000e patches have been acked by the relevant maintainers and are carried in the timer tree to avoid merge ordering issues. - Support for unregistering the current clocksource watchdog. That lifts a limitation for switching clocksources which has been there from day 1 - The usual pile of fixes and updates to the core and the drivers. Nothing outstanding and exciting" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) time/timekeeping: Work around false positive GCC warning e1000e: Adds hardware supported cross timestamp on e1000e nic ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping x86/tsc: Always Running Timer (ART) correlated clocksource hrtimer: Revert CLOCK_MONOTONIC_RAW support time: Add history to cross timestamp interface supporting slower devices time: Add driver cross timestamp interface for higher precision time synchronization time: Remove duplicated code in ktime_get_raw_and_real() time: Add timekeeping snapshot code capturing system time and counter time: Add cycles to nanoseconds translation jiffies: Use CLOCKSOURCE_MASK instead of constant clocksource: Introduce clocksource_freq2mult() clockevents/drivers/exynos_mct: Implement ->set_state_oneshot_stopped() clockevents/drivers/arm_global_timer: Implement ->set_state_oneshot_stopped() clockevents/drivers/arm_arch_timer: Implement ->set_state_oneshot_stopped() clocksource/drivers/arm_global_timer: Register delay timer clocksource/drivers/lpc32xx: Support timer-based ARM delay clocksource/drivers/lpc32xx: Support periodic mode clocksource/drivers/lpc32xx: Don't use the prescaler counter for clockevents clocksource/drivers/rockchip: Add err handle for rk_timer_init ... commit 4ee86babe09f0682a60b1c56be99819bbe4ba62c Author: Hannes Reinecke Date: Tue Mar 15 12:03:28 2016 -0700 blk-mq: add bounds check on tag-to-rq conversion We need to check for a valid index before accessing the array element to avoid accessing invalid memory regions. Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer Modified by Jens to drop the unlikely(), and make the fall through path be having a valid tag. Signed-off-by: Jens Axboe block/blk-mq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 208de21477679175384b5dc1e6dcf97bd568e8cb Merge: ae465be 6701915 Author: Linus Torvalds Date: Tue Mar 15 11:38:05 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 in this cycle were: - Miscellaneous fixes, cleanups, restructuring. - RCU torture-test updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rcu: Export rcu_gp_is_normal() rcu: Remove rcu_user_hooks_switch rcu: Catch up rcu_report_qs_rdp() comment with reality rcu: Document unique-name limitation for DEFINE_STATIC_SRCU() rcu: Make rcu/tiny_plugin.h explicitly non-modular irq: Privatize irq_common_data::state_use_accessors RCU: Privatize rcu_node::lock sparse: Add __private to privatize members of structs rcu: Remove useless rcu_data_p when !PREEMPT_RCU rcutorture: Correct no-expedite console messages rcu: Set rdp->gpwrap when CPU is idle rcu: Stop treating in-kernel CPU-bound workloads as errors rcu: Update rcu_report_qs_rsp() comment rcu: Assign false instead of 0 for ->core_needs_qs rcutorture: Check for self-detected stalls rcutorture: Don't keep empty console.log.diags files rcutorture: Add checks for rcutorture writer starvation commit ae465beeff5e7f49e029c7de02f055fe0dca4b19 Merge: 8ab84ef c25323c Author: Linus Torvalds Date: Tue Mar 15 11:29:24 2016 -0700 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer update from Ingo Molnar: "A single simplification of the x86 TSC code" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Use topology functions commit 8ab84ef699e5495d37ace5801c5cb788cafcf9da Merge: 13c76ad c637fa5 Author: Linus Torvalds Date: Tue Mar 15 11:20:44 2016 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core platform updates from Ingo Molnar: "Intel Quark and Geode SoC platform updates" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/intel/quark: Drop IMR lock bit support x86/platform/intel/mid: Remove dead code x86/platform: Make platform/geode/net5501.c explicitly non-modular x86/platform: Make platform/geode/alix.c explicitly non-modular x86/platform: Make platform/geode/geos.c explicitly non-modular x86/platform: Make platform/intel-quark/imr_selftest.c explicitly non-modular x86/platform: Make platform/intel-quark/imr.c explicitly non-modular commit 13c76ad87216513db2487aac84155aa57dfd46ce Merge: 9cf8d63 8b8addf Author: Linus Torvalds Date: Tue Mar 15 10:45:39 2016 -0700 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "The main changes in this cycle were: - Enable full ASLR randomization for 32-bit programs (Hector Marco-Gisbert) - Add initial minimal INVPCI support, to flush global mappings (Andy Lutomirski) - Add KASAN enhancements (Andrey Ryabinin) - Fix mmiotrace for huge pages (Karol Herbst) - ... misc cleanups and small enhancements" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/32: Enable full randomization on i386 and X86_32 x86/mm/kmmio: Fix mmiotrace for hugepages x86/mm: Avoid premature success when changing page attributes x86/mm/ptdump: Remove paravirt_enabled() x86/mm: Fix INVPCID asm constraint x86/dmi: Switch dmi_remap() from ioremap() [uncached] to ioremap_cache() x86/mm: If INVPCID is available, use it to flush global mappings x86/mm: Add a 'noinvpcid' boot option to turn off INVPCID x86/mm: Add INVPCID helpers x86/kasan: Write protect kasan zero shadow x86/kasan: Clear kasan_zero_page after TLB flush x86/mm/numa: Check for failures in numa_clear_kernel_node_hotplug() x86/mm/numa: Clean up numa_clear_kernel_node_hotplug() x86/mm: Make kmap_prot into a #define x86/mm/32: Set NX in __supported_pte_mask before enabling paging x86/mm: Streamline and restore probe_memory_block_size() commit 9cf8d6360c1589a97a98313729ed9e5db187f80b Merge: ecc026b 4ace2e7 Author: Linus Torvalds Date: Tue Mar 15 10:39:22 2016 -0700 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode updates from Ingo Molnar: "The biggest change in this cycle was the separation of the microcode loading mechanism from the initrd code plus the support of built-in microcode images. There were also lots cleanups and general restructuring (by Borislav Petkov)" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/microcode/intel: Drop orig_sum from ext signature checksum x86/microcode/intel: Improve microcode sanity-checking error messages x86/microcode/intel: Merge two consecutive if-statements x86/microcode/intel: Get rid of DWSIZE x86/microcode/intel: Change checksum variables to u32 x86/microcode: Use kmemdup() rather than duplicating its implementation x86/microcode: Remove unnecessary paravirt_enabled check x86/microcode: Document builtin microcode loading method x86/microcode/AMD: Issue microcode updated message later x86/microcode/intel: Cleanup get_matching_model_microcode() x86/microcode/intel: Remove unused arg of get_matching_model_microcode() x86/microcode/intel: Rename mc_saved_in_initrd x86/microcode/intel: Use *wrmsrl variants x86/microcode/intel: Cleanup apply_microcode_intel() x86/microcode/intel: Move the BUG_ON up and turn it into WARN_ON x86/microcode/intel: Rename mc_intel variable to mc x86/microcode/intel: Rename mc_saved_count to num_saved x86/microcode/intel: Rename local variables of type struct mc_saved_data x86/microcode/AMD: Drop redundant printk prefix x86/microcode: Issue update message only once ... commit ecc026bff6e8444c6b50dcde192e7acdaf42bf82 Merge: fa53c48 14ddde7 Author: Linus Torvalds Date: Tue Mar 15 10:23:56 2016 -0700 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: "The biggest change in terms of impact is the changing of the FPU context switch model to 'eagerfpu' for all CPU types, via: commit 58122bf1d856: "x86/fpu: Default eagerfpu=on on all CPUs" This makes all FPU saves and restores synchronous and makes the FPU code a lot more obvious to read. In the next cycle, if this change is problem free, we'll remove the old lazy FPU restore code altogether. This change flushed out some old bugs, which should all be fixed by now, BYMMV" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Default eagerfpu=on on all CPUs x86/fpu: Speed up lazy FPU restores slightly x86/fpu: Fold fpu_copy() into fpu__copy() x86/fpu: Fix FNSAVE usage in eagerfpu mode x86/fpu: Fix math emulation in eager fpu mode commit fa53c4893994da439c6a74a03a13572cf7e1b41a Merge: 42576be 8b30a8b Author: Linus Torvalds Date: Tue Mar 15 10:16:48 2016 -0700 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build update from Ingo Molnar: "A single adjustment of a defconfig value" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/defconfigs/32: Set CONFIG_FRAME_WARN to the Kconfig default commit b62232d429fa8b1dcf5d8503aa5a5397a03e646a Author: Takashi Iwai Date: Tue Mar 15 18:15:26 2016 +0100 ALSA: hda - Limit i915 HDMI binding only for HSW and later It turned out that the pre-HSW Intel chips are incompatible with the naive assumption we had -- the fixed mapping between the port and the HD-audio widget. This may result in the bad access, as captured by the recent patch to add a WARN_ON() for the port mapping check. As a quick workaround, disable the i915 audio component binding for all pre-Haswell models. Reported-by: Ville Syrjälä Cc: # v4.5 Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 42576bee6eacda29a3193e97961ab3583a324850 Merge: ba33ea8 25b4caf Author: Linus Torvalds Date: Tue Mar 15 10:02:25 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: "Early command line options parsing enhancements from Dave Hansen, plus minor cleanups and enhancements" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Remove unused 'is_big_kernel' variable x86/boot: Use proper array element type in memset() size calculation x86/boot: Pass in size to early cmdline parsing x86/boot: Simplify early command line parsing x86/boot: Fix early command-line parsing when partial word matches x86/boot: Fix early command-line parsing when matching at end x86/boot: Simplify kernel load address alignment check x86/boot: Micro-optimize reset_early_page_tables() commit ba33ea811e1ff6726abb7f8f96df38c2d7b50304 Merge: e23604e d050049 Author: Linus Torvalds Date: Tue Mar 15 09:32:27 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: "This is another big update. Main changes are: - lots of x86 system call (and other traps/exceptions) entry code enhancements. In particular the complex parts of the 64-bit entry code have been migrated to C code as well, and a number of dusty corners have been refreshed. (Andy Lutomirski) - vDSO special mapping robustification and general cleanups (Andy Lutomirski) - cpufeature refactoring, cleanups and speedups (Borislav Petkov) - lots of other changes ..." * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits) x86/cpufeature: Enable new AVX-512 features x86/entry/traps: Show unhandled signal for i386 in do_trap() x86/entry: Call enter_from_user_mode() with IRQs off x86/entry/32: Change INT80 to be an interrupt gate x86/entry: Improve system call entry comments x86/entry: Remove TIF_SINGLESTEP entry work x86/entry/32: Add and check a stack canary for the SYSENTER stack x86/entry/32: Simplify and fix up the SYSENTER stack #DB/NMI fixup x86/entry: Only allocate space for tss_struct::SYSENTER_stack if needed x86/entry: Vastly simplify SYSENTER TF (single-step) handling x86/entry/traps: Clear DR6 early in do_debug() and improve the comment x86/entry/traps: Clear TIF_BLOCKSTEP on all debug exceptions x86/entry/32: Restore FLAGS on SYSEXIT x86/entry/32: Filter NT and speed up AC filtering in SYSENTER x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test selftests/x86: In syscall_nt, test NT|TF as well x86/asm-offsets: Remove PARAVIRT_enabled x86/entry/32: Introduce and use X86_BUG_ESPFIX instead of paravirt_enabled uprobes: __create_xol_area() must nullify xol_mapping.fault x86/cpufeature: Create a new synthetic cpu capability for machine check recovery ... commit 1f7c6658962fa1260c1658d681bd6bb0c746b99a Author: Takashi Iwai Date: Tue Mar 15 16:44:55 2016 +0100 ALSA: hda - Fix unconditional GPIO toggle via automute Cirrus HD-audio driver may adjust GPIO pins for EAPD dynamically depending on the jack plug state. This works fine for the auto-mute mode where the speaker gets muted upon the HP jack plug. OTOH, when the auto-mute mode is off, this turns off the EAPD unexpectedly depending on the jack state, which results in the silent speaker output. This patch fixes the silent speaker output issue by setting GPIO bits constantly when the auto-mute mode is off. Reported-and-tested-by: moosotc@gmail.com Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_cirrus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 73b462d2808d7cbca4d7886cf6aaed850640e6cd Author: Bob Peterson Date: Fri Dec 18 11:44:49 2015 -0600 GFS2: Eliminate parameter non_block on gfs2_inode_lookup Now that we're not filtering out I_FREEING inodes from our lookups anymore, we can eliminate the non_block parameter from the lookup function. Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse fs/gfs2/dir.c | 2 +- fs/gfs2/inode.c | 5 ++--- fs/gfs2/inode.h | 3 +-- fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) commit ff34245d524a898eee6e013eb1ec165095277148 Author: Bob Peterson Date: Fri Mar 27 08:25:41 2015 -0500 GFS2: Don't filter out I_FREEING inodes anymore This patch basically reverts a very old patch from 2008, 7a9f53b3c1875bef22ad4588e818bc046ef183da, with the title "Alternate gfs2_iget to avoid looking up inodes being freed". The original patch was designed to avoid a deadlock caused by lock ordering with try_rgrp_unlink. The patch forced the function to not find inodes that were being removed by VFS. The problem is, that made it impossible for nodes to delete their own unlinked dinodes after a certain point in time, because the inode needed was not found by this filtering process. There is no longer a need for the patch, since function try_rgrp_unlink no longer locks the inode: All it does is queue the glock onto the delete work_queue, so there should be no more deadlock. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse fs/gfs2/export.c | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 59 ++++---------------------------------------------------- fs/gfs2/inode.h | 2 +- 4 files changed, 7 insertions(+), 58 deletions(-) commit a4923865ea071b0bd708339df7a83c76732fa2db Author: Bob Peterson Date: Mon Dec 7 16:24:27 2015 -0600 GFS2: Prevent delete work from occurring on glocks used for create This patch tries to prevent delete work (queued via iopen callback) from executing if the glock is currently being used to create a new inode. Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse fs/gfs2/glock.c | 7 +++++++ fs/gfs2/incore.h | 1 + fs/gfs2/inode.c | 7 ++++++- 3 files changed, 14 insertions(+), 1 deletion(-) commit 2df6f47150b6afbb258ed1d5c9ed78c23df05053 Author: Bob Peterson Date: Wed Jan 27 16:00:38 2016 -0500 GFS2: Fix direct IO write rounding error The fsx test in xfstests was failing because it was using direct IO writes which were using a bad calculation. It was using loff_t lstart = offset & (PAGE_CACHE_SIZE - 1); when it should be loff_t lstart = offset & ~(PAGE_CACHE_SIZE - 1); Thus, the write at offset 0x67e00 was calculating lstart to be 0xe00, the address of our corruption. Instead, it should have been 0x67000. This patch fixes the calculation. Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse fs/gfs2/aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67893f12e5374bbcaaffbc6e570acbc2714ea884 Author: Arnd Bergmann Date: Tue Jan 26 13:08:10 2016 -0500 gfs2: avoid uninitialized variable warning We get a bogus warning about a potential uninitialized variable use in gfs2, because the compiler does not figure out that we never use the leaf number if get_leaf_nr() returns an error: fs/gfs2/dir.c: In function 'get_first_leaf': fs/gfs2/dir.c:802:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized] fs/gfs2/dir.c: In function 'dir_split_leaf': fs/gfs2/dir.c:1021:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized] Changing the 'if (!error)' to 'if (!IS_ERR_VALUE(error))' is sufficient to let gcc understand that this is exactly the same condition as in IS_ERR() so it can optimize the code path enough to understand it. Signed-off-by: Arnd Bergmann Signed-off-by: Bob Peterson fs/gfs2/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d1b564ff852944a10b524f21dfb78818bd43f52 Author: Heiner Kallweit Date: Thu Mar 10 20:52:21 2016 +0100 hid: thingm: reorder calls in thingm_probe When reviewing another thingm patch Benjamin Tissoires pointed out the following: "The problem here is that hid_hw_start() is called before thingm_version() which allows user space to briefly introduce races between thingm_version() and any hidraw requests. The mutex will not help here as it is initialized after hid_hw_start() and only used for protecting the concurrent access of the rgb." Avoid this possible issue by calling hid_hw_start() later in the probe function. Signed-off-by: Heiner Kallweit Signed-off-by: Jiri Kosina drivers/hid/hid-thingm.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 6e6f498b039aa5558c7377fbbe65f7421d34cea4 Merge: cfeb813 bd5174d Author: Bjorn Helgaas Date: Tue Mar 15 08:56:28 2016 -0500 Merge branch 'pci/resource' into next * pci/resource: PCI: Simplify pci_create_attr() control flow PCI: Don't leak memory if sysfs_create_bin_file() fails PCI: Simplify sysfs ROM cleanup PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource MIPS: Loongson 3: Use temporary struct resource * to avoid repetition ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource ia64/PCI: Use ioremap() instead of open-coded equivalent ia64/PCI: Use temporary struct resource * to avoid repetition PCI: Clean up pci_map_rom() whitespace PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs PCI: Set ROM shadow location in arch code, not in PCI core PCI: Don't enable/disable ROM BAR if we're using a RAM shadow copy PCI: Don't assign or reassign immutable resources PCI: Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs PCI: Disable IO/MEM decoding for devices with non-compliant BARs commit cfeb8139a1fbbbae3f1e986133f4e9e7833eeac4 Merge: 562df5c 4daace0 Author: Bjorn Helgaas Date: Tue Mar 15 08:56:16 2016 -0500 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs PCI: Look up IRQ domain by fwnode_handle PCI: Add fwnode_handle to x86 pci_sysdata commit 562df5c8521e1371f3cbd0b7b868034da376d714 Merge: c334f9c 5a3aa2a Author: Bjorn Helgaas Date: Tue Mar 15 08:55:52 2016 -0500 Merge branch 'pci/host-designware' into next * pci/host-designware: PCI: designware: Add driver for prototyping kits based on ARC SDP PCI: designware: Add default link up check if sub-driver doesn't override PCI: designware: Add generic dw_pcie_wait_for_link() ARC: Add PCI support commit c334f9c89e40d2c9f4598e87e186bf3264d39e51 Merge: 18e5e69 eff31f4 28e3abe 25de15c9 304e6d57 e32faa3 7b6e7ba 2c2c5c5 01cf9d5 ab597d3 Author: Bjorn Helgaas Date: Tue Mar 15 08:55:19 2016 -0500 Merge branches 'pci/host-altera', 'pci/host-imx6', 'pci/host-keystone', 'pci/host-rcar', 'pci/host-tegra', 'pci/host-thunder', 'pci/host-vmd', 'pci/host-xilinx' and 'pci/host-xilinx-nwl' into next * pci/host-altera: PCI: altera: Fix altera_pcie_link_is_up() * pci/host-imx6: PCI: imx6: Add DT bindings to configure PHY Tx driver settings * pci/host-keystone: PCI: keystone: Defer probing if devm_phy_get() returns -EPROBE_DEFER * pci/host-rcar: PCI: rcar: Depend on ARCH_RENESAS, not ARCH_SHMOBILE * pci/host-tegra: PCI: tegra: Remove misleading PHYS_OFFSET PCI: tegra: Track bus -> CPU mapping PCI: tegra: Remove unused struct tegra_pcie.num_ports field PCI: tegra: Implement ->{add,remove}_bus() callbacks PCI: Add pci_ops.{add,remove}_bus() callbacks * pci/host-thunder: PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices PCI: thunder: Add PCIe host driver for ThunderX processors PCI: generic: Expose pci_host_common_probe() for use by other drivers PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe() PCI: generic: Move structure definitions to separate header file * pci/host-vmd: x86/PCI: VMD: Attach VMD resources to parent domain's resource tree x86/PCI: VMD: Set bus resource start to 0 x86/PCI: VMD: Document code for maintainability * pci/host-xilinx: microblaze/PCI: Support generic Xilinx AXI PCIe Host Bridge IP driver PCI: xilinx: Update Zynq binding with Microblaze node PCI: xilinx: Don't call pci_fixup_irqs() on Microblaze PCI: xilinx: Remove dependency on ARM-specific struct hw_pci PCI: xilinx: Use of_pci_get_host_bridge_resources() to parse DT * pci/host-xilinx-nwl: PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller commit 18e5e6913b1ae5c6f60390945d4c8446f5c40c89 Merge: a314966 8e47e15 6ca7227 cc73176 7b78f48 5adecf8 7c20078 Author: Bjorn Helgaas Date: Tue Mar 15 08:55:02 2016 -0500 Merge branches 'pci/aer', 'pci/enumeration', 'pci/kconfig', 'pci/misc', 'pci/virtualization' and 'pci/vpd' into next * pci/aer: PCI/AER: Log aer_inject error injections PCI/AER: Log actual error causes in aer_inject PCI/AER: Use dev_warn() in aer_inject PCI/AER: Fix aer_inject error codes * pci/enumeration: PCI: Fix broken URL for Dell biosdevname * pci/kconfig: PCI: Cleanup pci/pcie/Kconfig whitespace PCI: Include pci/hotplug Kconfig directly from pci/Kconfig PCI: Include pci/pcie/Kconfig directly from pci/Kconfig * pci/misc: PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition PCI: Add QEMU top-level IDs for (sub)vendor & device unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition PCI: Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h PCI: Move pci_dma_* helpers to common code frv/PCI: Remove stray pci_{alloc,free}_consistent() declaration * pci/virtualization: PCI: Wait for up to 1000ms after FLR reset PCI: Support SR-IOV on any function type * pci/vpd: PCI: Prevent VPD access for buggy devices PCI: Sleep rather than busy-wait for VPD access completion PCI: Fold struct pci_vpd_pci22 into struct pci_vpd PCI: Rename VPD symbols to remove unnecessary "pci22" PCI: Remove struct pci_vpd_ops.release function pointer PCI: Move pci_vpd_release() from header file to pci/access.c PCI: Move pci_read_vpd() and pci_write_vpd() close to other VPD code PCI: Determine actual VPD size on first access PCI: Use bitfield instead of bool for struct pci_vpd_pci22.busy PCI: Allow access to VPD attributes with size 0 PCI: Update VPD definitions commit 7b78f48a0443eceae435870b14e86d586f8c2a3e Author: Heikki Krogerus Date: Tue Mar 15 14:06:00 2016 +0200 PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition PCI-SIG has defined Interface FEh for Base Class 0Ch, Sub-Class 03h as "USB Device (not host controller)". It is already being used in various USB device controller drivers for matching, so add PCI_CLASS_SERIAL_USB_DEVICE and use it. Signed-off-by: Heikki Krogerus Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 2 +- drivers/usb/gadget/udc/amd5536udc.c | 2 +- drivers/usb/gadget/udc/goku_udc.c | 2 +- drivers/usb/gadget/udc/net2280.c | 8 ++++---- drivers/usb/gadget/udc/pch_udc.c | 8 ++++---- include/linux/pci_ids.h | 1 + 6 files changed, 12 insertions(+), 11 deletions(-) commit 5a3aa2a8fae4ce1a3ad786d212b8fffca8ee72f5 Author: Joao Pinto Date: Thu Mar 10 14:44:52 2016 -0600 PCI: designware: Add driver for prototyping kits based on ARC SDP Add a reference platform driver for PCI RC IP Protoyping Kits based on the ARC SDP. [bhelgaas: changelog, split patch up, MAINTAINERS update] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand .../devicetree/bindings/pci/designware-pcie.txt | 17 +++ MAINTAINERS | 7 ++ drivers/pci/host/Kconfig | 11 ++ drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-designware-plat.c | 138 +++++++++++++++++++++ 5 files changed, 174 insertions(+) commit dac29e6c5460d05774e3e8c4fdf4d6e7bd481fab Author: Joao Pinto Date: Thu Mar 10 14:44:44 2016 -0600 PCI: designware: Add default link up check if sub-driver doesn't override Add a default DesignWare "link_up" test for use when a sub-driver doesn't supply its own pcie_host_ops.link_up() method. [bhelgaas: changelog, split into its own patch] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand drivers/pci/host/pcie-designware.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 886bc5ceb5cc3ad4b219502d72b277e3c3255a32 Author: Joao Pinto Date: Thu Mar 10 14:44:35 2016 -0600 PCI: designware: Add generic dw_pcie_wait_for_link() Several DesignWare-based drivers (dra7xx, exynos, imx6, keystone, qcom, and spear13xx) had similar loops waiting for the link to come up. Add a generic dw_pcie_wait_for_link() for use by all these drivers so the waiting is done consistently, e.g., always using usleep_range() rather than mdelay() and using similar timeouts and retry counts. Note that this changes the Keystone link training/wait for link strategy, so we initiate link training, then wait longer for the link to come up before re-initiating link training. [bhelgaas: changelog, split into its own patch, update pci-keystone.c, pcie-qcom.c] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand drivers/pci/host/pci-dra7xx.c | 11 +---------- drivers/pci/host/pci-exynos.c | 13 +++---------- drivers/pci/host/pci-imx6.c | 13 ++++--------- drivers/pci/host/pci-keystone.c | 10 ++++------ drivers/pci/host/pcie-designware.c | 19 +++++++++++++++++++ drivers/pci/host/pcie-designware.h | 6 ++++++ drivers/pci/host/pcie-qcom.c | 12 +----------- drivers/pci/host/pcie-spear13xx.c | 14 +------------- 8 files changed, 39 insertions(+), 59 deletions(-) commit cc73176cc91b67f4f07385d0dcfde954e54f42c3 Author: Andreas Ziegler Date: Tue Mar 15 12:28:32 2016 +0100 PCI: Cleanup pci/pcie/Kconfig whitespace Clean up style issues in drivers/pci/pcie/Kconfig, in particular all indentation is now done using tabs, not spaces, and the definition of PCIEASPM_DEBUG is now separated from the definition of PCIEASPM with a newline. Signed-off-by: Andreas Ziegler Signed-off-by: Bjorn Helgaas drivers/pci/pcie/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3b654288b196ceaa156029d9457ccbded0489b98 Author: Dmitry Torokhov Date: Mon Mar 14 15:21:04 2016 -0700 HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report() Even though hid_hw_* checks that passed in data_len is less than HID_MAX_BUFFER_SIZE it is not enough, as i2c-hid does not necessarily allocate buffers of HID_MAX_BUFFER_SIZE but rather checks all device reports and select largest size. In-kernel users normally just send as much data as report needs, so there is no problem, but hidraw users can do whatever they please: BUG: KASAN: slab-out-of-bounds in memcpy+0x34/0x54 at addr ffffffc07135ea80 Write of size 4101 by task syz-executor/8747 CPU: 2 PID: 8747 Comm: syz-executor Tainted: G BU 3.18.0 #37 Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT) Call trace: [] dump_backtrace+0x0/0x258 arch/arm64/kernel/traps.c:83 [] show_stack+0x1c/0x2c arch/arm64/kernel/traps.c:172 [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x90/0x140 lib/dump_stack.c:50 [< inline >] print_error_description mm/kasan/report.c:97 [< inline >] kasan_report_error mm/kasan/report.c:278 [] kasan_report+0x268/0x530 mm/kasan/report.c:305 [] __asan_storeN+0x20/0x150 mm/kasan/kasan.c:718 [] memcpy+0x30/0x54 mm/kasan/kasan.c:299 [] __i2c_hid_command+0x2b0/0x7b4 drivers/hid/i2c-hid/i2c-hid.c:178 [< inline >] i2c_hid_set_or_send_report drivers/hid/i2c-hid/i2c-hid.c:321 [] i2c_hid_output_raw_report.isra.2+0x3d4/0x4b8 drivers/hid/i2c-hid/i2c-hid.c:589 [] i2c_hid_output_report+0x54/0x68 drivers/hid/i2c-hid/i2c-hid.c:602 [< inline >] hid_hw_output_report include/linux/hid.h:1039 [] hidraw_send_report+0x400/0x414 drivers/hid/hidraw.c:154 [] hidraw_write+0x40/0x64 drivers/hid/hidraw.c:177 [] vfs_write+0x1d4/0x3cc fs/read_write.c:534 [< inline >] SYSC_pwrite64 fs/read_write.c:627 [] SyS_pwrite64+0xec/0x144 fs/read_write.c:614 Object at ffffffc07135ea80, in cache kmalloc-512 Object allocated with size 268 bytes. Let's check data length against the buffer size before attempting to copy data over. Cc: stable@vger.kernel.org Reported-by: Alexander Potapenko Signed-off-by: Dmitry Torokhov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit b47ff7e6a534bc285eb98f90eadd2a56e2e54056 Author: Andrzej Hajda Date: Tue Mar 15 13:46:28 2016 +0100 drm/atmel-hlcdc: use helper to get crtc state DRM core provide helper to access crtc state. Signed-off-by: Andrzej Hajda Acked-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1458045988-25246-1-git-send-email-a.hajda@samsung.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2943ef32c97666a6556c98496722c4b72420ad37 Author: Andrzej Hajda Date: Tue Mar 15 13:46:00 2016 +0100 drm/atomic: use helper to get crtc state DRM core provide helper to access crtc state. Signed-off-by: Andrzej Hajda Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1458045960-25193-1-git-send-email-a.hajda@samsung.com drivers/gpu/drm/drm_atomic_helper.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 93fce954427effee89e44a976299b15dd75b4bbc Author: Dan Carpenter Date: Fri Mar 11 10:51:51 2016 +0300 drm/amdkfd: uninitialized variable in dbgdev_wave_control_set_registers() At the end of the function we expect "status" to be zero, but it's either -EINVAL or uninitialized. Fixes: 788bf83db301 ('drm/amdkfd: Add wave control operation to debugger') Signed-off-by: Dan Carpenter Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8331c055b23c4155b896a2c3791704ae68992d2b Merge: b562e44 840f5b0 Author: Mauro Carvalho Chehab Date: Tue Mar 15 07:48:28 2016 -0300 Merge commit '840f5b0572ea' into v4l_for_linus * commit '840f5b0572ea': (381 commits) media: au0828 disable tuner to demod link in au0828_media_device_register() [media] touptek: cast char types on %x printk [media] touptek: don't DMA at the stack [media] mceusb: use %*ph for small buffer dumps [media] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links [media] v4l: vsp1: Check if an entity is a subdev with the right function [media] hide unused functions for !MEDIA_CONTROLLER [media] em28xx: fix Terratec Grabby AC97 codec detection [media] media: add prefixes to interface types [media] media: rc: nuvoton: switch attribute wakeup_data to text [media] v4l2-ioctl: fix YUV422P pixel format description [media] media: fix null pointer dereference in v4l_vb2q_enable_media_source() [media] v4l2-mc.h: fix yet more compiler errors [media] staging/media: add missing TODO files [media] media.h: always start with 1 for the audio entities [media] sound/usb: Use meaninful names for goto labels [media] v4l2-mc.h: fix compiler warnings [media] media: au0828 audio mixer isn't connected to decoder [media] sound/usb: Use Media Controller API to share media resources [media] dw2102: add support for TeVii S662 ... commit df420fd68811c98e2a563e8b6ff7eb04aa9c8141 Author: Lada Trimasova Date: Mon Mar 14 17:11:57 2016 +0300 arc: [plat-nsimosci*] use ezchip network driver Since ezchip network driver was adapted to little endian architecture this patch provides the corresponding arch/arc/{boot/dts,configs}/ updates so we can switch over to this device-model/driver for OSCI platform. Cc: Alexey Brodkin Signed-off-by: Lada Trimasova Signed-off-by: Vineet Gupta arch/arc/boot/dts/nsimosci.dts | 5 ++--- arch/arc/boot/dts/nsimosci_hs.dts | 5 ++--- arch/arc/boot/dts/nsimosci_hs_idu.dts | 5 ++--- arch/arc/configs/nsimosci_defconfig | 1 + arch/arc/configs/nsimosci_hs_defconfig | 1 + arch/arc/configs/nsimosci_hs_smp_defconfig | 2 ++ 6 files changed, 10 insertions(+), 9 deletions(-) commit b31ac42697bef4a3aa5d0aa42375a55657f57174 Author: Vineet Gupta Date: Tue Mar 15 11:36:43 2016 +0530 ARCv2: LLSC: software backoff is NOT needed starting HS2.1c Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 +- arch/arc/kernel/setup.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) commit 743146db071c4a828159211a295d12ff4f61752f Author: Vitaly Kuznetsov Date: Tue Mar 15 09:20:33 2016 +0100 x86/video: Don't assume all FB devices are PCI devices When booting Hyper-V Generation 2 guests KASAN reports the following out-of-bounds access: BUG: KASAN: slab-out-of-bounds in fb_is_primary_device+0x58/0x70 at addr ffff880079cf0eb0 Read of size 8 by task swapper/0/1 ... [] dump_stack+0x63/0x8b [] print_trailer+0xf9/0x150 [] object_err+0x34/0x40 [] kasan_report_error+0x230/0x550 [] kasan_report+0x58/0x60 [] ? ___slab_alloc+0x80/0x490 [] ? fb_is_primary_device+0x58/0x70 [] __asan_load8+0x5d/0x70 [] fb_is_primary_device+0x58/0x70 [] register_framebuffer+0xda/0x5b0 [] ? remove_conflicting_framebuffers+0x50/0x50 ... The issue is caused by the to_pci_dev() call with no check that the given info->device is in fact a PCI device and some FB devices (Hyper-V FB, EFI FB,...) are not. While on it, clean up the function. Signed-off-by: Vitaly Kuznetsov Acked-by: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Cathy Avery Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1458030033-10122-1-git-send-email-vkuznets@redhat.com Signed-off-by: Ingo Molnar arch/x86/video/fbdev.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit bb51537aa825e98b970c784f802e7e09f29df3ba Author: Geert Uytterhoeven Date: Mon Mar 14 16:30:16 2016 +0100 spi: rockchip: Spelling s/divsor/divisor/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd5dc001581a7cf6f563e188c302caae1be998c2 Author: Arnd Bergmann Date: Mon Mar 14 15:49:54 2016 +0100 ASoC: cs35l32: avoid uninitialized variable access gcc warns about the possibilty of accessing a property read from devicetree in cs35l32_i2c_probe() when it has not been initialized because CONFIG_OF is disabled: sound/soc/codecs/cs35l32.c: In function 'cs35l32_i2c_probe': sound/soc/codecs/cs35l32.c:278:2: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] The code is actually correct because it checks the dev->of_node variable first and we know this is NULL here when CONFIG_OF is disabled, but Russell King noticed that it's broken when we probe the device using DT, and the properties are absent. The code already has some checking for incorrect values, and I keep that checking unchanged here, but add an additional check for an error returned by the property accessor functions that now gets handled the same way as incorrect data in the properties. Signed-off-by: Arnd Bergmann Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l32.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 294783e092217bb973b38dbefa11ec4c86878a0e Author: Dan Carpenter Date: Tue Mar 15 10:09:17 2016 +0300 ALSA: mixart: silence unitialized variable warnings We print can print the uninitialized memory on error. Which is an info leak, I suppose but it's basically harmless. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/pci/mixart/mixart_mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45fe3fca6d5e9789dd274521180f364437d596e7 Author: Andrew F. Davis Date: Fri Mar 4 12:58:44 2016 -0600 gpio: Add generic serializer DT binding Add binding for generic parallel-in/serial-out shift register devices used as GPIO. Signed-off-by: Andrew F. Davis Acked-by: Rob Herring [Clarified ngpios semantic] Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-pisosr.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 670191572e929ca351e65f532ff51b1f61f424dc Merge: 8bc6782 4f2a848 Author: Ingo Molnar Date: Tue Mar 15 09:01:17 2016 +0100 Merge commit 'torture.2015.02.23a' into core/rcu Signed-off-by: Ingo Molnar commit 8bc6782fe20bd2584c73a35c47329c9fd0a8d34c Merge: e23604e 3500efa Author: Ingo Molnar Date: Tue Mar 15 09:00:12 2016 +0100 Merge commit 'fixes.2015.02.23a' into core/rcu Conflicts: kernel/rcu/tree.c Signed-off-by: Ingo Molnar commit e23604edac2a7be6a8808a5d13fac6b9df4eb9a8 Merge: d4e7961 1f25184 Author: Linus Torvalds Date: Mon Mar 14 19:44:38 2016 -0700 Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull NOHZ updates from Ingo Molnar: "NOHZ enhancements, by Frederic Weisbecker, which reorganizes/refactors the NOHZ 'can the tick be stopped?' infrastructure and related code to be data driven, and harmonizes the naming and handling of all the various properties" [ This makes the ugly "fetch_or()" macro that the scheduler used internally a new generic helper, and does a bad job at it. I'm pulling it, but I've asked Ingo and Frederic to get this fixed up ] * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched-clock: Migrate to use new tick dependency mask model posix-cpu-timers: Migrate to use new tick dependency mask model sched: Migrate sched to use new tick dependency mask model sched: Account rr tasks perf: Migrate perf to use new tick dependency mask model nohz: Use enum code for tick stop failure tracing message nohz: New tick dependency mask nohz: Implement wide kick on top of irq work atomic: Export fetch_or() commit d4e796152a049f6a675f8b6dcf7080a9d80014e5 Merge: d88bfe1 f9c904b Author: Linus Torvalds Date: Mon Mar 14 19:14:06 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: "The main changes in this cycle are: - Make schedstats a runtime tunable (disabled by default) and optimize it via static keys. As most distributions enable CONFIG_SCHEDSTATS=y due to its instrumentation value, this is a nice performance enhancement. (Mel Gorman) - Implement 'simple waitqueues' (swait): these are just pure waitqueues without any of the more complex features of full-blown waitqueues (callbacks, wake flags, wake keys, etc.). Simple waitqueues have less memory overhead and are faster. Use simple waitqueues in the RCU code (in 4 different places) and for handling KVM vCPU wakeups. (Peter Zijlstra, Daniel Wagner, Thomas Gleixner, Paul Gortmaker, Marcelo Tosatti) - sched/numa enhancements (Rik van Riel) - NOHZ performance enhancements (Rik van Riel) - Various sched/deadline enhancements (Steven Rostedt) - Various fixes (Peter Zijlstra) - ... and a number of other fixes, cleanups and smaller enhancements" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits) sched/cputime: Fix steal_account_process_tick() to always return jiffies sched/deadline: Remove dl_new from struct sched_dl_entity Revert "kbuild: Add option to turn incompatible pointer check into error" sched/deadline: Remove superfluous call to switched_to_dl() sched/debug: Fix preempt_disable_ip recording for preempt_disable() sched, time: Switch VIRT_CPU_ACCOUNTING_GEN to jiffy granularity time, acct: Drop irq save & restore from __acct_update_integrals() acct, time: Change indentation in __acct_update_integrals() sched, time: Remove non-power-of-two divides from __acct_update_integrals() sched/rt: Kick RT bandwidth timer immediately on start up sched/debug: Add deadline scheduler bandwidth ratio to /proc/sched_debug sched/debug: Move sched_domain_sysctl to debug.c sched/debug: Move the /sys/kernel/debug/sched_features file setup into debug.c sched/rt: Fix PI handling vs. sched_setscheduler() sched/core: Remove duplicated sched_group_set_shares() prototype sched/fair: Consolidate nohz CPU load update code sched/fair: Avoid using decay_load_missed() with a negative value sched/deadline: Always calculate end of period on sched_yield() sched/cgroup: Fix cgroup entity load tracking tear-down rcu: Use simple wait queues where possible in rcutree ... commit 1cdba550555561201398f6eb81c52d5bc511f1ad Merge: acffb58 e39365b Author: David S. Miller Date: Mon Mar 14 22:10:25 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS/OVS updates for net-next The following patchset contains Netfilter/IPVS fixes and OVS NAT support, more specifically this batch is composed of: 1) Fix a crash in ipset when performing a parallel flush/dump with set:list type, from Jozsef Kadlecsik. 2) Make sure NFACCT_FILTER_* netlink attributes are in place before accessing them, from Phil Turnbull. 3) Check return error code from ip_vs_fill_iph_skb_off() in IPVS SIP helper, from Arnd Bergmann. 4) Add workaround to IPVS to reschedule existing connections to new destination server by dropping the packet and wait for retransmission of TCP syn packet, from Julian Anastasov. 5) Allow connection rescheduling in IPVS when in CLOSE state, also from Julian. 6) Fix wrong offset of SIP Call-ID in IPVS helper, from Marco Angaroni. 7) Validate IPSET_ATTR_ETHER netlink attribute length, from Jozsef. 8) Check match/targetinfo netlink attribute size in nft_compat, patch from Florian Westphal. 9) Check for integer overflow on 32-bit systems in x_tables, from Florian Westphal. Several patches from Jarno Rajahalme to prepare the introduction of NAT support to OVS based on the Netfilter infrastructure: 10) Schedule IP_CT_NEW_REPLY definition for removal in nf_conntrack_common.h. 11) Simplify checksumming recalculation in nf_nat. 12) Add comments to the openvswitch conntrack code, from Jarno. 13) Update the CT state key only after successful nf_conntrack_in() invocation. 14) Find existing conntrack entry after upcall. 15) Handle NF_REPEAT case due to templates in nf_conntrack_in(). 16) Call the conntrack helper functions once the conntrack has been confirmed. 17) And finally, add the NAT interface to OVS. The batch closes with: 18) Cleanup to use spin_unlock_wait() instead of spin_lock()/spin_unlock(), from Nicholas Mc Guire. ==================== Signed-off-by: David S. Miller commit d88bfe1d68735595d57bd071294f664c4f054435 Merge: e71c2c1 eb1af3b Author: Linus Torvalds Date: Mon Mar 14 18:43: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: "Various RAS updates: - AMD MCE support updates for future CPUs, fixes and 'SMCA' (Scalable MCA) error decoding support (Aravind Gopalakrishnan) - x86 memcpy_mcsafe() support, to enable smart(er) hardware error recovery in NVDIMM drivers, based on an extension of the x86 exception handling code. (Tony Luck)" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: EDAC/sb_edac: Fix computation of channel address x86/mm, x86/mce: Add memcpy_mcsafe() x86/mce/AMD: Document some functionality x86/mce: Clarify comments regarding deferred error x86/mce/AMD: Fix logic to obtain block address x86/mce/AMD, EDAC: Enable error decoding of Scalable MCA errors x86/mce: Move MCx_CONFIG MSR definitions x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries x86/mm: Expand the exception table logic to allow new handling options x86/mce/AMD: Set MCAX Enable bit x86/mce/AMD: Carve out threshold block preparation x86/mce/AMD: Fix LVT offset configuration for thresholding x86/mce/AMD: Reduce number of blocks scanned per bank x86/mce/AMD: Do not perform shared bank check for future processors x86/mce: Fix order of AMD MCE init function call commit cdc43ae34c25693fa8de30c9a95243cd45548023 Author: Hannes Reinecke Date: Mon Mar 14 10:43:08 2016 +0100 scsi_transport_sas: add 'scsi_target_id' sysfs attribute There is no way to detect the scsi_target_id for any given SAS remote port, so add a new sysfs attribute 'scsi_target_id'. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Manoj Kumar Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sas_internal.h | 2 +- drivers/scsi/scsi_transport_sas.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 100bcb851b8ce09824215cfc2afd661ae8d454c9 Author: Dan Carpenter Date: Fri Mar 11 14:19:03 2016 +0300 scsi_dh_alua: uninitialized variable in alua_check_vpd() The pg_updated variable is support to be set to false at the start but it is uninitialized. Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field') Signed-off-by: Dan Carpenter Reviewed-by: Hannes Reinicke Reviewed-by: Manoj Kumar Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eba5ed3539071b0185084e429f17805bcc7f2419 Author: Yaniv Gardi Date: Thu Mar 10 17:37:21 2016 +0200 scsi: ufs-qcom: add printouts of testbus debug registers This change adds printouts of testbus and debug registers. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufs-qcom.h | 9 ++++++ 2 files changed, 86 insertions(+) commit f37aabcf58202e65db3035b1b360d856dd378ee2 Author: Yaniv Gardi Date: Thu Mar 10 17:37:20 2016 +0200 scsi: ufs-qcom: enable/disable the device ref clock This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 12 ++++++++++++ drivers/scsi/ufs/ufshcd.h | 9 +++++++++ 2 files changed, 21 insertions(+) commit 4b9ad0b88c3e8400f23aac63ac7709d4cd972392 Author: Yaniv Gardi Date: Thu Mar 10 17:37:19 2016 +0200 scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup Some UFS devices (and may be host) have issues if LCC is enabled. So we are setting PA_Local_TX_LCC_Enable to 0 before link startup which will make sure that both host and device TX LCC are disabled once link startup is completed. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 27 ++++++++++++++++++++------- drivers/scsi/ufs/unipro.h | 1 + 2 files changed, 21 insertions(+), 7 deletions(-) commit b799fdf754b5c6c4dad0016826fb6b3e79bccaea Author: Yaniv Gardi Date: Thu Mar 10 17:37:18 2016 +0200 scsi: ufs: add device quirk delay before putting UFS rails in LPM We put the UFS device in sleep state & UFS link in hibern8 state during runtime suspend. After this we put all the UFS rails in low power modes immediately but it seems some devices may still draw more than sleep current from UFS rails (especially from VCCQ rail) at-least for 500us. To avoid this situation, this change adds 2ms delay before putting these UFS rails in LPM mode. Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs_quirks.h | 14 +++++++++++++- drivers/scsi/ufs/ufshcd.c | 10 ++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit f3099fbd9b90f94849bd155ebf690dd5a8cfa477 Author: Yaniv Gardi Date: Thu Mar 10 17:37:17 2016 +0200 scsi: ufs: fix leakage during link off state Currently when we try to put the link in off/disabled state during suspend, it seems link is not being kept in low power mode. This patch fixes the issue by putting the link in hibern8 first (so device also puts the link in low power mode) and then stop the host controller. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 371131065de99b57d39620ac159d94e0d3773f13 Author: Yaniv Gardi Date: Thu Mar 10 17:37:16 2016 +0200 scsi: ufs: tune UniPro parameters to optimize hibern8 exit time Optimal values of local UniPro parameters like PA_Hibern8Time & PA_TActivate can help reduce the hibern8 exit latency. If both host and device supports UniPro ver1.6 or later, these parameters will be automatically tuned during link startup itself. But if either host or device doesn't support UniPro ver 1.6 or later, we have to manually tune them. But to keep manual tuning logic simple, we will only do manual tuning if local unipro version doesn't support ver1.6 or later. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshcd.h | 1 + drivers/scsi/ufs/ufshci.h | 2 + drivers/scsi/ufs/unipro.h | 21 +++++++++ 4 files changed, 142 insertions(+) commit afdfff59a0e0c5527610d3bc5d338a0da03dd23d Author: Yaniv Gardi Date: Thu Mar 10 17:37:15 2016 +0200 scsi: ufs: handle non spec compliant bkops behaviour by device We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 53 ++++++++++++++++++++++++++++++++++++++++------- drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 52 insertions(+), 7 deletions(-) commit a70e91b8bbaa3924d6598f9b4d1d468d2c88e6d3 Author: Yaniv Gardi Date: Thu Mar 10 17:37:14 2016 +0200 scsi: ufs: add retry for query descriptors Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 55 +++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 583fa62d082483412715af9ab4f528fcf00e4c38 Author: Yaniv Gardi Date: Thu Mar 10 17:37:13 2016 +0200 scsi: ufs: add error recovery after DL NAC error Some vendor's UFS device sends back to back NACs for the DL data frames causing the host controller to raise the DFES error status. Sometimes such UFS devices send back to back NAC without waiting for new retransmitted DL frame from the host and in such cases it might be possible the Host UniPro goes into bad state without raising the DFES error interrupt. If this happens then all the pending commands would timeout only after respective SW command (which is generally too large). This change workarounds such device behaviour like this: - As soon as SW sees the DL NAC error, it would schedule the error handler - Error handler would sleep for 50ms to see if there any fatal errors raised by UFS controller. - If there are fatal errors then SW does normal error recovery. - If there are no fatal errors then SW sends the NOP command to device to check if link is alive. - If NOP command times out, SW does normal error recovery - If NOP command succeed, skip the error handling. If DL NAC error is seen multiple times with some vendor's UFS devices then enable this quirk to initiate quick error recovery and also silence related error logs to reduce spamming of kernel logs. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshci.h | 2 + 2 files changed, 95 insertions(+) commit 9a47ec7c390e819d2ca61f7a55d16412f168b674 Author: Yaniv Gardi Date: Thu Mar 10 17:37:12 2016 +0200 scsi: ufs: make error handling bit faster UFS driver's error handler forcefully tries to clear all the pending requests. For each pending request in the queue, it waits 1 sec for it to get cleared. If we have multiple requests in the queue then it's possible that we might end up waiting for those many seconds before resetting the host. But note that resetting host would any way clear all the pending requests from the hardware. Hence this change skips the forceful clear of the pending requests if we are anyway going to reset the host (for fatal errors). Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 155 +++++++++++++++++++++++++++++++++------------- 1 file changed, 112 insertions(+), 43 deletions(-) commit 60f0187031c05e04cbadffb62f557d0ff3564490 Author: Yaniv Gardi Date: Thu Mar 10 17:37:11 2016 +0200 scsi: ufs: disable vccq if it's not needed by UFS device Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 1 + drivers/scsi/ufs/ufshcd.c | 60 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 4 deletions(-) commit c58ab7aab71e2c783087115f0ce1623c2fdcf0b2 Author: Yaniv Gardi Date: Thu Mar 10 17:37:10 2016 +0200 scsi: ufs: separate device and host quirks Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 31 ++++++++++ drivers/scsi/ufs/ufs_quirks.h | 139 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshcd.c | 71 +++++++++++++++++++++ drivers/scsi/ufs/ufshcd.h | 3 + 4 files changed, 244 insertions(+) commit b573d484e4ff33b60b1ef95ca30f199e749ff7c9 Author: Yaniv Gardi Date: Thu Mar 10 17:37:09 2016 +0200 scsi: ufs: add support to read device and string descriptors This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs.h | 1 + drivers/scsi/ufs/ufshcd.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++- drivers/scsi/ufs/ufshcd.h | 7 ++++ 3 files changed, 95 insertions(+), 1 deletion(-) commit 596585a285a41993f26efab686e1ef20fc16a04a Author: Yaniv Gardi Date: Thu Mar 10 17:37:08 2016 +0200 scsi: ufs: verify hba controller hce reg value Sometimes due to hw issues it takes some time to the host controller register to update. In order to verify the register has updated, a polling is done until its value is set. In addition the functions ufshcd_hba_stop() and ufshcd_wait_for_register() was updated with an additional input parameter, indicating the timeout between reads will be done by sleeping or spinning the cpu. Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 53 ++++++++++++++++++++++++++++------------------- drivers/scsi/ufs/ufshcd.h | 12 +++-------- 2 files changed, 35 insertions(+), 30 deletions(-) commit f550c65b543b4d3fa55201084b1a16432b748365 Author: Yaniv Gardi Date: Thu Mar 10 17:37:07 2016 +0200 scsi: ufs: implement scsi host timeout handler A race condition exists between request requeueing and scsi layer error handling: When UFS driver queuecommand returns a busy status for a request, it will be requeued and its tag will be freed and set to -1. At the same time it is possible that the request will timeout and scsi layer will start error handling for it. The scsi layer reuses the request and its tag to send error related commands to the device, however its tag is no longer valid. As this request was never really sent to the device, there is no point to start error handling with the device. Implement the scsi error handling timeout callback and bypass SCSI error handling for request that were not actually sent to the device. For such requests simply reset the block layer timer. Otherwise, let SCSI layer perform the usual error handling. Reviewed-by: Hannes Reinecke Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 199ef13cac7d43f20d92ca077a25c3cbf91427ca Author: Yaniv Gardi Date: Thu Mar 10 17:37:06 2016 +0200 scsi: ufs: avoid spurious UFS host controller interrupts When control reaches to Linux UFS driver during UFS boot mode, UFS host controller interrupt status/enable registers may have left over settings. In order to avoid any spurious interrupts due to these left overs, it's important to clear these interrupt status/enable registers before enabling UFS interrupt handling. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 54b879b76ea253105505f840bd842c1927c9e380 Author: Yaniv Gardi Date: Thu Mar 10 17:37:05 2016 +0200 scsi: ufs-qcom: add number of lanes per direction Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Reviewed-by: Hannes Reinecke Acked-by: Rob Herring Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi Signed-off-by: Martin K. Petersen .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++ drivers/scsi/ufs/ufs-qcom.c | 39 ++++++++++++---------- drivers/scsi/ufs/ufshcd-pltfrm.c | 19 +++++++++++ drivers/scsi/ufs/ufshcd.c | 1 + drivers/scsi/ufs/ufshcd.h | 2 ++ 5 files changed, 47 insertions(+), 17 deletions(-) commit e71c2c1eeb8de7a083a728c5b7e0b83ed1faf047 Merge: d09e356 ced30bc Author: Linus Torvalds Date: Mon Mar 14 17:58:53 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: "Main kernel side changes: - Big reorganization of the x86 perf support code. The old code grew organically deep inside arch/x86/kernel/cpu/perf* and its naming became somewhat messy. The new location is under arch/x86/events/, using the following cleaner hierarchy of source code files: perf/x86: Move perf_event.c .................. => x86/events/core.c perf/x86: Move perf_event_amd.c .............. => x86/events/amd/core.c perf/x86: Move perf_event_amd_ibs.c .......... => x86/events/amd/ibs.c perf/x86: Move perf_event_amd_iommu.[ch] ..... => x86/events/amd/iommu.[ch] perf/x86: Move perf_event_amd_uncore.c ....... => x86/events/amd/uncore.c perf/x86: Move perf_event_intel_bts.c ........ => x86/events/intel/bts.c perf/x86: Move perf_event_intel.c ............ => x86/events/intel/core.c perf/x86: Move perf_event_intel_cqm.c ........ => x86/events/intel/cqm.c perf/x86: Move perf_event_intel_cstate.c ..... => x86/events/intel/cstate.c perf/x86: Move perf_event_intel_ds.c ......... => x86/events/intel/ds.c perf/x86: Move perf_event_intel_lbr.c ........ => x86/events/intel/lbr.c perf/x86: Move perf_event_intel_pt.[ch] ...... => x86/events/intel/pt.[ch] perf/x86: Move perf_event_intel_rapl.c ....... => x86/events/intel/rapl.c perf/x86: Move perf_event_intel_uncore.[ch] .. => x86/events/intel/uncore.[ch] perf/x86: Move perf_event_intel_uncore_nhmex.c => x86/events/intel/uncore_nmhex.c perf/x86: Move perf_event_intel_uncore_snb.c => x86/events/intel/uncore_snb.c perf/x86: Move perf_event_intel_uncore_snbep.c => x86/events/intel/uncore_snbep.c perf/x86: Move perf_event_knc.c .............. => x86/events/intel/knc.c perf/x86: Move perf_event_p4.c ............... => x86/events/intel/p4.c perf/x86: Move perf_event_p6.c ............... => x86/events/intel/p6.c perf/x86: Move perf_event_msr.c .............. => x86/events/msr.c (Borislav Petkov) - Update various x86 PMU constraint and hw support details (Stephane Eranian) - Optimize kprobes for BPF execution (Martin KaFai Lau) - Rewrite, refactor and fix the Intel uncore PMU driver code (Thomas Gleixner) - Rewrite, refactor and fix the Intel RAPL PMU code (Thomas Gleixner) - Various fixes and smaller cleanups. There are lots of perf tooling updates as well. A few highlights: perf report/top: - Hierarchy histogram mode for 'perf top' and 'perf report', showing multiple levels, one per --sort entry: (Namhyung Kim) On a mostly idle system: # perf top --hierarchy -s comm,dso Then expand some levels and use 'P' to take a snapshot: # cat perf.hist.0 - 92.32% perf 58.20% perf 22.29% libc-2.22.so 5.97% [kernel] 4.18% libelf-0.165.so 1.69% [unknown] - 4.71% qemu-system-x86 3.10% [kernel] 1.60% qemu-system-x86_64 (deleted) + 2.97% swapper # - Add 'L' hotkey to dynamicly set the percent threshold for histogram entries and callchains, i.e. dynamicly do what the --percent-limit command line option to 'top' and 'report' does. (Namhyung Kim) perf mem: - Allow specifying events via -e in 'perf mem record', also listing what events can be specified via 'perf mem record -e list' (Jiri Olsa) perf record: - Add 'perf record' --all-user/--all-kernel options, so that one can tell that all the events in the command line should be restricted to the user or kernel levels (Jiri Olsa), i.e.: perf record -e cycles:u,instructions:u is equivalent to: perf record --all-user -e cycles,instructions - Make 'perf record' collect CPU cache info in the perf.data file header: $ perf record usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.017 MB perf.data (7 samples) ] $ perf report --header-only -I | tail -10 | head -8 # CPU cache info: # L1 Data 32K [0-1] # L1 Instruction 32K [0-1] # L1 Data 32K [2-3] # L1 Instruction 32K [2-3] # L2 Unified 256K [0-1] # L2 Unified 256K [2-3] # L3 Unified 4096K [0-3] Will be used in 'perf c2c' and eventually in 'perf diff' to allow, for instance running the same workload in multiple machines and then when using 'diff' show the hardware difference. (Jiri Olsa) - Improved support for Java, using the JVMTI agent library to do jitdumps that then will be inserted in synthesized PERF_RECORD_MMAP2 events via 'perf inject' pointed to synthesized ELF files stored in ~/.debug and keyed with build-ids, to allow symbol resolution and even annotation with source line info, see the changeset comments to see how to use it (Stephane Eranian) perf script/trace: - Decode data_src values (e.g. perf.data files generated by 'perf mem record') in 'perf script': (Jiri Olsa) # perf script perf 693 [1] 4.088652: 1 cpu/mem-loads,ldlat=30/P: ffff88007d0b0f40 68100142 L1 hit|SNP None|TLB L1 or L2 hit|LCK No ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Improve support to 'data_src', 'weight' and 'addr' fields in 'perf script' (Jiri Olsa) - Handle empty print fmts in 'perf script -s' i.e. when running python or perl scripts (Taeung Song) perf stat: - 'perf stat' now shows shadow metrics (insn per cycle, etc) in interval mode too. E.g: # perf stat -I 1000 -e instructions,cycles sleep 1 # time counts unit events 1.000215928 519,620 instructions # 0.69 insn per cycle 1.000215928 752,003 cycles - Port 'perf kvm stat' to PowerPC (Hemant Kumar) - Implement CSV metrics output in 'perf stat' (Andi Kleen) perf BPF support: - Support converting data from bpf events in 'perf data' (Wang Nan) - Print bpf-output events in 'perf script': (Wang Nan). # perf record -e bpf-output/no-inherit,name=evt/ -e ./test_bpf_output_3.c/map:channel.event=evt/ usleep 1000 # perf script usleep 4882 21384.532523: evt: ffffffff810e97d1 sys_nanosleep ([kernel.kallsyms]) BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a 0008: 42 50 46 20 65 76 65 6e BPF even 0010: 74 21 00 00 t!.. BPF string: "Raise a BPF event!" # - Add API to set values of map entries in a BPF object, be it individual map slots or ranges (Wang Nan) - Introduce support for the 'bpf-output' event (Wang Nan) - Add glue to read perf events in a BPF program (Wang Nan) - Improve support for bpf-output events in 'perf trace' (Wang Nan) ... and tons of other changes as well - see the shortlog and git log for details!" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (342 commits) perf stat: Add --metric-only support for -A perf stat: Implement --metric-only mode perf stat: Document CSV format in manpage perf hists browser: Check sort keys before hot key actions perf hists browser: Allow thread filtering for comm sort key perf tools: Add sort__has_comm variable perf tools: Recalc total periods using top-level entries in hierarchy perf tools: Remove nr_sort_keys field perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry() perf tools: Remove hist_entry->fmt field perf tools: Fix command line filters in hierarchy mode perf tools: Add more sort entry check functions perf tools: Fix hist_entry__filter() for hierarchy perf jitdump: Build only on supported archs tools lib traceevent: Add '~' operation within arg_num_eval() perf tools: Omit unnecessary cast in perf_pmu__parse_scale perf tools: Pass perf_hpp_list all the way through setup_sort_list perf tools: Fix perf script python database export crash perf jitdump: DWARF is also needed perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes ... commit 2cdb958aba6afbced5bc563167813b972b6acbfe Merge: ab9d1e4 355cced Author: Dave Chinner Date: Tue Mar 15 11:44:35 2016 +1100 Merge branch 'xfs-misc-fixes-4.6-4' into for-next commit 355cced45286ed7e710058174066628ff9ad9fa4 Author: Christoph Hellwig Date: Tue Mar 15 11:44:18 2016 +1100 xfs: always set rvalp in xfs_dir2_node_trim_free xfs_dir2_node_trim_free can return with setting the rvalp argument pointer. Initialize it to 0 at the beginning of the function and only update it to 1 if we succeeded trimming a freespace block. Reported-by: Dan Carpenter Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_dir2_node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cc07eed8336d6452214d13e0cba770a0f5296a7f Author: Eric Sandeen Date: Tue Mar 15 11:42:47 2016 +1100 xfs: ensure committed is initialized in xfs_trans_roll __xfs_trans_roll() can return without setting the *committed argument; this was a problem for xfs_bmap_finish(): int committed;/* xact committed or not */ ... error = __xfs_trans_roll(tp, ip, &committed); if (error) { ... if (committed) { and we tested an uninitialized "committed" variable on the error path. No caller is preserving "committed" state across calls to __xfs_trans_roll(), so just initialize committed inside the function to avoid future errors like this. Reported-by: Dan Carpenter Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/xfs_trans.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d34999c97ae87cd56514b8cbc6269651efe274fe Author: Brian Foster Date: Tue Mar 15 11:42:47 2016 +1100 xfs: borrow indirect blocks from freed extent when available xfs_bmap_del_extent() handles extent removal from the in-core and on-disk extent lists. When removing a delalloc range, it updates the indirect block reservation appropriately based on the removal. It currently enforces that the new indirect block reservation is less than or equal to the original. This is normally the case in all situations except for in certain cases when the removed range creates a hole in a single delalloc extent, thus splitting a single delalloc extent in two. It is possible with small enough extents to split an indlen==1 extent into two such slightly smaller extents. This leaves one extent with 0 indirect blocks and leads to assert failures in other areas (e.g., xfs_bunmapi() if the extent happens to be removed). Update the indlen distribution code to steal blocks from the deleted extent, if necessary, to satisfy the worst case total indirect reservation for the new extents. This is safe as the caller does not update the fdblocks counters until the extent is removed. Blocks stolen in this manner simply remain accounted as allocated, having ownership transferred from the data extent to an indirect reservation. As a precaution, fall back to the original reservation algorithm if the new indlen requirement is not met and warn if we end up with extents without any reservation at all to detect this more easily in the future. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) commit a9bd24ac2becf69e896d88bf8b1b7b0f18c2157b Author: Brian Foster Date: Tue Mar 15 11:42:46 2016 +1100 xfs: refactor delalloc indlen reservation split into helper The delayed allocation indirect reservation splitting code is not sufficient in some cases where a delalloc extent is split in two. In preparation for enhancements to this code, refactor the current indlen distribution algorithm into a new helper function. [dchinner: rename temp, temp2 variables] Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 73 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 19 deletions(-) commit b2706a05bad36c0a826493c6ba84c8a9caf8a3ae Author: Brian Foster Date: Tue Mar 15 11:42:46 2016 +1100 xfs: update freeblocks counter after extent deletion xfs_bunmapi() currently updates the fdblocks counter, unreserves quota, etc. before the extent is deleted by xfs_bmap_del_extent(). The function has problems dividing up the indirect reserved blocks for scenarios where a single delalloc extent is split in two. Particularly, there aren't always enough blocks reserved for multiple extents in a single extent reservation. The solution to this problem is to allow the extent removal code to steal from the deleted extent to meet indirect reservation requirements. Move the block of code in xfs_bmapi() that updates the fdblocks counter to after the call to xfs_bmap_del_extent() to allow the codepath to update the extent record before the free blocks are accounted. Also, reshuffle the code slightly so the delalloc accounting occurs near the xfs_bmap_del_extent() call to provide context for the comments. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 58 ++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 24 deletions(-) commit 801cc4e17a34c32e1527827292fac9cec5d3393b Author: Brian Foster Date: Tue Mar 15 11:42:44 2016 +1100 xfs: debug mode forced buffered write failure Add a DEBUG mode-only sysfs knob to enable forced buffered write failure. An additional side effect of this mode is brute force killing of delayed allocation blocks in the range of the write. The latter is the prime motiviation behind this patch, as userspace test infrastructure requires a reliable mechanism to create and split delalloc extents without causing extent conversion. Certain fallocate operations (i.e., zero range) were used for this in the past, but the implementations have changed such that delalloc extents are flushed and converted to real blocks, rendering the test useless. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/xfs_aops.c | 9 ++++++- fs/xfs/xfs_mount.h | 25 +++++++++++++++++ fs/xfs/xfs_sysfs.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 101 insertions(+), 11 deletions(-) commit e39365be031e37b229f745ea49db0b25e82436fa Author: Nicholas Mc Guire Date: Mon Mar 14 12:39:02 2016 +0100 netfilter: nf_conntrack: consolidate lock/unlock into unlock_wait The spin_lock()/spin_unlock() is synchronizing on the nf_conntrack_locks_all_lock which is equivalent to spin_unlock_wait() but the later should be more efficient. Signed-off-by: Nicholas Mc Guire Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d09e356ad06a8b6f5cceabf7c6cf05fdb62b46e5 Merge: 5ec9424 11bf9b8 Author: Linus Torvalds Date: Mon Mar 14 16:58:50 2016 -0700 Merge branch 'mm-readonly-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull read-only kernel memory updates from Ingo Molnar: "This tree adds two (security related) enhancements to the kernel's handling of read-only kernel memory: - extend read-only kernel memory to a new class of formerly writable kernel data: 'post-init read-only memory' via the __ro_after_init attribute, and mark the ARM and x86 vDSO as such read-only memory. This kind of attribute can be used for data that requires a once per bootup initialization sequence, but is otherwise never modified after that point. This feature was based on the work by PaX Team and Brad Spengler. (by Kees Cook, the ARM vDSO bits by David Brown.) - make CONFIG_DEBUG_RODATA always enabled on x86 and remove the Kconfig option. This simplifies the kernel and also signals that read-only memory is the default model and a first-class citizen. (Kees Cook)" * 'mm-readonly-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ARM/vdso: Mark the vDSO code read-only after init x86/vdso: Mark the vDSO code read-only after init lkdtm: Verify that '__ro_after_init' works correctly arch: Introduce post-init read-only memory x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings asm-generic: Consolidate mark_rodata_ro() commit b82ddd48e8bc01cd7bfc8511dc31778c5c4ebe6e Merge: d0b4588 4cba7d2 032f4a1 Author: Zhang Rui Date: Tue Mar 15 07:54:06 2016 +0800 Merge branches 'thermal-core', 'thermal-intel' and 'thermal-soc' into next commit 032f4a1e5a307c63b5ac27298ea82eb328f40ccc Merge: ccb361d 61f846f Author: Zhang Rui Date: Tue Mar 15 07:53:01 2016 +0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc commit d0b45880b2981e4b0edf1ce873114bf4e57061d5 Author: Michele Di Giorgio Date: Tue Mar 1 17:38:54 2016 +0000 thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros Userspace tools are not aware of how to convert the enums provided by the tracepoints to their corresponding strings. Adding TRACE_DEFINE_ENUM() macros allows to make the enums available to userspace to let the tools know what those enum values represent. In particular, for thermal zone trip types what we obtained before was something like: kworker/1:1-460 [001] 320.372732: thermal_zone_trip: thermal_zone=soc id=0 trip=1 trip_type=1 Unfortunately, userspace tools do not know how to convert enum values to strings and as a consequence they can only forward the enum value to the output. By using TRACE_DEFINE_ENUM() macros for thermal traces we get the following trace line: kworker/1:1-460 [001] 320.372732: thermal_zone_trip: thermal_zone=soc id=0 trip=1 trip_type=PASSIVE Userspace tools are now able to better understand the meaning of the trip_type and provide the user with more readable information. CC: Steven Rostedt CC: Eduardo Valentin Signed-off-by: Michele Di Giorgio Acked-by: Steven Rostedt Acked-by: Javi Merino Signed-off-by: Zhang Rui include/trace/events/thermal.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 4cba7d23633c8ecb55460f0c614c3d57af0d8c08 Author: Srinivas Pandruvada Date: Tue Feb 2 00:03:41 2016 -0800 thermal: intel_pch_thermal: Enable Skylake PCH thermal Enabled temperature reporting device of Skylake Platform Controller hub. The register map is same as the wildcat point thermal currently implemented in this driver. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/intel_pch_thermal.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 211afd577a186e18d3eece543c6767420d6f6737 Merge: f2c4882 90d7116 Author: Dave Airlie Date: Tue Mar 15 09:49:19 2016 +1000 Merge tag 'drm-vc4-next-2016-03-14' of github.com:anholt/linux into drm-next This pull request covers what's left for 4.6. Notably, it includes a significant 3D performance improvement and a fix to HDMI hotplug detection for the Pi2/3. * tag 'drm-vc4-next-2016-03-14' of github.com:anholt/linux: drm/vc4: Recognize a more specific compatible string for V3D. dt-bindings: Add binding docs for V3D. drm/vc4: Return -EFAULT on copy_from_user() failure drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set in the devicetree. drm/vc4: Let gpiolib know that we're OK with sleeping for HPD. drm/vc4: improve throughput by pipelining binning and rendering jobs commit acffb584cda7069b0c2c83045503ccd07516a891 Author: Eric Dumazet Date: Mon Mar 14 15:40:00 2016 -0700 net: diag: add a scheduling point in inet_diag_dump_icsk() On loaded TCP servers, looking at millions of sockets can hold cpu for many seconds, if the lookup condition is very narrow. (eg : ss dst 1.2.3.4 ) Better add a cond_resched() to allow other processes to access the cpu. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_diag.c | 1 + 1 file changed, 1 insertion(+) commit e3ebd894f084255fde19116955ba7054858ff5d6 Author: Arnd Bergmann Date: Mon Mar 14 23:45:12 2016 +0100 smc91x: avoid self-comparison warning The smc91x driver defines a macro that compares its argument to itself, apparently to get a true result while using its argument to avoid a warning about unused local variables. Unfortunately, this triggers a warning with gcc-6, as the comparison is obviously useless: drivers/net/ethernet/smsc/smc91x.c: In function 'smc_hardware_send_pkt': drivers/net/ethernet/smsc/smc91x.c:563:14: error: self-comparison always evaluates to true [-Werror=tautological-compare] if (!smc_special_trylock(&lp->lock, flags)) { This replaces the macro with another one that behaves similarly, with a cast to (void) to ensure the argument is used, and using a literal 'true' as its value. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ec942463bfbc6c98ea4a96689b498e88a031c4a Merge: fbed0bc f6e4566 Author: Linus Torvalds Date: Mon Mar 14 16:31:41 2016 -0700 Merge branch 'mm-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull dma_*_writecombine rename from Ingo Molnar: "Rename dma_*_writecombine() to dma_*_wc() This is a tree-wide API rename, to move the dma_*() write-combining APIs closer in name to their usual API families. (The old API names are kept as compatibility wrappers to not introduce extra breakage.) The patch was Coccinelle generated" * 'mm-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() commit 399221ccf45106455c163bb34b4e66256c0ae233 Author: Alexandre Belloni Date: Tue Mar 15 00:29:33 2016 +0100 rtc: rv3029: stop mentioning rv3029c2 rv3029c2 is actually rv3029. c2 denotes an option. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f95ff2e41a32dd190cf28e3abb029625eef968 Author: SeongJae Park Date: Mon Feb 22 08:28:29 2016 -0800 documentation: Clarify compiler store-fusion example The compiler store-fusion example in memory-barriers.txt uses a C comment to represent arbitrary code that does not update a given variable. Unfortunately, someone could reasonably interpret the comment as instead referring to the following line of code. This commit therefore replaces the comment with a string that more clearly represents the arbitrary code. Signed-off-by: SeongJae Park Acked-by: David Howells Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f36fe1e70b5477d4e42df8ea97278e9698dddbbf Author: Paul E. McKenney Date: Mon Feb 15 14:50:36 2016 -0800 documentation: Transitivity is not cumulativity The "transitivity" section mentions cumulativity in a potentially confusing way. Contrary to the current wording, cumulativity is not transitivity, but rather a hardware discipline that can be used to implement transitivity on ARM and PowerPC CPUs. This commit therefore deletes the mention of cumulativity. Reported-by: Luc Maranget Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37ef0341ca60b364dde05239c98b15c999195d8c Author: Paul E. McKenney Date: Mon Jan 25 22:12:34 2016 -0800 documentation: Add alternative release-acquire outcome The memory-barriers.txt discussion of local transitivity and release-acquire chains leaves out discussion of the outcome of the read from "u". This commit therefore adds an outcome showing that you can get a "1" from this read even if the release-acquire pairs don't line up. Reported-by: Will Deacon Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 4 ++++ 1 file changed, 4 insertions(+) commit c535cc92924baf68e238bd1b5ff8d74883f88b9b Author: Paul E. McKenney Date: Fri Jan 15 09:30:42 2016 -0800 documentation: Distinguish between local and global transitivity The introduction of smp_load_acquire() and smp_store_release() had the side effect of introducing a weaker notion of transitivity: The transitivity of full smp_mb() barriers is global, but that of smp_store_release()/smp_load_acquire() chains is local. This commit therefore introduces the notion of local transitivity and gives an example. Reported-by: Peter Zijlstra Reported-by: Will Deacon Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 78 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 2 deletions(-) commit 92a84dd210b8263f765882d3ee1a1d5cd348c16a Author: Paul E. McKenney Date: Thu Jan 14 14:17:04 2016 -0800 documentation: Subsequent writes ordered by rcu_dereference() The current memory-barriers.txt does not address the possibility of a write to a dereferenced pointer. This should be rare, but when it happens, we need that write -not- to be clobbered by the initialization. This commit therefore adds an example showing a data dependency ordering a later data-dependent write. Reported-by: Leonid Yegoshin Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0e4bd2aba3d0ae5caeb0d1a2b71f6fe6147c4d56 Author: Paul E. McKenney Date: Thu Jan 14 14:01:34 2016 -0800 documentation: Remove obsolete reference to RCU-protected indexes Commit #1ebee8017d84 (rcu: Eliminate array-index-based RCU primitives) eliminated the primitives supporting RCU-protected array indexes, but failed to update Documentation/memory-barriers.txt accordingly. This commit therefore removes the discussion of RCU-protected array indexes. Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 15 --------------- 1 file changed, 15 deletions(-) commit 895f5542220eeea43b811a9b4cd73f244c5673d7 Author: Paul E. McKenney Date: Wed Jan 6 14:23:03 2016 -0800 documentation: Fix memory-barriers.txt section references This commit fixes a couple of "Compiler Barrier" section references to be "COMPILER BARRIER". This makes it easier to find the section in the usual text editors. Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7817b799ed6b270fbf7f2b30efd0ae011dfc9644 Author: Paul E. McKenney Date: Tue Dec 29 16:23:18 2015 -0800 documentation: Fix control dependency and identical stores The summary of the "CONTROL DEPENDENCIES" section incorrectly states that barrier() may be used to prevent compiler reordering when more than one leg of the control-dependent "if" statement start with identical stores. This is incorrect at high optimization levels. This commit therefore updates the summary to match the detailed description. Reported by: Jianyu Zhan Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit fbed0bc0915e2dec7452fc3e66ad03dd2b0c04c7 Merge: d37a14b 38460a2 Author: Linus Torvalds Date: Mon Mar 14 15:50:44 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: "Various updates: - Futex scalability improvements: remove page lock use for shared futex get_futex_key(), which speeds up 'perf bench futex hash' benchmarks by over 40% on a 60-core Westmere. This makes anon-mem shared futexes perform close to private futexes. (Mel Gorman) - lockdep hash collision detection and fix (Alfredo Alvarez Fernandez) - lockdep testing enhancements (Alfredo Alvarez Fernandez) - robustify lockdep init by using hlists (Andrew Morton, Andrey Ryabinin) - mutex and csd_lock micro-optimizations (Davidlohr Bueso) - small x86 barriers tweaks (Michael S Tsirkin) - qspinlock updates (Waiman Long)" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) locking/csd_lock: Use smp_cond_acquire() in csd_lock_wait() locking/csd_lock: Explicitly inline csd_lock*() helpers futex: Replace barrier() in unqueue_me() with READ_ONCE() locking/lockdep: Detect chain_key collisions locking/lockdep: Prevent chain_key collisions tools/lib/lockdep: Fix link creation warning tools/lib/lockdep: Add tests for AA and ABBA locking tools/lib/lockdep: Add userspace version of READ_ONCE() tools/lib/lockdep: Fix the build on recent kernels locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h locking/mutex: Allow next waiter lockless wakeup locking/pvqspinlock: Enable slowpath locking count tracking locking/qspinlock: Use smp_cond_acquire() in pending code locking/pvqspinlock: Move lock stealing count tracking code into pv_queued_spin_steal_lock() locking/mcs: Fix mcs_spin_lock() ordering futex: Remove requirement for lock_page() in get_futex_key() futex: Rename barrier references in ordering guarantees locking/atomics: Update comment about READ_ONCE() and structures locking/lockdep: Eliminate lockdep_init() locking/lockdep: Convert hash tables to hlists ... commit 05752523e56502cd9975aec0a2ded465d51a71f3 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:23 2016 -0800 openvswitch: Interface with NAT. Extend OVS conntrack interface to cover NAT. New nested OVS_CT_ATTR_NAT attribute may be used to include NAT with a CT action. A bare OVS_CT_ATTR_NAT only mangles existing and expected connections. If OVS_NAT_ATTR_SRC or OVS_NAT_ATTR_DST is included within the nested attributes, new (non-committed/non-confirmed) connections are mangled according to the rest of the nested attributes. The corresponding OVS userspace patch series includes test cases (in tests/system-traffic.at) that also serve as example uses. This work extends on a branch by Thomas Graf at https://github.com/tgraf/ovs/tree/nat. Signed-off-by: Jarno Rajahalme Acked-by: Thomas Graf Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso include/uapi/linux/openvswitch.h | 49 ++++ net/openvswitch/Kconfig | 3 +- net/openvswitch/conntrack.c | 524 +++++++++++++++++++++++++++++++++++++-- net/openvswitch/conntrack.h | 3 +- 4 files changed, 551 insertions(+), 28 deletions(-) commit 28b6e0c1ace45779c60e7cefe6d469b7ecb520b8 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:22 2016 -0800 openvswitch: Delay conntrack helper call for new connections. There is no need to help connections that are not confirmed, so we can delay helping new connections to the time when they are confirmed. This change is needed for NAT support, and having this as a separate patch will make the following NAT patch a bit easier to review. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 5b6b929376a621e2bd3367f5de563d7123506597 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:21 2016 -0800 openvswitch: Handle NF_REPEAT in conntrack action. Repeat the nf_conntrack_in() call when it returns NF_REPEAT. This avoids dropping a SYN packet re-opening an existing TCP connection. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 289f225349cb2a97448fd14599ab34b741f706f3 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:20 2016 -0800 openvswitch: Find existing conntrack entry after upcall. Add a new function ovs_ct_find_existing() to find an existing conntrack entry for which this packet was already applied to. This is only to be called when there is evidence that the packet was already tracked and committed, but we lost the ct reference due to an userspace upcall. ovs_ct_find_existing() is called from skb_nfct_cached(), which can now hide the fact that the ct reference may have been lost due to an upcall. This allows ovs_ct_commit() to be simplified. This patch is needed by later "openvswitch: Interface with NAT" patch, as we need to be able to pass the packet through NAT using the original ct reference also after the reference is lost after an upcall. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 103 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 90 insertions(+), 13 deletions(-) commit 394e910e909b174270b8231fd51942eb2f541fb9 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:19 2016 -0800 openvswitch: Update the CT state key only after nf_conntrack_in(). Only a successful nf_conntrack_in() call can effect a connection state change, so it suffices to update the key only after the nf_conntrack_in() returns. This change is needed for the later NAT patches. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9f13ded8d3c715147c4759f937cfb712c185ca13 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:18 2016 -0800 openvswitch: Add commentary to conntrack.c This makes the code easier to understand and the following patches more focused. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 264619055bd52bc2278af848472176642d759874 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:17 2016 -0800 netfilter: Allow calling into nat helper without skb_dst. NAT checksum recalculation code assumes existence of skb_dst, which becomes a problem for a later patch in the series ("openvswitch: Interface with NAT."). Simplify this by removing the check on skb_dst, as the checksum will be dealt with later in the stack. Suggested-by: Pravin Shelar Signed-off-by: Jarno Rajahalme Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 30 ++++++++---------------------- net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 30 ++++++++---------------------- 2 files changed, 16 insertions(+), 44 deletions(-) commit bfa3f9d7f3b349acea8982d2248e33a0ed84c687 Author: Jarno Rajahalme Date: Thu Mar 10 10:54:16 2016 -0800 netfilter: Remove IP_CT_NEW_REPLY definition. Remove the definition of IP_CT_NEW_REPLY from the kernel as it does not make sense. This allows the definition of IP_CT_NUMBER to be simplified as well. Signed-off-by: Jarno Rajahalme Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_common.h | 12 +++++++++--- net/openvswitch/conntrack.c | 2 -- 2 files changed, 9 insertions(+), 5 deletions(-) commit d37a14bb5fed13a52dada3fa9ef4488ac588b35e Merge: b562e44 bc94b99 Author: Linus Torvalds Date: Mon Mar 14 15:15:51 2016 -0700 Merge branch 'core-resources-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull ram resource handling changes from Ingo Molnar: "Core kernel resource handling changes to support NVDIMM error injection. This tree introduces a new I/O resource type, IORESOURCE_SYSTEM_RAM, for System RAM while keeping the current IORESOURCE_MEM type bit set for all memory-mapped ranges (including System RAM) for backward compatibility. With this resource flag it no longer takes a strcmp() loop through the resource tree to find "System RAM" resources. The new resource type is then used to extend ACPI/APEI error injection facility to also support NVDIMM" * 'core-resources-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ACPI/EINJ: Allow memory error injection to NVDIMM resource: Kill walk_iomem_res() x86/kexec: Remove walk_iomem_res() call with GART type x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search resource: Add walk_iomem_res_desc() memremap: Change region_intersects() to take @flags and @desc arm/samsung: Change s3c_pm_run_res() to use System RAM type resource: Change walk_system_ram() to use System RAM type drivers: Initialize resource entry to zero xen, mm: Set IORESOURCE_SYSTEM_RAM to System RAM kexec: Set IORESOURCE_SYSTEM_RAM for System RAM arch: Set IORESOURCE_SYSTEM_RAM flag for System RAM ia64: Set System RAM type and descriptor x86/e820: Set System RAM type and descriptor resource: Add I/O resource descriptor resource: Handle resource flags properly resource: Add System RAM resource type commit 76b06402796c46566ea3794a999f718f144d93d2 Merge: 5a30247 78a50a5 387add4 4c8ba94 7cf20fc Author: Doug Ledford Date: Mon Mar 14 17:42:57 2016 -0400 Merge branches 'ib_core', 'ib_ipoib', 'srpt', 'drain-cq-v4' and 'net/9p' into k.o/for-4.6 commit 98dbc9c6c61698792e3a66f32f3bf066201d42d7 Author: Bryn M. Reeves Date: Mon Mar 14 17:04:34 2016 -0400 dm: fix rq_end_stats() NULL pointer in dm_requeue_original_request() An "old" (.request_fn) DM 'struct request' stores a pointer to the associated 'struct dm_rq_target_io' in rq->special. dm_requeue_original_request(), previously named dm_requeue_unmapped_original_request(), called dm_unprep_request() to reset rq->special to NULL. But rq_end_stats() would go on to hit a NULL pointer deference because its call to tio_from_request() returned NULL. Fix this by calling rq_end_stats() _before_ dm_unprep_request() Signed-off-by: Bryn M. Reeves Signed-off-by: Mike Snitzer Fixes: e262f34741 ("dm stats: add support for request-based DM devices") Cc: stable@vger.kernel.org # 4.2+ drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 005bcea933629fa6c921a57aa497928d7f7e7cb6 Merge: 1e1589a 6debb68 Author: David S. Miller Date: Mon Mar 14 16:05:32 2016 -0400 Merge branch 'dsa-finers-bridging-control' Vivien Didelot says: ==================== net: dsa: finer bridging control This patchset renames the bridging routines of the DSA layer, make the unbridging routine return void, and rework the DSA netdev notifier handler, similar to what the Mellanox Spectrum driver does. Changes RFC -> v1: - drop unused NETDEV_PRECHANGEUPPER case - add Andrew's Tested-by tag ==================== Signed-off-by: David S. Miller commit 6debb68a2d1acd1f5eca1d9d1c79a54dc998b6d6 Author: Vivien Didelot Date: Sun Mar 13 16:21:34 2016 -0400 net: dsa: refine netdev event notifier Rework the netdev event handler, similar to what the Mellanox Spectrum driver does, to easily welcome more events later (for example NETDEV_PRECHANGEUPPER) and use netdev helpers (such as netif_is_bridge_master). Signed-off-by: Vivien Didelot Acked-by: Jiri Pirko Acked-by: Ido Schimmel Signed-off-by: David S. Miller net/dsa/slave.c | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) commit 16bfa7024eba5e36aff38ba62086b9027373007d Author: Vivien Didelot Date: Sun Mar 13 16:21:33 2016 -0400 net: dsa: make port_bridge_leave return void netdev_upper_dev_unlink() which notifies NETDEV_CHANGEUPPER, returns void, as well as del_nbp(). So there's no advantage to catch an eventual error from the port_bridge_leave routine at the DSA level. Make this routine void for the DSA layer and its existing drivers. Signed-off-by: Vivien Didelot Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 4 +--- drivers/net/dsa/mv88e6xxx.c | 28 +++++++++------------------- drivers/net/dsa/mv88e6xxx.h | 2 +- include/net/dsa.h | 2 +- net/dsa/slave.c | 9 +++------ 5 files changed, 15 insertions(+), 30 deletions(-) commit 71327a4e7d997276d49db92fd3d30008389ee6d5 Author: Vivien Didelot Date: Sun Mar 13 16:21:32 2016 -0400 net: dsa: rename port_*_bridge routines Rename DSA port_join_bridge and port_leave_bridge routines to respectively port_bridge_join and port_bridge_leave in order to respect an implicit Port::Bridge namespace. Signed-off-by: Vivien Didelot Acked-by: Jiri Pirko Signed-off-by: David S. Miller Documentation/networking/dsa/dsa.txt | 4 ++-- drivers/net/dsa/bcm_sf2.c | 4 ++-- drivers/net/dsa/mv88e6171.c | 4 ++-- drivers/net/dsa/mv88e6352.c | 4 ++-- include/net/dsa.h | 4 ++-- net/dsa/slave.c | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) commit 1e1589ad8b5cb5b8a6781ba5850cf710ada0e919 Author: Maciej S. Szmigiero Date: Sun Mar 13 00:19:07 2016 +0100 mISDN: Support DR6 indication in mISDNipac driver According to figure 39 in PEB3086 data sheet, version 1.4 this indication replaces DR when layer 1 transition source state is F6. This fixes mISDN layer 1 getting stuck in F6 state in TE mode on Dialogic Diva 2.02 card (and possibly others) when NT deactivates it. Signed-off-by: Maciej S. Szmigiero Acked-by: Karsten Keil Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/ipac.h | 1 + drivers/isdn/hardware/mISDN/mISDNipac.c | 2 ++ 2 files changed, 3 insertions(+) commit 464be1e0be687ffbad64014099f7d0c1a5f3723e Author: Maciej S. Szmigiero Date: Sun Mar 13 00:18:06 2016 +0100 mISDN: Order IPAC register defines It looks like IPAC/ISAC chips register defines weren't in any particular order. Order them by their number to make it easier to spot holes. Signed-off-by: Maciej S. Szmigiero Acked-by: Karsten Keil Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/ipac.h | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 4fa8c3cc70b2a0aa090bce174c6f2ac148453690 Author: Sergei Shtylyov Date: Sun Mar 13 01:29:45 2016 +0300 sh_eth: kill useless initializers Some of the local variable intializers in the driver turned out to be pointless, kill 'em. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f6a695cf7a21519fe32b8005ff1a45d81c307f2c Author: Douglas Gilbert Date: Thu Mar 3 00:31:29 2016 -0500 sg: fix dxferp in from_to case One of the strange things that the original sg driver did was let the user provide both a data-out buffer (it followed the sg_header+cdb) _and_ specify a reply length greater than zero. What happened was that the user data-out buffer was copied into some kernel buffers and then the mid level was told a read type operation would take place with the data from the device overwriting the same kernel buffers. The user would then read those kernel buffers back into the user space. From what I can tell, the above action was broken by commit fad7f01e61bf ("sg: set dxferp to NULL for READ with the older SG interface") in 2008 and syzkaller found that out recently. Make sure that a user space pointer is passed through when data follows the sg_header structure and command. Fix the abnormal case when a non-zero reply_len is also given. Fixes: fad7f01e61bf737fe8a3740d803f000db57ecac6 Cc: #v2.6.28+ Signed-off-by: Douglas Gilbert Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bb017d031a551b6011a43d255f4ebf613de0e13d Author: Vitaly Kuznetsov Date: Mon Mar 7 11:59:44 2016 +0100 scsi: storvsc: fix SRB_STATUS_ABORTED handling Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags") filtered SRB_STATUS_AUTOSENSE_VALID out effectively making the (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID) case a dead code. The logic from this branch (e.g. storvsc_device_scan() call) is still required, fix the check. Cc: #v4.4+ Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags") Signed-off-by: Vitaly Kuznetsov Acked-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a41b2efb134bdeefe8c27fa77ffaaef0b974c390 Author: Maurizio Lombardi Date: Fri Mar 4 10:41:49 2016 +0100 be2iscsi: set the boot_kset pointer to NULL in case of failure In beiscsi_setup_boot_info(), the boot_kset pointer should be set to NULL in case of failure otherwise an invalid pointer dereference may occur later. Cc: Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+) commit f4327a95dd080ed6aecb185478a88ce1ee4fa3c4 Author: Martin K. Petersen Date: Sat Mar 5 17:52:02 2016 -0500 sd: Fix discard granularity when LBPRZ=1 Commit 397737223c59 ("sd: Make discard granularity match logical block size when LBPRZ=1") accidentally set the granularity to one byte instead of one logical block on devices that provide deterministic zeroes after UNMAP. Signed-off-by: Martin K. Petersen Reported-by: Mike Snitzer Reviewed-by: Ewan Milne Reviewed-by: Bart Van Assche Fixes: 397737223c59e89dca7305feb6528caef8fbef84 Cc: #v4.4+ drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ee7895c93d1d6cafad2f5d187f0a9369e91eaec Author: James Bottomley Date: Mon Mar 14 12:42:27 2016 -0700 MAINTAINERS: use new email address for James Bottomley The @odin.com one has been bouncing for a while now, so replace with new Employer email. Signed-off-by: James Bottomley Signed-off-by: James Bottomley MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d98654a7f314026323df8a50cd9354071f98ac8d Merge: 8626c56 a3703fb Author: David S. Miller Date: Mon Mar 14 15:48:53 2016 -0400 Merge branch 'mvneta-fixes' Gregory CLEMENT says: ==================== Few mvneta fixes In this second version I split the last patch in two parts as requested. For the record the initial cover letter was: "here is a patch set of few fixes. Without the first one, a kernel configured with debug features ended to hang when the driver is built as a module and is removed. This is quite is annoying for debugging! The second patch fix a forgotten flag at the initial submission of the driver. The third patch is only really a cosmetic one so I have no problem to not apply it for 4.5 and wait for 4.6. I really would like to see the first one applied for 4.5 and for the second I let you judge if it something needed for now or that should wait the next release." ==================== Signed-off-by: David S. Miller commit a3703fb31a4779e5c515f51f602dda1ffcfbfec9 Author: Dmitri Epshtein Date: Sat Mar 12 18:44:20 2016 +0100 net: mvneta: replace magic numbers by existing macros Some literal values are actually already defined by macros, so let's use them. [gregory.clement@free-electrons.com: split intial commit in two individual changes] Signed-off-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0838abb3c08cff83719b461adffefc83721af34b Author: Dmitri Epshtein Date: Sat Mar 12 18:44:19 2016 +0100 net: mvneta: fix error messages in mvneta_port_down function This commit corrects error printing when shutting down the port. [gregory.clement@free-electrons.com: split initial commit in two individual changes] Signed-off-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 928b6519afeb2a5e2dc61154380b545ed66c476a Author: Dmitri Epshtein Date: Sat Mar 12 18:44:18 2016 +0100 net: mvneta: enable change MAC address when interface is up Function eth_prepare_mac_addr_change() is called as part of MAC address change. This function check if interface is running. To enable change MAC address when interface is running: IFF_LIVE_ADDR_CHANGE flag must be set to dev->priv_flags field Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Cc: stable@vger.kernel.org Signed-off-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c2722a975fdb8c90bc6ba8570b7fb62db4e2e9c Author: Gregory CLEMENT Date: Sat Mar 12 18:44:17 2016 +0100 net: mvneta: Fix spinlock usage In the previous patch, the spinlock was not initialized. While it didn't cause any trouble yet it could be a problem to use it uninitialized. The most annoying part was the critical section protected by the spinlock in mvneta_stop(). Some of the functions could sleep as pointed when activated CONFIG_DEBUG_ATOMIC_SLEEP. Actually, in mvneta_stop() we only need to protect the is_stopped flagged, indeed the code of the notifier for CPU online is protected by the same spinlock, so when we get the lock, the notifer work is done. Reported-by: Patrick Uiterwijk Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2180c52cc72993b3b097573aaa550f273f795c8a Author: Mike Marshall Date: Mon Mar 14 15:30:39 2016 -0400 Orangefs: fix sloppy cleanups of debugfs and sysfs init failures. Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 20 +++++----- fs/orangefs/orangefs-mod.c | 29 +++++++++++--- fs/orangefs/orangefs-sysfs.c | 89 +++++++++++++++++++++--------------------- 3 files changed, 76 insertions(+), 62 deletions(-) commit a7d3e78ab53ff479fee3ad5a674a74c54c337b3b Author: Mike Marshall Date: Mon Mar 14 15:30:03 2016 -0400 Orangefs: follow_link -> get_link change Signed-off-by: Mike Marshall fs/orangefs/inode.c | 8 +++----- fs/orangefs/symlink.c | 15 +-------------- 2 files changed, 4 insertions(+), 19 deletions(-) commit 53f57fef43f5b9586c7a78acdeae27e206eae48b Author: Mike Marshall Date: Mon Mar 14 15:28:34 2016 -0400 Orangefs: Extra sanity insurance on buffer before using string functions on it. Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8626c56c8279b88b91b8df55345cdf89542d5e90 Author: Florian Westphal Date: Sat Mar 12 11:14:42 2016 +0100 bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict Zefir Kurtisi reported kernel panic with an openwrt specific patch. However, it turns out that mainline has a similar bug waiting to happen. Once NF_HOOK() returns the skb is in undefined state and must not be used. Moreover, the okfn must consume the skb to support async processing (NF_QUEUE). Current okfn in this spot doesn't consume it and caller assumes that NF_HOOK return value tells us if skb was freed or not, but thats wrong. It "works" because no in-tree user registers a NFPROTO_BRIDGE hook at LOCAL_IN that returns STOLEN or NF_QUEUE verdicts. Once we add NF_QUEUE support for nftables bridge this will break -- NF_QUEUE holds the skb for async processing, caller will erronoulsy return RX_HANDLER_PASS and on reinject netfilter will access free'd skb. Fix this by pushing skb up the stack in the okfn instead. NB: It also seems dubious to use LOCAL_IN while bypassing PRE_ROUTING completely in this case but this is how its been forever so it seems preferable to not change this. Cc: Felix Fietkau Cc: Zefir Kurtisi Signed-off-by: Florian Westphal Tested-by: Zefir Kurtisi Signed-off-by: David S. Miller net/bridge/br_input.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 180a2c542ce904e256ba0d8732517d7f42b3f3fa Merge: f7f58ae 6a0e780 Author: David S. Miller Date: Mon Mar 14 15:44:56 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-03-12 Here's the last bluetooth-next pull request for the 4.6 kernel. - New USB ID for AR3012 in btusb - New BCM2E55 ACPI ID - Buffer overflow fix for the Add Advertising command - Support for a new Bluetooth LE limited privacy mode - Fix for firmware activation in btmrvl_sdio - Cleanups to mac802154 & 6lowpan code Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit f7f58ae0f81bf454030eb76444646d15b0bfba2c Merge: dc91d7e 5bcbe0f Author: David S. Miller Date: Mon Mar 14 15:43:12 2016 -0400 Merge branch 'dsa-cleanups' Andrew Lunn says: ==================== DSA cleanup and fixes The RFC patchset for re-architecturing DSA probing contains a few standalone patches, either clean up or fixes. This pulls them out for submission. ==================== Signed-off-by: David S. Miller commit 5bcbe0f35fb13e31fdd0b2dc9695f19ab0208207 Author: Andrew Lunn Date: Sat Mar 12 00:01:40 2016 +0100 phy: fixed: Fix removal of phys. The fixed phys delete function simply removed the fixed phy from the internal linked list and freed the memory. It however did not unregister the associated phy device. This meant it was still possible to find the phy device on the mdio bus. Make fixed_phy_del() an internal function and add a fixed_phy_unregister() to unregisters the phy device and then uses fixed_phy_del() to free resources. Modify DSA to use this new API function, so we don't leak phys. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/fixed_phy.c | 11 +++++++++-- include/linux/phy_fixed.h | 5 ++--- net/dsa/dsa.c | 4 +--- 3 files changed, 12 insertions(+), 8 deletions(-) commit ec777e6b4254648be51146d4e7d735ee3d06bd13 Author: Andrew Lunn Date: Sat Mar 12 00:01:39 2016 +0100 dsa: dsa: Fix freeing of fixed-phys from user ports. All ports types can have a fixed PHY associated with it. Remove the check which limits removal to only CPU and DSA ports. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa.c | 3 --- 1 file changed, 3 deletions(-) commit 3a44514ff979d7b0192a9f67445509f4ea7dfe2f Author: Andrew Lunn Date: Sat Mar 12 00:01:38 2016 +0100 dsa: Destroy fixed link phys after the phy has been disconnected The phy is disconnected from the slave in dsa_slave_destroy(). Don't destroy fixed link phys until after this, since there can be fixed linked phys connected to ports. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b71be352f76ac3c0559feec2fd960ab9c31404c9 Author: Andrew Lunn Date: Sat Mar 12 00:01:37 2016 +0100 dsa: slave: Don't reference NULL pointer during phy_disconnect When the phy is disconnected, the parent pointer to the netdev it was attached to is set to NULL. The code then tries to suspend the phy, but dsa_slave_fixed_link_update needs the parent pointer to determine which switch the phy is connected to. So it dereferenced a NULL pointer. Check for this condition. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/slave.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ca3dfa51e67cd41f6514b84a88bc101e8b1a139a Author: Andrew Lunn Date: Sat Mar 12 00:01:36 2016 +0100 dsa: Rename mv88e6123_61_65 to mv88e6123 to be consistent All the drivers support multiple chips, but mv88e6123_61_65 is the only one that reflects this in its naming. Change it to be consistent with the other drivers. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/mvebu_v5_defconfig | 2 +- arch/arm/configs/orion5x_defconfig | 2 +- arch/tile/configs/tilegx_defconfig | 2 +- arch/tile/configs/tilepro_defconfig | 2 +- drivers/net/dsa/Kconfig | 2 +- drivers/net/dsa/Makefile | 4 +- drivers/net/dsa/mv88e6123.c | 124 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6123_61_65.c | 124 ------------------------------------ drivers/net/dsa/mv88e6xxx.c | 8 +-- drivers/net/dsa/mv88e6xxx.h | 2 +- 11 files changed, 137 insertions(+), 137 deletions(-) commit ab6652524aaf834d5dcdb46dd7695813b8d63da5 Merge: acfcbaf b562e44 Author: Mike Marshall Date: Mon Mar 14 15:39:42 2016 -0400 Orangefs: merge to v4.5 Merge tag 'v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into current Linux 4.5 commit dc91d7efdc0ea7c1ff242fea17e0122aaeb87dc5 Merge: 1f3a1c5 5189b1d Author: David S. Miller Date: Mon Mar 14 15:31:59 2016 -0400 Merge branch 'of_mdio-checks' Sergei Shtylyov says: ==================== of_mdio: use IS_ERR_OR_NULL() and PTR_ERR_OR_ZERO() Here's the set of 3 patches against DaveM's 'net-next.git' repo. They deal with some error checks in the device tree MDIO code... ==================== Signed-off-by: David S. Miller commit 5189b1d82f1ce6c2749fa3499d28ffd3f5075543 Author: Sergei Shtylyov Date: Sun Mar 13 00:34:58 2016 +0300 of_mdio: use PTR_ERR_OR_ZERO() PTR_ERR_OR_ZERO() is open coded in of_phy_register_fixed_link(), so just call it directly... Signed-off-by: Sergei Shtylyov Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Zapolskiy Signed-off-by: David S. Miller drivers/of/of_mdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac044b902e50ba50713e257e331bc0e0c1c7d4d9 Author: Sergei Shtylyov Date: Sun Mar 13 00:34:02 2016 +0300 of_mdio: use IS_ERR_OR_NULL() IS_ERR_OR_NULL() is open coded in of_mdiobus_register_phy(), so just call it directly... Signed-off-by: Sergei Shtylyov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/of/of_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3478bae7a2751500386816ca567af4fc0f5eb10 Author: Sergei Shtylyov Date: Sun Mar 13 00:33:13 2016 +0300 of_mdio: mdio_device_create() never returns NULL mdio_device_create() never returns NULL, thus checking for it in of_mdiobus_register_device() is pointless... Suggested-by: Vladimir Zapolskiy Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/of/of_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f3a1c546615a2022c461c5e3458dd8a8f2f3aa1 Merge: 0df83e7 379d7ac Author: David S. Miller Date: Mon Mar 14 15:27:23 2016 -0400 Merge branch 'thunderx-phy' David Daney says: ==================== net/phy: Improvements to Cavium Thunder MDIO code. Changes from v1: - In 1/3 Add back check for non-OF objects in bgx_init_of_phy(). It is probably not necessary, but better safe than sorry... The firmware on many Cavium Thunder systems configures the MDIO bus hardware to be probed as a PCI device. In order to use the MDIO bus drivers in this configuration, we must add PCI probing to the driver. There are two parts to this set of three patches: 1) Cleanup the PHY probing code in thunder_bgx.c to handle the case where there is no PHY attached to a port, as well as being more robust in the face of driver loading order by use of -EPROBE_DEFER. 2) Split mdio-octeon.c into two drivers, one with platform probing, and the other with PCI probing. Common code is shared between the two. Tested on several different Thunder and OCTEON systems, also compile tested on x86_64. ==================== Signed-off-by: David S. Miller commit 379d7ac7ca31722a1fb488ae3e98b274c9db568c Author: David Daney Date: Fri Mar 11 09:53:11 2016 -0800 phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses. The Cavium Thunder SoCs have multiple MIDO buses that are part of a single PCI device. To model this in the device tree we call the PCI parent device a "cavium,thunder-8890-mdio-nexus", it has several children, one for each MDIO bus. The MDIO bus hardware is identical to that found in the OCTEON SoCs, so we use that code for things that are not part of the PCI driver probe/remove Signed-off-by: David Daney Signed-off-by: David S. Miller .../devicetree/bindings/net/cavium-mdio.txt | 61 +++++++- drivers/net/phy/Kconfig | 11 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-thunder.c | 154 +++++++++++++++++++++ 4 files changed, 225 insertions(+), 2 deletions(-) commit 1eefee901fca0208b8a56f20cdc134e2b8638ae7 Author: David Daney Date: Fri Mar 11 09:53:10 2016 -0800 phy: mdio-octeon: Refactor into two files/modules A follow-on patch uses PCI probing to find the Thunder MDIO hardware. In preparation for this, split out the common code into a new file mdio-cavium.c, which will be used by both the existing OCTEON driver, and the new Thunder PCI based driver. As part of the refactoring simplify the struct cavium_mdiobus by removing fields that are only ever used in the probe function and can just as well be local variables. Use readq/writeq in preference to readq_relaxed/writeq_relaxed as the relaxed form was an optimization for an early chip revision, and the MDIO drivers are not performance bottlenecks that need optimization in the first place. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 11 +- drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-cavium.c | 149 ++++++++++++++++++++++ drivers/net/phy/mdio-cavium.h | 119 ++++++++++++++++++ drivers/net/phy/mdio-octeon.c | 280 +++--------------------------------------- 5 files changed, 292 insertions(+), 268 deletions(-) commit 5fc7cf179449502ad4ad67845ded2df94b680de2 Author: David Daney Date: Fri Mar 11 09:53:09 2016 -0800 net: thunderx: Cleanup PHY probing code. Remove the call to force the octeon-mdio driver to be loaded. Allow the standard driver loading mechanisms to load the PHY drivers, and use -EPROBE_DEFER to cause the BGX driver to be probed only after the PHY drivers are available. Reorder the setting of MAC addresses and PHY probing to allow BGX LMACs with no attached PHY to still be assigned a MAC address. Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 29 ++++++++++++++--------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 0df83e7a6b58674683677f572e4e2361b2a69eea Author: Anna-Maria Gleixner Date: Fri Mar 11 10:10:23 2016 +0100 net: mvneta: Add missing hotplug notifier transition The mvneta_percpu_notifier() hotplug callback lacks handling of the CPU_DOWN_FAILED case. That means, if CPU_DOWN_PREPARE failes, the driver is not well configured on the CPU. Add handling for CPU_DOWN_FAILED[_FROZEN] hotplug notifier transition to setup the driver. Cc: Thomas Petazzoni Cc: netdev@vger.kernel.org Signed-off-by: Anna-Maria Gleixner Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 ++ 1 file changed, 2 insertions(+) commit 7c82a7b998c6c6a2cb8a42aeb1d5d3450e51afb3 Author: Igal Liberman Date: Sun Mar 13 21:14:43 2016 +0200 fsl/fman: fix dtsec_set_tx_pause_frames Fix a bug introduced in e06a03b (fsl/fman: fix the pause_time test) When pause_time is set to '0' - pause frames are disabled and there's no need to apply dTSEC-A003 Errata workaround. Signed-off-by: Igal Liberman Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 387178ec26332e2a35529a716ff3e83a3a457fca Author: Florian Fainelli Date: Mon Mar 14 10:55:50 2016 -0700 Documentation: networking: phy.txt: Add missing functions Some new development in PHYLIB added new function pointers to the struct phy_driver, document these. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/phy.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2fa8f88d8892507ecff0126fbc67906740491d31 Author: Chuck Lever Date: Fri Mar 4 11:28:53 2016 -0500 xprtrdma: Use new CQ API for RPC-over-RDMA client send CQs Calling ib_poll_cq() to sort through WCs during a completion is a common pattern amongst RDMA consumers. Since commit 14d3a3b2498e ("IB: add a proper completion queue abstraction"), WC sorting can be handled by the IB core. By converting to this new API, xprtrdma is made a better neighbor to other RDMA consumers, as it allows the core to schedule the delivery of completions more fairly amongst all active consumers. Because each ib_cqe carries a pointer to a completion method, the core can now post its own operations on a consumer's QP, and handle the completions itself, without changes to the consumer. Send completions were previously handled entirely in the completion upcall handler (ie, deferring to a process context is unneeded). Thus IB_POLL_SOFTIRQ is a direct replacement for the current xprtrdma send code path. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 99 ++++++++++++++++++++++++++----------- net/sunrpc/xprtrdma/verbs.c | 107 +++++++--------------------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 10 ++-- 3 files changed, 91 insertions(+), 125 deletions(-) commit c882a655b78d23eb7037cfd6ebf94af1d7068a58 Author: Chuck Lever Date: Fri Mar 4 11:28:45 2016 -0500 xprtrdma: Use an anonymous union in struct rpcrdma_mw Clean up: Make code more readable. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 28 +++++++++++++-------------- net/sunrpc/xprtrdma/frwr_ops.c | 42 ++++++++++++++++++++--------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) commit 552bf225281f96e7a02e1a1b874966fdb6b997e0 Author: Chuck Lever Date: Fri Mar 4 11:28:36 2016 -0500 xprtrdma: Use new CQ API for RPC-over-RDMA client receive CQs Calling ib_poll_cq() to sort through WCs during a completion is a common pattern amongst RDMA consumers. Since commit 14d3a3b2498e ("IB: add a proper completion queue abstraction"), WC sorting can be handled by the IB core. By converting to this new API, xprtrdma is made a better neighbor to other RDMA consumers, as it allows the core to schedule the delivery of completions more fairly amongst all active consumers. Because each ib_cqe carries a pointer to a completion method, the core can now post its own operations on a consumer's QP, and handle the completions itself, without changes to the consumer. xprtrdma's reply processing is already handled in a work queue, but there is some initial order-dependent processing that is done in the soft IRQ context before a work item is scheduled. IB_POLL_SOFTIRQ is a direct replacement for the current xprtrdma receive code path. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 78 +++++++++++------------------------------ net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 2 files changed, 21 insertions(+), 58 deletions(-) commit 23826c7aeac7e333bfee6f10a3407a23c58b6147 Author: Chuck Lever Date: Fri Mar 4 11:28:27 2016 -0500 xprtrdma: Serialize credit accounting again Commit fe97b47cd623 ("xprtrdma: Use workqueue to process RPC/RDMA replies") replaced the reply tasklet with a workqueue that allows RPC replies to be processed in parallel. Thus the credit values in RPC-over-RDMA replies can be applied in a different order than in which the server sent them. To fix this, revert commit eba8ff660b2d ("xprtrdma: Move credit update to RPC reply handler"). Reverting is done by hand to accommodate code changes that have occurred since then. Fixes: fe97b47cd623 ("xprtrdma: Use workqueue to process . . .") Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 9 +-------- net/sunrpc/xprtrdma/verbs.c | 27 ++++++++++++++++++++++++++- net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 3 files changed, 28 insertions(+), 9 deletions(-) commit 59aa1f9a3cce388b4d7d842d6963df11d92a407e Author: Chuck Lever Date: Fri Mar 4 11:28:18 2016 -0500 xprtrdma: Properly handle RDMA_ERROR replies These are shorter than RPCRDMA_HDRLEN_MIN, and they need to complete the waiting RPC. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 11 +++++---- net/sunrpc/xprtrdma/rpc_rdma.c | 51 ++++++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 13 deletions(-) commit d8647f2d3c381a6f543358710eb07dafa7070854 Author: Chuck Lever Date: Fri Mar 4 11:28:09 2016 -0500 rpcrdma: Add RPCRDMA_HDRLEN_ERR Error headers are shorter than either RDMA_MSG or RDMA_NOMSG. Since HDRLEN_MIN is already used in several other places that would be annoying to change, add RPCRDMA_HDRLEN_ERR for the one or two spots where the shorter length is needed. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 1 + 1 file changed, 1 insertion(+) commit b892a699cecc36ca373def4bc5ddc5fa3d46ba3b Author: Chuck Lever Date: Fri Mar 4 11:28:01 2016 -0500 xprtrdma: Do not wait if ib_post_send() fails If ib_post_send() in ro_unmap_sync() fails, the WRs have not been posted, no completions will fire, and wait_for_completion() will wait forever. Skip the wait in that case. To ensure the MRs are invalid, disconnect. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 821c791a0bde997499384733fc98dba76baac41e Author: Chuck Lever Date: Fri Mar 4 11:27:52 2016 -0500 xprtrdma: Segment head and tail XDR buffers on page boundaries A single memory allocation is used for the pair of buffers wherein the RPC client builds an RPC call message and decodes its matching reply. These buffers are sized based on the maximum possible size of the RPC call and reply messages for the operation in progress. This means that as the call buffer increases in size, the start of the reply buffer is pushed farther into the memory allocation. RPC requests are growing in size. It used to be that both the call and reply buffers fit inside a single page. But these days, thanks to NFSv4 (and especially security labels in NFSv4.2) the maximum call and reply sizes are large. NFSv4.0 OPEN, for example, now requires a 6KB allocation for a pair of call and reply buffers, and NFSv4 LOOKUP is not far behind. As the maximum size of a call increases, the reply buffer is pushed far enough into the buffer's memory allocation that a page boundary can appear in the middle of it. When the maximum possible reply size is larger than the client's RDMA receive buffers (currently 1KB), the client has to register a Reply chunk for the server to RDMA Write the reply into. The logic in rpcrdma_convert_iovs() assumes that xdr_buf head and tail buffers would always be contained on a single page. It supplies just one segment for the head and one for the tail. FMR, for example, registers up to a page boundary (only a portion of the reply buffer in the OPEN case above). But without additional segments, it doesn't register the rest of the buffer. When the server tries to write the OPEN reply, the RDMA Write fails with a remote access error since the client registered only part of the Reply chunk. rpcrdma_convert_iovs() must split the XDR buffer into multiple segments, each of which are guaranteed not to contain a page boundary. That way fmr_op_map is given the proper number of segments to register the whole reply buffer. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit af0f16e825cebd53a3460adc8391acb0d85dc913 Author: Chuck Lever Date: Fri Mar 4 11:27:43 2016 -0500 xprtrdma: Clean up dprintk format string containing a newline Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4d97291b6fb46e31fcb03876595d49b477ac196d Author: Chuck Lever Date: Fri Mar 4 11:27:35 2016 -0500 xprtrdma: Clean up physical_op_map() physical_op_unmap{_sync} don't use mr_nsegs, so don't bother to set it in physical_op_map. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/physical_ops.c | 1 - 1 file changed, 1 deletion(-) commit 66cede527924543e0ff9414e6be65a923cbce10a Author: Chuck Lever Date: Fri Mar 4 11:27:26 2016 -0500 xprtrdma: Clean up unused RPCRDMA_INLINE_PAD_THRESH macro Fixes: b3221d6a53c4 ('xprtrdma: Remove logic that constructs...') Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker include/linux/sunrpc/xprtrdma.h | 2 -- 1 file changed, 2 deletions(-) commit a44d6eacdaf56f74fad699af7f4925a5f5ac0e7f Author: Martin KaFai Lau Date: Mon Mar 14 10:52:15 2016 -0700 tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In Per RFC4898, they count segments sent/received containing a positive length data segment (that includes retransmission segments carrying data). Unlike tcpi_segs_out/in, tcpi_data_segs_out/in excludes segments carrying no data (e.g. pure ack). The patch also updates the segs_in in tcp_fastopen_add_skb() so that segs_in >= data_segs_in property is kept. Together with retransmission data, tcpi_data_segs_out gives a better signal on the rxmit rate. v6: Rebase on the latest net-next v5: Eric pointed out that checking skb->len is still needed in tcp_fastopen_add_skb() because skb can carry a FIN without data. Hence, instead of open coding segs_in and data_segs_in, tcp_segs_in() helper is used. Comment is added to the fastopen case to explain why segs_in has to be reset and tcp_segs_in() has to be called before __skb_pull(). v4: Add comment to the changes in tcp_fastopen_add_skb() and also add remark on this case in the commit message. v3: Add const modifier to the skb parameter in tcp_segs_in() v2: Rework based on recent fix by Eric: commit a9d99ce28ed3 ("tcp: fix tcpi_segs_in after connection establishment") Signed-off-by: Martin KaFai Lau Cc: Chris Rapier Cc: Eric Dumazet Cc: Marcelo Ricardo Leitner Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 6 ++++++ include/net/tcp.h | 10 ++++++++++ include/uapi/linux/tcp.h | 2 ++ net/ipv4/tcp.c | 2 ++ net/ipv4/tcp_fastopen.c | 8 ++++++++ net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_minisocks.c | 2 +- net/ipv4/tcp_output.c | 4 +++- net/ipv6/tcp_ipv6.c | 2 +- 9 files changed, 34 insertions(+), 4 deletions(-) commit d85326cf86d7f52d1ac23c38f745470066acc76f Author: Guoqing Jiang Date: Mon Mar 14 17:01:39 2016 +0800 md: fix typos for stipe Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6f0b9f195416e2d3c474e51190b6aa0c238aa36 Author: Guoqing Jiang Date: Mon Mar 14 17:01:38 2016 +0800 md/bitmap: remove redundant return in bitmap_checkpage The "return 0" is not needed since bitmap_checkpage will finally return 0 for the case. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 1 - 1 file changed, 1 deletion(-) commit b3c95b425e0991840262dba8dd095f2682dbf848 Author: Guoqing Jiang Date: Mon Mar 14 17:01:37 2016 +0800 md/raid1: remove unnecessary BUG_ON Since bitmap_start_sync will not return until sync_blocks is not less than PAGE_SIZE>>9, so the BUG_ON is not needed anymore. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 1 - 1 file changed, 1 deletion(-) commit fafcde3ac1a418688a734365203a12483b83907a Author: Ming Lei Date: Sat Mar 12 09:29:40 2016 +0800 md: multipath: don't hardcopy bio in .make_request path Inside multipath_make_request(), multipath maps the incoming bio into low level device's bio, but it is totally wrong to copy the bio into mapped bio via '*mapped_bio = *bio'. For example, .__bi_remaining is kept in the copy, especially if the incoming bio is chained to via bio splitting, so .bi_end_io can't be called for the mapped bio at all in the completing path in this kind of situation. This patch fixes the issue by using clone style. Cc: stable@vger.kernel.org (v3.14+) Reported-and-tested-by: Andrea Righi Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/multipath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 22e5a2f46a26adc6822c54af946b384e14930417 Author: Christian König Date: Fri Mar 11 15:12:53 2016 +0100 drm/amdgpu: move fence structure into amdgpu_fence.c No need to have that in the header file any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 ------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 26 deletions(-) commit 77163f074aa68b06f6de2f2fc271f4a828d56da2 Author: Christian König Date: Fri Mar 11 15:15:02 2016 +0100 drm/amdgpu: remove amdgpu_fence_wait_next Not used any more. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 20 -------------------- 2 files changed, 21 deletions(-) commit f104fbcb8fde4e03b5bc9cbec95d5898f0be5882 Author: Christian König Date: Fri Mar 11 14:55:20 2016 +0100 drm/amdgpu: remove amdgpu_ring_from_fence Not used any more. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 24 ------------------------ 2 files changed, 25 deletions(-) commit 6ba60b891cf82ae5fd2634badaa2d6752837def6 Author: Christian König Date: Fri Mar 11 14:50:08 2016 +0100 drm/amdgpu: stop using the ring index in the SA The ring index will always collide as hash into the fence list, so use the context number instead. That can still cause collisions, but they are less likely than using ring indices. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 53 ++++++++++++---------------------- 2 files changed, 22 insertions(+), 36 deletions(-) commit f4247c5046cdea4e166620f41c0bd3b475e98fff Author: Christian König Date: Thu Mar 10 16:23:29 2016 +0100 drm/amdgpu: stop waiting on UVD messages before mapping them amdgpu_bo_kmap() now always waits for moves to finish. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ------- 1 file changed, 7 deletions(-) commit 587f3c70aaf07081fb24ac035789836a3f7d9008 Author: Christian König Date: Thu Mar 10 16:21:04 2016 +0100 drm/amdgpu: always wait before kmap a BO When a BO is currently moving we otherwise would blindly access the new location without checking. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 102534b085c41b278ee30674951c3ebac243645f Author: Josh Poimboeuf Date: Fri Mar 11 08:18:24 2016 -0600 drm/radeon: refactor SI tiling table initialization Simplify the control flow of si_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Signed-off-by: Josh Poimboeuf Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/si.c | 925 +++++++++++++++++++++----------------------- 1 file changed, 439 insertions(+), 486 deletions(-) commit f0e201f2d3852168b5a8e19330bc3f82d7b042b4 Author: Josh Poimboeuf Date: Fri Mar 11 08:18:23 2016 -0600 drm/radeon: refactor CIK tiling table initialization Simplify the control flow of cik_tiling_mode_table_init() similar to how it was done in gfx_v7_0.c and gfx_v8_0.c. Acked-by: Christian König Signed-off-by: Josh Poimboeuf Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 1691 +++++++++++++++++------------------------- 1 file changed, 666 insertions(+), 1025 deletions(-) commit 358c258a816baed4c6997b59c2117578a1360498 Author: Christian König Date: Fri Mar 11 15:29:27 2016 +0100 drm/amdgpu: allow write access to mapped userptrs With the updated MMU notifier we should also be able to handle the writeback case correctly. Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 00dfedc1e4999926d4af455fc07215ec8c0347ff Author: Alex Deucher Date: Wed Jan 6 13:02:10 2016 -0500 drm/amd/powerplay: use pp_endian.h for Tonga Drop local versions of these macros. Reviewed-by: Michel Dänzer Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 1445abf0cc0cd2c9f022934be069a9e31e9760a1 Author: Alex Deucher Date: Wed Jan 6 13:00:16 2016 -0500 drm/amd/powerplay: use pp_endian.h for Fiji Drop local versions of these macros. Reviewed-by: Michel Dänzer Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 2119364de5a8d67f46b94c0f5ef4a451698c342d Author: Alex Deucher Date: Wed Jan 6 12:58:19 2016 -0500 drm/amd/powerplay: add a common pp endian header To replace the duplicated versions of this in all asic variants. Reviewed-by: Michel Dänzer Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/pp_endian.h | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit b5be3a6bef91692515cdfd1c3c7e4e7e1d2f996a Author: rezhu Date: Mon Nov 16 10:24:17 2015 +0800 drm/amd/powerplay: mv avfs status to smumgr.h Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.h | 18 ------------------ 2 files changed, 21 insertions(+), 18 deletions(-) commit e5f243bd2edd95c6cc1d90c1878f821068e83fba Author: Alex Deucher Date: Thu Mar 10 15:55:26 2016 -0500 drm/radeon: rework fbdev handling on chips with no connectors Move all the logic to radeon_fb.c and add checks to functions called frome elsewhere. bug: https://bugzilla.kernel.org/show_bug.cgi?id=112781 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_display.c | 6 ++---- drivers/gpu/drm/radeon/radeon_fb.c | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) commit b980a26d02d1f54be31346666222304fcd27ea33 Author: Wolfram Sang Date: Mon Mar 14 10:41:52 2016 +0100 i2c: immediately mark ourselves as registered Mark the i2c bus as registered right after the the bus_register call, not at the end of init. Otherwise, we can't register our own dummy driver. Reported-by: Thierry Reding Signed-off-by: Wolfram Sang Fixes: 95026658c46ea2 ("i2c: do not use internal data from driver core") drivers/i2c/i2c-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit efc21d95067f658a20e51e24c4c86d68f23b7f7f Author: Arnd Bergmann Date: Mon Mar 14 15:53:57 2016 +0100 vmxnet3: fix lock imbalance in vmxnet3_tq_xmit() A recent bug fix rearranged the code in vmxnet3_tq_xmit() in a way that left the error handling for oversized headers unlock a lock that had not been taken yet. Gcc warns about the incorrect use of the 'flags' variable because of that: drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_tq_xmit.constprop': include/linux/spinlock.h:246:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the error handling path to 'goto' the end of the function beyond the lock/unlock pair. Signed-off-by: Arnd Bergmann Fixes: cec05562fb1d ("vmxnet3: avoid calling pskb_may_pull with interrupts disabled") Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 888506a967fe428bd776d2b9f540393963fc5bdd Merge: 916848c 8e0cc8c Author: David S. Miller Date: Mon Mar 14 13:09:50 2016 -0400 Merge branch 'net-gcc60-fixes' Arnd Bergmann says: ==================== net: gcc-6.0 warning fixes I've just installed gcc-6.0 to see what kinds of new warnings we get. It turns out that it's actually really useful once I disabled -Wunused-const-variable, and all of the warnings it found in network drivers seem valid. Sorry for the bad timing in the merge window, but I figured it would be better to send the fixes as I found the bugs rather than waiting for the next cycle. The first three look appropriate for stable backports. The other two only fix a gcc warning about incorrect whitespace, probably not worth backporting those. ==================== Signed-off-by: David S. Miller commit 8e0cc8c326d99e41468c96fea9785ab78883a281 Author: Arnd Bergmann Date: Mon Mar 14 15:18:38 2016 +0100 net: caif: fix misleading indentation gcc points out code that is not indented the way it is interpreted: net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen': net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] return cfpkt_getlen(pkt); ^~~~~~ net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not else ^~~~ It is clear from the context that not returning here would be a bug, as we'd end up passing a negative length into a function that takes a u16 length, so it is not missing curly braces here, and I'm assuming that the indentation is the only part that's wrong about it. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/caif/cfpkt_skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 362210e0dff4eb7bb36a9b34dbef3b39d779d95e Author: Arnd Bergmann Date: Mon Mar 14 15:18:37 2016 +0100 ath9k: fix misleading indentation A cleanup patch in linux-3.18 moved around some code in the ath9k driver and left some code to be indented in a misleading way, made worse by the addition of some new code for p2p mode, as discovered by a new gcc-6 warning: drivers/net/wireless/ath/ath9k/init.c: In function 'ath9k_set_hw_capab': drivers/net/wireless/ath/ath9k/init.c:851:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] hw->wiphy->iface_combinations = if_comb; ^~ drivers/net/wireless/ath/ath9k/init.c:847:3: note: ...this 'if' clause, but it is not if (ath9k_is_chanctx_enabled()) ^~ The code is in fact correct, but the indentation is not, so I'm reformatting it as it should have been after the original cleanup. Signed-off-by: Arnd Bergmann Fixes: 499afaccf6f3 ("ath9k: Isolate ath9k_use_chanctx module parameter") Fixes: eb61f9f623f7 ("ath9k: advertise p2p dev support when chanctx") Signed-off-by: David S. Miller drivers/net/wireless/ath/ath9k/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83d6f1f15f8cce844b0a131cbc63e444620e48b5 Author: Arnd Bergmann Date: Mon Mar 14 15:18:36 2016 +0100 ath9k: fix buffer overrun for ar9287 Code that was added back in 2.6.38 has an obvious overflow when accessing a static array, and at the time it was added only a code comment was put in front of it as a reminder to have it reviewed properly. This has not happened, but gcc-6 now points to the specific overflow: drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs': drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds] maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4]; ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ It turns out that the correct array length exists in the local 'intercepts' variable of this function, so we can just use that instead of hardcoding '4', so this patch changes all three instances to use that variable. The other two instances were already correct, but it's more consistent this way. Signed-off-by: Arnd Bergmann Fixes: 940cd2c12ebf ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs") Signed-off-by: David S. Miller drivers/net/wireless/ath/ath9k/eeprom.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e725a66c0202b5f36c2f9d59d26a65c53bbf21f7 Author: Arnd Bergmann Date: Mon Mar 14 15:18:35 2016 +0100 farsync: fix off-by-one bug in fst_add_one gcc-6 finds an out of bounds access in the fst_add_one function when calculating the end of the mmio area: drivers/net/wan/farsync.c: In function 'fst_add_one': drivers/net/wan/farsync.c:418:53: error: index 2 denotes an offset greater than size of 'u8[2][8192] {aka unsigned char[2][8192]}' [-Werror=array-bounds] #define BUF_OFFSET(X) (BFM_BASE + offsetof(struct buf_window, X)) ^ include/linux/compiler-gcc.h:158:21: note: in definition of macro '__compiler_offsetof' __builtin_offsetof(a, b) ^ drivers/net/wan/farsync.c:418:37: note: in expansion of macro 'offsetof' #define BUF_OFFSET(X) (BFM_BASE + offsetof(struct buf_window, X)) ^~~~~~~~ drivers/net/wan/farsync.c:2519:36: note: in expansion of macro 'BUF_OFFSET' + BUF_OFFSET ( txBuffer[i][NUM_TX_BUFFER][0]); ^~~~~~~~~~ The warning is correct, but not critical because this appears to be a write-only variable that is set by each WAN driver but never accessed afterwards. I'm taking the minimal fix here, using the correct pointer by pointing 'mem_end' to the last byte inside of the register area as all other WAN drivers do, rather than the first byte outside of it. An alternative would be to just remove the mem_end member entirely. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/wan/farsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baefd7015cdb304ce6c94f9679d0486c71954766 Author: Arnd Bergmann Date: Mon Mar 14 15:18:34 2016 +0100 mlx4: add missing braces in verify_qp_parameters The implementation of QP paravirtualization back in linux-3.7 included some code that looks very dubious, and gcc-6 has grown smart enough to warn about it: drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'verify_qp_parameters': drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3154:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] if (optpar & MLX4_QP_OPTPAR_ALT_ADDR_PATH) { ^~ drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3144:4: note: ...this 'if' clause, but it is not if (slave != mlx4_master_func_num(dev)) >From looking at the context, I'm reasonably sure that the indentation is correct but that it should have contained curly braces from the start, as the update_gid() function in the same patch correctly does. Signed-off-by: Arnd Bergmann Fixes: 54679e148287 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop") Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 916848ca6f10e1bbf0c2af72ef51e494aaa5c466 Author: Arnd Bergmann Date: Mon Mar 14 15:07:12 2016 +0100 net: mediatek: check device_reset return code The device_reset() function may fail, so we have to check its return value, e.g. to make deferred probing work correctly. gcc warns about it because of the warn_unused_result attribute: drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_probe': drivers/net/ethernet/mediatek/mtk_eth_soc.c:1679:2: error: ignoring return value of 'device_reset', declared with attribute warn_unused_result [-Werror=unused-result] This adds the trivial error check to propagate the return value to the generic platform device probe code. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a25cdc0dd87d308b508ebea436cb43ee49d54a0e Author: Arnd Bergmann Date: Mon Mar 14 15:07:11 2016 +0100 net: mediatek: remove incorrect dma_mask assignment Device drivers should not mess with the DMA mask directly, but instead call dma_set_mask() etc if needed. In case of the mtk_eth_soc driver, the mask already gets set correctly when the device is created, and setting it again is against the documented API. This removes the incorrect setting. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 --- 1 file changed, 3 deletions(-) commit 6aab1a628b99bc1350673e5191a21571626cade3 Author: Arnd Bergmann Date: Mon Mar 14 15:07:10 2016 +0100 net: mediatek: use dma_addr_t correctly dma_alloc_coherent() expects a dma_addr_t pointer as its argument, not an 'unsigned int', and gcc correctly warns about broken code in the mtk_init_fq_dma function: drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_init_fq_dma': drivers/net/ethernet/mediatek/mtk_eth_soc.c:463:13: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] This changes the type of the local variable to dma_addr_t. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34b88a68f26a75e4fded796f1a49c40f82234b7d Author: Arnaldo Carvalho de Melo Date: Mon Mar 14 09:56:35 2016 -0300 net: Fix use after free in the recvmmsg exit path The syzkaller fuzzer hit the following use-after-free: Call Trace: [] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295 [] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261 [< inline >] SYSC_recvmmsg net/socket.c:2281 [] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 And, as Dmitry rightly assessed, that is because we can drop the reference and then touch it when the underlying recvmsg calls return some packets and then hit an error, which will make recvmmsg to set sock->sk->sk_err, oops, fix it. Reported-and-Tested-by: Dmitry Vyukov Cc: Alexander Potapenko Cc: Eric Dumazet Cc: Kostya Serebryany Cc: Sasha Levin Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall") http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller net/socket.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 9c6ba456711687b794dcf285856fc14e2c76074f Author: Josh Boyer Date: Mon Mar 14 09:33:40 2016 -0700 Input: powermate - fix oops with malicious USB descriptors The powermate driver expects at least one valid USB endpoint in its probe function. If given malicious descriptors that specify 0 for the number of endpoints, it will crash. Validate the number of endpoints on the interface before using them. The full report for this issue can be found here: http://seclists.org/bugtraq/2016/Mar/85 Reported-by: Ralf Spenneberg Cc: stable Signed-off-by: Josh Boyer Signed-off-by: Dmitry Torokhov drivers/input/misc/powermate.c | 3 +++ 1 file changed, 3 insertions(+) commit b6e4038262bc933f2ef5427b6bcd2607d02ba4bb Merge: 9bd160b 1d36879 Author: David S. Miller Date: Mon Mar 14 12:33:37 2016 -0400 Merge branch 'thunderx-perf' Sunil Goutham says: ==================== net: thunderx: Performance enhancement changes Below patches attempts to improve performance by reducing no of atomic operations while allocating new receive buffers and reducing cache misses by adjusting nicvf structure elements. Changes from v1: No changes, resubmitting a fresh as per David's suggestion. ==================== Signed-off-by: David S. Miller commit 1d368790bc2d4111feae6fcc0b3b68d6ae92ff0f Author: Sunil Goutham Date: Mon Mar 14 16:36:15 2016 +0530 net: thunderx: Adjust nicvf structure to reduce cache misses Adjusted nicvf structure such that all elements used in hot path like napi, xmit e.t.c fall into same cache line. This reduced no of cache misses and resulted in ~2% increase in no of packets handled on a core. Also modified elements with :1 notation to boolean, to be consistent with other element definitions. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 52 ++++++++++++++++++------------- 1 file changed, 30 insertions(+), 22 deletions(-) commit 5c2e26f6f674ee93719769d024cc72fad3ba9134 Author: Sunil Goutham Date: Mon Mar 14 16:36:14 2016 +0530 net: thunderx: Set recevie buffer page usage count in bulk Instead of calling get_page() for every receive buffer carved out of page, set page's usage count at the end, to reduce no of atomic calls. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 1 + drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 31 ++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) commit 9bd160bfa27fa41927dbbce7ee0ea779700e09ef Author: Richard Alpe Date: Mon Mar 14 09:43:52 2016 +0100 tipc: make sure IPv6 header fits in skb headroom Expand headroom further in order to be able to fit the larger IPv6 header. Prior to this patch this caused a skb under panic for certain tipc packets when using IPv6 UDP bearer(s). Signed-off-by: Richard Alpe Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9214f50a2b24f7de92752fd2c2358520bb84f9f Merge: d3bf9b1 baa11eb Author: David S. Miller Date: Mon Mar 14 12:19:47 2016 -0400 Merge branch 'mvneta-hwbm' Gregory CLEMENT says: ==================== API set for HW Buffer management This is the sixth version of the API set for HW Buffer management (that was initially submitted here: http://thread.gmane.org/gmane.linux.kernel/2125152). This version is just a rebasing onto the last net-next. I also added the Tested-by flag from Sebastian Careba : "The patch set applies successfully and it works well, no more Samba issues any longer". For the record in the previous versions I made the following changes: v4 -> v5: - Add a field with the size of the buffer of the pool was added. It then allow to fix some misused size in the mvneta_bm code when using the new framework. - Add a new patch from Marcin for sram allowing to require non-bufferable access to the memory. It was needed for the hardware buffer management of the mvneta. - Fix the build issue notified by the 0-day builder when building the drivers as module. v3 -> v4 - Fix build issue when HWBM is not selected v2 -> v3 - Make a HWBM and a SWBM version of the mvneta_rx() function in order to reduce the the conditional code. Kept a condition inside the mvneta_poll because specializing this function would have means duplicating 95% of the code. - Put back the register_netdev() call at the end of the mvneta_probe() function. In order to have a unique ID for each port, just used a global variable in the driver. - Added a fix from Marcin in the "net: mvneta: bm: add support for hardware buffer management" patch: "when dropping packets, only buffer pointers passed from BM to descriptors have to be returned to the pool. In submitted version after closing the port and mvneta_rxq_deinit(), it was very likely that a lot of fake buffers are added to the pool, because all descriptors took part in iteration." - Removed the select MVNETA_BM from the Kconfig, it will let the user the choice to use not use it if they want. v1 -> v2 - The hardware buffer management helpers are no more built by default and now depend on a hidden config symbol which has to be selected by the driver if needed - The hwbm_pool_refill() and hwbm_pool_add() now receive a gfp_t as argument allowing the caller to specify the flag it needs. - buf_num is now tested to ensure there is no wrapping - A spinlock has been added to protect the hwbm_pool_add() function in SMP or irq context. - used pr_warn instead of pr_debug in case of errors. - fixed the mvneta implementation by returning the buffer to the pool at various place instead of ignoring it. - Squashed "bus: mvenus-mbus: Fix size test for mvebu_mbus_get_dram_win_info" into bus: mvebu-mbus: provide api for obtaining IO and DRAM window information. - Added my signed-otf-by on all the patches as submitter of the series. - Renamed the dts patches with the pattern "ARM: dts: platform:" - Removed the patch "ARM: mvebu: enable SRAM support in mvebu_v7_defconfig" of this series and already applied it - Modified the order of the patches. In order to ease the test the branch mvneta-BM-framework-v6 is available at git@github.com:MISL-EBU-System-SW/mainline-public.git. ==================== Signed-off-by: David S. Miller commit baa11ebc0c7680861f74f8a11dca903e4b421262 Author: Gregory CLEMENT Date: Mon Mar 14 09:39:05 2016 +0100 net: mvneta: Use the new hwbm framework Now that the hardware buffer management framework had been introduced, let's use it. Tested-by: Sebastian Careba Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/mvneta.c | 18 +++-- drivers/net/ethernet/marvell/mvneta_bm.c | 125 ++++++++----------------------- drivers/net/ethernet/marvell/mvneta_bm.h | 17 ++--- 4 files changed, 49 insertions(+), 112 deletions(-) commit 8cb2d8bf57e6e004c37db2fb4ce74f4d032b7cd0 Author: Gregory CLEMENT Date: Mon Mar 14 09:39:04 2016 +0100 net: add a hardware buffer management helper API This basic implementation allows to share code between driver using hardware buffer management. As the code is hardware agnostic, there is few helpers, most of the optimization brought by the an HW BM has to be done at driver level. Tested-by: Sebastian Careba Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller include/net/hwbm.h | 28 ++++++++++++++++++ net/Kconfig | 3 ++ net/core/Makefile | 1 + net/core/hwbm.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+) commit dc35a10f68d3781c2345d60b22103785985ca849 Author: Marcin Wojtas Date: Mon Mar 14 09:39:03 2016 +0100 net: mvneta: bm: add support for hardware buffer management Buffer manager (BM) is a dedicated hardware unit that can be used by all ethernet ports of Armada XP and 38x SoC's. It allows to offload CPU on RX path by sparing DRAM access on refilling buffer pool, hardware-based filling of descriptor ring data and better memory utilization due to HW arbitration for using 'short' pools for small packets. Tests performed with A388 SoC working as a network bridge between two packet generators showed increase of maximum processed 64B packets by ~20k (~555k packets with BM enabled vs ~535 packets without BM). Also when pushing 1500B-packets with a line rate achieved, CPU load decreased from around 25% without BM to 20% with BM. BM comprise up to 4 buffer pointers' (BP) rings kept in DRAM, which are called external BP pools - BPPE. Allocating and releasing buffer pointers (BP) to/from BPPE is performed indirectly by write/read access to a dedicated internal SRAM, where internal BP pools (BPPI) are placed. BM hardware controls status of BPPE automatically, as well as assigning proper buffers to RX descriptors. For more details please refer to Functional Specification of Armada XP or 38x SoC. In order to enable support for a separate hardware block, common for all ports, a new driver has to be implemented ('mvneta_bm'). It provides initialization sequence of address space, clocks, registers, SRAM, empty pools' structures and also obtaining optional configuration from DT (please refer to device tree binding documentation). mvneta_bm exposes also a necessary API to mvneta driver, as well as a dedicated structure with BM information (bm_priv), whose presence is used as a flag notifying of BM usage by port. It has to be ensured that mvneta_bm probe is executed prior to the ones in ports' driver. In case BM is not used or its probe fails, mvneta falls back to use software buffer management. A sequence executed in mvneta_probe function is modified in order to have an access to needed resources before possible port's BM initialization is done. According to port-pools mapping provided by DT appropriate registers are configured and the buffer pools are filled. RX path is modified accordingly. Becaues the hardware allows a wide variety of configuration options, following assumptions are made: * using BM mechanisms can be selectively disabled/enabled basing on DT configuration among the ports * 'long' pool's single buffer size is tied to port's MTU * using 'long' pool by port is obligatory and it cannot be shared * using 'short' pool for smaller packets is optional * one 'short' pool can be shared among all ports This commit enables hardware buffer management operation cooperating with existing mvneta driver. New device tree binding documentation is added and the one of mvneta is updated accordingly. [gregory.clement@free-electrons.com: removed the suspend/resume part] Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller .../bindings/net/marvell-armada-370-neta.txt | 19 +- .../devicetree/bindings/net/marvell-neta-bm.txt | 49 ++ drivers/net/ethernet/marvell/Kconfig | 13 + drivers/net/ethernet/marvell/Makefile | 1 + drivers/net/ethernet/marvell/mvneta.c | 507 +++++++++++++++++-- drivers/net/ethernet/marvell/mvneta_bm.c | 546 +++++++++++++++++++++ drivers/net/ethernet/marvell/mvneta_bm.h | 189 +++++++ 7 files changed, 1285 insertions(+), 39 deletions(-) commit f2900acea8018c4525ddaa86c7f7cd8afd3f0cc4 Author: Marcin Wojtas Date: Mon Mar 14 09:39:02 2016 +0100 bus: mvebu-mbus: provide api for obtaining IO and DRAM window information This commit enables finding appropriate mbus window and obtaining its target id and attribute for given physical address in two separate routines, both for IO and DRAM windows. This functionality is needed for Armada XP/38x Network Controller's Buffer Manager and PnC configuration. [gregory.clement@free-electrons.com: Fix size test for mvebu_mbus_get_dram_win_info] Signed-off-by: Marcin Wojtas [DRAM window information reference in LKv3.10] Signed-off-by: Evan Wang Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/bus/mvebu-mbus.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mbus.h | 3 +++ 2 files changed, 55 insertions(+) commit 293fdc24fcc9532e2a10120daa1c38b057f37209 Author: Gregory CLEMENT Date: Mon Mar 14 09:39:01 2016 +0100 ARM: dts: armada-xp-openblocks-ax3-4: Add BM support Allow Openblock AX3 using hardware buffer management with mvneta. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 9dd7a57e2cbf33d1f13be8e2d07875c63beb71ac Author: Marcin Wojtas Date: Mon Mar 14 09:39:00 2016 +0100 ARM: dts: armada-xp: enable buffer manager support on Armada XP boards Since mvneta driver supports using hardware buffer management (BM), in order to use it, board files have to be adjusted accordingly. This commit enables BM on AXP-DB and AXP-GP in same manner - because number of ports on those boards is the same as number of possible pools, each port is supposed to use single pool for all kind of packets. Moreover appropriate entry is added to 'soc' node ranges, as well as "okay" status for 'bm' and 'bm-bppi' (internal SRAM) nodes. Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller arch/arm/boot/dts/armada-xp-db.dts | 19 ++++++++++++++++++- arch/arm/boot/dts/armada-xp-gp.dts | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) commit ebae1376fd9ff2cb31bebb04deaa4a4bc04372e5 Author: Marcin Wojtas Date: Mon Mar 14 09:38:59 2016 +0100 ARM: dts: armada-xp: add buffer manager nodes Armada XP network controller supports hardware buffer management (BM). Since it is now enabled in mvneta driver, appropriate nodes can be added to armada-xp.dtsi - for the actual common BM unit (bm@c0000) and its internal SRAM (bm-bppi), which is used for indirect access to buffer pointer ring residing in DRAM. Pools - ports mapping, bm-bppi entry in 'soc' node's ranges and optional parameters are supposed to be set in board files. Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller arch/arm/boot/dts/armada-xp.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c49e99c2b25a412623412a461bb751239208b9b3 Author: Marcin Wojtas Date: Mon Mar 14 09:38:58 2016 +0100 ARM: dts: armada-38x: enable buffer manager support on Armada 38x boards Since mvneta driver supports using hardware buffer management (BM), in order to use it, board files have to be adjusted accordingly. This commit enables BM on: * A385-DB-AP - each port has its own pool for long and common pool for short packets, * A388-ClearFog - same as above, * A388-DB - to each port unique 'short' and 'long' pools are mapped, * A388-GP - same as above. Moreover appropriate entry is added to 'soc' node ranges, as well as "okay" status for 'bm' and 'bm-bppi' (internal SRAM) nodes. [gregory.clement@free-electrons.com: add suppport for the ClearFog board] Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT Acked-by: Russell King Signed-off-by: David S. Miller arch/arm/boot/dts/armada-385-db-ap.dts | 20 +++++++++++++++++++- arch/arm/boot/dts/armada-388-clearfog.dts | 6 ++++++ arch/arm/boot/dts/armada-388-db.dts | 17 ++++++++++++++++- arch/arm/boot/dts/armada-388-gp.dts | 17 ++++++++++++++++- arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 15 ++++++++++++++- 5 files changed, 71 insertions(+), 4 deletions(-) commit 4a547a5a46d05442a767b8ea8b8feb2a5bd76585 Author: Marcin Wojtas Date: Mon Mar 14 09:38:57 2016 +0100 ARM: dts: armada-38x: add buffer manager nodes Armada 38x network controller supports hardware buffer management (BM). Since it is now enabled in mvneta driver, appropriate nodes can be added to armada-38x.dtsi - for the actual common BM unit (bm@c8000) and its internal SRAM (bm-bppi), which is used for indirect access to buffer pointer ring residing in DRAM. Pools - ports mapping, bm-bppi entry in 'soc' node's ranges and optional parameters are supposed to be set in board files. Signed-off-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller arch/arm/boot/dts/armada-38x.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit eb43e023130b5021c1ffad4d5c84cb310ffcb0f6 Author: Marcin Wojtas Date: Mon Mar 14 09:38:56 2016 +0100 misc: sram: add optional ioremap without write combining Some SRAM users may require non-bufferable access to the memory, which is impossible, because devm_ioremap_wc() is used for setting sram->virt_base. This commit adds optional flag 'no-memory-wc', which allow to choose remap method, using DT property. Documentation is updated accordingly. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller Documentation/devicetree/bindings/sram/sram.txt | 5 +++++ drivers/misc/sram.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit d3bf9b19ff06bdcc4aacdd6eb395c742138a9dc9 Merge: 20db778 ccfe1e8 Author: David S. Miller Date: Mon Mar 14 12:13:23 2016 -0400 Merge tag 'wireless-drivers-next-for-davem-2016-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers patches for 4.6 Major changes: rtl8xxxu * add 8723bu support wl18xx * add radar_debug_mode debugfs file for DFS testing ==================== Signed-off-by: David S. Miller commit cee2cc21550648679d222cbe2637fcc6d0f730ef Author: Akinobu Mita Date: Mon Mar 14 23:45:01 2016 +0900 rtc: pcf2127: add pcf2129 device id There are only a few differences between PCF2127 and PCF2129 (PCF2127 has 512 bytes of general purpose SRAM and count-down timer). The rtc-pcf2127 driver currently doesn't use the PCF2127 specific functionality and Kconfig help text already says this driver supports PCF2127/29, so we can simply add pcf2129 to device id list. Signed-off-by: Akinobu Mita Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2127.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9408ec1af875a83ad75f3dac1aa18d2337a809fe Author: Akinobu Mita Date: Mon Mar 14 23:45:00 2016 +0900 rtc: pcf2127: add support for spi interface pcf2127 has selectable I2C-bus and SPI-bus interface support. This adds support for SPI interface. Signed-off-by: Akinobu Mita Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 19 ++++---- drivers/rtc/rtc-pcf2127.c | 118 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 126 insertions(+), 11 deletions(-) commit 907b3262583c700ef48f6a45b2b48878b524b2ef Author: Akinobu Mita Date: Mon Mar 14 23:44:59 2016 +0900 rtc: pcf2127: convert to use regmap pcf2127 has selectable I2C-bus and SPI-bus interface support. Currently rtc-pcf2127 driver only supports I2C. This is preparation for support for SPI interface. Signed-off-by: Akinobu Mita Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2127.c | 214 +++++++++++++++++++++++++++++++--------------- 1 file changed, 144 insertions(+), 70 deletions(-) commit a696b31e2feeaa0ef99242adb9e771b0d3369a81 Author: Michael Büsch Date: Thu Mar 10 18:34:46 2016 +0100 rtc: rv3029: Add thermometer hwmon support This adds support to - enable/disable the thermometer - set the temperature scanning interval - read the current temperature that is used for temp compensation. via hwmon interface Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 9 ++++ drivers/rtc/rtc-rv3029c2.c | 120 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) commit 39387dc2cf22bc5e9c310a4991c6a40852df4217 Author: Michael Büsch Date: Thu Mar 10 18:34:23 2016 +0100 rtc: rv3029: Add update_bits helper for eeprom access This simplifies the update of single bits in the eeprom. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit 361c6ed6b1536d522815abba82bc676038259f72 Author: Josh Poimboeuf Date: Mon Mar 7 09:03:02 2016 -0600 rtc: ds1685: actually spin forever in poweroff error path objtool reports the following warnings: drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x0: duplicate frame pointer save drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x3: duplicate frame pointer setup drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x0: frame pointer state mismatch The warning message needs to be improved, but what it really means in this case is that ds1685_rtc_poweroff() has a possible code path where it can actually fall through to the next function in the object code, ds1685_rtc_work_queue(). The bug is caused by the use of the unreachable() macro in a place which is actually reachable. That causes gcc to assume that the printk() immediately before the unreachable() macro never returns, when in fact it does. So gcc places the printk() at the very end of the function's object code. When the printk() returns, the next function starts executing. The surrounding comment and printk message state that the code should spin forever, which explains the unreachable() statement. However the actual spin code is missing. Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1685.c | 1 + 1 file changed, 1 insertion(+) commit d5861262210067fc01b2fb4f7af2fd85a3453f15 Author: Alexander Kochetkov Date: Sun Mar 6 12:43:57 2016 +0300 rtc: hym8563: fix invalid year calculation Year field must be in BCD format, according to hym8563 datasheet. Due to the bug year 2016 became 2010. Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver") Signed-off-by: Alexander Kochetkov Signed-off-by: Alexandre Belloni drivers/rtc/rtc-hym8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc1dcb0b39dbb10d3290f2fcd6e154670f699166 Author: Akinobu Mita Date: Mon Mar 7 00:27:53 2016 +0900 rtc: ds3232: use rtc->ops_lock to protect alarm operations ds3232->mutex is used to protect for alarm operations which need to access status and control registers. But we can use rtc->ops_lock instead. rtc->ops_lock is held when most of rtc_class_ops methods are called, so we only need to explicitly acquire it from irq handler in order to protect form concurrent accesses. Signed-off-by: Akinobu Mita Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit 95c60c1c8f51521e7f2174fd0fff4dae6d522b83 Author: Akinobu Mita Date: Mon Mar 7 00:27:52 2016 +0900 rtc: ds3232: fix issue when irq is shared several devices ds3232-core requests irq with IRQF_SHARED, so irq can be shared by several devices. But the irq handler for ds3232 unconditionally disables the irq at first and the irq is re-enabled only when the interrupt source was the ds3232's alarm. This behaviour breaks the devices sharing the same irq in the various scenarios. This converts to use threaded irq and remove outdated code in suspend/resume paths. Signed-off-by: Akinobu Mita Suggested-by: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 81 +++++++----------------------------------------- 1 file changed, 12 insertions(+), 69 deletions(-) commit 7522297e1638f985e5d52f34b871e742b10586d4 Author: Akinobu Mita Date: Mon Mar 7 00:27:51 2016 +0900 rtc: ds3232: remove unused UIE code UIE mode irqs are handled by the generic rtc core now. But there are remaining unused code fragments for it. Signed-off-by: Akinobu Mita Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 7b4393a62f784bdd295c397c640cd93238ded0be Author: Akinobu Mita Date: Mon Mar 7 00:27:50 2016 +0900 rtc: ds3232: add register access error checks Add missing register access error checks and make it return error code or print error message. Signed-off-by: Akinobu Mita Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit dfc2532b55a4989930d0d67cdf83da9ccb2a1b5b Author: Akinobu Mita Date: Mon Mar 7 00:27:49 2016 +0900 rtc: ds3232: fix read on /dev/rtc after RTC_AIE_ON The rtctest (tools/testing/selftests/timers/rtctest.c) found that reading ds3232 rtc device immediately return the value 0x20 (RTC_AF) without waiting alarm interrupt. This is because alarm_irq_enable() of ds3232 driver changes RTC_AF flag in rtc->irq_data. So calling ioctl with RTC_AIE_ON generates invalid value in rtc device. The lower-level driver should not touch rtc->irq_data directly. Signed-off-by: Akinobu Mita Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 080481f54ef621211d6c75a03dc652fb6ed04222 Author: Akinobu Mita Date: Mon Mar 7 00:27:48 2016 +0900 rtc: merge ds3232 and ds3234 According to "Feature Comparison of the DS323x Real-Time Clocks" (http://pdfserv.maximintegrated.com/en/an/AN5143.pdf), DS3232 and DS3234 are very similar. This merges rtc-ds3232 and rtc-ds3234 with using regmap. This change also enables to support alarm for ds3234. Signed-off-by: Akinobu Mita Suggested-by: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 44 ++++++------ drivers/rtc/Makefile | 1 - drivers/rtc/rtc-ds3232.c | 167 ++++++++++++++++++++++++++++++++++++++++++++- drivers/rtc/rtc-ds3234.c | 171 ----------------------------------------------- 4 files changed, 189 insertions(+), 194 deletions(-) commit 370927c4b651539c65dd8d17dd5079526cd8401d Author: Akinobu Mita Date: Mon Mar 7 00:27:47 2016 +0900 rtc: ds3232: convert to use regmap This is preparation for merging rtc-ds3232 i2c driver and rtc-ds3234 spi driver. Signed-off-by: Akinobu Mita Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Dennis Aberilla Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 216 +++++++++++++++++++++++++---------------------- 1 file changed, 113 insertions(+), 103 deletions(-) commit 832315b05b660427ebdc5987b66e02cb7ec7b4f6 Author: Alexandre Belloni Date: Thu Mar 10 05:46:18 2016 +0100 rtc: pxa: fix Kconfig indentation The pxa section is indented using spaces, use tabs. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e27e21603e1ff9f6897e5f2ffa7dec09ab0c955c Author: Michael Büsch Date: Fri Mar 4 22:41:19 2016 +0100 rtc: rv3029: Add device tree property for trickle charger The trickle charger resistor can be enabled via device tree property trickle-resistor-ohms. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 106 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 3 deletions(-) commit a7f6e287419cf523c769e87bbef748ae7bd856ff Author: Michael Büsch Date: Fri Mar 4 22:40:55 2016 +0100 rtc: rv3029: Add functions for EEPROM access This adds functions for access to the EEPROM memory on the rv3029. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 125 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 2dca3d9e1440162a959d8b2942293bfc6ac14a19 Author: Michael Büsch Date: Fri Mar 4 22:40:30 2016 +0100 rtc: rv3029: Add i2c register update-bits helper This simplifies mask/set operations on device I2C registers. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 54 ++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 26 deletions(-) commit 7697de35faf02b5b04d1cb53e44cd42658610fe9 Author: Michael Büsch Date: Fri Mar 4 22:39:49 2016 +0100 rtc: rv3029: Add missing register definitions This adds all (according to the data sheet) missing register and bit definitions. It also fixes the definition of the trickle charger bit masks. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 61 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 16 deletions(-) commit baba623f124423797443401a667cdeb714a26d1f Author: Michael Büsch Date: Fri Mar 4 22:39:17 2016 +0100 rtc: rv3029: Add "rv3029" I2C device id The C2 suffix does not appear in the latest datasheet, so add a device ID without it. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 1 + 1 file changed, 1 insertion(+) commit aba39d27bdb2e92b22f0cd1b29adb3a86d781d2c Author: Michael Büsch Date: Fri Mar 4 22:38:45 2016 +0100 rtc: rv3029: Remove all 'C2' suffixes from identifiers The C2 suffix does not appear anymore in the latest device and data sheet versions. Signed-off-by: Michael Buesch Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 295 +++++++++++++++++++++++---------------------- 1 file changed, 148 insertions(+), 147 deletions(-) commit 7a587eae2a8b6eeb7919fd25f686fa20b14f4821 Author: Alexandre Belloni Date: Sun May 3 11:00:57 2015 +0200 rtc: enable COMPILE_TEST There are several arch-specific RTC drivers that can be successfully compiled on other platforms. Add a COMPILE_TEST dependency for those. Signed-off-by: Alexandre Belloni Acked-by: Geert Uytterhoeven drivers/rtc/Kconfig | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 64232fc33a5bcc29aeb001e1bee80e17a889b4fb Author: Arnd Bergmann Date: Tue Mar 1 17:59:57 2016 +0100 rtc: generic: allow building on all architectures There are four architectures using this driver, but since we can build it with COMPILE_TEST, we should try dealing with the absence of the asm/rtc.h header file, to avoid getting a build error: drivers/rtc/rtc-generic.c:12:21: fatal error: asm/rtc.h: No such file or directory This creates an alternative use of the driver, allowing architectures to pass a set of rtc_class_ops in platform data. We can convert the four architectures to use this and then remove the original code. Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-generic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ede44c908d44b166a5b6bd7caacd105c2ff5a70f Author: Alexandre Belloni Date: Thu Mar 3 09:55:47 2016 +0100 rtc: pcf8523: properly handle oscillator stop bit The time and date register of the pcf8223 are undefined after a power reset. Properly handle the OS bit and return -EINVAL when that bit is set. It is properly removed when setting the time. This solves an issue where the time and date may be valid for rtc_valid_tm() but is not the current time. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8523.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit 2da424af4531c4469408136772d6d5e0f8df748b Author: Alexandre Belloni Date: Wed Mar 2 11:25:43 2016 +0100 rtc: pcf85063: remove struct pcf85063 No members of struct pcf85063 are used anymore, remove the whole structure. Reviewed-by: Juergen Borleis Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit a2892bf4456ef2c57a03b48cf09476bedee140f1 Author: Alexandre Belloni Date: Wed Mar 2 11:25:42 2016 +0100 rtc: pcf85063: remove useless DRV_VERSION Since the driver is mainlined there is no use for a separate version number. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 5 ----- 1 file changed, 5 deletions(-) commit e0252ec77b5ea6cf4403ba49112bc95378ffe50a Author: Alexandre Belloni Date: Thu Mar 3 04:01:18 2016 +0100 rtc: always show I2C Always show there is an I2C section, like the other sections. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 8c09b9fdecab1f4a289f07b46e2ad174b6641928 Author: Dan Carpenter Date: Wed Mar 2 13:07:45 2016 +0300 rtc: ds1685: passing bogus values to irq_restore We call spin_lock_irqrestore with "flags" set to zero instead of to the value from spin_lock_irqsave(). Fixes: aaaf5fbf56f1 ('rtc: add driver for DS1685 family of real time clocks') Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1685.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e84536cb9ffb6562b3a2584c7454104e750e01a Author: Laxman Dewangan Date: Wed Mar 2 14:06:25 2016 +0530 rtc: max77686: Use REGMAP_IRQ_REG for regmap-rtc-irqs initialisation Use macro REGMAP_IRQ_REG from regmap.h to initialise the regmap irq table for max77686 to have better coding style and improve readability. Signed-off-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max77686.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 726fe738bd5cc5deba86d7e621505392c0f7961f Author: Laxman Dewangan Date: Wed Mar 2 14:06:24 2016 +0530 rtc: max77686: Add support for MAX20024/MAX77620 RTC IP Maxim Semiconductor's PMIC MAX77686 has RTC IP which is reused in the MAX77620/MAX20024 PMICs. Add support for these devices in MAX77686 RTC driver. This device does not have RTC alarm pending status outside of RTC IP. The RTC IP is having separate I2C address for its register access. Signed-off-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 4 ++-- drivers/rtc/rtc-max77686.c | 47 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) commit 582841a4f66f64ed08450fcb8f716cacc51ac7d7 Author: Javier Martinez Canillas Date: Wed Feb 24 14:26:20 2016 -0300 rtc: mt6397: Remove plaform module alias The driver uses the MODULE_ALIAS() macro to export a platform module alias to allow the module to be autoloaded if the device is registered using the legacy platform registration mechanism but the driver is always used by OF only machines so the alias is not needed and should just be removed. Suggested-by: Arnd Bergmann Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-mt6397.c | 1 - 1 file changed, 1 deletion(-) commit ba270bbbf43474fe459e206b5283996fd1511647 Author: Alexandre Belloni Date: Wed Feb 24 00:05:28 2016 +0100 rtc: pcf85063: remove useless century handling pcf85063_get_datetime() tries to handle a century bit but that bit is not documented and the final value is never used anywhere else in the kernel. Reviewed-by: Juergen Borleis Tested-by: Ulrich Ölmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 7 ------- 1 file changed, 7 deletions(-) commit a25f4a95ec3cded34c1250364eba704c5e4fdac4 Author: Geert Uytterhoeven Date: Tue Mar 1 09:50:01 2016 +0100 rtc: vr41xx: Wire up alarm_irq_enable drivers/rtc/rtc-vr41xx.c:229: warning: ‘vr41xx_rtc_alarm_irq_enable’ defined but not used Apparently the conversion to alarm_irq_enable forgot to wire up the callback. Fixes: 16380c153a69c378 ("RTC: Convert rtc drivers to use the alarm_irq_enable method") Signed-off-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni drivers/rtc/rtc-vr41xx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d2c6b8743b74fc012f858abd0b78d934fc422641 Author: Alexandre Belloni Date: Mon Feb 29 00:47:49 2016 +0100 rtc: rv3029: reword Kconfig option The Kconfig option for rv3029 is not mentioning any part number, explicitly show rv3029. Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddf7059ce5dfa28e30380524983db94868fa9083 Author: Grygorii Strashko Date: Fri Feb 26 17:42:56 2016 +0200 rtc: as3722: Drop IRQF_EARLY_RESUME flag as3722 RTC IRQ is nested threaded and wired to the as3722 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Lee Jones Cc: Nishanth Menon Cc: Laxman Dewangan Signed-off-by: Grygorii Strashko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-as3722.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed214bec6803081bace1ca5d546eac6b18c36028 Author: Grygorii Strashko Date: Fri Feb 26 17:42:55 2016 +0200 rtc: tps80031: Drop IRQF_EARLY_RESUME flag tps80031 RTC IRQ is nested threaded and wired to the tps80031 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Lee Jones Cc: Nishanth Menon Signed-off-by: Grygorii Strashko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps80031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be563c9a2727806213ad634643045d521655fc6d Author: Grygorii Strashko Date: Fri Feb 26 17:42:54 2016 +0200 rtc: tps65910: Drop IRQF_EARLY_RESUME flag tps65910 RTC IRQ is nested threaded and wired to the tps65910 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Lee Jones Cc: Tony Lindgren Cc: Nishanth Menon Cc: Laxman Dewangan Signed-off-by: Grygorii Strashko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps65910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa1e8069fcbc7f05e786922db2942dd49c136b4e Author: Grygorii Strashko Date: Fri Feb 26 17:42:53 2016 +0200 rtc: tps6586x: Drop IRQF_EARLY_RESUME flag tps6586x RTC IRQ is nested threaded and wired to the tps6586x inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Lee Jones Cc: Nishanth Menon Cc: Laxman Dewangan Signed-off-by: Grygorii Strashko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps6586x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3be3f6a364b0e2c59b3ad0d7f6dd259feb8a393 Author: Grygorii Strashko Date: Fri Feb 26 17:42:52 2016 +0200 rtc: palmas: Drop IRQF_EARLY_RESUME flag Palams RTC IRQ is nested threaded and wired to the Palmas inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Tony Lindgren Cc: Lee Jones Cc: Nishanth Menon Signed-off-by: Grygorii Strashko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-palmas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d084885e9800f574f0cc41e7b82fc4a18fca3a95 Author: Soren Brinkmann Date: Tue Nov 3 23:13:46 2015 -0800 rtc: Group Kconfig entries by vendor The RTC entries are mostly grouped by vendor. Move the few outliers in place. Also, change the one occurrence of 'nxp' to 'NXP' to make all NXP entries consistent. Signed-off-by: Soren Brinkmann Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 88 ++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit 51aa905c912385ee99791b2ced80646f37b9fe0a Author: Joshua Henderson Date: Thu Feb 25 10:30:44 2016 -0700 rtc: pic32: Add PIC32 real time clock driver This driver adds support for the PIC32 real time clock and calendar peripheral: - reading and setting time - alarms provided by dedicated IRQ Signed-off-by: Joshua Henderson Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-pic32.c | 411 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 422 insertions(+) commit af556c11f08bbe14a6be8936d5c155fb6694f566 Author: Joshua Henderson Date: Thu Feb 25 10:30:43 2016 -0700 dt/bindings: Add bindings for the PIC32 real time clock Document the devicetree bindings for the real time clock found on Microchip PIC32 class devices. Signed-off-by: Joshua Henderson Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/microchip,pic32-rtc.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ef5f4a9e805d7241ebef898d832a97915c995712 Author: Akinobu Mita Date: Mon Feb 15 23:49:09 2016 +0900 rtc: rx8025: unsupport UIE mode The alarm for rx8025 only has a minute accuracy, so unsupport UIE mode. pcf8563 and hym8563 also have a minute accuracy and unsupport it. Signed-off-by: Akinobu Mita Cc: Wolfgang Grandegger Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 3 +++ 1 file changed, 3 insertions(+) commit 302c5608e9213c9c440b512628cb6f1626f61054 Author: Akinobu Mita Date: Mon Feb 15 23:49:08 2016 +0900 rtc: rx8025: round up to nearest minute for a minute accuracy alarm The alarm for rx8025 only has a minute accuracy, so round up to nearest minute when setting alarm. Without doing this, rtctest blocks one day after setting alarm to 5 seconds later. pcf8563 and hym8563 also have similar handling. Signed-off-by: Akinobu Mita Cc: Wolfgang Grandegger Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 9dbe3852964166fdf3ac4aff4cb67311dfa243bc Author: Akinobu Mita Date: Mon Feb 15 23:49:07 2016 +0900 rtc: rx8025: protect ctrl1 register update by rtc->ops_lock The ctrl1 register is accessed by alarm operations. But it is updated in threaded interrupt handler without acquiring rtc->ops_lock. Signed-off-by: Akinobu Mita Cc: Wolfgang Grandegger Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0a966c07323a0506522587e8de96f542ebac04ba Author: Akinobu Mita Date: Mon Feb 15 23:49:06 2016 +0900 rtc: rx8025: fix irq handler registration When IRQ line for this chips is connected, devm_request_threaded_irq() refuses to register irq handler with the following message. genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq Signed-off-by: Akinobu Mita Cc: Wolfgang Grandegger Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8124c7117ecd1e431a287be943e590452ff4092e Author: Krzysztof Kozlowski Date: Tue Feb 16 11:04:42 2016 +0900 rtc: s5m: De-inline large functions to save space Few functions were marked inline even though they were relatively large and sometimes used in multiple places. De-inline them to let the compiler decide whether optimization makes sense. This fixes inline_hunt report: drivers/rtc/rtc-s5m.c: Deinline s5m8767_rtc_set_alarm_reg, save 704 bytes drivers/rtc/rtc-s5m.c: Deinline s5m8767_wait_for_udr_update, save 192 bytes Reported-by: Denys Vlasenko Cc: Denys Vlasenko Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 270a3bd6bdc2140708f88337c833e74ddafdcf61 Author: Paul Gortmaker Date: Sun Feb 14 15:04:19 2016 -0500 rtc: make class.c explicitly non-modular The Makefile/Kconfig currently controlling compilation of this code is: obj-$(CONFIG_RTC_CLASS) += rtc-core.o rtc-core-y := class.o interface.o drivers/rtc/Kconfig:menuconfig RTC_CLASS drivers/rtc/Kconfig: bool "Real Time Clock" ...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 code there is no doubt it is builtin-only. We don't replace module.h with init.h since the file does need to know what a struct module is. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Signed-off-by: Alexandre Belloni drivers/rtc/class.c | 13 ------------- 1 file changed, 13 deletions(-) commit 31d4d33ef431364972f4a38401f660a2ec935cde Author: Juergen Borleis Date: Tue Feb 9 11:57:27 2016 +0100 rtc: pcf85063: fix time/date setting When setting a new time/date the RTC's clock must be stopped first, in order to write the time/date registers in an atomic manner. So, this change stops the clock first and then writes the time/date registers and the clock control register (to re-enable the clock) in one turn. Signed-off-by: Juergen Borleis Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 78 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 23 deletions(-) commit 6cc4c8b1e3790c63b2e1b6d9b25d2bda6e406572 Author: Juergen Borleis Date: Tue Feb 9 11:57:26 2016 +0100 rtc: pcf85063: fix time/date reading Check if the RTC signals an invalid time/date (due to a battery power loss for example). In this case ignore the time/date until it is really set again. Signed-off-by: Juergen Borleis Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7b5768486a910532885f01b9d2dad4818c8b3be1 Author: Juergen Borleis Date: Tue Feb 9 11:57:25 2016 +0100 rtc: pcf85063: simplify code to read the current time By using i2c_smbus_read_i2c_block_data() the code is now much simpler. While at it: when reading the RTC's seconds register, all time/date registers are frozen until the RTC's year register is read. So it is important to read all time/date registers in one turn to not lose a second event. Make it more clear why the read must happen in this way. Signed-off-by: Juergen Borleis Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf85063.c | 47 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) commit bae2f647025549fd2a24f02e9587481a50c0066b Author: Joshua Clayton Date: Fri Feb 5 12:41:13 2016 -0800 rtc: pcf2123: implement read_offset and set_offset pcf2123 has an offset register, which can be used to make minor adjustments to the clock rate to compensate for temperature or a crystal that is not exactly right. Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 5495a4159f7413f0367e8c9727ba9facd40ade7f Author: Joshua Clayton Date: Fri Feb 5 12:41:12 2016 -0800 rtc: implement a sysfs interface for clock offset clock offset may be set and read in decimal parts per billion attribute is /sys/class/rtc/rtcN/offset The attribute is only visible for rtcs that have set_offset implemented. Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni Documentation/rtc.txt | 6 ++++++ drivers/rtc/rtc-sysfs.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) commit b3967067c273359c7462f4be9a887c3d1a515f49 Author: Joshua Clayton Date: Fri Feb 5 12:41:11 2016 -0800 rtc: Add functions to set and read rtc offset A number of rtc devices, such as the NXP pcf2123 include a facility to adjust the clock in order to compensate for temperature or a crystal, capacitor, etc, that results in the rtc clock not running at exactly 32.768 kHz. Data sheets I have seen refer to this as a clock offset, and measure it in parts per million, however they often reference ppm to 2 digits of precision, which makes integer ppm less than ideal. We use parts per billion, which more than covers the precision needed and works nicely within 32 bits Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/rtc.h | 4 ++++ 2 files changed, 58 insertions(+) commit 9d1fa4c3737ac82520931d940dcd2426719f8dd2 Author: Oleksij Rempel Date: Thu Feb 4 13:45:20 2016 +0100 rtc: rv8803: convert spin_lock to mutex_lock Fix a scheduling while atomic issue caused by rv8803_set_time() holding a spinlock during the call to i2c_smbus_read_byte_data(). Signed-off-by: Oleksij Rempel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 7444845b084d7785a2581ba5292aa8adbc1fd439 Author: Oleksij Rempel Date: Tue Feb 2 20:56:11 2016 +0100 doc: dt: add documentation for alphascale,asm9260-rtc Document Alphascale asm9260 RTC bindings Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../bindings/rtc/alphascale,asm9260-rtc.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 125e550fd2573ed114076f7e0d7e9834e6cb0734 Author: Oleksij Rempel Date: Tue Feb 2 20:56:10 2016 +0100 rtc: add Alphascale asm9260 driver Add support for RTC controller found on Alphascale asm9260 SoC. Signed-off-by: Oleksij Rempel Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-asm9260.c | 355 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 366 insertions(+) commit 6c6ff145b3346b071e7d80f9bd33aa7de0e438bc Author: Akinobu Mita Date: Sun Jan 31 23:10:10 2016 +0900 rtc: ds1307: add clock provider support for DS3231 DS3231 has programmable square-wave output signal. This enables to use this feature as a clock provider of common clock framework. Signed-off-by: Akinobu Mita Reviewed-by: Michael Turquette Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/maxim,ds3231.txt | 37 +++ drivers/rtc/rtc-ds1307.c | 296 ++++++++++++++++++++- 2 files changed, 332 insertions(+), 1 deletion(-) commit f3937549a975fadec9b517b059616f08f9cb7653 Author: Laxman Dewangan Date: Tue Feb 9 22:56:34 2016 +0530 rtc: max77686: move initialisation of rtc regmap, irq chip locally To make RTC block of MAX77686/MAX77802 as independent driver, move the registration of i2c device, regmap for register access and irq_chip for interrupt support inside the RTC driver. Removed the same initialisation from MFD driver. Having this change will allow to reuse this driver for different PMIC/devices from Maxim Semiconductor if they kept same RTC IP on different PMIC. Some of examples as PMIC MAX77620, MAX20024 where same RTC IP used and hence driver for these chips will use this driver only for RTC support. Suggested-by: Krzysztof Kozlowski Signed-off-by: Laxman Dewangan Tested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Acked-by: Lee Jones Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni drivers/mfd/max77686.c | 85 +------------------- drivers/rtc/rtc-max77686.c | 148 ++++++++++++++++++++++++++++++----- include/linux/mfd/max77686-private.h | 3 - 3 files changed, 130 insertions(+), 106 deletions(-) commit 08e37ef17db5b0d387564cf06520f6ff5f54c76b Author: Laxman Dewangan Date: Tue Feb 9 22:56:33 2016 +0530 mfd: max77686: do not set i2c client data for rtc i2c client There is different RTC I2C address for RTC block in MAX77686. Driver is creating dummy i2c client for this address to access the register of this IP block. As there is no call to i2c_get_clientdata() for rtc_i2c client, there is no need to store pointer and hence removing the call to set client data for rtc i2c client. Suggested-by: Krzysztof Kozlowski Signed-off-by: Laxman Dewangan Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Acked-by: Lee Jones Signed-off-by: Alexandre Belloni drivers/mfd/max77686.c | 1 - 1 file changed, 1 deletion(-) commit f604c48849a5408065d1b53e89588dd76054dd06 Author: Laxman Dewangan Date: Tue Feb 9 22:56:32 2016 +0530 rtc: max77686: avoid reference of parent device info multiple places Get rid of referring parent device info for register access all the places by making regmap as part of max77686 rtc device info. This will also remove the need of storing parent device info in max77686 rtc device info as this is no more required. Signed-off-by: Laxman Dewangan Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max77686.c | 52 ++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) commit 69be249ab4bcfe3dae61866835f102632cdbe9d9 Author: Laxman Dewangan Date: Tue Feb 9 22:56:31 2016 +0530 rtc: max77686: use rtc regmap to access RTC registers rtc_regmap should be used to access all RTC registers instead of parent regmap regardless of what chip or property have it. This makes the register access uniform and extendible for other chips. Signed-off-by: Laxman Dewangan Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max77686.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0b4f8b085b5dc2567e5cfb6417df9f79df9cb39e Author: Laxman Dewangan Date: Tue Feb 9 22:56:30 2016 +0530 rtc: max77686: fix checkpatch error Fix following check patch error in rtc-max77686 driver: - Alignment should match open parenthesis. - braces {} should be used on all arms of this statement. - Prefer using the BIT macro Signed-off-by: Laxman Dewangan Tested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-max77686.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 2863934e2393e6b3bf635ff51a35ed1bc5a83ca8 Author: Andre Przywara Date: Mon Feb 1 17:39:22 2016 +0000 rtc: allow compilation of sun6i RTC for all sunxi SoCs At the moment the "sun6i" RTC drivers depends on having two specific SoC families selected. The Allwinner A64 SoC has the same RTC, so extend the Kconfig option to allow inclusion of the driver for all Allwinner SoCs. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 68298c2dac96c75ed6950f059bbb1368c21da2a3 Author: Steffen Trumtrar Date: Mon Jan 4 18:04:35 2016 +0100 rtc: add driver for RX6110SA real time clock The RX6110 comes in two different variants: SPI and I2C. This driver only supports the SPI variant. If the need ever arises to also support the I2C variant, this driver could easily be refactored to support both cases. Reviewed-by: Philipp Zabel Signed-off-by: Steffen Trumtrar Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 9 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rx6110.c | 402 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 412 insertions(+) commit cfe941628a04b572b0dba7a20fd4570edad74c81 Author: Steffen Trumtrar Date: Mon Jan 4 18:04:34 2016 +0100 Documentation: devicetree: add epson rx6110 binding Add the binding documentation for the Epson RX6110 RTC. Acked-by: Rob Herring Reviewed-by: Philipp Zabel Signed-off-by: Steffen Trumtrar Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/epson,rx6110.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f07fa9242ee72e8a1e926458759b895b3f1de115 Author: Joshua Clayton Date: Mon Jan 4 10:31:23 2016 -0800 rtc: pcf2123: avoid resetting the clock if possible pcf2123 data sheet recommends a software reset when the chip is first powered on. This change avoids resetting the chip every time the driver is loaded, which has some negative effects. There are several registers including a clock rate adjustment that really should survive a reload of the driver (or reboot). In addition, stopping and restarting the clock to verify the chip is there is not a good thing once the time is set. According to the data sheet, the seconds register has a 1 in the high bit when the voltage has gotten low. We check for this condition, as well as whether the time retrieved from the chip is valid. We reset the rtc only if the time is not reliable and valid. This is sufficient for checking for the presence of the chip, as either all zeros or all 0xff will result in an invalid time/date Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 1e094b946c1e2186b412118c2af3cc602cad3ac4 Author: Joshua Clayton Date: Mon Jan 4 10:31:22 2016 -0800 rtc: pcf2123: refactor chip reset into a function Refactor chip reset items into its own function, isolating it from the rest of the device probe. Subsequent commits will avoid calling this code. Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 64 ++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 28 deletions(-) commit 809b453b76e1544d245b7285fe570f3f20b8bd89 Author: Joshua Clayton Date: Mon Jan 4 10:31:21 2016 -0800 rtc: pcf2123: clean up writes to the rtc chip Add new functions pcf2123_write(), and pcf2123_write_reg(). Use named defines for the values being written. This improves modularity and readability, and reduces lines of code. Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 67 ++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) commit 66c056d6a1f7392b4fe49500ad65fd96e4d94435 Author: Joshua Clayton Date: Mon Jan 4 10:31:20 2016 -0800 rtc: pcf2123: clean up reads from the chip Put read operations into a function. This improves modularity and readability. Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 245cb74be649ada355ca68f1cc9cfec519aae612 Author: Joshua Clayton Date: Mon Jan 4 10:31:19 2016 -0800 rtc: pcf2123: define registers and bit macros Add defines for all 16 registers in the pcf2123. Add defines for useful bits from several registers I've tried to document all the registers, and as best as possible, all the special bits they employ Use BIT() wherever possible in the bit definitions Signed-off-by: Joshua Clayton Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 50 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) commit 80c544ded25ac14d7cc3e555abb8ed2c2da99b84 Author: Sebastian Ott Date: Mon Mar 14 15:47:23 2016 +0100 s390/pci: enforce fmb page boundary rule The function measurement block must not cross a page boundary. Ensure that by raising the alignment requirement to the smallest power of 2 larger than the size of the fmb. Fixes: d0b088531 ("s390/pci: performance statistics and debug infrastructure") Cc: stable@vger.kernel.org # v3.8+ Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci.h | 2 +- arch/s390/pci/pci.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit d436641439e0121d26b19d4268e9fb3ecd368d71 Author: Jens Axboe Date: Mon Mar 14 09:06:01 2016 -0600 cpqarray: remove it from the kernel We disabled the ability to enable this driver back in October of 2013, we should be able to safely remove it at this point. The initial goal was to remove it in 3.15, so now is the time. Signed-off-by: Jens Axboe Documentation/blockdev/cpqarray.txt | 93 -- MAINTAINERS | 6 - drivers/block/Kconfig | 10 - drivers/block/cpqarray.c | 1820 ----------------------------------- drivers/block/cpqarray.h | 126 --- drivers/block/ida_cmd.h | 349 ------- drivers/block/ida_ioctl.h | 87 -- 7 files changed, 2491 deletions(-) commit 2b885517110cbe8724fef30363778b6284d0a428 Author: Christoph Hellwig Date: Fri Mar 11 17:34:53 2016 +0100 block: bio_remaining_done() isn't unlikely We use bio chaining during most I/Os these days due to the delayed bio splitting. Additionally XFS will start using it, and there is a pending direct I/O rewrite also making heavy use for it. Don't pretend it's always unlikely, and let the branch predictor do it's job instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba8c6967b7391aab8fa562611fe637a57850b4aa Author: Christoph Hellwig Date: Fri Mar 11 17:34:52 2016 +0100 block: cleanup bio_endio Replace the while loop that unecessarily checks for a NULL bio in the fast path with a simple goto loop. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 38f8baae890561203ba6093f76b14576ce9b271b Author: Christoph Hellwig Date: Fri Mar 11 17:34:51 2016 +0100 block: factor out chained bio completion Factor common code between bio_chain_endio and bio_endio into a common helper. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit af3e3a5259e35d7056fbe568a0ffcbd1420e1742 Author: Christoph Hellwig Date: Fri Mar 11 17:34:50 2016 +0100 block: don't unecessarily clobber bi_error for chained bios Only overwrite the parents bi_error if it was zero. That way a successful bio completion doesn't reset the error pointer. Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c988cabe2534b6efbf0cfab6d69e18855dc3409e Author: Hannes Reinecke 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 v3: [Put Hannes back as author] Signed-off-by: Hannes Reinecke Signed-off-by: Lee Duncan Reviewed-by: Mike Christie Signed-off-by: Konrad Rzeszutek Wilk 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 bb7ab3b92e46da06b580c6f83abe7894dc449cca Author: Adam Buchbinder Date: Fri Mar 4 11:23:12 2016 -0800 btrfs: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- fs/btrfs/ctree.h | 10 +++++----- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/extent_map.c | 4 ++-- fs/btrfs/file.c | 2 +- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/tree-log.c | 2 +- fs/btrfs/volumes.c | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) commit 744742d692e37ad5c20630e57d526c8f2e2fe3c9 Author: Seth Forshee Date: Fri Mar 11 10:35:34 2016 -0600 fuse: Add reference counting for fuse_io_priv The 'reqs' member of fuse_io_priv serves two purposes. First is to track the number of oustanding async requests to the server and to signal that the io request is completed. The second is to be a reference count on the structure to know when it can be freed. For sync io requests these purposes can be at odds. fuse_direct_IO() wants to block until the request is done, and since the signal is sent when 'reqs' reaches 0 it cannot keep a reference to the object. Yet it needs to use the object after the userspace server has completed processing requests. This leads to some handshaking and special casing that it needlessly complicated and responsible for at least one race condition. It's much cleaner and safer to maintain a separate reference count for the object lifecycle and to let 'reqs' just be a count of outstanding requests to the userspace server. Then we can know for sure when it is safe to free the object without any handshaking or special cases. The catch here is that most of the time these objects are stack allocated and should not be freed. Initializing these objects with a single reference that is never released prevents accidental attempts to free the objects. Fixes: 9d5722b7777e ("fuse: handle synchronous iocbs internally") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Seth Forshee Signed-off-by: Miklos Szeredi fs/fuse/cuse.c | 4 ++-- fs/fuse/file.c | 28 +++++++++++++++++++++------- fs/fuse/fuse_i.h | 9 +++++++++ 3 files changed, 32 insertions(+), 9 deletions(-) commit 7cabc61e01a0a8b663bd2b4c982aa53048218734 Author: Robert Doebbelin Date: Mon Mar 7 09:50:56 2016 +0100 fuse: do not use iocb after it may have been freed There's a race in fuse_direct_IO(), whereby is_sync_kiocb() is called on an iocb that could have been freed if async io has already completed. The fix in this case is simple and obvious: cache the result before starting io. It was discovered by KASan: kernel: ================================================================== kernel: BUG: KASan: use after free in fuse_direct_IO+0xb1a/0xcc0 at addr ffff88036c414390 Signed-off-by: Robert Doebbelin Signed-off-by: Miklos Szeredi Fixes: bcba24ccdc82 ("fuse: enable asynchronous processing direct IO") Cc: # 3.10+ fs/fuse/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b0dc6d43ed89b861b8ee32cc454d2d0c89074843 Author: Thomas Hellstrom Date: Fri Feb 12 10:34:19 2016 +0100 drm/vmwgfx: Allow the UPDATE_LAYOUT ioctl from control nodes On vmware there is a daemon telling the KMS system about the GUI layout. Typically it talks to the X server but in the absence of an X server or if there are multiple, it wants to talk directly to the vmwgfx kernel module. Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ea1734827bb49a738c9d8bda783763d729bf233 Author: Thomas Hellstrom Date: Fri Feb 12 10:01:28 2016 +0100 drm/vmwgfx: Send a hotplug event at master_set Make sure drm clients (mostly the X server) are communicated the current layout when switched in. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 + 1 file changed, 1 insertion(+) commit 2e3fcb1ccdbe7918006d509a531fcf8c9b10e9f8 Author: Ashish Samant Date: Fri Mar 11 14:54:05 2016 -0800 btrfs: Print Warning only if ENOSPC_DEBUG is enabled Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use btrfs_debug if it is enabled. Signed-off-by: Ashish Samant [ preserve the WARN_ON ] Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2e69b25bb12cfd32250684b600652589d823a96c Author: Thomas Hellstrom Date: Fri Feb 12 09:59:50 2016 +0100 drm/vmwgfx: Default to explicit crtc placement for screen targets and screen objects Enables using multiple framebuffers. For legacy display units, explicit crtc placement is not supported due to hardware limitations. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6dd687b42fff7aa681978e117cf3051de0d023a5 Author: Thomas Hellstrom Date: Fri Feb 12 09:57:15 2016 +0100 drm/vmwgfx: Calculate the cursor position based on the crtc gui origin Base the cursor position on the coordinate of the crtc origin in the gui coordinate system rather than in the framebuffer coordinate system. With explicit placement, these may differ (for example when two crtcs scan out of the same framebuffer location). Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) commit 76404ac0a2c358dd63b8ed32e4df69f3b781b7eb Author: Thomas Hellstrom Date: Fri Feb 12 09:55:45 2016 +0100 drm/vmwgfx: Add connector properties to switch between explicit and implicit placement Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 7 +++++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 7 +++++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 +++++++- 6 files changed, 54 insertions(+), 2 deletions(-) commit 578e609a096e086dc1259611cfb47b1499bcded6 Author: Thomas Hellstrom Date: Fri Feb 12 09:45:42 2016 +0100 drm/vmwgfx: Add suggested screen x and y connector properties Introduced by qxl, add these properties as a generic way to tell a display manager about the GUI layout. Also add the hotplug_mode_update_property which advises display managers to reread the mode list on a hotplug event. Signed-off-by: Thomas Hellstrom Reviewed-by: Jakob Bornecrantz drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 32 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 10 ++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 10 ++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 6 ++++++ 5 files changed, 55 insertions(+), 4 deletions(-) commit 4d492a07ad62e58c47d863266ff347a9f202016b Author: Thomas Hellstrom Date: Fri Feb 12 09:01:29 2016 +0100 drm/vmwgfx: Add implicit framebuffer checks to the screen target code Just like for screen objects, make sure we use only a single framebuffer for implicit placement. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 75c0685549bb4af6e66bcc1c4c055add531b3880 Author: Thomas Hellstrom Date: Fri Feb 12 09:00:26 2016 +0100 drm/vmwgfx: Break out implicit fb code Preparation for supporting explicit fbs for screen objects and screen targets. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 3 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 92 ++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 12 ++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 125 ++++------------------------------- 4 files changed, 120 insertions(+), 112 deletions(-) commit b1097aeb6f23433c4e073a8d7447a8d919e1e163 Author: Thomas Hellstrom Date: Fri Feb 12 08:54:07 2016 +0100 drm/vmwgfx: Rework screen target page flips v2 Gnome-Shell / Wayland assumes that page-flips can be done on a crtc regardless of framebuffer size and the crtc position within the framebuffer. Therefore rework the screen target code to correctly handle changes in framebuffer size and content_fb_type. Also make sure that we update the screen target correctly when the content_fb_type is not SAME_AS_DISPLAY. This commit breaks out the framebuffer binding code from crtc_set so it can be used both from page_flip() and crtc_set() and reworks those functions a bit to be more robust. v2: Address review comments by Sinclair Yeh. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 422 ++++++++++++++++------------------- 1 file changed, 188 insertions(+), 234 deletions(-) commit 897b818077f3c11eda82ead57fd173c7f12f9796 Author: Thomas Hellstrom Date: Fri Feb 12 08:32:08 2016 +0100 drm/vmwgfx: Fix screen object page flips for large framebuffers For page flips the framebuffer may be much larger than the crtc scanout area and may be attached to multiple crtcs. When flipping a crtc, make sure we dirty only that crtc's area of the framebuffer. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 18 +++++++++++------- 3 files changed, 14 insertions(+), 10 deletions(-) commit fea7dd547b038bfed6728641dc35703ab29a16d3 Author: Thomas Hellstrom Date: Fri Feb 12 08:26:37 2016 +0100 drm/vmwgfx: Fix a screen object framebuffer dirty corner case If there are no cliprects for a particular crtc, an invalid command would have been generated. If that's the case, instead ditch the generated command sequence. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f3b3355073ffc2ee717693df587e5d1855ab2d22 Author: Charmaine Lee Date: Fri Feb 12 08:11:56 2016 +0100 drm/vmwgfx: Add DXGenMips support Add support for DXGenMips command. Signed-off-by: Charmaine Lee Reviewed-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 0d571b62dd8eb341788599259c3dbc92c0dc8f22 Merge: 93dffd0 3fdb746 Author: Rafael J. Wysocki Date: Mon Mar 14 14:22:34 2016 +0100 Merge branch 'pm-tools' * pm-tools: tools/power turbostat: bugfix: TDP MSRs print bits fixing tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump tools/power turbostat: call __cpuid() instead of __get_cpuid() tools/power turbostat: indicate SMX and SGX support tools/power turbostat: detect and work around syscall jitter tools/power turbostat: show GFX%rc6 tools/power turbostat: show GFXMHz tools/power turbostat: show IRQs per CPU tools/power turbostat: make fewer systems calls tools/power turbostat: fix compiler warnings tools/power turbostat: add --out option for saving output in a file tools/power turbostat: re-name "%Busy" field to "Busy%" tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding tools/power turbostat: Intel Xeon x200: fix erroneous bclk value tools/power turbostat: allow sub-sec intervals tools/power turbostat: Decode MSR_MISC_PWR_MGMT tools/power turbostat: decode HWP registers x86 msr-index: Simplify syntax for HWP fields tools/power turbostat: CPUID(0x16) leaf shows base, max, and bus frequency tools/power turbostat: decode more CPUID fields commit 93dffd03b33a085106e2397297fe2064a73e5d57 Merge: 4ed3900 3b99669 22e09b3 41795a8 Author: Rafael J. Wysocki Date: Mon Mar 14 14:22:22 2016 +0100 Merge branches 'pm-cpuidle', 'pm-sleep' and 'pm-domains' * pm-cpuidle: cpuidle: menu: help gcc generate slightly better code cpuidle: menu: avoid expensive square root computation * pm-sleep: PM / suspend: replacing printk PM/freezer: y2038, use boottime to compare tstamps PM / sleep: declare __tracedata symbols as char[] rather than char * pm-domains: PM / Domains: Fix potential NULL pointer dereference PM / Domains: Fix removal of a subdomain PM / Domains: Propagate start and restore errors during runtime resume PM / Domains: Join state name and index in debugfs output PM / Domains: Restore alignment of slaves in debugfs output PM / Domains: remove old power on/off latencies ARM: imx6: pm: declare pm domain latency on power_state struct PM / Domains: Support for multiple states commit 4ed39004271280d2b5fc6929b2782c0e330f6895 Merge: b5d5fad 4fec7ad Author: Rafael J. Wysocki Date: Mon Mar 14 14:22:03 2016 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (94 commits) intel_pstate: Do not skip samples partially intel_pstate: Remove freq calculation from intel_pstate_calc_busy() intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance() intel_pstate: Optimize calculation for max/min_perf_adj intel_pstate: Remove extra conversions in pid calculation cpufreq: Move scheduler-related code to the sched directory Revert "cpufreq: postfix policy directory with the first CPU in related_cpus" cpufreq: Reduce cpufreq_update_util() overhead a bit cpufreq: Select IRQ_WORK if CPU_FREQ_GOV_COMMON is set cpufreq: Remove 'policy->governor_enabled' cpufreq: Rename __cpufreq_governor() to cpufreq_governor() cpufreq: Relocate handle_update() to kill its declaration cpufreq: governor: Drop unnecessary checks from show() and store() cpufreq: governor: Fix race in dbs_update_util_handler() cpufreq: governor: Make gov_set_update_util() static cpufreq: governor: Narrow down the dbs_data_mutex coverage cpufreq: governor: Make dbs_data_mutex static cpufreq: governor: Relocate definitions of tuners structures cpufreq: governor: Move per-CPU data to the common code cpufreq: governor: Make governor private data per-policy ... commit b5d5fad9bed079a4f182e4d282ca29380e8c08f2 Merge: 07cc77e 2c2709d Author: Rafael J. Wysocki Date: Mon Mar 14 14:21:55 2016 +0100 Merge branch 'pm-opp' * pm-opp: PM / OPP: Rename structures for clarity PM / OPP: Fix incorrect comments PM / OPP: Initialize regulator pointer to an error value PM / OPP: Initialize u_volt_min/max to a valid value PM / OPP: Fix NULL pointer dereference crash when disabling OPPs PM / OPP: Add dev_pm_opp_set_rate() PM / OPP: Manage device clk PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings PM / OPP: Introduce dev_pm_opp_get_max_transition_latency() PM / OPP: Introduce dev_pm_opp_get_max_volt_latency() PM / OPP: Disable OPPs that aren't supported by the regulator PM / OPP: get/put regulators from OPP core commit 07cc77e05e82b4eb6d11161c31b6aca5ed146baf Merge: e1fb19c 323ee64 Author: Rafael J. Wysocki Date: Mon Mar 14 14:21:45 2016 +0100 Merge branch 'powercap' * powercap: powercap/rapl: track lead cpu per package powercap/rapl: add package reference per domain powercap/rapl: reduce ipi calls cpumask: export cpumask_any_but commit e1fb19cbbbf57ee8c10d4fa6d6aadf16c73e75bd Merge: bdeabcc 0d67e0f Author: Rafael J. Wysocki Date: Mon Mar 14 14:21:39 2016 +0100 Merge branch 'device-properties' * device-properties: device property: fix for a case of use-after-free commit bdeabccdf9703a8efd71f19d7f31fc60d3538d08 Merge: 02fd4e7 1b6e75e 1d75158 0f9aeb7 bea3c37 Author: Rafael J. Wysocki Date: Mon Mar 14 14:21:23 2016 +0100 Merge branches 'acpi-ec', 'acpi-fan', 'acpi-video' and 'acpi-misc' * acpi-ec: ACPI / EC: Deny write access unless requested by module param * acpi-fan: ACPI / fan: Make struct dev_pm_ops const * acpi-video: ACPI / video: remove unused device_decode array * acpi-misc: ACPI / util: remove redundant check if element is NULL ACPI: Add acpi_force_32bit_fadt_addr option to force 32 bit FADT addresses drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular drivers/acpi: make apei/ghes.c more explicitly non-modular drivers/acpi: make bgrt driver explicitly non-modular commit 02fd4e76a62f4e7fe6cfc38b2bf1f693d29e8184 Merge: 6a8ccb1 e237a55 e4e666b 86e7541 Author: Rafael J. Wysocki Date: Mon Mar 14 14:20:57 2016 +0100 Merge branches 'acpi-pci', 'acpi-soc' and 'pnp' * acpi-pci: x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected" * acpi-soc: i2c: designware: Add device HID for future AMD I2C controller * pnp: PNP / ACPI: add ACPI_RESOURCE_TYPE_SERIAL_BUS as a valid type commit 6a8ccb1dfd0452a68e1ce0a2bf67ff5b90ebd2a6 Merge: caf5aa1 504997c f387e5b Author: Rafael J. Wysocki Date: Mon Mar 14 14:20:33 2016 +0100 Merge branches 'acpi-processor' and 'acpi-cppc' * acpi-processor: ACPI / sleep: move acpi_processor_sleep to sleep.c ACPI / processor : add support for ACPI0010 processor container ACPI / processor_idle: replace PREFIX with pr_fmt * acpi-cppc: ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent ACPI / CPPC: replace writeX/readX to PCC with relaxed version mailbox: pcc: optimized pcc_send_data ACPI / CPPC: optimized cpc_read and cpc_write ACPI / CPPC: Optimize PCC Read Write operations commit caf5aa19f76cfefede07b70c669db58111db408d Merge: 255a60f 6ce2e18 c85cc81 3a03d12 Author: Rafael J. Wysocki Date: Mon Mar 14 14:20:13 2016 +0100 Merge branches 'acpi-scan', 'acpi-osl' and 'acpi-apei' * acpi-scan: ACPI / scan: AMBA bus probing support ACPI: introduce a function to find the first physical device * acpi-osl: ACPI / OSL: Add support to install tables via initrd ACPI / OSL: Clean up initrd table override code * acpi-apei: ACPI / APEI: ERST: Fixed leaked resources in erst_init ACPI / APEI: Fix leaked resources commit 255a60fcfc34087f66f18db65e2dde773292652d Merge: b562e44 5508df8 Author: Rafael J. Wysocki Date: Mon Mar 14 14:19:52 2016 +0100 Merge branch 'acpica' * acpica: ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support ACPICA: Utilities: Update trace mechinism for acquire_object ACPICA: Namespace: Rename acpi_gbl_reg_methods_enabled to acpi_gbl_namespace_initialized ACPICA: Namespace: Ensure \_SB._INI executed before any _REG ACPICA: ACPICA: Tune _REG evaluations order in the initialization steps ACPICA: Tables: make default region accessible during the table load ACPICA: ACPI 6.0/iASL: Add support for the External AML opcode ACPICA: Remove unnecessary arguments to ACPI_INFO ACPICA: debugger: dbconvert: free pld_info on error return path ACPICA: iASL: Update to use internal acpi_ut_strtoul64 function ACPICA: iASL: Fix some typos with the name strtoul64 ACPICA: Remove incorrect "static" from a global structure ACPICA: aclocal: Put parens around some definitions. commit ca80e26a5995f078aa442f151b94cf4305e07ac4 Merge: 028cb68 d4a6360 Author: Takashi Iwai Date: Mon Mar 14 14:03:29 2016 +0100 Merge tag 'asoc-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.6 The main thing in terms of the core this time around has been some additional framework work for dynamic topologies (though we *still* don't appear to have a stable ABI for the topology code, it's probably worth considering if this will ever happen...). Otherwise the work has almost all been in the drivers: - HDMI support for Sky Lake, along with other fixes and enhancements for the Intel drivers. - Lots of improvements to the Renesas drivers. - Capture support for Qualcomm drivers. - Support for TI DaVinci DRA7xxx devices. - New machine drivers for Freescale systems with Cirrus CODECs, Mediatek systems with RT5650 CODECs. - New CPU drivers for Allwinner S/PDIF controllers - New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514. commit 392c5174499296bcdecbe1705d577883065fa5de Author: Mans Rullgard Date: Thu Mar 10 14:23:49 2016 +0000 avr32: fix asm operand constraint in cmpxchg() If the 'old' operand to cmpxchg() is a constant wider than 21 bits, linking fails with a "relocation truncated to fit: R_AVR32_21S" error. Fix this by replacing the "i" constraint with "Ks21" which makes the compiler use a temporary register for out of range constants. Signed-off-by: Mans Rullgard Acked-by: Hans-Christian Noren Egtvedt Tested-by: Andy Shevchenko Tested-by: Sudip Mukherjee arch/avr32/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b837e97fd35a6b551e3478ace0623a0bd744787c Author: Hans-Christian Egtvedt Date: Sun Feb 28 18:14:41 2016 +0100 avr32: wire up copy_file_range syscall This patch wires up the new copy_file_range syscall on AVR32. On AVR32, all parameters beyond the 5th are passed on the stack. System calls don't use the stack -- they borrow a callee-saved register instead. This means that syscalls that take 6 parameters must be called through a stub that pushes the last parameter on the stack. Signed-off-by: Hans-Christian Noren Egtvedt arch/avr32/include/uapi/asm/unistd.h | 1 + arch/avr32/kernel/syscall-stubs.S | 9 +++++++++ arch/avr32/kernel/syscall_table.S | 1 + 3 files changed, 11 insertions(+) commit a1b5344620a3e6291afaf7542714ba9c391ef1c7 Merge: d8c0282 fba4e9f Author: Michael Ellerman Date: Mon Mar 14 20:05:14 2016 +1100 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Highlights include 8xx optimizations, 32-bit checksum optimizations, 86xx consolidation, e5500/e6500 cpu hotplug, more fman and other dt bits, and minor fixes/cleanup." commit d3e69b9a04f8e42de1b4132218567b027d368bb5 Author: Benson Leung Date: Fri Mar 11 14:19:49 2016 -0800 HID: multitouch: Release all touch slots on reset_resume When resetting a device (especially after power loss) it is unlikely that the firmware will keep the contact tracking data for the previous touches and will be able to reconcile it with the new contacts, so let's release all slots on reset resume as start anew. Signed-off-by: Benson Leung Signed-off-by: Dmitry Torokhov Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 94669e6ba1ada133394ec8295d773df8b9238d08 Author: Maarten Lankhorst Date: Mon Feb 29 09:18:57 2016 +0100 drm/i915: Handle -EDEADLK in drm_atomic_commit from load-detect. CI runs with DEBUG_WW_MUTEX_SLOWPATH, so -EDEADLK occurs a lot more. Handle the case where drm_atomic_commit fails with -EDEADLK correctly. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/56D3FEF1.6070306@linux.intel.com Reviewed-by: Ville Syrjälä (cherry picked from commit 3ba86073edcbe2be53d9862d5a3098f0ebf8ae9a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7296c33ed12ef13de50e03c76643382123766f96 Author: Heiner Kallweit Date: Tue Mar 8 23:08:36 2016 +0100 leds: triggers: simplify led_trigger_store led_trigger_store can be significantly simplified by using sysfs_streq(). Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/led-triggers.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 1c430f90216d00b7db13abe306d4f7fac9c6869f Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:54:32 2016 +0530 leds: max8997: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, max8997_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-max8997.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit eed16255d66bde1abbce272400912a9ea9e69e08 Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:54:10 2016 +0530 leds: da903x: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, da903x_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-da903x.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 48a7032ba044103cf89af680d3e3bb9bf0ba9072 Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:53:57 2016 +0530 leds: s3c24xx: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove unnecessary function pdev_to_gpio, platform_set_drvdata in the probe function and the remove function, s3c24xx_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-s3c24xx.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit 8d3b6a4001ceaeef1aaac39e6cb5380780b4ef9c Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:53:47 2016 +0530 leds: wm831x-status: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata from probe function and the remove function, wm831x_status_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-wm831x-status.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit f165a66e16f0aa8270ec4a26fdb07606eb7d6ae3 Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:53:38 2016 +0530 leds: lp8788: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, lp8788_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp8788.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 375446df95eee10c21ecc7fcb2295bd1ae1db8f7 Author: Amitoj Kaur Chawla Date: Wed Mar 9 08:53:29 2016 +0530 leds: 88pm860x: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, pm860x_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-88pm860x.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit e0442d7def8f9dccde0d825a01d8a6951aa6e95d Author: David Rivshin Date: Mon Mar 7 19:57:16 2016 -0500 leds: Add SN3218 and SN3216 support to the IS31FL32XX driver Si-En Technology was acquired by ISSI in 2011, and it appears that the IS31FL3218/IS31FL3216 are just rebranded SN3218/SN3216 devices. Add the "si-en,sn3218" and "si-en,sn3216" compatible strings into the IS31FL32XX driver as aliases for the issi equivalents, and update binding documentation. Datasheets: IS31FL3218: http://www.issi.com/WW/pdf/31FL3218.pdf SN3218: http://www.si-en.com/uploadpdf/s2011517171720.pdf IS31FL3216: http://www.issi.com/WW/pdf/31FL3216.pdf SN3216: http://www.si-en.com/uploadpdf/SN3216201152410148.pdf Signed-off-by: David Rivshin Acked-by: Rob Herring Tested-by: Stefan Wahren Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/leds/leds-is31fl32xx.txt | 9 ++++++--- drivers/leds/Kconfig | 6 +++--- drivers/leds/leds-is31fl32xx.c | 6 +++++- 3 files changed, 14 insertions(+), 7 deletions(-) commit 204a70bba9e7aee2c8827724258bd96306469e82 Author: Stefan Wahren Date: Thu Feb 4 18:56:04 2016 +0000 of: Add vendor prefix for Si-En Technology Si-En Technology is a fabless design house which offers audio amplifiers, LED drivers and sensors. Signed-off-by: Stefan Wahren Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 9d7cffaf99f5f7756746a328c2854ebe4ce9f442 Author: David Rivshin Date: Mon Mar 7 19:57:15 2016 -0500 leds: Add driver for the ISSI IS31FL32xx family of LED controllers The IS31FL32xx family of LED controllers are I2C devices with multiple constant-current channels, each with independent 256-level PWM control. Datasheets: http://www.issi.com/US/product-analog-fxled-driver.shtml This has been tested on the IS31FL3236 and IS31FL3216, on an ARM (TI am335x) platform. The programming paradigm of these devices is similar in the following ways: - All registers are 8 bit - All LED control registers are write-only - Each LED channel has a PWM register (0-255) - PWM register writes are shadowed until an Update register is poked - All have a concept of Software Shutdown, which disables output However, there are some differences in devices: - 3236/3235 have a separate Control register for each LED, (3218/3216 pack the enable bits into fewer registers) - 3236/3235 have a per-channel current divisor setting - 3236/3235 have a Global Control register that can turn off all LEDs - 3216 is unique in a number of ways - OUT9-OUT16 can be configured as GPIOs instead of LED controls - LEDs can be programmed with an 8-frame animation, with programmable delay between frames - LEDs can be modulated by an input audio signal - Max output current can be adjusted from 1/4 to 2x globally - Has a Configuration register instead of a Shutdown register This driver currently only supports the base PWM control function of these devices. The following features of these devices are not implemented, although it should be possible to add them in the future: - All devices are capable of going into a lower-power "software shutdown" mode. - The is31fl3236 and is31fl3235 can reduce the max output current per-channel with a divisor of 1, 2, 3, or 4. - The is31fl3216 can use some LED channels as GPIOs instead. - The is31fl3216 can animate LEDs in hardware. - The is31fl3216 can modulate LEDs according to an audio input. - The is31fl3216 can reduce/increase max output current globally. Signed-off-by: David Rivshin Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-is31fl32xx.c | 504 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) commit 4ef31e4993ffee122c06da04d3410c88c056286e Author: David Rivshin Date: Mon Mar 7 19:57:14 2016 -0500 DT: leds: Add binding for the ISSI IS31FL32xx family of LED controllers This adds a binding description for the is31fl3236/35/18/16 I2C LED controllers. Signed-off-by: David Rivshin Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-is31fl32xx.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit b63e55b9cd252300da688fe83829657aeffe54a1 Author: David Rivshin Date: Mon Mar 7 19:57:13 2016 -0500 DT: Add vendor prefix for Integrated Silicon Solutions Inc. ISSI is the stock ticker Integrated Silicon Solutions Inc. Company website: http://www.issi.com Signed-off-by: David Rivshin Acked-by: Rob Herring Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 50154e29e5cc4f0e5f38871f9c90e686bfd09f18 Author: Amitoj Kaur Chawla Date: Mon Mar 7 20:21:42 2016 +0530 leds: lm3533: Use devm_led_classdev_register Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. To be compatible with this change, remove an unnecessary label by replacing it with direct return statement. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e; @@ probefn(struct platform_device *pdev, ...) { ... e = - led_classdev_register + devm_led_classdev_register (...); ... ?- led_classdev_unregister(...); ... } @remove depends on prb@ identifier platform.removefn; @@ removefn(...) { ... ?- led_classdev_unregister(...); ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jacek Anaszewski drivers/leds/leds-lm3533.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit eae7c98acd13b35bc37608a430086b417b1150fe Author: Geert Uytterhoeven Date: Fri Feb 19 10:52:34 2016 +0100 leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero Use the GPIO flag definition instead of a numeric literal, so the casual reader grepping for GPIOF_ will find the GPIO flags used. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4887af9c2b6ab550516f14106133a1e436c0712 Author: Heiner Kallweit Date: Tue Feb 16 20:21:56 2016 +0100 leds: core: add helpers for calling brightness_set(_blocking) Add helpers for calling brightness_set(_blocking) allowing to simplify the code and make it better readable. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/led-core.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 2d88a331e48095cf60ad9bdf3177bd401bf99727 Author: Wei Yongjun Date: Sat Feb 6 22:37:33 2016 +0800 leds: leds-gpio: Fix return value check in create_gpio_led() In case of error, the function gpio_to_desc() 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 Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9eec908a1ec7829497a0914514badec95cc8461 Author: Antonio Ospite Date: Thu Jan 28 16:49:29 2016 +0100 leds: lp3944: improve wording and formatting in a comment Improve the wording for the comment about the led status, and while at it also use the standard formatting for multi-line comments. Signed-off-by: Antonio Ospite Cc: Richard Purdie Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp3944.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d84d80f38f0ff4eb4becf1a3569c8e7b2c463b61 Author: Heiner Kallweit Date: Fri Jan 22 21:43:48 2016 +0100 leds: core: avoid error message when a USB LED device is unplugged When a USB LED device is unplugged the remove call chain calls led_classdev_unregister which tries to switch the LED off. As the device has been removed already this results in a ENODEV error message in dmesg. Avoid this error message by ignoring ENODEV in calls from led_classdev_unregister if the LED device is flagged as pluggable. Therefore a new flag LED_HW_PLUGGABLE was introduced which should be set by all LED drivers handling pluggable LED devices (mainly USB LED devices). Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski drivers/leds/led-class.c | 2 ++ drivers/leds/led-core.c | 5 ++++- include/linux/leds.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 70b2563b35b3edcf67819b99e560f3f0f6ce4a9f Author: Heiner Kallweit Date: Thu Jan 21 23:11:25 2016 +0100 leds: core: fix misleading comment after workqueue removal from drivers Now that workqueues have been removed from individual drivers and were replaced with a core-internal workqueue we shouldn't encourage people to add new workqueues to drivers. Signed-off-by: Heiner Kallweit Signed-off-by: Jacek Anaszewski include/linux/leds.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8e7fe2660d4a98255a2741c64b64e3961d020bf5 Merge: 143d36a 725b06f Author: Thomas Gleixner Date: Mon Mar 14 08:40:29 2016 +0100 Merge tag 'irqchip-core-4.6-3' of git://git.infradead.org/users/jcooper/linux into irq/core Pull irqchip core changes from Jason Cooper: - mvebu: Update dt binding docs for new odmi driver commit 028cb68ee3d01f5323493cb3c07ba92b0acb2f03 Author: Subhransu S. Prusty Date: Mon Mar 14 10:35:06 2016 +0530 ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_type nvhdmi_chmap_cea_alloc_validate_get_type calls itself recursively using chmap ops causing the double fault. Fixed by adding the default validate_get_type handling inside nvdia validate_get_type handler. Link: https://bugzilla.kernel.org/show_bug.cgi?id=114311 Fixes: 67b90cb ("ALSA: hda - Create common chmap object") Reported-by: Andreas Reis Signed-off-by: Subhransu S. Prusty Tested-by: Andreas Reis Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4061db03dd71d195b9973ee466f6ed32f6a3fc16 Author: Vittorio Gambaletta (VittGam) Date: Sun Mar 13 22:19:34 2016 +0100 ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41. The clock measurement on the AC'97 audio card found in the IBM ThinkPad X41 will often fail, so add a quirk entry to fix it. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=441087 Cc: Signed-off-by: Vittorio Gambaletta Signed-off-by: Takashi Iwai sound/pci/intel8x0.c | 1 + 1 file changed, 1 insertion(+) commit 2d369c748c2ecc2a012ee85412a04007e67913ec Author: Aaron Plattner Date: Sun Mar 13 13:58:57 2016 -0700 ALSA: hda - Add new GPU codec ID 0x10de0082 to snd-hda Vendor ID 0x10de0082 is used by a yet-to-be-named GPU chip. This chip also has the 2-ch audio swapping bug, so patch_nvhdmi is appropriate here. Signed-off-by: Aaron Plattner Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit cdcb61a78f8d4f880a2dc1154ddfb6a05b47c092 Merge: 0ab1ace 6ef2f68 Author: Takashi Iwai Date: Mon Mar 14 08:23:07 2016 +0100 Merge branch 'for-linus' into for-next commit 896e041e8e8efb34520d033a693ef25391f9c9f0 Merge: 0dae184 6949063 Author: Vinod Koul Date: Mon Mar 14 11:18:32 2016 +0530 Merge branch 'topic/xilinx' into for-linus commit 0dae18450aac1d0d51d64141dfea80f9ce8175dd Merge: 254efee 20c169a Author: Vinod Koul Date: Mon Mar 14 11:18:27 2016 +0530 Merge branch 'topic/sh' into for-linus commit 254efeec3154bb0f373f10a069d5ad05cff9d310 Merge: 8bce4c8 67a2003 Author: Vinod Koul Date: Mon Mar 14 11:18:22 2016 +0530 Merge branch 'topic/qcom' into for-linus commit 8bce4c87657af3dc4625e873ec1201205e44375b Merge: 805dd35 0a18f9b Author: Vinod Koul Date: Mon Mar 14 11:18:12 2016 +0530 Merge branch 'topic/pl330' into for-linus commit 805dd3508b2398ca339f5dd3b2d11ac82ef41b5c Merge: 0e3d5b2 9bef6d8 Author: Vinod Koul Date: Mon Mar 14 11:17:59 2016 +0530 Merge branch 'topic/omap' into for-linus commit 0e3d5b212999803542a2be5e0e439d7275eb1ad5 Merge: 8795d14 c997e30 Author: Vinod Koul Date: Mon Mar 14 11:17:52 2016 +0530 Merge branch 'topic/ioatdma' into for-linus commit 8795d1432846eda999370ce51140e23d6df1f35c Merge: 9f2f495 8e2067b Author: Vinod Koul Date: Mon Mar 14 11:17:44 2016 +0530 Merge branch 'topic/idma' into for-linus commit 9f2f4956edf3deb93b1d805ce7ef46b7bff7f5ce Merge: 0f4cc16 e4d8817 Author: Vinod Koul Date: Mon Mar 14 11:17:36 2016 +0530 Merge branch 'topic/edma' into for-linus commit 0f4cc16c432ef489139a0270913a143c137f7832 Merge: 242637b 9575632 Author: Vinod Koul Date: Mon Mar 14 11:17:26 2016 +0530 Merge branch 'topic/core' into for-linus commit ed782b5a70a016dbfe503089fd5c11dd74953cc4 Author: Al Viro Date: Wed Mar 9 19:52:39 2016 -0500 dcache.c: new helper: __d_add() d_add() with inode->i_lock already held; common to d_add() and d_splice_alias(). All ->lookup() instances that end up hashing the dentry they are given will hash it here. This almost completes the preparations to parallel lookups proper - the only remaining bit is taking security_d_instantiate() past d_rehash() and doing rehashing without dropping ->d_lock. Signed-off-by: Al Viro fs/dcache.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit de689f5e366373682e95059e9b89d981187e4544 Author: Al Viro Date: Wed Mar 9 18:05:42 2016 -0500 don't bother with __d_instantiate(dentry, NULL) it's a no-op - bumping ->d_seq is pointless there. Signed-off-by: Al Viro fs/dcache.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 27f203f655a2e1dab66598a5b19afb637c587f0b Author: Al Viro Date: Wed Mar 9 17:58:49 2016 -0500 untangle fsnotify_d_instantiate() a bit First of all, don't bother calling it if inode is NULL - that makes inode argument unused. Moreover, do it *before* dropping ->d_lock, not right after that (and don't bother grabbing ->d_lock in it, of course). Signed-off-by: Al Viro fs/dcache.c | 3 ++- include/linux/fsnotify.h | 9 --------- include/linux/fsnotify_backend.h | 9 ++------- 3 files changed, 4 insertions(+), 17 deletions(-) commit 34d0d19dc0929ccc326448737f05a8fae3d47b8a Author: Al Viro Date: Tue Mar 8 21:01:03 2016 -0500 uninline d_add() Signed-off-by: Al Viro fs/dcache.c | 16 ++++++++++++++++ include/linux/dcache.h | 15 +-------------- 2 files changed, 17 insertions(+), 14 deletions(-) commit 668d0cd56ef7bc71be6dd8c081007221e09d9a86 Author: Al Viro Date: Tue Mar 8 12:44:17 2016 -0500 replace d_add_unique() with saner primitive new primitive: d_exact_alias(dentry, inode). If there is an unhashed dentry with the same name/parent and given inode, rehash, grab and return it. Otherwise, return NULL. The only caller of d_add_unique() switched to d_exact_alias() + d_splice_alias(). Signed-off-by: Al Viro fs/dcache.c | 125 ++++++++++++++++++++----------------------------- fs/nfs/nfs4proc.c | 13 ++--- include/linux/dcache.h | 18 +------ 3 files changed, 58 insertions(+), 98 deletions(-) commit e12a4e8a04a9ef84ba645379c56abad1a0ca9dbd Author: Al Viro Date: Mon Mar 7 23:27:22 2016 -0500 quota: use lookup_one_len_unlocked() Signed-off-by: Al Viro fs/quota/dquot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 85f40482bc175f14f63d78fe482ef1826cf3913d Author: Al Viro Date: Mon Mar 7 23:20:44 2016 -0500 cifs_get_root(): use lookup_one_len_unlocked() Signed-off-by: Al Viro fs/cifs/cifsfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 130f9ab75dc3afdb96d49334bd941f2e6faf39a1 Author: Al Viro Date: Mon Mar 7 22:40:43 2016 -0500 nfs_lookup: don't bother with d_instantiate(dentry, NULL) Signed-off-by: Al Viro fs/nfs/dir.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 9d95afd5971918b1aa8db1960ba24532c2d6ec89 Author: Al Viro Date: Tue Mar 1 15:35:06 2016 -0500 kill dentry_unhash() the last user is gone Signed-off-by: Al Viro fs/namei.c | 25 ------------------------- include/linux/fs.h | 5 ----- 2 files changed, 30 deletions(-) commit f8b31710e46c852b2af1635d1b6fab8e69bf7799 Author: Al Viro Date: Mon Mar 7 15:11:43 2016 -0500 ceph_fill_trace(): don't bother with d_instantiate(dn, NULL) ... and use d_add(dn, NULL) in case we need to hash a negative unhashed rather than using d_rehash() directly. Signed-off-by: Al Viro fs/ceph/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit de4acda16e11110bbba5195061789f93a6c0d29d Author: Al Viro Date: Mon Mar 7 15:10:45 2016 -0500 autofs4: don't bother with d_instantiate(dentry, NULL) in ->lookup() Signed-off-by: Al Viro fs/autofs4/root.c | 2 -- 1 file changed, 2 deletions(-) commit 5cf3b560af903c82e9fc12578fac2fbcb8ca1533 Author: Al Viro Date: Mon Mar 7 14:25:46 2016 -0500 configfs: move d_rehash() into configfs_create() for regular files ... and turn it into d_add in there Signed-off-by: Al Viro fs/configfs/dir.c | 9 ++------- fs/configfs/inode.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 9 deletions(-) commit f7380af04bac0ecee88c10dba037749b14d26e7d Author: Al Viro Date: Sun Mar 6 20:42:16 2016 -0500 ceph: don't bother with d_rehash() in splice_dentry() d_splice_alias() guarantees that it'll be always hashed Signed-off-by: Al Viro fs/ceph/inode.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 949a852e46dda07caaa0ff02e181f55d24e3ebf8 Author: Al Viro Date: Sun Mar 6 14:20:52 2016 -0500 namei: teach lookup_slow() to skip revalidate ... and make mountpoint_last() use it. That makes all candidates for lookup with parent locked shared go through lookup_slow(). Signed-off-by: Al Viro fs/namei.c | 58 +++++++++++++++++++++++++++++++-------------------- include/linux/namei.h | 1 + 2 files changed, 36 insertions(+), 23 deletions(-) commit e3c13928086f1ed3620329b9fff678df2294d327 Author: Al Viro Date: Sun Mar 6 14:03:27 2016 -0500 namei: massage lookup_slow() to be usable by lookup_one_len_unlocked() Return dentry and don't pass nameidata or path; lift crossing mountpoints into the caller. Signed-off-by: Al Viro fs/namei.c | 56 ++++++++++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) commit d6d95ded914eb321b0a2c8c26cdf0a225a0d9917 Author: Al Viro Date: Sat Mar 5 22:31:50 2016 -0500 lookup_one_len_unlocked(): use lookup_dcache() No need to lock parent just because of ->d_revalidate() on child; contrary to the stale comment, lookup_dcache() *can* be used without locking the parent. Result can be moved as soon as we return, of course, but the same is true for lookup_one_len_unlocked() itself. Signed-off-by: Al Viro fs/namei.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 74ff0ffc7f0682cb4c00252807d76116b95ecb9e Author: Al Viro Date: Sat Mar 5 22:37:46 2016 -0500 namei: simplify invalidation logics in lookup_dcache() Signed-off-by: Al Viro fs/namei.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e9742b5332061bf885d8dd95d17e18a1b21371fa Author: Al Viro Date: Sat Mar 5 22:04:59 2016 -0500 namei: change calling conventions for lookup_{fast,slow} and follow_managed() Have lookup_fast() return 1 on success and 0 on "need to fall back"; lookup_slow() and follow_managed() return positive (1) on success. Signed-off-by: Al Viro fs/namei.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 5d0f49c136b520dd4da886e0e37458790f5a9617 Author: Al Viro Date: Sat Mar 5 21:32:53 2016 -0500 namei: untanlge lookup_fast() Signed-off-by: Al Viro fs/namei.c | 83 ++++++++++++++++++++++++++++---------------------------------- 1 file changed, 37 insertions(+), 46 deletions(-) commit 20db778e51d569e8260c40e06473a639d6d01393 Merge: fbd40ea 0833482 Author: David S. Miller Date: Sun Mar 13 23:55:14 2016 -0400 Merge branch 'ipv4-ipv6-csums' Alexander Duyck says: ==================== Fix differences between IPv4 and IPv6 TCP/UDP checksum calculation This patch series is meant to address the differences that exist between IPv4 and IPv6 in terms of checksum calculation. Specifically the IPv6 function csum_ipv6_magic treated length as a value that could be greater than 64K, while csum_tcpudp_magic was truncating the length at 16 bits. After looking over the code and giving it some thought I decided it would be best to update the IPv4 function so that it worked the same way the IPv6 one did. This allows us to get the same results given the same inputs for both functions. As a result we can use the same processes to reverse the calculation in the event we need to do something like remove the length of the pseudo-header checksum. I also took the opportunity to standardize things so that the parameters for these functions all use the correct types. IPv4 addresses are __be32, length should always be __u32, and protocol is a __u8. With this change in place it corrects an issue with UDP tunnels in which we were getting a checksum that was off by 1 when performing fragmentation on inner UDP packets. ==================== Signed-off-by: David S. Miller commit 08334824951dd6d1295860da07b1236d18b0b8df Author: Alexander Duyck Date: Fri Mar 11 14:05:47 2016 -0800 GSO/UDP: Use skb->len instead of udph->len to determine length of original skb It is possible for tunnels to end up generating IP or IPv6 datagrams that are larger than 64K and expecting to be segmented. As such we need to deal with length values greater than 64K. In order to accommodate this we need to update the code to work with a 32b length value instead of a 16b one. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/udp_offload.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 1e94082963747b551b129528714827f76a090e93 Author: Alexander Duyck Date: Fri Mar 11 14:05:41 2016 -0800 ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short This patch updates csum_ipv6_magic so that it correctly recognizes that protocol is a unsigned 8 bit value. This will allow us to better understand what limitations may or may not be present in how we handle the data. For example there are a number of places that call htonl on the protocol value. This is likely not necessary and can be replaced with a multiplication by ntohl(1) which will be converted to a shift by the compiler. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller arch/alpha/include/asm/checksum.h | 3 +-- arch/arm/include/asm/checksum.h | 4 ++-- arch/frv/include/asm/checksum.h | 2 +- arch/ia64/include/asm/checksum.h | 4 ++-- arch/m68k/include/asm/checksum.h | 2 +- arch/mips/include/asm/checksum.h | 2 +- arch/parisc/include/asm/checksum.h | 2 +- arch/score/include/asm/checksum.h | 5 ++--- arch/sh/include/asm/checksum_32.h | 3 +-- arch/sparc/include/asm/checksum_32.h | 3 +-- arch/sparc/include/asm/checksum_64.h | 3 +-- arch/x86/include/asm/checksum_32.h | 3 +-- arch/x86/include/asm/checksum_64.h | 2 +- arch/x86/lib/csum-wrappers_64.c | 2 +- arch/x86/um/asm/checksum_32.h | 2 +- arch/xtensa/include/asm/checksum.h | 2 +- include/net/ip6_checksum.h | 3 +-- net/ipv6/ip6_checksum.c | 3 +-- 18 files changed, 21 insertions(+), 29 deletions(-) commit 01cfbad79a5e2b835abf6a8154a341d75a6fc8cd Author: Alexander Duyck Date: Fri Mar 11 14:05:34 2016 -0800 ipv4: Update parameters for csum_tcpudp_magic to their original types This patch updates all instances of csum_tcpudp_magic and csum_tcpudp_nofold to reflect the types that are usually used as the source inputs. For example the protocol field is populated based on nexthdr which is actually an unsigned 8 bit value. The length is usually populated based on skb->len which is an unsigned integer. This addresses an issue in which the IPv6 function csum_ipv6_magic was generating a checksum using the full 32b of skb->len while csum_tcpudp_magic was only using the lower 16 bits. As a result we could run into issues when attempting to adjust the checksum as there was no protocol agnostic way to update it. With this change the value is still truncated as many architectures use "(len + proto) << 8", however this truncation only occurs for values greater than 16776960 in length and as such is unlikely to occur as we stop the inner headers at ~64K in size. I did have to make a few minor changes in the arm, mn10300, nios2, and score versions of the function in order to support these changes as they were either using things such as an OR to combine the protocol and length, or were using ntohs to convert the length which would have truncated the value. I also updated a few spots in terms of whitespace and type differences for the addresses. Most of this was just to make sure all of the definitions were in sync going forward. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller arch/alpha/include/asm/checksum.h | 9 +++------ arch/alpha/lib/checksum.c | 8 ++------ arch/arc/include/asm/checksum.h | 4 ++-- arch/arm/include/asm/checksum.h | 10 +++++----- arch/avr32/include/asm/checksum.h | 10 ++++------ arch/blackfin/include/asm/checksum.h | 4 ++-- arch/c6x/include/asm/checksum.h | 4 ++-- arch/cris/include/arch-v10/arch/checksum.h | 4 ++-- arch/cris/include/arch-v32/arch/checksum.h | 2 +- arch/cris/include/asm/checksum.h | 5 ++--- arch/frv/include/asm/checksum.h | 8 ++++---- arch/hexagon/include/asm/checksum.h | 8 ++++---- arch/hexagon/lib/checksum.c | 10 ++++------ arch/ia64/include/asm/checksum.h | 12 ++++-------- arch/ia64/lib/checksum.c | 8 ++++---- arch/m32r/include/asm/checksum.h | 10 ++++------ arch/metag/include/asm/checksum.h | 7 +++---- arch/microblaze/include/asm/checksum.h | 4 ++-- arch/mips/include/asm/checksum.h | 6 +++--- arch/mn10300/include/asm/checksum.h | 17 +++++------------ arch/nios2/include/asm/checksum.h | 9 ++++----- arch/parisc/include/asm/checksum.h | 10 ++++------ arch/s390/include/asm/checksum.h | 6 ++---- arch/score/include/asm/checksum.h | 10 +++++----- arch/sh/include/asm/checksum_32.h | 6 ++---- arch/sparc/include/asm/checksum_32.h | 10 ++++------ arch/sparc/include/asm/checksum_64.h | 6 ++---- arch/unicore32/include/asm/checksum.h | 4 ++-- arch/x86/include/asm/checksum_32.h | 6 ++---- arch/x86/include/asm/checksum_64.h | 8 ++++---- arch/x86/um/asm/checksum.h | 9 ++++----- arch/xtensa/include/asm/checksum.h | 10 ++++------ include/asm-generic/checksum.h | 8 ++++---- lib/checksum.c | 4 +--- 34 files changed, 106 insertions(+), 150 deletions(-) commit fbd40ea0180a2d328c5adc61414dc8bab9335ce2 Author: David S. Miller Date: Sun Mar 13 23:28:00 2016 -0400 ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all addresses, so there is no point in doing this. 2) A full nf conntrack table purge for every address. We only need to do this once, as is already caught by the existing masq_dev_notifier so masq_inet_event() can skip this. Reported-by: Solar Designer Signed-off-by: David S. Miller Tested-by: Cyrill Gorcunov net/ipv4/devinet.c | 4 ++++ net/ipv4/fib_frontend.c | 4 ++++ net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 12 ++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) commit f4fa6e6d883cd89fa5c240c1896a4dd329d1caa9 Merge: 0109988 079c265 Author: David S. Miller Date: Sun Mar 13 22:43:01 2016 -0400 Merge tag 'nfc-next-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.6 pull request This is a very small one this time, with only 5 patches. There are a couple of big items that could not be merged/finished on time. We have: - 2 LLCP fixes for a race and a potential OOM. - 2 cleanups for the pn544 and microread drivers. - 1 Maintainer addition for the s3fwrn5 driver. ==================== Signed-off-by: David S. Miller commit 010998815230792aa8923a4b72deef0fd0c5f2e5 Merge: f3c9869 c09440f Author: David S. Miller Date: Sun Mar 13 22:40:24 2016 -0400 Merge branch 'macsec' Sabrina Dubroca says: ==================== MACsec IEEE 802.1AE implementation MACsec (IEEE 802.1AE [0]) is a protocol that provides security for wired ethernet LANs. MACsec offers two protection modes: authentication only, or authenticated encryption. MACsec defines "secure channels" that allow transmission from one node to one or more others. Communication on a channel is done over a succession of "secure associations", that each use a specific key. Secure associations are identified by their "association number" in the range 0..3. A secure association is retired when its 32-bit packet number would wrap, and the same association number can later be reused with a new key and packet number. The standard mode of encryption is GCM AES with 128 bits keys, although an extension allows 256 bits keys [1] (not implemented in this submission). When using MACsec, an extra header, called "SecTAG", is added between the ethernet header and the original payload: +---------------------------------+----------------+----------------+ | (MACsec ethertype) | TCI_AN | SL | +---------------------------------+----------------+----------------+ | Packet Number | +-------------------------------------------------------------------+ | Secure Channel Identifier | | (optional) | +-------------------------------------------------------------------+ TCI_AN: version end_station sci_present scb encrypted changed_text association_number (2 bits) SL: short_length (6 bits) unused (2 bits) The ethertype for the packet is set to 0x88E5, and the original ethertype becomes part of the secure payload, which may be encrypted. The ethernet header and the SecTAG are always transmitted in the clear, but are integrity-protected. MACsec supports optional replay protection with a configurable replay window. MACsec is designed to be used with the MKA extension to 802.1X (MACsec Key Agreement protocol) [2], which provides channel attribution and key distribution to the nodes, but can also be used with static keys getting fed manually by an administrator. Optional (not supported yet) features: - confidentiality offset: in encryption mode, part of the payload may be left unencrypted. - choice of cipher suite: GCM AES with 256 bits has been standardised [1]. Implementation A netdevice is created on top of a real device for each TX secure channel, like we do for VLANs. Multiple TX channels can be created on top of the same underlying device. Several other approaches were considered for the RX path: - dev_add_pack: doesn't work, because we want to filter out unprotected packets - transparent mode: MACsec would be enabled directly on the real netdevice. For this, we cannot use a rx_handler directly because MACsec must be available for underlying devices enslaved in a bridge or in a bond, so we need a hook directly in __netif_receive_skb_core. This approach makes it harder to filter non-encrypted packets on RX without forcing the user to setup some rules, so the "transparent" mode is not so transparent after all. It also makes TX more complex than with a dedicated netdevice. One issue with the proposed implementation is that the qdisc layer for the real device operates on already encrypted packets. Netlink API This is currently a mix of rtnetlink (to create the device and set up the TX channel) and genl (for RX channels, secure associations and their keys). genl provides clean demultiplexing of the {TX,RX}{SC,SA} commands. Use cases The normal use case is wired LANs, including veth and slave devices for bonding/teaming or bridges. MACsec can also be used on any device that makes a full ethernet header visible, for example VXLAN. The VXLAN+MACsec setup would be: hypervisor | virtual machine ------|------ And the packets would look like this: | eth | IP | UDP | VXLAN | eth | MACsec | IP | ... | MACsec ICV | One benefit on this approach to encryption in the cloud is that the payload is encrypted by the tenant, not by the tunnel provider, thus the tenant has full control over the keys. Changes from v1: - rework netlink API after discussion with Johannes Berg - nest attributes, rename - export stats as separate attributes - add some comments - misc small fixes (rcu, constants, struct organization) Changes from RFCv2: - fix ENCODING_SA param validation - add parent link to netlink ifdumps Changes from RFCv1: - addressed comments from Florian and Paolo + kbuild robot - also perform post-decrypt handling after crypto callback - fixed ->dellink behavior Future plans: - offload to hardware, on nics that support it - implement optional features [0] http://standards.ieee.org/getieee802/download/802.1AE-2006.pdf [1] http://standards.ieee.org/getieee802/download/802.1AEbn-2011.pdf [2] http://standards.ieee.org/getieee802/download/802.1X-2010.pdf [3] RFCv1: http://www.spinics.net/lists/netdev/msg358151.html [4] RFCv2: http://www.spinics.net/lists/netdev/msg362389.html [5] v1: http://www.spinics.net/lists/netdev/msg367959.html ==================== Signed-off-by: David S. Miller commit c09440f7dcb304002dfced8c0fea289eb25f2da0 Author: Sabrina Dubroca Date: Fri Mar 11 18:07:33 2016 +0100 macsec: introduce IEEE 802.1AE driver This is an implementation of MACsec/IEEE 802.1AE. This driver provides authentication and encryption of traffic in a LAN, typically with GCM-AES-128, and optional replay protection. http://standards.ieee.org/getieee802/download/802.1AE-2006.pdf Signed-off-by: Sabrina Dubroca Reviewed-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/macsec.c | 3297 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3305 insertions(+) commit 3c17578473b9be5a6e7680a45ea97e1d56e13249 Author: Sabrina Dubroca Date: Fri Mar 11 18:07:32 2016 +0100 net: add MACsec netdevice priv_flags and helper Signed-off-by: Sabrina Dubroca Reviewed-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/linux/netdevice.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit dece8d2b78d19df7fe5e4e965f1f0d1a3e188d1b Author: Sabrina Dubroca Date: Fri Mar 11 18:07:31 2016 +0100 uapi: add MACsec bits Signed-off-by: Sabrina Dubroca Reviewed-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/uapi/linux/Kbuild | 1 + include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_link.h | 29 ++++++++ include/uapi/linux/if_macsec.h | 161 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+) commit f3c986908cc3b369b57f75de306c635a0074b76b Author: liping.zhang Date: Fri Mar 11 23:08:36 2016 +0800 net: socket: use pr_info_once to tip the obsolete usage of PF_PACKET There is no need to use the static variable here, pr_info_once is more concise. Signed-off-by: Liping Zhang Signed-off-by: David S. Miller net/socket.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 98267311fe3b334ae7c107fa0e2413adcf3ba735 Author: Zefir Kurtisi Date: Fri Mar 11 15:31:53 2016 +0100 at803x: fix suspend/resume for SGMII link When operating the at803x in SGMII mode, resuming the chip from power down brings up the copper-side link but leaves the SGMII link in unconnected state (tested with at8031 attached to gianfar). In effect, this caused a permanent link loss once the related interface was put down. This patch ensures that power down handling in supspend() and resume() is also applied to the SGMII link. Signed-off-by: Zefir Kurtisi Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5d6084142e8c7535710ba83a6e11ef8952354b02 Merge: c455697 8ec736e Author: David S. Miller Date: Sun Mar 13 22:35:36 2016 -0400 Merge branch 'net-more-bulk-free-users' Jesper Dangaard Brouer says: ==================== net: bulk free adjustment and two driver use-cases I've split out the bulk free adjustments, from the bulk alloc patches, as I want the adjustment to napi_consume_skb be in same kernel cycle the API was introduced. Adjustments based on discussion: Subj: "mlx4: use napi_consume_skb API to get bulk free operations" http://thread.gmane.org/gmane.linux.network/402503/focus=403386 Patchset based on net-next at commit 3ebeac1d0295 V4: more nitpicks from Sergei V3: spelling fixes from Sergei ==================== Signed-off-by: David S. Miller commit 8ec736e556e3340b4b4295c7567b0766d6629702 Author: Jesper Dangaard Brouer Date: Fri Mar 11 09:44:17 2016 +0100 mlx5: use napi_consume_skb API to get bulk free operations Bulk free of SKBs happen transparently by the API call napi_consume_skb(). The napi budget parameter is needed by napi_consume_skb() to detect if called from netpoll. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit b4a53379a0c19df784e30b1f35af5841f2b74f30 Author: Jesper Dangaard Brouer Date: Fri Mar 11 09:44:08 2016 +0100 mlx4: use napi_consume_skb API to get bulk free operations Bulk free of SKBs happen transparently by the API call napi_consume_skb(). The napi budget parameter is usually needed by napi_consume_skb() to detect if called from netpoll. In this patch it has an extra meaning. For mlx4 driver, the mlx4_en_stop_port() call is done outside NAPI/softirq context, and cleanup the entire TX ring via mlx4_en_free_tx_buf(). The code mlx4_en_free_tx_desc() for freeing SKBs are shared with NAPI calls. To handle this shared use the zero budget indication is reused, and handled appropriately in napi_consume_skb(). To reflect this, variable is called napi_mode for the function call that needed this distinction. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 885eb0a516e4d686849b91c5a1ba25c70b7a6540 Author: Jesper Dangaard Brouer Date: Fri Mar 11 09:43:58 2016 +0100 net: adjust napi_consume_skb to handle non-NAPI callers Some drivers reuse/share code paths that free SKBs between NAPI and non-NAPI calls. Adjust napi_consume_skb to handle this use-case. Before, calls from netpoll (w/ IRQs disabled) was handled and indicated with a budget zero indication. Use the same zero indication to handle calls not originating from NAPI/softirq. Simply handled by using dev_consume_skb_any(). This adds an extra branch+call for the netpoll case (checking in_irq() + irqs_disabled()), but that is okay as this is a slowpath. Suggested-by: Alexander Duyck Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/skbuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c45569755e828a8458d125bb93feb1d90ac9be6f Author: Chun-Hao Lin Date: Fri Mar 11 14:21:14 2016 +0800 r8169:Remove unnecessary phy reset for pcie nic when setting link spped. For pcie nic, after setting link speed and there is no link driver does not need to do phy reset until link up. For some pcie nics, to do this will also reset phy speed down counter and prevent phy from auto speed down. This patch fix the issue reported in following link. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151 Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 233fa44bd67ae0c6cbc01f96ab87d66a6c57812e Author: Jiri Pirko Date: Thu Mar 10 23:10:21 2016 +0100 mlxsw: pci: Implement reset done check Firmware now tells us that the reset is done by passing a magic value via register. Use it to shorten the wait in case this is supported. With old firmware, we still wait until the timeout is reached. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 15 +++++++++++---- drivers/net/ethernet/mellanox/mlxsw/pci.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) commit cea8768f333e3f0bc231d8b815aa4a9e63fa990c Author: Marcelo Ricardo Leitner Date: Thu Mar 10 18:33:07 2016 -0300 sctp: allow sctp_transmit_packet and others to use gfp Currently sctp_sendmsg() triggers some calls that will allocate memory with GFP_ATOMIC even when not necessary. In the case of sctp_packet_transmit it will allocate a linear skb that will be used to construct the packet and this may cause sends to fail due to ENOMEM more often than anticipated specially with big MTUs. This patch thus allows it to inherit gfp flags from upper calls so that it can use GFP_KERNEL if it was triggered by a sctp_sendmsg call or similar. All others, like retransmits or flushes started from BH, are still allocated using GFP_ATOMIC. In netperf tests this didn't result in any performance drawbacks when memory is not too fragmented and made it trigger ENOMEM way less often. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sm.h | 2 +- include/net/sctp/structs.h | 10 +++--- net/sctp/associola.c | 2 +- net/sctp/chunk.c | 6 ++-- net/sctp/input.c | 2 +- net/sctp/output.c | 6 ++-- net/sctp/outqueue.c | 30 ++++++++--------- net/sctp/sm_make_chunk.c | 80 +++++++++++++++++++++++++++------------------- net/sctp/sm_sideeffect.c | 23 ++++++------- 9 files changed, 89 insertions(+), 72 deletions(-) commit 6f15cdbf8a8ac2e22767cc8b1eae225702733c95 Author: Samuel Gauthier Date: Thu Mar 10 17:14:59 2016 +0100 ovs: allow nl 'flow set' to use ufid without flow key When we want to change a flow using netlink, we have to identify it to be able to perform a lookup. Both the flow key and unique flow ID (ufid) are valid identifiers, but we always have to specify the flow key in the netlink message. When both attributes are there, the ufid is used. The flow key is used to validate the actions provided by the userland. This commit allows to use the ufid without having to provide the flow key, as it is already done in the netlink 'flow get' and 'flow del' path. The flow key remains mandatory when an action is provided. Signed-off-by: Samuel Gauthier Reviewed-by: Simon Horman Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/datapath.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 6bdaa5e9ed39b3b3328f35d218e8ad5a99cfc4d2 Author: Nicolas Ferre Date: Thu Mar 10 16:44:32 2016 +0100 net: macb: fix default configuration for GMAC on AT91 On AT91 SoCs, the User Register (USRIO) exposes a switch to configure the "Reduced" or "Traditional" version of the Media Independent Interface (RMII vs. MII or RGMII vs. GMII). As on the older EMAC version, on GMAC, this switch is set by default to the non-reduced type of interface, so use the existing capability and extend it to GMII as well. We then keep the current logic in the macb_init() function. The capabilities of sama5d2, sama5d4 and sama5d3 GEM interface are updated in the macb_config structure to be able to properly enable them with a traditional interface (GMII or MII). Reported-by: Romain HENRIET Signed-off-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 13 +++++++------ drivers/net/ethernet/cadence/macb.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) commit 470c3822d2ab7fadcbb1ac317ef27b31caac370e Author: LABBE Corentin Date: Thu Mar 10 13:58:58 2016 +0100 phy: remove documentation of removed members of phy_device structure Commit e5a03bfd873c ("phy: Add an mdio_device structure") removed addr, bus and dev member of the phy_device structure. This patch remove the documentation about those members. Signed-off-by: LABBE Corentin Reviewed-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/phy.h | 3 --- 1 file changed, 3 deletions(-) commit 3c4ef85155acc8d7033d668536011f92c95f1065 Merge: 136ba62 8e4ee59 Author: David S. Miller Date: Sun Mar 13 22:08:01 2016 -0400 Merge branch 'xen-netback-fix-multiple-extra-info-handling' Paul Durrant says: ==================== xen-netback: fix multiple extra info handling If a frontend passes multiple extra info fragments to netback on the guest transmit side, because xen-netback does not account for this properly, only a single ack response will be sent. This will eventually cause processing of the shared ring to wedge. This series re-imports the canonical netif.h from Xen, where the ring protocol documentation has been updated, fixes this issue in xen-netback and also adds a patch to reduce log spam. ==================== Signed-off-by: David S. Miller commit 8e4ee59c1e75b74966476dcc3552c3b30d2768e7 Author: Paul Durrant Date: Thu Mar 10 12:30:28 2016 +0000 xen-netback: reduce log spam Remove the "prepare for reconnect" pr_info in xenbus.c. It's largely uninteresting and the states of the frontend and backend can easily be observed by watching the (o)xenstored log. Signed-off-by: Paul Durrant Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/xenbus.c | 2 -- 1 file changed, 2 deletions(-) commit 562abd39a1902745bdcab266c7824cd6c5bc34d3 Author: Paul Durrant Date: Thu Mar 10 12:30:27 2016 +0000 xen-netback: support multiple extra info fragments passed from frontend The code does not currently support a frontend passing multiple extra info fragments to the backend in a tx request. The xenvif_get_extras() function handles multiple extra_info fragments but make_tx_response() assumes there is only ever a single extra info fragment. This patch modifies xenvif_get_extras() to pass back a count of extra info fragments, which is then passed to make_tx_response() (after possibly being stashed in pending_tx_info for deferred responses). Signed-off-by: Paul Durrant Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/netback.c | 65 +++++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 23 deletions(-) commit 6b8abef5f833b03be1b5af491193477ad609ad35 Author: Paul Durrant Date: Thu Mar 10 12:30:26 2016 +0000 xen-netback: re-import canonical netif header The canonical netif header (in the Xen source repo) and the Linux variant have diverged significantly. Recently much documentation has been added to the canonical header which is highly useful for developers making modifications to either xen-netfront or xen-netback. This patch therefore re-imports the canonical header in its entirity. To maintain compatibility and some style consistency with the old Linux variant, the header was stripped of its emacs boilerplate, and post-processed and copied into place with the following commands: ed -s netif.h << EOF H ,s/NETTXF_/XEN_NETTXF_/g ,s/NETRXF_/XEN_NETRXF_/g ,s/NETIF_/XEN_NETIF_/g ,s/XEN_XEN_/XEN_/g ,s/netif/xen_netif/g ,s/xen_xen_/xen_/g ,s/^typedef.*$//g ,s/^ /${TAB}/g w $ w EOF indent --line-length 80 --linux-style netif.h \ -o include/xen/interface/io/netif.h Signed-off-by: Paul Durrant Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller include/xen/interface/io/netif.h | 861 ++++++++++++++++++++++++++++++++++----- 1 file changed, 766 insertions(+), 95 deletions(-) commit 136ba622de49a6bf1f6e5eab3391ed5d5dbe30e3 Author: Zhang Shengju Date: Thu Mar 10 08:55:50 2016 +0000 netconf: add macro to represent all attributes This patch adds macro NETCONFA_ALL to represent all type of netconf attributes for IPv4 and IPv6. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller include/uapi/linux/netconf.h | 1 + net/ipv4/devinet.c | 40 +++++++++++++++++++++++----------------- net/ipv6/addrconf.c | 36 +++++++++++++++++++++--------------- 3 files changed, 45 insertions(+), 32 deletions(-) commit 90d7116061f86c1f8ea460806a0414addea7b58b Author: Eric Anholt Date: Fri Mar 4 12:32:07 2016 -0800 drm/vc4: Recognize a more specific compatible string for V3D. The Raspberry Pi Foundation's firmware updates are shipping device trees using the old string, so we'll keep recognizing that as this rev of V3D. Still, we should use a more specific name in the upstream DT to clarify which board is being supported, in case we do other revs of V3D in the future. Signed-off-by: Eric Anholt Acked-by: Stephen Warren drivers/gpu/drm/vc4/vc4_v3d.c | 1 + 1 file changed, 1 insertion(+) commit 4653f22e9ab08b2b7178b7262a9326eb777e0266 Author: Eric Anholt Date: Fri Mar 4 12:32:06 2016 -0800 dt-bindings: Add binding docs for V3D. This was missed in the upstreaming process. Signed-off-by: Eric Anholt Acked-by: Stephen Warren Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 39d2adebf137de5f900843f69f5e500932e31047 Author: Xin Long Date: Thu Mar 10 15:31:57 2016 +0800 sctp: fix the transports round robin issue when init is retransmitted prior to this patch, at the beginning if we have two paths in one assoc, they may have the same params other than the last_time_heard, it will try the paths like this: 1st cycle try trans1 fail. then trans2 is selected.(cause it's last_time_heard is after trans1). 2nd cycle: try trans2 fail then trans2 is selected.(cause it's last_time_heard is after trans1). 3rd cycle: try trans2 fail then trans2 is selected.(cause it's last_time_heard is after trans1). .... trans1 will never have change to be selected, which is not what we expect. we should keeping round robin all the paths if they are just added at the beginning. So at first every tranport's last_time_heard should be initialized 0, so that we ensure they have the same value at the beginning, only by this, all the transports could get equal chance to be selected. Then for sctp_trans_elect_best, it should return the trans_next one when *trans == *trans_next, so that we can try next if it fails, but now it always return trans. so we can fix it by exchanging these two params when we calls sctp_trans_elect_tie(). Fixes: 4c47af4d5eb2 ('net: sctp: rework multihoming retransmission path selection to rfc4960') Signed-off-by: Xin Long Acked-by: Daniel Borkmann Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/associola.c | 2 +- net/sctp/transport.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3fdb74649b4f18ccaa88766750b616dec6acb5b0 Merge: 5b3e7e05 685b535 Author: Rafael J. Wysocki Date: Mon Mar 14 02:13:05 2016 +0100 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux into pm-tools Pull turbostat updates for 4.6 from Len Brown. * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: bugfix: TDP MSRs print bits fixing tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump tools/power turbostat: call __cpuid() instead of __get_cpuid() tools/power turbostat: indicate SMX and SGX support tools/power turbostat: detect and work around syscall jitter tools/power turbostat: show GFX%rc6 tools/power turbostat: show GFXMHz tools/power turbostat: show IRQs per CPU tools/power turbostat: make fewer systems calls tools/power turbostat: fix compiler warnings tools/power turbostat: add --out option for saving output in a file tools/power turbostat: re-name "%Busy" field to "Busy%" tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding tools/power turbostat: Intel Xeon x200: fix erroneous bclk value tools/power turbostat: allow sub-sec intervals tools/power turbostat: Decode MSR_MISC_PWR_MGMT tools/power turbostat: decode HWP registers x86 msr-index: Simplify syntax for HWP fields tools/power turbostat: CPUID(0x16) leaf shows base, max, and bus frequency tools/power turbostat: decode more CPUID fields commit f2c488212b511f7eadef78c564f1bff8f64db231 Merge: 67d1c0a 52829d4 Author: Dave Airlie Date: Mon Mar 14 10:49:40 2016 +1000 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-next - GM20x secure boot support (hence, acceleration, finally \o/) - GM200 support - GM20B clock driver - Support for power sensors on some GPUs - Various other fixes all over the place * 'linux-4.6' of git://github.com/skeggsb/linux: (95 commits) drm/nouveau/clk/gm20b: add basic driver drm/nouveau/clk/gk20a: share reusable structures/functions drm/nouveau/clk/gk20a: set lowest frequency during init() drm/nouveau/clk/gk20a: split gk20a_clk_new() drm/nouveau/clk/gk20a: abstract pl_to_div drm/nouveau/clk/gk20a: put mnp values into their own struct drm/nouveau/clk/gk20a: emit parent rate as debug message drm/nouveau/clk/gk20a: only restore divider to 1:1 if needed drm/nouveau/clk/gk20a: only compute n_lo if needed drm/nouveau/clk/gk20a: fix VCO bit mask drm/nouveau/clk/gk20a: rename enable/disable functions drm/nouveau/clk/gk20a: reorganize variables in gk20a_pllg_calc_mnp() drm/nouveau/clk/gk20a: convert parameters to Khz drm/nouveau/volt: add GM20B driver drm/nouveau/volt/gk20a: split constructor drm/nouveau/volt/gk20a: share reusable members & functions drm/nouveau/ce/gm107: expose MaxwellDmaCopyA drm/nouveau/fifo/gm107: KeplerChannelGpfifoB, and 2048 channels drm/nouveau/fifo/gk110: expose KeplerChannelGpfifoB drm/nouveau/fifo/gk104: submit NOP after all PBDMA_INTR_0, not just DEVICE ... commit 52829d4fabaf71748f16126d421dbefbfcf1319a Author: Alexandre Courbot Date: Fri Feb 12 14:38:18 2016 +0900 drm/nouveau/clk/gm20b: add basic driver Add a basic clock driver that reuses the GK20A logic. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c | 198 ++++++++++++++++++++++ 4 files changed, 201 insertions(+) commit 42d6e16787106f3506a95f24d231c37a5ef14772 Author: Alexandre Courbot Date: Fri Feb 12 14:23:22 2016 +0900 drm/nouveau/clk/gk20a: share reusable structures/functions Make functions/structures that the GM20B driver will reuse public. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 44 +++-------------- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.h | 65 +++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 36 deletions(-) commit 6871b34a0443e4910594c818c185901da81fdf3f Author: Alexandre Courbot Date: Fri Feb 12 16:59:16 2016 +0900 drm/nouveau/clk/gk20a: set lowest frequency during init() Err on the safe side by setting the lowest frequency (and thus voltage) during device init. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2efd3908517d0d32014dd88ccece9f40c3c4e13a Author: Alexandre Courbot Date: Fri Feb 12 14:22:17 2016 +0900 drm/nouveau/clk/gk20a: split gk20a_clk_new() This allows to instanciate drivers that use the same logic as gk20a with different parameters. Add a constructor function to allow other chips that inherit from this clock to easily initialize its members Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 43 ++++++++++++++++++------- 1 file changed, 31 insertions(+), 12 deletions(-) commit 195c113773c50fbc2bbe319d48ce82e43d9ff09c Author: Alexandre Courbot Date: Fri Feb 12 13:56:38 2016 +0900 drm/nouveau/clk/gk20a: abstract pl_to_div pl_to_div may be done differently depending on the chip. Abstract this operation so the same logic can be reused for them as well. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 57 ++++++++++++++++--------- 1 file changed, 36 insertions(+), 21 deletions(-) commit a04bc140aa52e4c0c781e42be8d49575b30ccd5b Author: Alexandre Courbot Date: Wed Oct 28 18:31:28 2015 +0900 drm/nouveau/clk/gk20a: put mnp values into their own struct This allows us to read them using one single function and will be handy to the GM20B driver. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 67 +++++++++++++------------ 1 file changed, 36 insertions(+), 31 deletions(-) commit f29cacf15960da2f201050c48b1bd2d43f848985 Author: Alexandre Courbot Date: Fri Feb 12 17:22:53 2016 +0900 drm/nouveau/clk/gk20a: emit parent rate as debug message Most users are probably not interested in this information. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c0d5d6e11c980890e9f5d6e1eb734e9297ea252 Author: Alexandre Courbot Date: Fri Feb 12 14:19:27 2016 +0900 drm/nouveau/clk/gk20a: only restore divider to 1:1 if needed Only restore the 1:1 divider if it is not set already. Also use the proper masks for this operation and add a second write as done in the Android code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit a08c8bae66eb42a901410e43fd48bac8948bd2da Author: Alexandre Courbot Date: Fri Feb 12 14:15:57 2016 +0900 drm/nouveau/clk/gk20a: only compute n_lo if needed n_lo is used if we are going to slide. Compute it only if that condition succeeds to avoid confusion about future usage of this computation. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3a91b9c5efd27729767edfde9df069aa61c4816f Author: Alexandre Courbot Date: Fri Feb 12 14:13:21 2016 +0900 drm/nouveau/clk/gk20a: fix VCO bit mask Fix the mask specified to switch to VCO mode was given as an (incorrect) immediate value. Although the side-effect happens to be the same, this is clearly incorrect. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e7952eb6630d18d8d16de539ab7e6ed24bcaf6ae Author: Alexandre Courbot Date: Fri Feb 12 14:07:07 2016 +0900 drm/nouveau/clk/gk20a: rename enable/disable functions gk20a_pllg_disable() is only used in the context of gk20a_clk_fini(). Move its body there and rename _gk20a_pllg_enable() and _gk20a_pllg_disable() to non-underscored versions. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 52 ++++++++++++------------- 1 file changed, 24 insertions(+), 28 deletions(-) commit d865f3c52de7c148d53ac9028659e6eafd833241 Author: Alexandre Courbot Date: Fri Feb 12 14:05:01 2016 +0900 drm/nouveau/clk/gk20a: reorganize variables in gk20a_pllg_calc_mnp() Move some variables declarations to the scope where they are actually used to make the code easier to follow. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit af6313d61a789fcf3313aef36114427cdc9ec194 Author: Alexandre Courbot Date: Wed Oct 28 17:36:06 2015 +0900 drm/nouveau/clk/gk20a: convert parameters to Khz Perform computations in Khz instead of Mhz for better precision. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) commit 71757abf2ee2af8bb5448a66ff68e50f308e3c28 Author: Alexandre Courbot Date: Tue Oct 27 12:35:14 2015 +0900 drm/nouveau/volt: add GM20B driver Add basic GM20B volt driver that reuses the GK20A logic. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/volt/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c | 56 ++++++++++++++++++++++ 4 files changed, 59 insertions(+) commit 4158c9c2bf13154b3ad69f377ef6584ac598f25a Author: Alexandre Courbot Date: Fri Feb 12 17:44:21 2016 +0900 drm/nouveau/volt/gk20a: split constructor Split the constructor function so we can reuse the same logic in other chips. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c | 33 +++++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.h | 4 +++ 2 files changed, 25 insertions(+), 12 deletions(-) commit 0f9520931eff906dab9c75a665fa0d4e59238166 Author: Vince Hsu Date: Mon Apr 27 11:48:02 2015 +0800 drm/nouveau/volt/gk20a: share reusable members & functions The CVB calculation and voltage setting functions can be reused for the future chips. So move the declaration to gk20a.h. Signed-off-by: Vince Hsu Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c | 24 ++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.h | 45 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 18 deletions(-) commit 253a03f03f518a7bf6c4ef73fec94aa5957da736 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/ce/gm107: expose MaxwellDmaCopyA The HW accepts KeplerDmaCopyA and MaxwellDmaCopyA classes. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/ce/gm107.c | 55 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 +- 4 files changed, 59 insertions(+), 2 deletions(-) commit 7c4f87c9e5014541025e05e05a10f7a5e6bcb9a2 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gm107: KeplerChannelGpfifoB, and 2048 channels Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 46 ++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) commit 63f8c9b7f6b7d85e0fa942d0319f72df6aa188c3 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk110: expose KeplerChannelGpfifoB This class supports a WFI method (0x0078) that's not present on the KeplerChannelGpfifoA class. The binary driver exposes both classes on these GPUs for some reason, though there doesn't appear to be any difference in the setup that's done for each (ie. even if you allocate GpfifoA, the WFI method will still work). We shall just expose GpfifoB, as I don't see a good reason to report the presence of both. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nouveau_chan.c | 1 + drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 2 + .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 46 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk110.c | 34 ++++++++++++++++ 9 files changed, 89 insertions(+), 2 deletions(-) commit b4c5fc4b853a1d508cbd3133f5d363037bfd5844 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: submit NOP after all PBDMA_INTR_0, not just DEVICE Prevents the same interrupt from re-triggering forever. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a3f63f8089fcb22113e92b73d07c7d87ad03844 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: add vic plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 2 ++ 2 files changed, 3 insertions(+) commit a8b005fd527076b01b6df16c49f71416649ac859 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: add sec plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 2 ++ 2 files changed, 3 insertions(+) commit 608fd040b730a137ff771df43207aa702973d210 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: add nvdec plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 2 ++ 3 files changed, 4 insertions(+) commit 9e4fff320521be3dabc01fb09fdc4c04b5b94769 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: add nvenc plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 2 ++ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 28 ++++++++++++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) commit 5d7fa4de46cc9200e80b72db2fe9271d9faf6400 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: add msenc plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 + 1 file changed, 1 insertion(+) commit 72150b2edd186077e7e6ae50ab72c6324bf05621 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/core: add vic plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/vic.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/vic/Kbuild | 1 + 4 files changed, 7 insertions(+) commit 3545b4253287a09be51355694473c8aed1b64b84 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/core: add nvdec plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 +++ drivers/gpu/drm/nouveau/include/nvkm/engine/nvdec.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 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/engine/nvdec/Kbuild | 1 + 7 files changed, 13 insertions(+) commit 294af04b161bd63be182b3f2c07c4130fe4d6740 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/core: add nvenc plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 7 ++++ .../gpu/drm/nouveau/include/nvkm/engine/nvenc.h | 4 ++ drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 2 + drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 46 ++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/nvenc/Kbuild | 1 + 7 files changed, 41 insertions(+), 21 deletions(-) commit c0c914eca7f251c70facc37dfebeaf176601918d Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/core: add msenc plumbing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/msenc.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/msenc/Kbuild | 1 + 3 files changed, 6 insertions(+) commit 7cee0433345029bb2a6d8ed8a93814822ddb537a Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/core: sort engine indices alphabetically Unlike subdevs, these aren't initialised in a defined order. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 1f5ff7f52bd7a69ee63765bff47ae90ca1a95237 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: make use of topology info during gpfifo construction Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 21 +-- drivers/gpu/drm/nouveau/nouveau_abi16.c | 18 ++- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 144 ++++++++++++++------- 5 files changed, 127 insertions(+), 64 deletions(-) commit 19f89279faca691c7e5222015324b9bac60cd836 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: make use of topology info during fault recovery Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 38 +++++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 22 ++------------ 2 files changed, 26 insertions(+), 34 deletions(-) commit af83a67779afce9bbf74d5b3903fc138a473ce18 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: make use of topology info when handling ctxsw timeout Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 29 ++++++++---------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 41e5171ba84f4aa6d37825218d299dca5d10e9a8 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: read device topology information from hw Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 95 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 11 ++- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 2 +- 3 files changed, 103 insertions(+), 5 deletions(-) commit 69aa40e276c79fc4d6b47b3126ce475aa3d09de1 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: cosmetic engine->runlist changes Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 67 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 17 +++--- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 12 ++-- 4 files changed, 50 insertions(+), 48 deletions(-) commit acdf7d4f7ea95211fe0e6739e4dc36fcf73b7a46 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: don't attempt recovery of unknown mmu engines Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55252da1612d95b7c19fab66dd0540171ef80c77 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: identify fault-recovery members more clearly Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) commit 6d39b83f13d9e0b24edc9a25022d260a8eb6bfa3 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gk104: rename spoon to pbdma, and move detection to oneinit Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 21 ++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) commit 1015d81122f3f527b2e042960ffc65916834fd1d Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gf100: fix certain engines not being recovered after a fault Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f22d7d45fab4a1a5cba7b932b55d74e925ffd6be Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gf100: don't attempt recovery of unknown mmu engines Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 792662439cf24176db8751e1f740ab5343a5c1b9 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gf100: identify fault-recovery members more clearly Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) commit adbe24a21eb7433496b5225fa37a3ded5d2fde97 Author: Ben Skeggs Date: Fri Mar 11 13:09:28 2016 +1000 drm/nouveau/fifo/gf100: rename spooon to pbdma, and move detection to oneinit Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 26 ++++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 3 ++- 2 files changed, 17 insertions(+), 12 deletions(-) commit 786656295b318b5894d71d9c0b153b6c17e26f15 Author: Roy Spliet Date: Thu Mar 10 11:19:00 2016 +0000 drm/nouveau/gr/fuc: Store $r0 in interrupt handler It's supposed to always be 0, but at least nv_iowr() temporarily violates this. Since the ih touches $r0, it should be stored. Signed-off-by: Roy Spliet Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc | 2 + .../drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h | 80 +++---- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h | 82 +++---- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h | 82 +++---- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h | 82 +++---- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h | 68 +++--- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | 70 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc | 2 + .../drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h | 252 ++++++++++----------- .../drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h | 252 ++++++++++----------- .../drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h | 238 +++++++++---------- .../drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h | 238 +++++++++---------- .../drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h | 210 ++++++++--------- .../drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h | 210 ++++++++--------- 14 files changed, 936 insertions(+), 932 deletions(-) commit b815a2e3f85cf93e02688fbbfb3bcc1fc1c54cba Author: Karol Herbst Date: Wed Mar 2 17:23:07 2016 +0100 drm/nouveau/pmu/fuc: use imm32 in ld/st macros Signed-off-by: Karol Herbst Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8609cb8ef0ba128300f13d0d228bacbc6a75015e Author: Karol Herbst Date: Wed Mar 2 17:23:06 2016 +0100 drm/nouveau/pmu/fuc: use the call macro instead of using the call instruction directly the macro deals with target specific differences and so we should always use this Signed-off-by: Karol Herbst Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/kernel.fuc | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 70d97b51731f86e2a6d901cef76096c157cbe0ff Author: Karol Herbst Date: Wed Mar 2 17:23:05 2016 +0100 drm/nouveau/pmu/fuc: replace mov+sethi with imm32 on gk208+ we can simply mov 32bits, so we should have a single mov there v2: use or operator instead of add Signed-off-by: Karol Herbst Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs .../drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 1598 +++++++++--------- .../drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 1494 ++++++++--------- .../drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 1424 ++++++++-------- .../drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1746 ++++++++++---------- .../gpu/drm/nouveau/nvkm/subdev/pmu/fuc/host.fuc | 3 +- .../gpu/drm/nouveau/nvkm/subdev/pmu/fuc/kernel.fuc | 20 +- .../gpu/drm/nouveau/nvkm/subdev/pmu/fuc/test.fuc | 3 +- 7 files changed, 3140 insertions(+), 3148 deletions(-) commit 4382e9091c219305c1b3d7a074528bce8acc2b84 Author: Karol Herbst Date: Wed Mar 2 17:23:04 2016 +0100 drm/nouveau/pmu/fuc: fix imm32 for gk208+ Signed-off-by: Karol Herbst Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs .../drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 882 ++++++++++----------- .../gpu/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 2 +- 2 files changed, 442 insertions(+), 442 deletions(-) commit 78a121d82da8aff3aca2a6a1c40f5061081760f0 Author: Ilia Mirkin Date: Sun Mar 6 16:06:06 2016 -0500 drm/nouveau/core: use vzalloc for allocating ramht Most calls to nvkm_ramht_new use 0x8000 as the size. This results in a fairly sizeable chunk of memory to be allocated, which may not be available with kzalloc. Since this is done fairly rarely (once per channel), use vzalloc instead. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/core/ramht.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2bf1833e51c324011484655b8e974962da77c453 Author: Alexandre Courbot Date: Tue Mar 1 16:59:05 2016 +0900 drm/nouveau/fifo/gk104: kick channel upon removal A channel may still be processed by the PBDMA even after removal, unless it is properly kicked. Some chips are more sensible to this than others, with GM20B triggering the issue very easily (the PBDMA will try to fetch methods from the previously-removed channel after a new one is added). Make sure this cannot happen by kicking the channel right after it is disabled, and before the new runlist is submitted. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 + 1 file changed, 1 insertion(+) commit e02d586da6405f8d401a90f5d19b90c3d7e2810b Author: Alexandre Courbot Date: Thu Mar 3 16:38:12 2016 +0900 drm/nouveau/instmem/gk20a: add write barrier when releasing DMA object When using the DMA-API for instmem, we may obtain a write-combined mapping. For such cases, add a write barrier in gk20a_instobj_release_dma() to make sure that all writes have reached memory at this time. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 2 ++ 1 file changed, 2 insertions(+) commit 1733a2ad36741b1812cf8b3f3037c28d0af53f50 Author: Alexandre Courbot Date: Thu Mar 3 16:03:02 2016 +0900 drm/nouveau/device/pci: set as non-CPU-coherent on ARM64 Without this buffer inconsistencies may appear between the CPU and GPU when using a PCI GPU on an ARM64 board. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2014cd02cdd54f5f286221925b13c3d19addd52 Author: Alexandre Courbot Date: Wed Mar 2 19:13:42 2016 +0900 drm/nouveau/hwmon: fix crash on non-PCI platforms Registration of the hwmon device will fail on non-PCI systems since dev->pdev is NULL in that case. Use the more generic drm_device::dev member that points to the same and is always set no matter the platform. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2a0adadeb53f6df93362cb18f797912224932c4 Author: Alexandre Courbot Date: Wed Mar 2 19:13:03 2016 +0900 drm/nouveau: silence unimportant HDMI status message On non-PCI devices, nobody should really care if the device does not provide HDMI... Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bcd38de5be745af218df9f569ec01b62905fabf Author: Alexandre Courbot Date: Wed Mar 2 19:12:27 2016 +0900 drm/nouveau/bo: consider DMA buffers on x86 only The DMA API has different semantics on different architectures. Currently on arm64, it can only provide memory from a small pool which dries up quickly if we attempt to allocate big buffers from it. Do not consider that option when running on non-x86, since regular TTM buffers are the (current) best-fit for ARM platforms. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab08f38cacd47168db1d568ae0a8249105e0cc06 Author: Alexandre Courbot Date: Tue Mar 1 17:39:00 2016 +0900 drm/nouveau/ltc/gf100: use more reasonable timeout value LTC operations timeout was set to 2ms, which may be too low for devices that run at very low clocks (e.g. GM20B) and trigger timeout messages. Set the timeout to the default 2s. Also remove the redundant error messages since nvkm_wait_msec() will already display a warning. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a2e435a1b0a3c2bc766d40356151610cc54b8772 Author: Alexandre Courbot Date: Tue Mar 1 16:51:58 2016 +0900 drm/nouveau/fifo/gk104: take runlist target into account Bits 28:29 of RUNLIST_BASE specify the memory target of the runlist. Set it to 0x3 (SYS_MEM_NONCOHERENT) if the runlist object resides in system memory. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c694ecad9dc4b2b367e33387c4407532b706dab7 Author: Alexandre Courbot Date: Tue Mar 1 16:51:57 2016 +0900 drm/nouveau/fifo/gf100: take runlist target into account Bits 28:29 of RUNLIST_BASE specify the memory target of the runlist. Set it to 0x3 (SYS_MEM_NONCOHERENT) if the runlist object resides in system memory. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0689aad70d719842c3a07f5782b7d35bb12efe9d Author: Xia Yang Date: Thu Feb 25 17:59:08 2016 +0900 drm/nouveau/fifo/gk104: fix chid bit mask Fix the channel id bit mask in FIFO schedule timeout error handling. FIFO_ENGINE_STATUS_NEXT_ID is bit 27:16 thus 0x0fff0000. FIFO_ENGINE_STATUS_ID is bit 11:0 thus 0x00000fff. Signed-off-by: Xia Yang Reviewed-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d0394c6bed5b4b78167cc0eea294754a9cb2bbc Author: Alexandre Courbot Date: Thu Feb 25 15:08:42 2016 +0900 drm/nouveau/instmem/gk20a: set DMA mask early DMA mask is typically set in nouveau_ttm_init(), but this function is called late during initialization and GK20A's instmem will have called DMA functions before this happens. Having a wrongly set DMA mask can result in the use of unneeded bounce buffers. Set it early to avoid this. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7d31cb7ca47e7268478033d62ce3ad37bf509655 Author: Ben Skeggs Date: Thu Feb 25 10:40:51 2016 +1000 drm/nouveau/gr/gm206: remove implementation, it's now identical to gm200 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 41 -------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | 47 ----------------------- 6 files changed, 1 insertion(+), 93 deletions(-) commit 5f7e8028c7946fd676a5a6043c252070f110dd74 Author: Ben Skeggs Date: Thu Feb 25 10:03:13 2016 +1000 drm/nouveau/gr/gm200: switch over to using sw_nonctx from firmware Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 202 +------------------------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | 1 - 3 files changed, 1 insertion(+), 204 deletions(-) commit d4a43a612a560c822fbc2d19f534b5bb8bc11887 Author: Ben Skeggs Date: Thu Feb 25 10:00:17 2016 +1000 drm/nouveau/gr/gm200: switch over to using sw_method_init from firmware Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 356 +--------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 1 - 3 files changed, 1 insertion(+), 358 deletions(-) commit c0e8550dbf3deb4098b379495f8a8e0fd741d94e Author: Ben Skeggs Date: Thu Feb 25 09:58:12 2016 +1000 drm/nouveau/gr/gm200: switch over to using sw_bundle_init from firmware Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 276 +--------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 1 - 3 files changed, 1 insertion(+), 278 deletions(-) commit 43bc83b9b0a23cf6f75f5b7114db8213304e0dc9 Author: Ben Skeggs Date: Thu Feb 25 09:48:37 2016 +1000 drm/nouveau/gr/gm200: switch over to using sw_ctx from firmware Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 11 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 276 +--------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 31 --- 3 files changed, 1 insertion(+), 317 deletions(-) commit b774c40b1c938afe04d06b5fa9c23fff9ca42f7a Author: Karol Herbst Date: Sat Feb 20 17:12:19 2016 +0100 drm/nouveau/bios/extdev: also parse v4.1 table Signed-off-by: Karol Herbst Reviewed-by: Martin Peres drivers/gpu/drm/nouveau/nvkm/subdev/bios/extdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb72ed5dc8116c537d9aa1be7305e12f27a21fdc Author: Karol Herbst Date: Sat Feb 20 17:10:12 2016 +0100 drm/nouveau/hwmon: don't require therm to be valid to get any data Signed-off-by: Karol Herbst Reviewed-by: Martin Peres drivers/gpu/drm/nouveau/nouveau_hwmon.c | 39 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) commit 353b9834402356df3e6c15d3a2c87be82e52c0df Author: Karol Herbst Date: Thu Feb 18 20:10:19 2016 +0100 drm/nouveau/hwmon: add power consumption v2: expose only if the sensor reading is valid Signed-off-by: Karol Herbst Reviewed-by: Martin Peres drivers/gpu/drm/nouveau/include/nvif/device.h | 1 + drivers/gpu/drm/nouveau/nouveau_hwmon.c | 36 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit b71c0892631af3dd2aea708529d282a65c683be5 Author: Karol Herbst Date: Thu Feb 18 16:53:44 2016 +0100 drm/nouveau/iccsense: implement for ina209, ina219 and ina3221 based on Martins initial work v3: fix ina2x9 calculations v4: don't kmalloc(0), fix the lsb/pga stuff v5: add a field to tell if the power reading may be invalid add nkvm_iccsense_read_all function check for the device on the i2c bus Signed-off-by: Karol Herbst Reviewed-by: Martin Peres .../drm/nouveau/include/nvkm/subdev/bios/extdev.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 31 ++++ .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 7 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 20 +++ .../gpu/drm/nouveau/nvkm/subdev/iccsense/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 191 ++++++++++++++++++++- .../gpu/drm/nouveau/nvkm/subdev/iccsense/gf100.c | 31 ++++ .../gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 8 + 8 files changed, 291 insertions(+), 1 deletion(-) commit 39b7e6e547ffca0b42a29df5a213f5bf3a19af0b Author: Martin Peres Date: Thu Feb 18 14:35:12 2016 +0100 drm/nouveau/nvbios/iccsense: add parsing of the SENSE table Karol Herbst: v4: don't kmalloc(0) v5: stricter validation Signed-off-by: Karol Herbst Reviewed-by: Martin Peres .../nouveau/include/nvkm/subdev/bios/iccsense.h | 16 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/bios/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c | 100 +++++++++++++++++++++ 3 files changed, 117 insertions(+) commit dc06e366fe656a8a260478dee4dd0b1bc38431a4 Author: Martin Peres Date: Thu Feb 18 14:10:49 2016 +0100 drm/nouveau/subdev/iccsense: add new subdev for power sensors Signed-off-by: Karol Herbst Reviewed-by: Martin Peres drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 85 +++++++------- .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 10 ++ drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 85 +++++++------- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 128 +++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/iccsense/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 43 +++++++ .../gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 8 ++ 9 files changed, 216 insertions(+), 146 deletions(-) commit 923f1bd27bf1ed49b3d1a4cccf2c8238618b49cf Author: Alexandre Courbot Date: Wed Feb 24 14:42:24 2016 +0900 drm/nouveau/secboot/gm20b: add secure boot support Add secure boot support for the GM20B chip found in Tegra X1. Secure boot on Tegra works slightly differently from desktop, notably in the way the WPR region is set up. In addition, the firmware bootloaders use a slightly different header format. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 9 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 233 +++++++++++++++++++++ 5 files changed, 242 insertions(+), 3 deletions(-) commit 9cc45521498b208b44575c96aa0b19e8eaac26ca Author: Alexandre Courbot Date: Wed Feb 24 14:42:23 2016 +0900 drm/nouveau/secboot/gm200: add secure-boot support Add secure-boot for the dGPU set of GM20X chips, using the PMU as the high-secure falcon. This work is based on Deepak Goyal's initial port of Secure Boot to Nouveau. v2. use proper memory target function Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 3 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 8 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 1489 ++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 178 +++ 6 files changed, 1674 insertions(+), 7 deletions(-) commit 82babeaf75aa35d23d5ce80c6fe34324dd303b09 Author: Alexandre Courbot Date: Wed Feb 24 14:42:22 2016 +0900 drm/nouveau/gr/gm200: do not load firmware for secure falcons Secure falcons' firmware is managed by secboot. Do not load it in GR for them. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit c9469aae5ee94ff095e1b33b3dfd6b0fbd25e30d Author: Alexandre Courbot Date: Wed Feb 24 14:42:21 2016 +0900 drm/nouveau/gr/gf100: add support for securely-managed falcons Start securely-managed falcons using secboot functions since the process for them is different from just writing CPUCTL. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 28 ++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 7d12388a1f4243c2f13e0f84b251b1a4a92f79a3 Author: Alexandre Courbot Date: Wed Feb 24 14:42:20 2016 +0900 drm/nouveau/core: add support for secure boot On GM200 and later GPUs, firmware for some essential falcons (notably GR ones) must be authenticated by a NVIDIA-produced signature and loaded by a high-secure falcon in order to be able to access privileged registers, in a process known as Secure Boot. Secure Boot requires building a binary blob containing the firmwares and signatures of the falcons to be loaded. This blob is then given to a high-secure falcon running a signed loader firmware that copies the blob into a write-protected region, checks that the signatures are valid, and finally loads the verified firmware into the managed falcons and switches them to privileged mode. This patch adds infrastructure code to support this process on chips that require it. v2: - The IRQ mask of the PMU falcon was left - replace it with the proper irq_mask variable. - The falcon reset procedure expecting a falcon in an initialized state, which was accidentally provided by the PMU subdev. Make sure that secboot can manage the falcon on its own. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 + .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 56 ++++ 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/secboot/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 288 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 48 ++++ 9 files changed, 401 insertions(+) commit f008d8c7b2218c0be0e7853341eac63db3ca4a42 Author: Alexandre Courbot Date: Wed Feb 24 14:42:19 2016 +0900 drm/nouveau/gr/gm200: load external firmware and bundles Load firmware and bundles in GM200's constructor. The previously called GF100 function did not care about the bundles. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 5 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 41 +++++++++++--------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 33 ++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 2 +- 5 files changed, 54 insertions(+), 29 deletions(-) commit 2e404b0da9441b281450b580e02fb26a494b79f4 Author: Alexandre Courbot Date: Wed Feb 24 14:42:18 2016 +0900 drm/nouveau/gr/gk20a: share external bundles loading functions There functions are going to be used by other chips that rely on NVIDIA-provided firmware. Export them. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 8 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit 5986d3e13bb2b7c1140c3cb64b78ff3f9e2330e2 Author: Alexandre Courbot Date: Wed Feb 24 14:42:17 2016 +0900 drm/nouveau/gr/gk20a: simplify external bundle loading functions Make these functions easier to use by handling memory management from within. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 120 +++++++++++++++---------- 1 file changed, 73 insertions(+), 47 deletions(-) commit 18cd5bc8ea587dc2fc0c07d2a4bf3cfe9ed2ef53 Author: Alexandre Courbot Date: Wed Feb 24 14:42:16 2016 +0900 drm/nouveau/gr/gf100: load firmware in outer function The firmwares required by GR may vary from chip to chip, especially with the introduction of secure boot and NVIDIA-provided firmwares. Move the firmware loading outside of gf100_gr_ctor so other chips may still call it while managing their firmwares themselves. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 26 ++++++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 6 ++++++ 2 files changed, 22 insertions(+), 10 deletions(-) commit 336c46524fcd822aaef3ede92b56bb4367b4538f Author: Alexandre Courbot Date: Wed Feb 24 14:42:15 2016 +0900 drm/nouveau/gr/gk20a: move firmware bundle release to gf100 Some members of gf100_gr were freed by the gk20a driver. That's not where it should be done - free them in gf100 so other chips that use NVIDIA-provided firmware free these structures properly. This also removes the need for a GK20A-specific destructor. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 11 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 16 ---------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 1 - 4 files changed, 12 insertions(+), 19 deletions(-) commit 5d2083d2f9f144024787da8296a14ed052849853 Author: Alexandre Courbot Date: Wed Feb 24 14:42:14 2016 +0900 drm/nouveau/core: add gpuobj memcpy helper functions Add memcpy functions to copy a buffer to a gpuobj and vice-versa. This will be used by the secure boot code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 96fc422c271d72dd465ae4620daabb2fb05971eb Author: Ben Skeggs Date: Wed Feb 24 14:05:54 2016 +1000 drm/nouveau/gm200: enable graphics device Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 + 1 file changed, 1 insertion(+) commit 9ec280529adaad3d8eb0c8c5aeb6237efc0b2c82 Author: Ben Skeggs Date: Wed Feb 24 14:03:40 2016 +1000 drm/nouveau/gr/gm200: s/gm204/gm200/ Most of the per-chipset differences will go away when we fully switch to using the register lists provided by the firmware files, which will leave all the remaining code "belonging" to GM200. This is a preemptive rename from GM204 to GM200. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 26 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 1049 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c | 1049 --------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 20 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 373 ++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c | 373 -------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | 4 +- 12 files changed, 1455 insertions(+), 1455 deletions(-) commit e24c9c44d7a3b4a57661100efc11b340ecdc873c Author: Ben Skeggs Date: Thu Feb 18 04:10:04 2016 +1000 drm/nouveau/bios/devinit: properly handle unknown generic conditions Upon encountering an unknown condition code, the script interpreter is supposed to skip 'size' bytes and continue at the next devinit token. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 989f57847396d1d042204747985d6aacf5399c8a Author: Ben Skeggs Date: Thu Feb 18 04:03:39 2016 +1000 drm/nouveau/bios/devinit: rename INIT_DP_CONDITION to INIT_GENERIC_CONDITION Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 96aedd0ba9122a13fd0f756e022856ce7f05f086 Author: Ben Skeggs Date: Thu Feb 11 12:23:03 2016 +1000 drm/nouveau/ltc/gm107: fix slice intr offset Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a0f67ca7aae2e6bec7ebf55d1e4853dc220816 Author: Alexandre Courbot Date: Thu Feb 11 11:10:04 2016 +0900 drm/nouveau/devinit/gf100-: detect if BIOS invoked devinit It is not advisable to perform devinit if it has already been done. VBIOS will very likely have invoked devinit if the GPU is the primary graphics device, but there is no accurate way to detect this fact yet. This patch adds such a method for gf100 and later chips, by means of the NV_PTOP_SCRATCH1_DEVINIT_COMPLETED bit. This bit is set to 1 by devinit, and reset to 0 when the GPU is powered. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c | 14 +++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) commit 8fb1240a7152d450d57402b5b85ba46d8610d443 Author: Alexandre Courbot Date: Thu Feb 11 11:09:52 2016 +0900 drm/nouveau/devinit/nv50: remove unneeded variable We never use any nv50-specific member in this nv50_devinit_preinit(). Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit db1eb528462fdcba8a4f9f9c878884c27bc5f5f6 Author: Ben Skeggs Date: Thu Feb 11 08:35:32 2016 +1000 drm/nouveau: s/gm204/gm200/ in a number of places Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 4 +- drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 +- .../gpu/drm/nouveau/include/nvkm/subdev/devinit.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/gm200.c | 54 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/ce/gm204.c | 54 ------ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 58 +++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 8 +- .../gpu/drm/nouveau/nvkm/engine/disp/coregm200.c | 38 +++++ .../gpu/drm/nouveau/nvkm/engine/disp/coregm204.c | 38 ----- .../gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c | 54 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/gm204.c | 54 ------ drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootgm200.c | 58 +++++++ .../gpu/drm/nouveau/nvkm/engine/disp/rootgm204.c | 58 ------- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 143 ++++++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm204.c | 143 ---------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 46 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm204.c | 46 ------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogm200.c | 34 ++++ .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogm204.c | 34 ---- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/Kbuild | 2 +- .../gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c | 181 +++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c | 181 --------------------- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 181 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c | 181 --------------------- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c | 40 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c | 40 ----- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.h | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgm200.c | 76 +++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgm204.c | 76 --------- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c | 40 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm204.c | 40 ----- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c | 63 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm204.c | 63 ------- 52 files changed, 1070 insertions(+), 1070 deletions(-) commit 2ed95a4c65a3d2be9aaac23ee89fe8d90ec720a5 Author: Ben Skeggs Date: Thu Feb 11 08:25:35 2016 +1000 drm/nouveau: recognise GM200 chipset Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 1b82111faebc24427c76b83738566bda7f315225 Author: Alexandre Courbot Date: Thu Jan 28 12:30:06 2016 +0900 drm/nouveau/device/tegra: fix uninitialized IRQ number nvkm_device_tegra_new initializes the irq member of the Tegra device to -1 in order to signal that it is uninitialized. However, nvkm_device_tegra_fini tests it against 0 to check whether an IRQ has been allocated or not. This leads to free_irq being called on -1 during device initialization. Fix this by using 0 as the uninitialized value everywhere. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 1 - 1 file changed, 1 deletion(-) commit 0529a46a7ae038761d2860b15c8d025cec448e88 Author: Alexandre Courbot Date: Mon Jan 25 18:44:23 2016 +0900 drm/nouveau/device: call nvkm_device_fini if nvkm_device_init fails nvkm_device_fini is never called if a failure occurs in nvkm_device_init, even when unloading the module. This can lead to a resources leak (one example is the Tegra interrupt which would never be freed in that case). Fix this by calling nvkm_device_fini in nvkm_device_init's failure path. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 ++ 1 file changed, 2 insertions(+) commit 33bcb4c340d843b5726842fce7d5ae222b125773 Author: Alexandre Courbot Date: Mon Jan 18 15:07:10 2016 +0900 drm/nouveau/gr/gf100: use the nvkm_firmware functions Use the nvkm_firmware_* functions when loading external firmware to avoid duplicate code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 046fdb2a595e1d78847fde6b625f94537b0ff365 Author: Alexandre Courbot Date: Mon Jan 18 15:07:09 2016 +0900 drm/nouveau/core: add firmware handling functions Add two functions nvkm_firmware_get() and nvkm_firmware_put() to load a firmware file and free its resources, respectively. Since firmware files are becoming a necessity for new GPUs, and their location has been standardized to nvidia/chip/, this will prevent duplicate and error-prone name-generation code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/core/firmware.h | 11 ++++ drivers/gpu/drm/nouveau/nvkm/core/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 61 ++++++++++++++++++++++ 3 files changed, 73 insertions(+) commit f0db6e3be9eb47f1bca0bdff4ba39db03975d988 Author: Alexandre Courbot Date: Fri Jan 15 11:53:24 2016 +0900 drm/nouveau/ltc/gm107: wait on relevant bit in gm107_ltc_cbc_wait Patch "ltc/gm107: use nvkm_mask to set cbc_ctrl1" sets the 3rd bit of the CTRL1 register instead of writing it entirely in gm107_ltc_cbc_clear(). As a counterpart, gm107_ltc_cbc_wait() must also be modified to wait on that single bit only, otherwise a timeout may occur if some other bit of that register is set. This happened at least on GM206 when running glmark2-drm. While we are at it, use the more compact nvkm_wait_msec() to wait for the bit to clear. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 585cb132a48190b554aecda2ebc3e2911fcbb665 Author: Dan Carpenter Date: Tue Mar 8 15:09:41 2016 +0300 drm/vc4: Return -EFAULT on copy_from_user() failure The copy_from_user() function returns the number of bytes not copied but we want to return a negative error code. Fixes: 463873d57014 ('drm/vc4: Add an API for creating GPU shaders in GEM BOs.') Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_bo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0b06e0a7945130e6a187f7959529cba7725f573a Author: Eric Anholt Date: Mon Feb 29 17:53:01 2016 -0800 drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set in the devicetree. The original Raspberry Pi had the GPIO active high, but the later models are active low. The DT GPIO bindings allow specifying the active flag, except that it doesn't get propagated to the gpiodesc, so you have to handle it yourself. Signed-off-by: Eric Anholt Tested-by: Daniel Stone drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0e60eab57557bc06bb3a5ef8d5d6dcd9ddd47aff Author: Eric Anholt Date: Mon Feb 29 17:53:00 2016 -0800 drm/vc4: Let gpiolib know that we're OK with sleeping for HPD. Fixes an error thrown every few seconds when we poll HPD when it's on a I2C to GPIO expander. Signed-off-by: Eric Anholt Tested-by: Daniel Stone drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca26d28bbaa39f31d5e7e4812603b015c8d54207 Author: Varad Gautam Date: Wed Feb 17 19:08:21 2016 +0530 drm/vc4: improve throughput by pipelining binning and rendering jobs The hardware provides us with separate threads for binning and rendering, and the existing model waits for them both to complete before submitting the next job. Splitting the binning and rendering submissions reduces idle time and gives us approx 20-30% speedup with some x11perf tests such as -line10 and -tilerect1. Improves openarena performance by 1.01897% +/- 0.247857% (n=16). Thanks to anholt for suggesting this. v2: Rebase on the spurious resets fix (change by anholt). Signed-off-by: Varad Gautam Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_drv.h | 37 +++++++++---- drivers/gpu/drm/vc4/vc4_gem.c | 123 ++++++++++++++++++++++++++++++------------ drivers/gpu/drm/vc4/vc4_irq.c | 58 ++++++++++++++++---- 3 files changed, 166 insertions(+), 52 deletions(-) commit 67d1c0a25c05e2105d12abd9c0172d2d5c0e7654 Merge: c3d7a1d 6a60920 Author: Dave Airlie Date: Mon Mar 14 09:48:04 2016 +1000 Merge tag 'drm-vc4-fixes-2016-03-03' of github.com:anholt/linux into drm-next This pull request fixes the major VC4 HDMI modesetting bugs found when the first wave of users showed up in Raspbian. * tag 'drm-vc4-fixes-2016-03-03' of github.com:anholt/linux: drm/vc4: Initialize scaler DISPBKGND on modeset. drm/vc4: Fix setting of vertical timings in the CRTC. drm/vc4: Fix the name of the VSYNCD_EVEN register. drm/vc4: Add another reg to HDMI debug dumping. drm/vc4: Bring HDMI up from power off if necessary. drm/vc4: Fix a framebuffer reference leak on async flip interrupt. commit c3d7a1d1e61e0ae94a89fbd0e2d4ad1eed9499c6 Merge: 9b61c0f 6564c65 Author: Dave Airlie Date: Mon Mar 14 09:46:46 2016 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: add DRM_EXYNOS_GEM_MAP ioctl commit 9b61c0fcdf0cfd20a85d9856d46142e7f297de0a Merge: 550e3b2 125234d Author: Dave Airlie Date: Mon Mar 14 09:42:34 2016 +1000 Merge drm-fixes into drm-next. Nouveau wanted this to avoid some worse conflicts when I merge that. commit 0304688676bdfc8159e165313d71da19c118ba27 Author: vikram.jadhav07 Date: Sun Mar 13 17:56:52 2016 -0400 ext4: clean up error handling in the MMP support There is memory leak as both caller function kmmpd() and callee read_mmp_block() not releasing bh_check (i.e buffer_head). Given patch fixes this problem. [ Additional changes suggested by Andreas Dilger -- TYT ] Signed-off-by: Jadhav Vikram Signed-off-by: Theodore Ts'o fs/ext4/mmp.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 490c1b444ce653d0784a9a5fa4d11287029feeb9 Author: Michal Hocko Date: Sun Mar 13 17:38:20 2016 -0400 jbd2: do not fail journal because of frozen_buffer allocation failure Journal transaction might fail prematurely because the frozen_buffer is allocated by GFP_NOFS request: [ 72.440013] do_get_write_access: OOM for frozen_buffer [ 72.440014] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access [ 72.440015] EXT4-fs error (device sda1) in ext4_reserve_inode_write:4735: Out of memory (...snipped....) [ 72.495559] do_get_write_access: OOM for frozen_buffer [ 72.495560] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access [ 72.496839] do_get_write_access: OOM for frozen_buffer [ 72.496841] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access [ 72.505766] Aborting journal on device sda1-8. [ 72.505851] EXT4-fs (sda1): Remounting filesystem read-only This wasn't a problem until "mm: page_alloc: do not lock up GFP_NOFS allocations upon OOM" because small GPF_NOFS allocations never failed. This allocation seems essential for the journal and GFP_NOFS is too restrictive to the memory allocator so let's use __GFP_NOFAIL here to emulate the previous behavior. Signed-off-by: Michal Hocko Signed-off-by: Theodore Ts'o fs/jbd2/transaction.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit adb7ef600cc9d9d15ecc934cc26af5c1379777df Author: Konstantin Khlebnikov Date: Sun Mar 13 17:29:06 2016 -0400 ext4: use __GFP_NOFAIL in ext4_free_blocks() This might be unexpected but pages allocated for sbi->s_buddy_cache are charged to current memory cgroup. So, GFP_NOFS allocation could fail if current task has been killed by OOM or if current memory cgroup has no free memory left. Block allocator cannot handle such failures here yet. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit a2821e34df141ac6019552618b57fa09227ff0dd Author: Aihua Zhang Date: Sun Mar 13 17:18:12 2016 -0400 ext4: fix compile error while opening the macro DOUBLE_CHECK the error is: fs/ext4/mballoc.c:475:43: error: 'struct ext4_group_info' has no member named 'bb_bitmap'. so, the definition of macro DOUBLE_CHECK should before 'struct ext4_group_info', I fixed it, and I moved the macro AGGRESSIVE_CHECK together, because I think they shoule be together. Signed-off-by: Aihua Zhang Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 12 ++++++++++++ fs/ext4/mballoc.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 725b06f33d2a4f66ee84604b02f01b46614c82bc Merge: 1ad9a57 b009b09 Author: Jason Cooper Date: Sun Mar 13 20:38:08 2016 +0000 Merge branch 'irqchip/mvebu' into irqchip/core commit dad8aff754247781514c9d38f6db89557685136d Author: David Howells Date: Wed Mar 9 23:22:56 2016 +0000 rxrpc: Replace all unsigned with unsigned int Replace all "unsigned" types with "unsigned int" types. Reported-by: David Miller Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-ack.c | 12 ++++++------ net/rxrpc/ar-call.c | 4 ++-- net/rxrpc/ar-connection.c | 2 +- net/rxrpc/ar-internal.h | 22 +++++++++++----------- net/rxrpc/ar-output.c | 2 +- net/rxrpc/ar-transport.c | 2 +- net/rxrpc/sysctl.c | 32 ++++++++++++++++---------------- 8 files changed, 39 insertions(+), 39 deletions(-) commit 00e3d2ef184d005db4e14d64f5870d556183e638 Merge: f22f5f6 836856e Author: David S. Miller Date: Sun Mar 13 15:03:34 2016 -0400 Merge tag 'wireless-drivers-next-for-davem-2016-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers patches for 4.6 Major changes: ath10k * dt: add bindings for ipq4019 wifi block * start adding support for qca4019 chip ath9k * add device ID for Toshiba WLM-20U2/GN-1080 * allow more than one interface on DFS channels bcma * move flash detection code to ChipCommon core driver brcmfmac * IPv6 Neighbor discovery offload * driver settings that can be populated from different sources * country code setting in firmware * length checks to validate firmware events * new way to determine device memory size needed for BCM4366 * various offloads during Wake on Wireless LAN (WoWLAN) * full Management Frame Protection (MFP) support iwlwifi * add support for thermal device / cooling device * improvements in scheduled scan without profiles * new firmware support (-21.ucode) * add MSIX support for 9000 devices * enable MU-MIMO and take care of firmware restart * add support for large SKBs in mvm to reach A-MSDU * add support for filtering frames from a BA session * start implementing the new Rx path for 9000 devices * enable the new Radio Resource Management (RRM) nl80211 feature flag * add a new module paramater to disable VHT * build infrastructure for Dynamic Queue Allocation ==================== Signed-off-by: David S. Miller commit f22f5f6060584ac66a7a43f644788fda8fc7b1f8 Merge: 3a8befc 3380396 Author: David S. Miller Date: Sun Mar 13 15:01:00 2016 -0400 Merge branch 'net-minor-cleanups-and-optimizations' Alexander Duyck says: ==================== A couple of minor clean-ups and optimizations This patch series is basically just a v2 of a couple patches I recently submitted. The two patches aren't technically related but there are just items I found while cleaning up and prepping some further work to enable Tx checksums for tunnels. ==================== Signed-off-by: David S. Miller commit 338039635d01524090e7bd706a3e555e20d5b337 Author: Alexander Duyck Date: Wed Mar 9 09:25:26 2016 -0800 csum: Update csum_block_add to use rotate instead of byteswap The code for csum_block_add was doing a funky byteswap to swap the even and odd bytes of the checksum if the offset was odd. Instead of doing this we can save ourselves some trouble and just shift by 8 as this should have the same effect in terms of the final checksum value and only requires one instruction. In addition we can update csum_block_sub to just use csum_block_add with a inverse value for csum2. This way we follow the same code path as csum_block_add without having to duplicate it. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller include/net/checksum.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c194cf93c164ed1c71142485ee0f70f9f2d1fe35 Author: Alexander Duyck Date: Wed Mar 9 09:24:23 2016 -0800 gro: Defer clearing of flush bit in tunnel paths This patch updates the GRO handlers for GRE, VXLAN, GENEVE, and FOU so that we do not clear the flush bit until after we have called the next level GRO handler. Previously this was being cleared before parsing through the list of frames, however this resulted in several paths where either the bit needed to be reset but wasn't as in the case of FOU, or cases where it was being set as in GENEVE. By just deferring the clearing of the bit until after the next level protocol has been parsed we can avoid any unnecessary bit twiddling and avoid bugs. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/geneve.c | 7 ++----- drivers/net/vxlan.c | 3 +-- net/ipv4/fou.c | 3 +-- net/ipv4/gre_offload.c | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-) commit c1f415c9acb5877c408d9311eb837d7d50636a68 Author: Lionel Landwerlin Date: Fri Mar 11 12:17:26 2016 +0000 drm: atomic helper: do not unreference error pointer 562c5b4d8986 didn't quite fix the issue of dealing with an error pointer. We can't free/unref an error pointer so reset it to NULL. Many thanks to Dan Carpenter for pointing this out again. Signed-off-by: Lionel Landwerlin Cc: Dan Carpenter Cc: Daniel Stone Cc: Daniel Vetter Cc: Matt Roper Cc: dri-devel@lists.freedesktop.org Fixes: 562c5b4d8986 ("drm: fix blob pointer check") Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1457698646-22231-1-git-send-email-lionel.g.landwerlin@intel.com drivers/gpu/drm/drm_atomic_helper.c | 1 + 1 file changed, 1 insertion(+) commit 7c01878254daadbb91f5b1137b7404d952e3931b Author: Ville Syrjälä Date: Wed Mar 9 22:07:46 2016 +0200 drm/edid: Extract SADs properly from multiple audio data blocks SADs may span multiple CEA audio data blocks in the EDID. CEA-861-E says: "The order of the Data Blocks is not constrained. It is also possible to have more than one of a specific type of data block if necessary to include all of the descriptors needed to describe the sink’s capabilities." Each audio data block can carry up to 10 SADs, whereas the ELD SAD limit is 15 according to HDA 1.0a spec. So we should support at least two data blocks. And apparently some devices take a more liberal interpretation and stuff only one SAD per data block even when they would fit into one. So let's try to extract all the SADs we can fit into the ELD even when they span multiple data blocks. While at it, toss in a comment to explain the 13 byte monitor name string limit which confused me at first. Cc: Arturo Pérez Tested-by: Arturo Pérez Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94197 Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1457554066-8739-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_edid.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 685b535b2cdb9cdf354321f8af9ed17dcf19d19f Author: Chen Yu Date: Sun Dec 13 21:09:31 2015 +0800 tools/power turbostat: bugfix: TDP MSRs print bits fixing MSR_CONFIG_TDP_NOMINAL: should print all 8 bits of base_ratio (bit 0:7) 0xFF MSR_CONFIG_TDP_LEVEL_1: should print all 15 bits of PKG_MIN_PWR_LVL1 (bit 48:62) 0x7FFF should print all 15 bits of PKG_MAX_PWR_LVL1 (bit 32:46) 0x7FFF should print all 8 bits of LVL1_RATIO (bit 16:23) 0xFF should print all 15 bits of PKG_TDP_LVL1 (bit 0:14) 0x7FFF And the same modification to MSR_CONFIG_TDP_LEVEL_2. MSR_TURBO_ACTIVATION_RATIO: should print all 8 bits of MAX_NON_TURBO_RATIO (bit 0:7) 0xFF Signed-off-by: Chen Yu Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6c34f160df82ae07bfff5b4c51f50622e9c2759e Author: Len Brown Date: Sun Mar 13 03:21:22 2016 -0400 tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008008 (...pkg-cstate-limit=0: unlimited) should print as MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008008 (...pkg-cstate-limit=8: unlimited) Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 768e66686cfe83f786f6ae26f1799cca69e80523 Merge: 41eeb34 e07ff94 935514c Author: Mark Brown Date: Sun Mar 13 15:20:14 2016 +0700 Merge remote-tracking branches 'regulator/topic/s5m8767' and 'regulator/topic/vexpress' into regulator-next commit 41eeb34acd3def009b1dd827364c9ed6d70ca4ea Merge: d6d50a8 abbf043 a34785f a7c2ded f907a0a 7ddec64 Author: Mark Brown Date: Sun Mar 13 15:20:00 2016 +0700 Merge remote-tracking branches 'regulator/topic/mt6397', 'regulator/topic/of', 'regulator/topic/pv88060', 'regulator/topic/pwm' and 'regulator/topic/s2mps11' into regulator-next commit d6d50a8f174141846f7507cefbf369a7100a6788 Merge: d1f8302 d4930cf 51817f4 0998a43 917e50d 96173cc Author: Mark Brown Date: Sun Mar 13 15:19:47 2016 +0700 Merge remote-tracking branches 'regulator/topic/ltc3589', 'regulator/topic/max77620', 'regulator/topic/max77686', 'regulator/topic/max77802' and 'regulator/topic/maxim' into regulator-next commit d1f83021d5ca993242105f7b41f924614501fce5 Merge: 92aa18f 354794d ab7cad3 0258382b 4618119 7e6213f Author: Mark Brown Date: Sun Mar 13 15:19:35 2016 +0700 Merge remote-tracking branches 'regulator/topic/discharge', 'regulator/topic/fan53555', 'regulator/topic/gpio', 'regulator/topic/hi655x' and 'regulator/topic/lp872x' into regulator-next commit 92aa18f88c1204c95ef42ed06a57a37ba7e34951 Merge: c155e0a 79b5d02 a3408b7 e0bbb38 9a397f4 Author: Mark Brown Date: Sun Mar 13 15:19:24 2016 +0700 Merge remote-tracking branches 'regulator/topic/act8865', 'regulator/topic/act8945a', 'regulator/topic/axp20x' and 'regulator/topic/cs4271' into regulator-next commit c155e0ab13fa6b318a026a7f5d3ee15ed7aba571 Merge: 905373b 3216523 Author: Mark Brown Date: Sun Mar 13 15:19:22 2016 +0700 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 905373b6377394ae6819574ed3c170632c8bab59 Merge: 5865865 4434cee 0f48eed e0d9b7c 623f7b9 Author: Mark Brown Date: Sun Mar 13 15:19:09 2016 +0700 Merge remote-tracking branches 'regulator/fix/ad5398', 'regulator/fix/da9210', 'regulator/fix/max77802' and 'regulator/fix/pv88090' into regulator-linus commit 58658659ee908cfeeab312e46dc7927163e43693 Merge: f6cede5 6333ef4 Author: Mark Brown Date: Sun Mar 13 15:19:06 2016 +0700 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit d4a6360f19c1c551afcba42be98df04651fab31b Merge: b25d280 f8260af b6b6e4d 51b2bb3 Author: Mark Brown Date: Sun Mar 13 15:17:56 2016 +0700 Merge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/topology' and 'asoc/topic/wm8974' into asoc-next commit b25d2803e900bde8116b45322e8bb6e84044e249 Merge: 4bfd5ba c77dd67 c62db3d ba4bc32 712a803 Author: Mark Brown Date: Sun Mar 13 15:17:47 2016 +0700 Merge remote-tracking branches 'asoc/topic/rt5640', 'asoc/topic/rt5659', 'asoc/topic/samsung' and 'asoc/topic/ssm4567' into asoc-next commit 4bfd5ba31fa989ed2b9fe5c22d4265dc1f9b9a68 Merge: f2d4c12 f1511a1 ab87739 0ce58cd 4a6180e d7fcd13 Author: Mark Brown Date: Sun Mar 13 15:17:35 2016 +0700 Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rockchip', 'asoc/topic/rt298', 'asoc/topic/rt5514' and 'asoc/topic/rt5616' into asoc-next commit f2d4c127f75b32aaf2b3c18f6010bbd4086df0b0 Merge: 88f18348 aa3e838 568cecf Author: Mark Brown Date: Sun Mar 13 15:17:28 2016 +0700 Merge remote-tracking branches 'asoc/topic/pxa' and 'asoc/topic/qcom' into asoc-next commit 88f183484a9419910737cde211f7dbb184171d66 Merge: ab96d9d e354d86 05f5afd 436e056 45d5eb3 e04fada Author: Mark Brown Date: Sun Mar 13 15:17:18 2016 +0700 Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/mtk', 'asoc/topic/mxs-saif', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next commit ab96d9d60367d614818692cfb8903f2afcfef214 Merge: 6fee37d 512feb4 6139b1b 391005e 9096639 Author: Mark Brown Date: Sun Mar 13 15:17:09 2016 +0700 Merge remote-tracking branches 'asoc/topic/fsl-sai', 'asoc/topic/fsl-ssl', 'asoc/topic/hdac' and 'asoc/topic/max9867' into asoc-next commit 6fee37df0212f61b9abcc7805d7879fa2c9096d9 Merge: a391dbe dc6cdb4 57e756d 0d55ad4 Author: Mark Brown Date: Sun Mar 13 15:17:01 2016 +0700 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/fsl-card' and 'asoc/topic/fsl-mpc5200' into asoc-next commit a391dbe09ac41adc5351a985f501a5866d73f220 Merge: 343b890 c706f2e 517e7a1 1f1e60c Author: Mark Brown Date: Sun Mar 13 15:16:53 2016 +0700 Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/bcm2835' and 'asoc/topic/cs42xx8' into asoc-next commit 343b89087196388a17a323881881dff2543fff29 Merge: 17bcf09 22363e7 aaf0f3a 4f2bf0a 5602a64 2595b7f Author: Mark Brown Date: Sun Mar 13 15:16:41 2016 +0700 Merge remote-tracking branches 'asoc/topic/ab8500', 'asoc/topic/adau17x1', 'asoc/topic/ads117x', 'asoc/topic/adsp' and 'asoc/topic/arizona' into asoc-next commit 17bcf095d8ebd805228705cf4d2bb48aedcafd92 Merge: 95d7ff5 3524be4 Author: Mark Brown Date: Sun Mar 13 15:16:38 2016 +0700 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next commit 95d7ff56d49057a21f9afbd2e1c5bd005057de7d Merge: 19142ae e7a508f Author: Mark Brown Date: Sun Mar 13 15:16:36 2016 +0700 Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next commit 19142ae6711478f3d858024eeccbf7959de290ce Merge: fc122f6 e0236f54 Author: Mark Brown Date: Sun Mar 13 15:16:33 2016 +0700 Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-next commit fc122f63d0c68baa90c2fdc448c51ecb3eea7ecb Merge: df91a21 b0639bd Author: Mark Brown Date: Sun Mar 13 15:16:30 2016 +0700 Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next commit df91a2100c05cec9323a222b97be918ccf53e378 Merge: a1eb300 e230480 Author: Mark Brown Date: Sun Mar 13 15:16:26 2016 +0700 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit a1eb30008c3bf540d15dfd891f306a144194ab9a Merge: 89595f5 e066ea2 Author: Mark Brown Date: Sun Mar 13 15:16:24 2016 +0700 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit 89595f5e29dddbf45c615c398776da9e7d3b5f4c Merge: 977011e 3bdff24 Author: Mark Brown Date: Sun Mar 13 15:16:21 2016 +0700 Merge remote-tracking branch 'asoc/topic/core-pcm' into asoc-next commit 977011ea0cf28549d55986e5a7855b6b57b07988 Merge: e87fb3b 513cb31 Author: Mark Brown Date: Sun Mar 13 15:16:19 2016 +0700 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit e87fb3b117e25833ff9349412f29b99b203531a6 Merge: f6cede5 02db17f Author: Mark Brown Date: Sun Mar 13 15:16:11 2016 +0700 Merge tag 'asoc-fix-v4.5-rc6' into asoc-linus ASoC: Fixes for v4.5 This is far too big a set of fixes for this late in the release cycle but the overwhelming bulk is essentially the same simple fix from Takashi for a cut'n'pasted 64 bit cleanliness issue in the userspace interface where drivers were accessing things using the wrong element in a union which worked OK on 32 bit platforms as the correct element happened to be aligned the same way but with 64 bit platforms ABIs are different and the two members of the union are laid out in different places. They aren't all tagged to stable since some of these chips have vanishingly little chance of being used in 64 bit systems. The other changes are: - A fix for Qualcomm devices to work on big endian systems. The original change is actually correct but triggered a bug in regmap which is too invasive to fix for this cycle and can be worked around by just letting regmap pick the default. - A fix for the Samsung I2S driver locking which wasn't using IRQ safe spinlocks when it needed to. - A fix for the new Intel Sky Lake driver forgetting that C pointer arithmetic takes the type of the pointer into consideration. - A revert of a change to the FSL SSI driver that broke some systems. - A fix for the cleanup path of the wm9713 driver. - A fix for some incorrect register definitions in the ADAU17x1 driver that caused misclocking in some configurations. - A fix for the tracepoints for jack detection to avoid using an internal field of the core jack structure which is no longer present in all configurations. - A fix for another of the new Intel drivers which tried to write to a string literal. # gpg: Signature made Mon 07 Mar 2016 09:41:48 ICT 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 " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " commit 5aea2f7f645b27635b856311dee5b775d277c686 Author: Len Brown Date: Sun Mar 13 03:14:35 2016 -0400 tools/power turbostat: call __cpuid() instead of __get_cpuid() turbostat already checks whether calling each cpuid leavf is legal, and it doesn't look at the function return value, so call the simpler gcc intrinsic __cpuid() instead of __get_cpuid(). syntax only, no functional change Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit aa8d8cc79af16e16da04efff1c1a72b1ea4a9e7e Author: Len Brown Date: Fri Mar 11 13:26:03 2016 -0500 tools/power turbostat: indicate SMX and SGX support SGX presence is related to a SKL power workaround, so lets show when that is enabled. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 0102b06747c7d24e334d2b27c4b43eed693676f1 Author: Len Brown Date: Sat Feb 27 03:11:29 2016 -0500 tools/power turbostat: detect and work around syscall jitter The accuracy of Bzy_Mhz and Busy% depend on reading the TSC, APERF, and MPERF close together in time. When there is a very short measurement interval, or a large system is profoundly idle, the changes in APERF and MPERF may be very small. They can be small enough that an expensive interrupt between reading APERF and MPERF can cause the APERF/MPERF ratio to become inaccurate, resulting in invalid calculation and display of Bzy_MHz. A dummy APERF read of APERF makes this problem much more rare. Apparently this 1st systemn call after exiting a long stretch of idle is when we typically see expensive timer interrupts that cause large jitter. For the cases that dummy APERF read fails to prevent, we compare the latency of the APERF and MPERF reads. If they differ by more than 2x, we re-issue them. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit fdf676e51f301d207586d9bac509b8ce055bae8a Author: Len Brown Date: Sat Feb 27 01:28:12 2016 -0500 tools/power turbostat: show GFX%rc6 The column "GFX%c6" show the percentage of time the GPU is in the "render C6" state, rc6. Deep package C-states on several systems depend on the GPU being in RC6. This information comes from the counter /sys/class/drm/card0/power/rc6_residency_ms, as read before and after the measurement interval. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 27d47356b6dfa92042a17a0b474f08910d4c8e8f Author: Len Brown Date: Sat Feb 27 00:37:54 2016 -0500 tools/power turbostat: show GFXMHz Under the column "GFXMHz", show a snapshot of this attribute: /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz This is an instantaneous snapshot of what sysfs presents at the end of the measurement interval. turbostat does not average or otherwise perform any math on this value. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 50 ++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit 562a2d377bb9882c49debc9e1be7127a1717e242 Author: Len Brown Date: Fri Feb 26 23:48:05 2016 -0500 tools/power turbostat: show IRQs per CPU The new IRQ column shows how many interrupts have occurred on each CPU during the measurement inteval. This information comes from the difference between /proc/interrupts shapshots made before and after the measurement interval. The first row, the system summary, shows the sum of the IRQS for all CPUs during that interval. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 126 ++++++++++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 4 deletions(-) commit 36229897ba966bb0dc9e060222ff17b198252367 Author: Len Brown Date: Fri Feb 26 20:51:02 2016 -0500 tools/power turbostat: make fewer systems calls skip the open(2)/close(2) on each msr read by keeping the /dev/cpu/*/msr files open. The remaining read(2) is generally far fewer cycles than the removed open(2) system call. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 51 ++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 10 deletions(-) commit 58cc30a4e6086d542302e04eea39b2a438e4c5dd Author: Len Brown Date: Wed Feb 24 18:16:40 2016 -0500 tools/power turbostat: fix compiler warnings Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b7d8c1483bbf6ec9d2dd76d6a1c91a38c3f6ac35 Author: Len Brown Date: Sat Feb 13 23:36:17 2016 -0500 tools/power turbostat: add --out option for saving output in a file By default... Turbostat --debug gconfiguration info goes to stderr. In FORK mode, turbostat statistics go to stderr. In PERIODIC mode, turbostat statistics go to stdout. These defaults do not change, but an option "--out file" will send all output above only to the specified file. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 14 +- tools/power/x86/turbostat/turbostat.c | 281 ++++++++++++++++++---------------- 2 files changed, 160 insertions(+), 135 deletions(-) commit 75d2e44e60490ba1fee076a5f4dcfbdc8598e8c4 Author: Len Brown Date: Sat Feb 13 23:41:53 2016 -0500 tools/power turbostat: re-name "%Busy" field to "Busy%" some tools processing turbostat output have difficulty with items that begin with %... Reported-by: Jacob Pan Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 16 ++++++++-------- tools/power/x86/turbostat/turbostat.c | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) commit cbf97abaf3689652bcddc0741dc49629d1838142 Author: Hubert Chrzaniuk Date: Wed Feb 10 14:55:22 2016 +0100 tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding Following changes have been made: - changed MSR_NHM_TURBO_RATIO_LIMIT to MSR_TURBO_RATIO_LIMIT in debug print for consistency with Developer Manual - updated definition of bitfields in MSR_TURBO_RATIO_LIMIT and appropriate parsing code - added x200 to list of architectures that do not support Nahlem compatible definition of MSR_TURBO_RATIO_LIMIT register (x200 has the register but bits definition is custom) - fixed typo in code that parses MSR_TURBO_RATIO_LIMIT (logical instead of bitwise operator) - changed MSR_TURBO_RATIO_LIMIT parsing algorithm so the print out had the same order as implementations for other platforms Signed-off-by: Hubert Chrzaniuk Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 53 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 27 deletions(-) commit 121b48bb77187cf2ed3053e147d2e6c1e864083c Author: Chrzaniuk, Hubert Date: Wed Feb 10 16:35:17 2016 +0100 tools/power turbostat: Intel Xeon x200: fix erroneous bclk value x200 does not enable any way to programmatically obtain bus clock speed. Bclk for the architecture has a fixed value of 100 MHz. At the same time x200 cannot be included in has_snb_msrs since it does not support C7 idle state. prior to this patch, MHz values reported on this chip were erroneously calculated using bclk of 133MHz, causing MHz values to be reported 33% higher than actual. Signed-off-by: Hubert Chrzaniuk Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a0609c02e6558df6075f258af98a54a74b050ff Author: Len Brown Date: Fri Feb 12 22:44:48 2016 -0500 tools/power turbostat: allow sub-sec intervals turbostat -i interval_sec will sample and display statistics every interval_sec. interval_sec used to be a whole number of seconds, but now we accept a decimal, as small as 0.001 sec (1 ms). Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.8 | 2 +- tools/power/x86/turbostat/turbostat.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) commit 6564c65f3a2b75832957e53bcc3c6066d1d73487 Author: Joonyoung Shim Date: Tue Mar 8 14:12:59 2016 +0900 drm/exynos: add DRM_EXYNOS_GEM_MAP ioctl The commit d931589c01a2 ("drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl") removed it same with the ioctl that this patch adds. The reason that removed DRM_EXYNOS_GEM_MAP_OFFSET was we could use DRM_IOCTL_MODE_MAP_DUMB. Both did exactly same thing. Now we again will revive it as DRM_EXYNOS_GEM_MAP because of render node. DRM_IOCTL_MODE_MAP_DUMB isn't permitted in render node. Signed-off-by: Joonyoung Shim Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 ++ drivers/gpu/drm/exynos/exynos_drm_gem.c | 9 +++++++++ drivers/gpu/drm/exynos/exynos_drm_gem.h | 4 ++++ include/uapi/drm/exynos_drm.h | 17 ++++++++++++++++- 4 files changed, 31 insertions(+), 1 deletion(-) commit 7915a861c01839a05eb7346023741742c4d2135e Author: Ales Novak Date: Sat Mar 12 21:55:50 2016 -0500 ext4: print ext4 mount option data_err=abort correctly If data_err=abort option is specified for an ext3/ext4 mount, /proc/mounts does show it as "(null)". This is caused by token2str() returning NULL for Opt_data_err_abort (due to its pattern containing '='). Signed-off-by: Ales Novak Signed-off-by: Theodore Ts'o fs/ext4/super.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5e1021f2b6dff1a86a468a1424d59faae2bc63c1 Author: Eryu Guan Date: Sat Mar 12 21:40:32 2016 -0500 ext4: fix NULL pointer dereference in ext4_mark_inode_dirty() ext4_reserve_inode_write() in ext4_mark_inode_dirty() could fail on error (e.g. EIO) and iloc.bh can be NULL in this case. But the error is ignored in the following "if" condition and ext4_expand_extra_isize() might be called with NULL iloc.bh set, which triggers NULL pointer dereference. This is uncovered by commit 8b4953e13f4c ("ext4: reserve code points for the project quota feature"), which enlarges the ext4_inode size, and run the following script on new kernel but with old mke2fs: #/bin/bash mnt=/mnt/ext4 devname=ext4-error dev=/dev/mapper/$devname fsimg=/home/fs.img trap cleanup 0 1 2 3 9 15 cleanup() { umount $mnt >/dev/null 2>&1 dmsetup remove $devname losetup -d $backend_dev rm -f $fsimg exit 0 } rm -f $fsimg fallocate -l 1g $fsimg backend_dev=`losetup -f --show $fsimg` devsize=`blockdev --getsz $backend_dev` good_tab="0 $devsize linear $backend_dev 0" error_tab="0 $devsize error $backend_dev 0" dmsetup create $devname --table "$good_tab" mkfs -t ext4 $dev mount -t ext4 -o errors=continue,strictatime $dev $mnt dmsetup load $devname --table "$error_tab" && dmsetup resume $devname echo 3 > /proc/sys/vm/drop_caches ls -l $mnt exit 0 [ Patch changed to simplify the function a tiny bit. -- Ted ] Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a86e56cb3910bfe6f842b31cbcfa549af76efafc Merge: c7e1d89 451e9e5 Author: Olof Johansson Date: Sat Mar 12 17:44:51 2016 -0800 Merge tag 'for-v4.6/gxbb-arm64' of https://github.com/carlocaione/linux-meson into next/arm64 Provide the ARCH_MESON Kconfig symbol for the Amlogic S905 SoCs. * tag 'for-v4.6/gxbb-arm64' of https://github.com/carlocaione/linux-meson: ARM64: Enable Amlogic Meson GXBaby platform Signed-off-by: Olof Johansson commit 8061a17ee3fb3e183873c8be3cfaaa37c41ce679 Merge: c8c9044 cc733bc Author: Olof Johansson Date: Sat Mar 12 17:43:08 2016 -0800 Merge tag 'for-v4.6/gxbb-dt' of https://github.com/carlocaione/linux-meson into next/dt64 This series adds initial support for the Amlogic S905 based Tronsmart Vega S95 Pro, Meta and Telos TV boxes. - Add new DTS to enable support for the boards - Add documentation for compatibles and vendor prefix * tag 'for-v4.6/gxbb-dt' of https://github.com/carlocaione/linux-meson: ARM64: dts: amlogic: Add Tronsmart Vega S95 configs Documentation: devicetree: amlogic: Document Tronsmart Vega S95 boards ARM64: dts: Prepare configs for Amlogic Meson GXBaby Documentation: devicetree: amlogic: Document Meson GXBaby devicetree: bindings: Add vendor prefix for Tronsmart Signed-off-by: Olof Johansson commit 2ef7d5f342c12c02e68da225c0715b0c9cefce70 Author: Masahiro Yamada Date: Wed Mar 9 13:26:45 2016 +0900 ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus" The compatible string "simple-bus" is well defined in ePAPR, while I see no documentation for the "arm,amba-bus" arnywhere in ePAPR or Documentation/devicetree/. DT is also used by other projects than Linux kernel. It is not a good idea to rely on such an unofficial binding. This commit - replaces "arm,amba-bus" with "simple-bus" - drops "arm,amba-bus" where it is used along with "simple-bus" Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/boot/dts/axm55xx.dtsi | 2 +- arch/arm/boot/dts/exynos3250.dtsi | 2 +- arch/arm/boot/dts/exynos4.dtsi | 2 +- arch/arm/boot/dts/exynos4415.dtsi | 2 +- arch/arm/boot/dts/exynos5250.dtsi | 2 +- arch/arm/boot/dts/exynos5420.dtsi | 2 +- arch/arm/boot/dts/exynos5440.dtsi | 2 +- arch/arm/boot/dts/hi3620.dtsi | 2 +- arch/arm/boot/dts/hip01.dtsi | 2 +- arch/arm/boot/dts/hisi-x5hd2.dtsi | 2 +- arch/arm/boot/dts/integrator.dtsi | 2 +- arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8660.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8960.dtsi | 2 +- arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot/dts/rk3228.dtsi | 2 +- arch/arm/boot/dts/rk3288.dtsi | 2 +- arch/arm/boot/dts/rk3xxx.dtsi | 2 +- arch/arm/boot/dts/s5pv210.dtsi | 2 +- arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 2 +- arch/arm/boot/dts/ste-u300.dts | 2 +- arch/arm/boot/dts/versatile-ab.dts | 2 +- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2m.dtsi | 2 +- arch/arm64/boot/dts/arm/foundation-v8.dtsi | 2 +- arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 2 +- arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) commit 301c6e0b16ef1c45d3a269f6d854d88ca97a950c Merge: b2af8e5 6d6acd1 Author: Olof Johansson Date: Sat Mar 12 17:26:37 2016 -0800 Merge tag 'vexpress-for-v4.6/dt-updates-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt Additional updates for ARM VExpress/Juno platforms 1. Add support for SBSA Generic Watchdog on foundation models 2. Fix node name unit-address presence/absence mismatch warnings in all the device trees * tag 'vexpress-for-v4.6/dt-updates-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno/vexpress: fix node name unit-address presence warnings arm64: dts: foundation-v8: add SBSA Generic Watchdog device node Signed-off-by: Olof Johansson commit c7e1d89b3480fc3f5cbce8b8d87d0ab4882e05b8 Merge: 2f85bb0 c87b3e9 Author: Olof Johansson Date: Sat Mar 12 17:13:34 2016 -0800 Merge tag 'samsung-soc64-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/arm64 Samsung Exynos ARM64 improvements for v4.6: 1. Remove separate ARCH_EXYNOS7 symbol and consolidate it into one ARCH_EXYNOS. This depends on clk tree: removal of last presence of ARCH_EXYNOS7. * tag 'samsung-soc64-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: EXYNOS: Consolidate ARCH_EXYNOS7 symbol into ARCH_EXYNOS clk: samsung: Don't build ARMv8 clock drivers on ARMv7 clk: samsung: Enable COMPILE_TEST for Samsung clocks clk: Move vendor's Kconfig into CCF menu section clk: mediatek: Fix memory leak on clock init fail clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h clk: xgene: Remove return from void function clk: xgene: Add SoC and PMD PLL clocks with v2 hardware Documentation: Update APM X-Gene clock binding for v2 hardware clk: s2mps11: remove redundant code clk: s2mps11: remove redundant static variables declaration clk: s2mps11: allocate only one structure for clock init clk: s2mps11: merge two for loops in one clk-divider: make sure read-only dividers do not write to their register clk: tango4: rename ARCH_TANGOX to ARCH_TANGO clk: scpi: Fix checking return value of platform_device_register_simple() clk: mvebu: Mark ioremapped memory as __iomem Signed-off-by: Olof Johansson commit 3a8befcd7872f572882ad7e14994a17f9b55dd4e Author: Jiri Pirko Date: Sat Mar 12 12:03:27 2016 +0100 rocker: move ageing_time from struct rocker to struct ofdpa This is OF-DPA specific, used only there, similar to ofdpa_port->ageing_time. So move it to OF-DPA code. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 1 - drivers/net/ethernet/rocker/rocker_main.c | 2 -- drivers/net/ethernet/rocker/rocker_ofdpa.c | 11 +++++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit 2a993a587e268459e376303aa894a6b236565b6d Merge: 0d8ec17 15925cf Author: Olof Johansson Date: Sat Mar 12 17:10:20 2016 -0800 Merge tag 'samsung-soc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung Exynos (and older platforms) improvements for v4.6: 1. Split out Exynos PMU driver implementation from arm/mach-exynos to the drivers/soc/samsung which will allow re-use of it on ARM64. 2. Use generic DT cpufreq driver on Exynos542x/5800. 3. Minor cleanups. * tag 'samsung-soc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c24xx: Avoid warning for inb/outb ARM: SAMSUNG: Remove unused register offset definition ARM: EXYNOS: Cleanup header files inclusion drivers: soc: samsung: Enable COMPILE_TEST MAINTAINERS: Add maintainers entry for drivers/soc/samsung drivers: soc: Add support for Exynos PMU driver ARM: EXYNOS: Split up exynos5420 SoC specific PMU data ARM: EXYNOS: Split up exynos5250 SoC specific PMU data ARM: EXYNOS: Split up exynos4 SoC specific PMU data ARM: EXYNOS: Split up exynos3250 SoC specific PMU data ARM: EXYNOS: Move pmu specific headers under "linux/soc/samsung" ARM: EXYNOS: Correct header comment in Kconfig file ARM: EXYNOS: Use generic cpufreq driver for Exynos5422/5800 ARM: EXYNOS: Use generic cpufreq driver for Exynos5420 ARM: s3c64xx: use "depends on" instead of "if" after prompt ARM: plat-samsung: use to_platform_device() ARM: EXYNOS: Code cleanup in map.h ARM: EXYNOS: Remove unused static mapping of CMU for exynos5 Signed-off-by: Olof Johansson commit 33b96d2c9579213cf3f36d7b29841b1e464750c4 Author: Fabio Estevam Date: Mon Feb 22 09:01:53 2016 -0300 bus: imx-weim: Take the 'status' property value into account Currently we have an incorrect behaviour when multiple devices are present under the weim node. For example: &weim { ... status = "okay"; sram@0,0 { ... status = "okay"; }; mram@0,0 { ... status = "disabled"; }; }; In this case only the 'sram' device should be probed and not 'mram'. However what happens currently is that the status variable is ignored, causing the 'sram' device to be disabled and 'mram' to be enabled. Change the weim_parse_dt() function to use for_each_available_child_of_node()so that the devices marked with 'status = disabled' are not probed. Cc: Suggested-by: Wolfgang Netbal Signed-off-by: Fabio Estevam Reviewed-by: Sascha Hauer Acked-by: Shawn Guo Signed-off-by: Olof Johansson drivers/bus/imx-weim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8c904471a501fb970de7c3a9a9c66483dbcdb55 Merge: 720721b b5ebfad Author: Olof Johansson Date: Sat Mar 12 17:05:27 2016 -0800 Merge tag 'mvebu-dt64-4.6-2' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.6 (part 2) Add support for the Armada 7K and 8K SoCs and the Armada 8040 DB board * tag 'mvebu-dt64-4.6-2' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: re-order Device Tree nodes for Armada AP806 arm64: dts: marvell: update Armada AP806 clock description arm64: dts: marvell: add Device Tree files for Armada 7K/8K Signed-off-by: Olof Johansson commit 88e9da9a2a70b6f1a171fbf30a681d6bc4031c4d Author: Krzysztof Halasa Date: Fri Mar 11 12:32:14 2016 +0100 CNS3xxx: Fix PCI cns3xxx_write_config() The "where" offset was added twice, fix it. Signed-off-by: Krzysztof Hałasa Fixes: 498a92d42596 ("ARM: cns3xxx: pci: avoid potential stack overflow") Signed-off-by: Olof Johansson arch/arm/mach-cns3xxx/pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3cf2efd5d767ab652cfc1f94b918ddc05686500f Author: Kevin Hilman Date: Wed Feb 24 14:57:36 2016 -0800 MAINTAINERS: unify email addrs for Kevin Hilman I have a couple different emails in here. It's time to make them all the same. Signed-off-by: Kevin Hilman Signed-off-by: Olof Johansson MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f85bb09d95e27c2932fc86e41318962bd33af96 Author: Georgi Djakov Date: Thu Feb 25 12:46:32 2016 +0200 arm64: defconfig: Increase MMC_BLOCK_MINORS to 16 Increase the block minors from the default 8 to 16. The db410c board by default has eMMC rootfs on the 10th partition. Signed-off-by: Georgi Djakov Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d1be05ab23a67876b7e6a64734fd617978fa6f0c Author: Georgi Djakov Date: Thu Feb 25 12:46:31 2016 +0200 arm64: defconfig: Add Qualcomm sdhci and restart functionality Enable sdhci and restart functionality for devices based on msm8916 platform. Signed-off-by: Georgi Djakov Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit b2af8e58a0c194eee1be5912566b68f076672cc1 Author: Lars Persson Date: Thu Feb 25 10:11:56 2016 +0100 ARM: dts: artpec: dual-license on artpec6.dtsi Relaxed the license on the dtsi to permit use in other projects. Signed-off-by: Lars Persson Signed-off-by: Olof Johansson arch/arm/boot/dts/artpec6.dtsi | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit 7ad86d612ba8fd0e9c1323082b846b6e69c1d456 Author: Linus Walleij Date: Mon Feb 22 09:33:26 2016 +0100 ARM: dts: ux500: add synaptics RMI4 for Ux500 TVK DT This adds the Synaptics RMI4 touchscreen to the Ux500 TVK user interface board. Tested on the U8500 HREFv60plus with the TVK UIB. Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/ste-href-tvk1281618.dtsi | 37 +++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit d10ef6f9380b8853c4b48eb104268fccfdc0b0c5 Author: Thomas Gleixner Date: Tue Mar 8 10:36:13 2016 +0100 cpu/hotplug: Document states better Requested-by: Peter Zijlstra Signed-off-by: Thomas Gleixner kernel/cpu.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit d05004944206cbbf1c453e179768163731c7c6f1 Author: Fenghua Yu Date: Thu Mar 10 19:38:18 2016 -0800 x86/cpufeature: Enable new AVX-512 features A few new AVX-512 instruction groups/features are added in cpufeatures.h for enuermation: AVX512DQ, AVX512BW, and AVX512VL. Clear the flags in fpu__xstate_clear_all_cpu_caps(). The specification for latest AVX-512 including the features can be found at: https://software.intel.com/sites/default/files/managed/07/b7/319433-023.pdf Note, I didn't enable the flags in KVM. Hopefully the KVM guys can pick up the flags and enable them in KVM. Signed-off-by: Fenghua Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: Denys Vlasenko Cc: Gleb Natapov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V Shankar Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Link: http://lkml.kernel.org/r/1457667498-37357-1-git-send-email-fenghua.yu@intel.com [ Added more detailed feature descriptions. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 3 +++ arch/x86/kernel/fpu/xstate.c | 3 +++ 2 files changed, 6 insertions(+) commit 34b57f40a6a27f45dfa51b46cdbc96b7031652a7 Author: Andy Shevchenko Date: Wed Mar 9 14:14:17 2016 +0200 i2c: i801: sort IDs alphabetically Sort the list to have a faster search for a certain PCI ID. There is no functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d0781b98fd0248bb22846bae380aa2e1483c04fc Author: Andy Shevchenko Date: Tue Mar 8 11:19:24 2016 +0200 MAINTAINERS: Mika and me are designated reviewers for I2C DESIGNWARE Jarkko is a main contact to handle i2c-designware driver. Move Mika and me to designated reviewers which we actualy are. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd7784c2d12f5af03c05abee051a73cca3a0fd1d Author: Jan Glauber Date: Mon Mar 7 16:10:44 2016 +0100 i2c: octeon: Cleanup kerneldoc comments Remove point after parameter description and replace kerneldoc by a comment if it has no additional no value. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 89 ++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 50 deletions(-) commit 95026658c46ea2d94498d0dac1282e28cd47c64a Author: Sudip Mukherjee Date: Mon Mar 7 17:19:17 2016 +0530 i2c: do not use internal data from driver core The variable p is a data structure which is used by the driver core internally and it is not expected that busses will be directly accessing these driver core internal only data. Signed-off-by: Sudip Mukherjee Acked-by: Greg Kroah-Hartman [wsa: removed the unlikely()] Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 30e31a1fbc1fc0fae001a96d9b4c375806fb8f41 Author: Shubhrajyoti Datta Date: Mon Mar 7 14:58:39 2016 +0530 i2c: cadence: Fix the kernel-doc warnings This fixes the below warnings drivers/i2c/busses/i2c-cadence.c:164: warning: No description found for parameter 'dev' drivers/i2c/busses/i2c-cadence.c:826: warning: No description found for parameter 'dev' drivers/i2c/busses/i2c-cadence.c:826: warning: Excess function parameter '_dev' description in 'cdns_i2c_runtime_suspend' drivers/i2c/busses/i2c-cadence.c:844: warning: No description found for parameter 'dev' drivers/i2c/busses/i2c-cadence.c:844: warning: Excess function parameter '_dev' description in 'cdns_i2c_runtime_resume' while at it also update the cdns_i2c_clear_bus_hold and the runtime function update. Tested-by: Michal Simek Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cadence.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit bd5174dfb6f171fa06e638664ec6ee54692cf7b2 Author: Bjorn Helgaas Date: Thu Mar 10 14:36:34 2016 -0600 PCI: Simplify pci_create_attr() control flow Return error immediately to simplify the control flow in pci_create_attr(). No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 53 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) commit b562ec8f74e4edb532a53d26f0002d6fb4a6c79b Author: Bjorn Helgaas Date: Thu Mar 10 14:36:28 2016 -0600 PCI: Don't leak memory if sysfs_create_bin_file() fails If sysfs_create_bin_file() fails, pci_create_attr() leaks the struct bin_attribute it allocated previously. Free the struct bin_attribute if pci_create_attr() fails. Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d88b93bea5937c0c5c5fc30089d4e6e3c9ca508 Author: Bjorn Helgaas Date: Tue Mar 1 09:37:10 2016 -0600 PCI: Simplify sysfs ROM cleanup The value of pdev->rom_attr is the definitive indicator of the fact that we're created a sysfs attribute. Check that rather than rom_size, which is only used incidentally when deciding whether to create a sysfs attribute. Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit d9c8bea179a6906a74ea42a2a162c4d1c6d9a16b Author: Bjorn Helgaas Date: Wed Mar 2 21:46:50 2016 -0600 PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY The IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY bits are unused. Remove them and code that depends on them. Signed-off-by: Bjorn Helgaas drivers/pci/remove.c | 1 - drivers/pci/rom.c | 31 +------------------------------ include/linux/ioport.h | 2 -- 3 files changed, 1 insertion(+), 33 deletions(-) commit 97f47e73c4a0dc2519276cd63274696c850e0613 Author: Bjorn Helgaas Date: Wed Mar 2 21:42:04 2016 -0600 MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource Loongson 3 used the IORESOURCE_ROM_COPY flag for its ROM resource. There are two problems with this: - When IORESOURCE_ROM_COPY is set, pci_map_rom() assumes the resource contains virtual addresses, so it doesn't ioremap the resource. This implies loongson_sysconf.vgabios_addr is a virtual address. That's a problem because resources should contain CPU *physical* addresses not virtual addresses. - When IORESOURCE_ROM_COPY is set, pci_cleanup_rom() calls kfree() on the resource. We did not kmalloc() the loongson_sysconf.vgabios_addr area, so it is incorrect to kfree() it. If we're using a shadow copy in RAM for the Loongson 3 VGA BIOS area, disable the ROM BAR and release the address space it was consuming. Use IORESOURCE_ROM_SHADOW instead of IORESOURCE_ROM_COPY. This means the struct resource contains CPU physical addresses, and pci_map_rom() will ioremap() it as needed. Signed-off-by: Bjorn Helgaas arch/mips/pci/fixup-loongson3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 53f0a509775dae77dab64d0b858635a70e3d6f4f Author: Bjorn Helgaas Date: Wed Mar 2 21:38:29 2016 -0600 MIPS: Loongson 3: Use temporary struct resource * to avoid repetition Use a temporary struct resource pointer to avoid needless repetition of "pdev->resource[PCI_ROM_RESOURCE]". No functional change intended. Signed-off-by: Bjorn Helgaas arch/mips/pci/fixup-loongson3.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 240504adaf0798a5ab18fac46ae782d3b004859f Author: Bjorn Helgaas Date: Wed Mar 2 16:06:32 2016 -0600 ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource A struct resource contains CPU physical addresses, not virtual addresses. But sn_acpi_slot_fixup() and sn_io_slot_fixup() stored the virtual address of a shadow ROM copy in the resource. To compensate, pci_map_rom() had a special case that returned the resource address directly rather than calling ioremap() on it. When we're using a shadow copy in RAM or PROM, disable the ROM BAR and release the address space it was consuming. Store the CPU physical (not virtual) address in the shadow ROM resource, and mark the resource as IORESOURCE_ROM_SHADOW so we use the normal pci_map_rom() path that ioremaps the copy. Signed-off-by: Bjorn Helgaas arch/ia64/sn/kernel/io_acpi_init.c | 18 +++++++++++------- arch/ia64/sn/kernel/io_init.c | 17 +++++------------ 2 files changed, 16 insertions(+), 19 deletions(-) commit f976721e826e06ba1cdfce701495b49e2e25289d Author: Bjorn Helgaas Date: Wed Mar 2 16:20:18 2016 -0600 ia64/PCI: Use ioremap() instead of open-coded equivalent Depositing __IA64_UNCACHED_OFFSET in the upper address bits is essentially equivalent to ioremap(): it converts a CPU physical address to a virtual address using the ia64 uncacheable identity map. Call ioremap() instead of doing the phys-to-virt conversion manually with __IA64_UNCACHED_OFFSET. Note that this makes it obvious that (a) we're putting a virtual address in a struct resource, and (b) we're passing a virtual address to ioremap() below in the PCI_ROM_RESOURCE case. These are both pre-existing problems that I'll resolve next. Signed-off-by: Bjorn Helgaas arch/ia64/sn/kernel/io_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ab97b8cc560eabfd8139dd97924a09e46a3c9632 Author: Bjorn Helgaas Date: Wed Mar 2 16:16:03 2016 -0600 ia64/PCI: Use temporary struct resource * to avoid repetition Use a temporary struct resource pointer to avoid needless repetition of "dev->resource[idx]". No functional change intended. Signed-off-by: Bjorn Helgaas arch/ia64/sn/kernel/io_acpi_init.c | 10 +++++----- arch/ia64/sn/kernel/io_init.c | 39 +++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 27 deletions(-) commit f50dd8c3dae5703704441ab2255dff99c021a340 Author: Bjorn Helgaas Date: Tue Mar 1 11:13:30 2016 -0600 PCI: Clean up pci_map_rom() whitespace Remove unnecessary indentation in pci_map_rom(). This is logically part of the previous patch; I split it out to make the critical changes in that patch more obvious. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/rom.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit ac0c302a919ba7b68dbf274babdc08c83df6f532 Author: Bjorn Helgaas Date: Sat Mar 12 05:48:08 2016 -0600 PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs When pci_create_sysfs_dev_files() created the "rom" sysfs file, it set the sysfs file size to the actual size of a ROM BAR, or if there was no ROM BAR but the platform provided a shadow copy in RAM, to 0x20000. 0x20000 is an arch-specific length that should not be baked into the PCI core. Every place that sets IORESOURCE_ROM_SHADOW also sets the size of the PCI_ROM_RESOURCE, so use the resource length always. Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d157bd761585605b7882935ffb86286919f62ea1 Author: Florian Westphal Date: Thu Mar 10 01:56:23 2016 +0100 netfilter: x_tables: check for size overflow Ben Hawkes says: integer overflow in xt_alloc_table_info, which on 32-bit systems can lead to small structure allocation and a copy_from_user based heap corruption. Reported-by: Ben Hawkes Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 3 +++ 1 file changed, 3 insertions(+) commit e38e5ce81c3ed79dd48fc1801134e8812558c389 Author: Stefan Richter Date: Wed Nov 11 14:53:27 2015 +0100 firewire: ABI documentation: libhinawa uses firewire-cdev Hinawa [https://github.com/takaswie/libhinawa/] is a library for access to IEEE 1394 devices. As a gobject introspection library, it facilitates writing applications in high-level programming languages. Besides generic I/O via /dev/fw* (firewire-cdev ABI), it also supports control of IEEE 1394 audio hardware via ALSA hwdep ABIs which are provided by sound/firewire drivers. Signed-off-by: Stefan Richter Documentation/ABI/stable/firewire-cdev | 1 + 1 file changed, 1 insertion(+) commit abfa6cd8cda71b9071191e72711bd474e539b1b2 Author: James Johnston Date: Thu Mar 10 03:38:48 2016 +0000 modsign: Fix documentation on module signing enforcement parameter. Modify the documentation to match the actual parameter as implemented in kernel/module.c:273. Signed-off-by: James Johnston Reviewed-by: David Howells Signed-off-by: Jonathan Corbet Documentation/module-signing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ff5cf2735c57542b8e630e63d6983013a2e1c3 Author: Vineet Gupta Date: Fri Dec 18 13:57:41 2015 +0530 ARC: mm: Use virt_to_pfn() for addr >> PAGE_SHIFT pattern Signed-off-by: Vineet Gupta arch/arc/include/asm/page.h | 19 +++++++------------ arch/arc/include/asm/pgtable.h | 9 ++++----- 2 files changed, 11 insertions(+), 17 deletions(-) commit 0b291635fce2bda983e1d2865a8bb5f46a8382bf Author: Vineet Gupta Date: Fri Dec 18 17:32:49 2015 +0530 ARC: [plat-nsim] document ranges Signed-off-by: Vineet Gupta arch/arc/boot/dts/nsim_hs.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 20d780374c81cf237834af2202c26df2100ddd69 Author: Vineet Gupta Date: Thu Feb 25 22:04:38 2016 +0530 ARC: build: Better way to detect ISA compatible toolchain ARC architecture has 2 instruction sets: ARCompact/ARCv2. While same gcc supports compiling for either (using appropriate toggles), we can't use the same toolchain to build kernel because libgcc needs to be unique and the toolchian (uClibc based) is not multilibed. uClibc toolchain is convenient since it allows all userspace and kernel to be built with a single install for an ISA. This however means 2 gnu installs (with same triplet prefix) are needed for building for 2 ISA and need to be in PATH. As developers we keep switching the builds, but would occassionally fail to update the PATH leading to usage of wrong tools. And this would only show up at the end of kernel build when linking incompatible libgcc. So the initial solution was to have gcc define a special preprocessor macro DEFAULT_CPU_xxx which is unique for default toolchain configuration. Claudiu proposed using grep for an existing preprocessor macro which is again uniquely defined per ISA. Cc: Michal Marek Suggested-by: Claudiu Zissulescu Signed-off-by: Vineet Gupta arch/arc/Makefile | 14 ++++++++++++++ arch/arc/include/asm/arcregs.h | 6 ------ 2 files changed, 14 insertions(+), 6 deletions(-) commit 2df122bdebaba1daad3a8087b89a5e3456474538 Author: James Simmons Date: Fri Mar 11 20:29:51 2016 -0500 staging: lustre: fix aligments in lnet selftest Some aligment issues were not caught by checkpatch. We address them here. Some of the alignment issues caused greater than 80 character checkpatch issues. Some changes were done to just make the code more readable and to match our production code. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conctl.c | 10 +++++----- drivers/staging/lustre/lnet/selftest/conrpc.c | 11 +++++------ drivers/staging/lustre/lnet/selftest/console.c | 7 ++++--- drivers/staging/lustre/lnet/selftest/framework.c | 5 ++--- drivers/staging/lustre/lnet/selftest/module.c | 3 +-- 5 files changed, 17 insertions(+), 19 deletions(-) commit d7fc52bdf2e09e21daab2a8a4986b6c09260d3ae Author: James Simmons Date: Fri Mar 11 20:29:50 2016 -0500 staging: lustre: report minimum of two buffers for LNet selftest load test The minimum number reserve buffer for lnet selftest load test is two not one. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/framework.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a41340a41597cc136f4f062e36a2c8f37ea8404 Author: James Simmons Date: Fri Mar 11 20:29:49 2016 -0500 staging: lustre: test for proper errno code in lstcon_rpc_trans_abort The error value returned will be -ETIMEDOUT not ETIMEDOUT. This fixes a typo that prevents us from handling the error case. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b794d796b45907a82c3541d64dc3947039f1d15e Author: James Simmons Date: Fri Mar 11 20:29:47 2016 -0500 staging: lustre: filter remaining extra spacing for lnet selftest This patch is a result of a filter applied to the lnet selftest code to remove the last bits of hidden white spaces. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 6 +- drivers/staging/lustre/lnet/selftest/conctl.c | 10 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 58 +++--- drivers/staging/lustre/lnet/selftest/console.c | 8 +- drivers/staging/lustre/lnet/selftest/console.h | 116 +++++------ drivers/staging/lustre/lnet/selftest/framework.c | 86 ++++---- drivers/staging/lustre/lnet/selftest/module.c | 2 +- drivers/staging/lustre/lnet/selftest/ping_test.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 10 +- drivers/staging/lustre/lnet/selftest/rpc.h | 178 ++++++++-------- drivers/staging/lustre/lnet/selftest/selftest.h | 250 +++++++++++------------ drivers/staging/lustre/lnet/selftest/timer.c | 8 +- drivers/staging/lustre/lnet/selftest/timer.h | 6 +- 13 files changed, 370 insertions(+), 370 deletions(-) commit ec436b9a08858e566f00e0bba717020812ecd6c0 Author: James Simmons Date: Fri Mar 11 20:29:46 2016 -0500 staging: lustre: remove extra spacing when setting variable for lnet selftest Remove any extra spacing for the lines of code setting variables to some value. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 40 ++++++------ drivers/staging/lustre/lnet/selftest/conrpc.c | 68 ++++++++++----------- drivers/staging/lustre/lnet/selftest/console.c | 78 ++++++++++++------------ drivers/staging/lustre/lnet/selftest/framework.c | 60 +++++++++--------- drivers/staging/lustre/lnet/selftest/ping_test.c | 14 ++--- drivers/staging/lustre/lnet/selftest/rpc.c | 68 ++++++++++----------- drivers/staging/lustre/lnet/selftest/selftest.h | 20 +++--- 7 files changed, 174 insertions(+), 174 deletions(-) commit 00b5fdb7453c1843e299733530a2301916df271a Author: James Simmons Date: Fri Mar 11 20:29:45 2016 -0500 staging: lustre: remove extra spacing of variable declartions for lnet selftest Remove any extra spacing such as "int rc" to "int rc" to match the proper kernel style Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 28 ++++++++--------- drivers/staging/lustre/lnet/selftest/conctl.c | 36 ++++++++++----------- drivers/staging/lustre/lnet/selftest/conrpc.c | 40 ++++++++++++------------ drivers/staging/lustre/lnet/selftest/console.c | 30 +++++++++--------- drivers/staging/lustre/lnet/selftest/ping_test.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 8 ++--- 6 files changed, 72 insertions(+), 72 deletions(-) commit d47e33e8c8377fe1832a98fcc19cf569d52a463a Author: James Simmons Date: Fri Mar 11 20:29:44 2016 -0500 staging: lustre: fix spacing issues checkpatch reported in lnet selftest Remove any extra spacing as reported by checkpatch. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 6 +++--- drivers/staging/lustre/lnet/selftest/console.c | 6 +++--- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- drivers/staging/lustre/lnet/selftest/timer.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 8a2c23068e2a825856c399425a37293611f9a617 Author: James Simmons Date: Fri Mar 11 20:29:43 2016 -0500 staging: lustre: remove returns in void function for lnet selftest No reason to have returns at end of void function. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/brw_test.c | 9 +++------ drivers/staging/lustre/lnet/selftest/conrpc.c | 6 ------ drivers/staging/lustre/lnet/selftest/framework.c | 14 -------------- drivers/staging/lustre/lnet/selftest/ping_test.c | 1 - drivers/staging/lustre/lnet/selftest/rpc.c | 8 -------- drivers/staging/lustre/lnet/selftest/selftest.h | 3 --- 6 files changed, 3 insertions(+), 38 deletions(-) commit c27d0a081f250096953651c6fb109d582307c299 Author: Isaac Huang Date: Fri Mar 11 20:29:42 2016 -0500 staging: lustre: fix bogus lst errors for lnet selftest It should not be counted as errors if a test RPC has been stopped due to administrative actions, e.g. lst end_session from the remote test console. Signed-off-by: Isaac Huang Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4181 Reviewed-on: http://review.whamcloud.com/13279 Reviewed-by: Amir Shehata Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/rpc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0b204161eecf813e13a3ee169b1e21dfe9d9ed35 Author: G Pooja Shamili Date: Sat Mar 12 05:22:02 2016 +0530 staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_err occurances are replaced with dev_err function calls Signed-off-by: G Pooja Shamili Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8d4cd9c8e2596e28cb9e13e2e20a493cb082283a Author: G Pooja Shamili Date: Sat Mar 12 05:28:54 2016 +0530 staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_info occurances are replaced with dev_info function calls. This was done using Coccinelle, the patch being: @@ expression E1,E2; expression list args; @@ E1 = devm_kzalloc(E2, ...); <... - pr_info( + dev_info(E2, args); ...> Signed-off-by: G Pooja Shamili Signed-off-by: Greg Kroah-Hartman drivers/staging/mt29f_spinand/mt29f_spinand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f75baf8d90bf45221694a1a5f0e5acdcb3245760 Author: Greg Kroah-Hartman Date: Fri Mar 11 14:43:06 2016 -0800 staging: android: ion: fix up file mode An older accidentally changed this to executable, so fix it back up. Gotta love windows editors... Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 3b0ae7bee0777699eb066e8668d8a25d9215d38d Author: Derek Yerger Date: Fri Mar 11 17:31:18 2016 -0500 staging: ion: debugfs invalid gfp mask The current code attempts assignment of -1 to an unsigned type. Note that in a downstream function ion_page_pool_shrink this mask is only ever evaluated against __GFP_HIGHMEM (drivers/staging/android/ion/ion_page_pool.c, line 125). Signed-off-by: Derek Yerger Reviewed-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80f10bcc7f8c0ca4bc0ef61bdc001ec11d5991f9 Author: Amitoj Kaur Chawla Date: Sat Mar 12 02:06:24 2016 +0530 staging: rts5208: Replace pci_enable_device with pcim_enable_device Devm_ functions allocate memory that is automatically freed when a driver detaches. Replace pci_enable_device with pcim_enable_device. Remove unnecessary pci_disable_device and pci_release_regions from probe and remove functions in rts5208 driver since pcim_enable_device contains a call to pcim_release which contains calls to both pci_disable_device and pci_release_regions. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 56c4a79958ebe7fc476f03a31589863813e4dd89 Author: Sandhya Bankar Date: Sun Mar 6 16:19:28 2016 +0530 Staging: ieee80211: Place constant on right side of the test. Place constant on right side of the test. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c943e13bd2bf4c344c3fe43ef39f07b57eff715e Author: Amitoj Kaur Chawla Date: Sun Mar 6 06:45:07 2016 +0530 staging: speakup: Replace del_timer with del_timer_sync Use del_timer_sync to ensure timer is stopped on all CPUs before the driver exists and the timer should not run when the module is being removed. Since the timer is not called from an interrupt context, this change is safe and will not cause deadlock. The Coccinelle semantic patch used to make this change is as follows: // @r@ declarer name module_exit; identifier ex; @@ module_exit(ex); @@ identifier r.ex; @@ ex(...) { <... - del_timer + del_timer_sync (...) ...> } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b33061fbcdb959a5cee024b052b6a64d7ccd0654 Author: Sandeep Jain Date: Mon Feb 29 18:48:30 2016 +0530 staging: lowmemorykiller: fix 2 checks that checkpatch complained Specifically: lowmemorykiller.c:53: CHECK: use a blank line after enum declarations lowmemorykiller.c:60: CHECK: use a blank line after enum declarations Signed-off-by: Sandeep Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/android/lowmemorykiller.c | 2 ++ 1 file changed, 2 insertions(+) commit 9842729cfcdc4836ecc786ee5b943950b872868d Author: Janani Ravichandran Date: Thu Feb 25 14:51:06 2016 -0500 staging: mt29f_spinand: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 437b29d1159af16b54b6571efb92c6e048d03c15 Author: Amitoj Kaur Chawla Date: Fri Mar 4 22:45:00 2016 +0530 staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN mm.h contains a helper function PAGE_ALIGN which aligns the pointer to the page boundary instead of using ALIGN(expression, PAGE_SIZE) This change was made with the help of the following Coccinelle semantic patch: // @@ expression e; symbol PAGE_SIZE; @@ ( - ALIGN(e, PAGE_SIZE) + PAGE_ALIGN(e) | - IS_ALIGNED(e, PAGE_SIZE) + PAGE_ALIGNED(e) ) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/file_ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f53896608128f311b7c4982fa479ab7400be3164 Author: Amitoj Kaur Chawla Date: Fri Mar 4 22:40:17 2016 +0530 staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED mm.h contains a helper function PAGE_ALIGNED which tests whether an address is aligned to PAGE_SIZE instead of using IS_ALIGNED(expression, PAGE_SIZE) This change was made with the help of the following Coccinelle semantic patch: // @@ expression e; symbol PAGE_SIZE; @@ ( - ALIGN(e, PAGE_SIZE) + PAGE_ALIGN(e) | - IS_ALIGNED(e, PAGE_SIZE) + PAGE_ALIGNED(e) ) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 844499175518d2d847ec0ca9fc133e8e03f11101 Author: Amitoj Kaur Chawla Date: Fri Mar 4 22:30:43 2016 +0530 staging: rdma: hfi1: Replace ALIGN with PAGE_ALIGN mm.h contains a helper function PAGE_ALIGN which aligns the pointer to the page boundary instead of using ALIGN(expression, PAGE_SIZE) This change was made with the help of the following Coccinelle semantic patch: // @@ expression e; symbol PAGE_SIZE; @@ ( - ALIGN(e, PAGE_SIZE) + PAGE_ALIGN(e) | - IS_ALIGNED(e, PAGE_SIZE) + PAGE_ALIGNED(e) ) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/init.c | 8 ++++---- drivers/staging/rdma/hfi1/user_sdma.c | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) commit c754db403d740827e49f5f9dedd9594ff55ccbe7 Author: Bhumika Goyal Date: Fri Feb 26 15:34:31 2016 +0530 Staging: rdma: Use min macro instead of ternary operator This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/pio_copy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 16ccad0475796c0acc084a51a49c9a86051586db Author: Janani Ravichandran Date: Thu Feb 25 15:08:17 2016 -0500 staging: rdma: hfi1: user_sdma.c: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/user_sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acc17d671c6282bd720b234fd59830cd2fa012a4 Author: Bhaktipriya Shridhar Date: Thu Feb 25 18:54:44 2016 +0530 staging: rdma: hfi1: Remove unnecessary parantheses Removed parantheses on the right hand side of assignments as they are not needed. Coccinelle patch used: @@ expression a, b; @@ a = & -( b -) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/mad.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a4fe1bc16411c4d3f8cbc0dbecb7b5dff80cd143 Author: Bhaktipriya Shridhar Date: Thu Feb 25 18:54:03 2016 +0530 staging: rdma: hfi1: Remove casts of pointer to same type Casting a pointer to a pointer of the same type is unnecessary, so remove these unnecessary casts. This was done with Coccinelle: @@ type T; T *ptr; @@ - (T *)ptr + ptr Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/mad.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6d210eef1b31b02ebec37a2ced6e73a1f94aacf1 Author: Bhaktipriya Shridhar Date: Thu Feb 25 17:22:11 2016 +0530 staging: rdma: hfi1: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/chip.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c8843b1f1d134f3e14cd357a74c2d1de52ccf884 Author: Amitoj Kaur Chawla Date: Thu Feb 25 11:08:09 2016 +0530 staging: rdma: hfi1: Remove unnecessary pci_set_drvdata() Unnecessary pci_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: // @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/pcie.c | 2 -- 1 file changed, 2 deletions(-) commit 037f741673e0822adcb2bd3bcbd692a148da756a Author: Janani Ravichandran Date: Tue Feb 23 20:06:12 2016 -0500 staging: rdma: hfi1: Do not use | with a variable with value 0 mr->lkey has a value equal to 0. There is no need to combine it with other things with | as for any value x, 0|x is always x. Semantic patch used: @@ expression x, e, e1; statement S; @@ if (x == 0) { ... when != x = e1 when != while(...) S when != for(...;...;...) S ( * x |= e | * x | e ) ... when any } Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e43d4d255588360d5cf7a2113babd9d9d34465e Author: Bhaktipriya Shridhar Date: Mon Feb 22 22:33:34 2016 +0530 staging: rdma: hfi1: Compress return logic Simplified function return by merging assignment and return into one line. Found with Coccinelle. @@ expression e; local idexpression ret; @@ - ret = + return e; - return ret; @@ type T; identifier x; @@ - T x; ... when != x Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/user_pages.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d34491679d7c583a1d3bddfc1d8a7b2f72dd2ad7 Author: Amitoj Kaur Chawla Date: Mon Feb 22 22:13:39 2016 +0530 staging: rdma: hfi1: Remove unnecessary kfree Remove an unnecessary kfree since rcd->opstats's value must be NULL for the code to execute `bail` label. This fixes the following smatch warning: drivers/staging/rdma/hfi1/init.c:335 hfi1_create_ctxtdata() warn: calling kfree() when 'rcd->opstats' is always NULL. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/init.c | 1 - 1 file changed, 1 deletion(-) commit e1af35bc7942483294e7f3cec818b64a66726853 Author: Bhaktipriya Shridhar Date: Mon Feb 22 13:29:20 2016 +0530 staging: rdma: hfi1: 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. This was done with Coccinelle. @@ expression e1, e2, e3; type T; @@ - init_timer(&e1); ... ( - e1.function = e2; ... - e1.data = (T)e3; + setup_timer(&e1, e2, (T)e3); | - e1.data = (T)e3; ... - e1.function = e2; + setup_timer(&e1, e2, (T)e3); | - e1.function = e2; + setup_timer(&e1, e2, 0); ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rdma/hfi1/verbs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 995ae68c30a5d4947f7685f29b1e69b436ddcdb3 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:41:38 2016 +0530 staging: lustre: lnet: o2iblnd: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2aff15d43a832cd0af0263e4456e5b01e15f86c6 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:40:42 2016 +0530 staging: lustre: lnet: socklnd: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1edae04ff85fe65a333949de6101578c015a21fa Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:39:28 2016 +0530 staging: lustre: lnet: socklnd_proto: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74cb7e3f65044ac6038874ffff9abde6d8c926a5 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:38:37 2016 +0530 staging: lustre: libcfs: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/workitem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4a81ce53a61c72afb079c096599a5d34749b9dd7 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:37:35 2016 +0530 staging: lustre: osc_cache: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 8adddc36b1fc4a71f3172585e1c71b88c0740a5c Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:36:51 2016 +0530 staging: lustre: osc: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_page.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c997866cd27495ae28bc07596457e2bd83fb3275 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:35:29 2016 +0530 staging: lustre: lnet: api-ni: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/api-ni.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3e47a1cfba5a8af7dc3c10a4705d8047abdc26c3 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:33:46 2016 +0530 staging: lustre: lnet: peer: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/peer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb734cf73eaed9b9bb7f190cceaafc15af0d8815 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:33:03 2016 +0530 staging: lustre: lnet: config: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/config.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 37cce1bcb750ac12773f1c53afe88a8433f53eb3 Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:32:13 2016 +0530 staging: lustre: lnet: router: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a9a6cb4f4693253349358f8163d826eb0cfecfbc Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:31:20 2016 +0530 staging: lustre: lnet: conrpc: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conrpc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 24f695909440b79b04bb75205384c9772e4c7d0a Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:30:15 2016 +0530 staging: lustre: lnet: lib-move: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-move.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6069f756d42160e454f49286183712514db3ca6b Author: Bhaktipriya Shridhar Date: Sat Mar 12 01:29:21 2016 +0530 staging: lustre: obdclass: Use list_for_each_entry_safe Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro. This makes the iteration simpler and more readable. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. This was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 09971adc33bf49a31b16c84e05f525769e08cc60 Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:41:53 2016 +0530 staging: iio: addac: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/addac/adt7316.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 0d9363c5f7fa99e25a9adbd52c078bdd3f221314 Author: Georgiana Chelu Date: Mon Mar 7 10:31:54 2016 +0200 Staging: iio: Fixed block comments warning Fixed the following warning: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/accel/lis3l02dq.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 63ac41f5d81bfc4f2035ce780581d1f0dbf9b934 Author: Sandhya Bankar Date: Sun Mar 6 18:51:55 2016 +0530 Staging: iio: ade7854: Remove unnecessary goto. Remove unnecessary goto. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7854.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3949d9292a5d880c249f1d7f0f83cd6aad20b42f Author: Sandhya Bankar Date: Sun Mar 6 18:48:47 2016 +0530 Staging: iio: ade7758_core: Remove unnecessary goto. Remove unnecessary goto. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7758_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 78731a01f4d2eea5887f8302b7525919d41151f8 Author: Sandhya Bankar Date: Sun Mar 6 18:44:59 2016 +0530 Staging: iio: ade7754: Remove unnecessary goto. Remove unnecessary goto. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7754.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 09b9da3399c8fee4ec7fc393b2d1aeaef4607caf Author: Amitoj Kaur Chawla Date: Mon Feb 29 13:03:46 2016 +0530 staging: iio: adc: Replace of_iomap() with devm_ioremap_resource() The adc driver uses of_iomap() which doesn't request the resource and isn't device managed so error handling is needed. of_iomap() is mainly used in cases where there is no driver or struct device so a switch to devm_ functions is required. This patch switches to use devm_ioremap_resource() instead which automatically requests the resource and is freed when the driver detaches. Removed the error handling to unmap I/O registers i.e. iounmap() in probe and remove functions of this driver and consequently removed an unnecessary label. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/adc/spear_adc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit a04b4e5005d95d80248fdec66180cbb9f020afea Author: Alison Schofield Date: Sun Feb 28 00:22:50 2016 -0800 staging: iio: ade7854: use devm_iio_device_register Replace iio_device_register with the device managed version. This change is safe because it does not change the order of any device removal actions. Unregistering the device was the only removal action. The newly emptied .remove functions are deleted. Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/meter/ade7854-i2c.c | 6 ------ drivers/staging/iio/meter/ade7854-spi.c | 7 ------- drivers/staging/iio/meter/ade7854.c | 20 ++------------------ 3 files changed, 2 insertions(+), 31 deletions(-) commit 8f27f7323f064e0e847d8b97565499da53d485b5 Author: Alison Schofield Date: Tue Feb 23 22:18:50 2016 -0800 staging: iio: adt7316: remove useless initialization Remove the initialization of a variable that is immediately reassigned. Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/addac/adt7316-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3f9555202bf5ad646575483fe81bb1c541e4ecc Author: Alison Schofield Date: Tue Feb 23 22:18:01 2016 -0800 staging: iio: light: tsl2x7x: remove useless initialization Remove the initialization of a variable that is immediately reassigned. Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 887d2198ac683dabe17946bdb7dda2d5d30ee01e Author: Bhumika Goyal Date: Fri Mar 11 12:28:50 2016 +0530 Staging: rtl8723au: Remove unused functions and prototype The functions rtw_ap_inform_ch_switch23a, rtw_acl_remove_sta23a and rtw_acl_add_sta23a are not used anywhere in the kernel. So remove their definition and prototype. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_ap.c | 115 ----------------------------- drivers/staging/rtl8723au/include/rtw_ap.h | 3 - 2 files changed, 118 deletions(-) commit 7a90b826cdf267573f93bae27090fa750fa6708b Author: Bhumika Goyal Date: Fri Mar 11 12:28:51 2016 +0530 taging: rtl8723au: Remove empty function odm_Init_RSSIForDM23a The function odm_Init_RSSIForDM23a is empty and therefore there is no use of keeping it. Also, remove its prototype. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/odm_HWConfig.c | 4 ---- drivers/staging/rtl8723au/include/odm_HWConfig.h | 2 -- 2 files changed, 6 deletions(-) commit d9209cb8f1133254f168cf0814cd07360263fc9c Author: Bhaktipriya Shridhar Date: Thu Mar 10 23:31:22 2016 +0530 staging: rtl8723au: hal: Remove unnecessary function and its call The function odm_DynamicBBPowerSaving23a on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, odm_DynamicBBPowerSaving23a and its calls have been removed. This was done using Coccinelle. @@ identifier f; @@ void f(...) { -return; } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/odm.c | 6 ------ 1 file changed, 6 deletions(-) commit 3deba0bcd818769eab2c108808543b863a2c671f Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:30:07 2016 +0530 staging: rtl8723au: core: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_efuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c2f78f4fc63b3f971ea5a4c4885f4f820bb6e69 Author: Bhaktipriya Shridhar Date: Tue Mar 8 23:28:13 2016 +0530 staging: rtl8723au: hal: Use macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/usb_halinit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0cd8f4396e3204cff40208221a92cd6322d2b721 Author: Bhaktipriya Shridhar Date: Sun Mar 6 02:49:46 2016 +0530 staging: rtl8723au: core: rtw_security: Change form of NULL comparisons Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b747a1e936b614afd4a5ba5b51ae8d00ea53de2c Author: Bhaktipriya Shridhar Date: Sun Mar 6 02:47:23 2016 +0530 staging: rtl8723au: core: rtw_sta_mgt: Change form of NULL comparisons Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d31770b32fb40f6087ca9ae7139fedd0d0a27771 Author: Cihangir Akturk Date: Fri Mar 4 15:43:10 2016 +0200 drivers: staging: rtl8723au: remove unneeded null test null test on pnetwork removed, because the iterator variable list_for_each_entry_safe cannot be null. This commit fixes the following error reported by coccinelle: drivers/staging/rtl8723au/core/rtw_mlme.c:1621:7-15: ERROR: iterator variable bound on line 1620 cannot be NULL Signed-off-by: Cihangir Akturk Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_mlme.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 67ea154073bc3ecfdce58654b103363420ac9403 Author: Bhaktipriya Shridhar Date: Tue Mar 1 23:03:30 2016 +0530 staging: rtl8723au: hal: Remove Unused macro PlatformIndicateBTACLData is an unused macro. Hence, removed. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 -- 1 file changed, 2 deletions(-) commit 400a30dd991bd9aa16cd6f77e163bf96314f9262 Author: Geliang Tang Date: Tue Mar 1 23:22:23 2016 +0800 staging: rtl8723au: fix static checker warning Fix the following static checker warning: drivers/staging/rtl8723au/core/rtw_sta_mgt.c:365 rtw_get_stainfo23a() error: potential NULL dereference 'psta'. Fixes: e280d71("staging: rtl8723au: use list_for_each_entry*()") Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c15cc49810fe2547cbf3ac58f6939f0f69a6c1c5 Author: Bhumika Goyal Date: Sun Feb 28 22:55:29 2016 +0530 Staging: rtl8723au: Remove print statements and debug messages The memory allocation functions generates a call stack containing all the context information on failure, so print statements and debug messages can be removed on failure of these functions. Also remove unwanted {} around if block after removal of these messages. Done using coccinelle: @@ expression e; @@ e=\(kmalloc\|kmalloc\|kmalloc_array\|alloc_netdev\|kzalloc\| devm_kzalloc\|devm_ioremap\)(...); ... if(!e){ - \(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/usb_ops_linux.c | 6 +----- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) commit b32f6fdc9b82296c22d0bd0896f11643fb3e0cd5 Author: Janani Ravichandran Date: Sun Feb 28 13:39:13 2016 -0500 staging: rtl8723au: Eliminate commented out code Reduce code clutter by removing commented out code. Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_recv.c | 50 ------------------------------- 1 file changed, 50 deletions(-) commit 4b25ce977e43f55f88df30a4d338b63bb597fdef Author: Bhumika Goyal Date: Fri Feb 26 15:34:30 2016 +0530 Staging: rtl8723au: Use min macro instead of ternary operator This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 37491cd6fcf6474262fbff9c10208a8105573abf Author: Janani Ravichandran Date: Thu Feb 25 14:02:56 2016 -0500 staging: rtl8723au: core: Remove CamelCase Remove CamelCase on the variable FunctionContext. Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17002df772f487ba814b3936dbbeb00e39cfb03a Author: Janani Ravichandran Date: Thu Feb 25 14:01:40 2016 -0500 staging: rtl8723au: core: Drop unneeded pointer cast Void pointers don't need to be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 454b0ec8bf992b35895eb86a4b62ec3ba7be190c Author: Bhumika Goyal Date: Fri Mar 4 19:15:55 2016 +0530 Staging: fsl-mc: Replace pr_err with dev_err This patch replaces pr_err calls with dev_err when the device structure is available as dev_* prints identifying information about the struct device. Done using coccinelle: @r exists@ identifier f, s; identifier x; position p; @@ f(...,struct s *x,...) { <+... when != x == NULL \(pr_err@p\|pr_debug@p\|pr_info\)(...); ...+> } @r2@ identifier fld2; identifier r.s; @@ struct s { ... struct device *fld2; ... }; @@ identifier r.x,r2.fld2; position r.p; @@ ( -pr_err@p +dev_err ( + &x->fld2, ...) | - pr_debug@p + dev_dbg ( + &x->fld2, ...) | - pr_info@p + dev_info ( + &x->fld2, ...) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/mc-bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit de71daf5c839b3b3cc8a5b09b4a00107817868de Author: Bhumika Goyal Date: Fri Mar 4 19:14:52 2016 +0530 Staging: fsl-mc: Replace pr_debug with dev_dbg This patch replaces pr_debug calls with dev_dbg when the device structure is available as dev_* prints identifying information about the struct device. Done using coccinelle: @r exists@ identifier f, s; identifier x; position p; @@ f(...,struct s *x,...) { <+... when != x == NULL \(pr_err@p\|pr_debug@p\|pr_info\)(...); ...+> } @r2@ identifier fld2; identifier r.s; @@ struct s { ... struct device *fld2; ... }; @@ identifier r.x,r2.fld2; position r.p; @@ ( -pr_err@p +dev_err ( + &x->fld2, ...) | - pr_debug@p + dev_dbg ( + &x->fld2, ...) | - pr_info@p + dev_info ( + &x->fld2, ...) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/mc-sys.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit eb66b2d301033e33c29fedffc6a317003d1e632c Author: Bhaktipriya Shridhar Date: Sun Feb 28 23:58:05 2016 +0530 staging: fsl-mc: bus: Eliminate double function call A call to irq_find_matching_host was already made and the result has been stored in mc_msi_domain. mc_msi_domain is again reassigned using the same function call which is redundant. irq_find_matching_host returns/locates a domain for a given fwnode. The domain is identified using device node and bus_token(if several domains have same device node but different purposes they can be distinguished using bus-specific token). http://www.bricktou.com/include/linux/irqdomain_irq_find_matching_host_en.html Also, of_property_read_bool finds and reads a boolean from a property device node from which the property value is to be read. It doesn't alter the device node. http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/083698.html Since, both the function calls have the same device node and bus_token, the return values shall be the same. Hence, the second call has been removed. This was done using Coccinelle: @r@ idexpression *x; identifier f; position p1,p2; @@ x@p1 = f(...) ... when != x ( x@p2 = f(...) ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].line == p2[0].line): cocci.include_match(False) @@ idexpression *x; identifier f; position r.p1,r.p2; @@ *x@p1 = f(...) ... *x@p2 = f(...) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 -- 1 file changed, 2 deletions(-) commit 36b64670fae87abd190f2896de24277c6c8ae8ac Author: Janani Ravichandran Date: Thu Feb 25 14:46:11 2016 -0500 staging: fsl-mc: Drop unneeded void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0ece6c383f84e0c408347cdb59456017a2f9e27 Author: Bhumika Goyal Date: Fri Mar 11 19:33:05 2016 +0530 Staging: android: ashmem.c: Convert macros page_range_{subsumes/subsumed_by/in}_range to static inline function Convert macros page_range_{subsumes/subsumed_by/in}_range to static inline function as static inline functions are preferred over macros. The change can be done as the arguments at all call sites have the same type. Also, all three macro have same type of arguments and return values so they can converted using a common semantic patch. @r@ identifier f; expression e; @@ #define f(...) e @r2@ identifier r.f; identifier range,start,end; expression r.e; @@ - #define f(range,start,end) e + static inline int f(struct ashmem_range *range, size_t start, size_t end) +{ + return e; +} Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit e2a83f328f55b12b896c1467631ca414ac22980f Author: Bhumika Goyal Date: Fri Mar 11 19:33:04 2016 +0530 Staging: android: ashmem.c: Redefine macros as static inline functions Convert macros page_in_range and range_before_page into static inline functions as static inline functions are preferred over macros. The change can be done as the arguments at all call sites have the same type. Also, both the macros have same type of arguments and return values. Done using coccinelle: @r@ identifier f; expression e; @@ #define f(...) e @r1@ identifier r.f; identifier range,page; expression r.e; @@ - #define f(range,page) e + static inline int f(struct ashmem_range *range, size_t page) + { + return e; + } Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0103fe20a7dd343c43bec6215e01cd6bedddd5eb Author: Amitoj Kaur Chawla Date: Thu Feb 25 20:21:20 2016 +0530 staging: android: Use devm_kcalloc instead of devm_kzalloc Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof. The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E2,E3; @@ - devm_kzalloc(dev,E1*sizeof(E2),E3) + devm_kcalloc(dev,E1,sizeof(E2),E3) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/android/timed_gpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9f1c427d8093a97f356612c933f12f3b9f0bc9de Author: Amitoj Kaur Chawla Date: Thu Feb 25 08:18:52 2016 +0530 staging: android: Replace min_t/max_t with min/max Replace min_t/max_t with min/max when both variables are of the same type. The Coccinelle semantic patch used to make this change is as follows: @@ type T; T a,b; @@ - min_t(T, a, b) + min(a, b) @@ type T; T a,b; @@ - max_t(T, a, b) + max(a, b) Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcce1c7c083d80a8230270eb264c90a8d767131f Author: Amitoj Kaur Chawla Date: Thu Feb 25 19:52:27 2016 +0530 staging: android: ion: tegra: Replace IS_ERR_OR_NULL with IS_ERR Replace IS_ERR_OR_NULL test with an IS_ERR test since ion_device_create() function returns a valid device or a -PTR_ERR only as evidenced by the comment on the function prototype. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/tegra/tegra_ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0969e3d46b7cae0d52ba14e8901105d3cb421eb1 Author: Amitoj Kaur Chawla Date: Thu Feb 25 19:25:04 2016 +0530 staging: android: ion: tegra: Use devm_kcalloc instead of devm_kzalloc Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof. The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E3; type T; @@ - devm_kzalloc(dev,E1*sizeof(T),E3) + devm_kcalloc(dev,E1,sizeof(T),E3) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/tegra/tegra_ion.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dd28473385e78f94456fc66bd05c9d6db3febe13 Author: Bhaktipriya Shridhar Date: Thu Feb 25 17:24:17 2016 +0530 staging: android: ion: hisilicon: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/hisilicon/hi6220_ion.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c1586b52ee509658265e44dc2395635edee3848a Author: Ben Marsh Date: Wed Feb 24 13:42:18 2016 +0100 Staging: android: change memory allocation style in ion_carveout_heap.c This is a patch for ion_carveout_heap.c that changes the memory allocation style in order to remove a checkpatch.pl warning. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_carveout_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5821a33b9bbdab3ba62bddc562be9eff6ba3b1dc Author: Ben Marsh Date: Wed Feb 24 13:35:50 2016 +0100 Staging: Android: align code with open parenthesis in ion_carveout_heap.c This is a patch to ion_carveout_heap.c that alligns code with open parenthesis to remove a checkpatch.pl warning. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_carveout_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c328cbd84b1ab442d951daa5ccf23e4f64b6b4a Author: Ben Marsh Date: Wed Feb 24 13:26:16 2016 +0100 Staging: Android: change memory allocation style in ion_carveout_heap.c This is a patch to ion_carveout_heap.c to change the memory allocation style in order to remove a checkpatch.pl warning. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_carveout_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 Author: EunTaik Lee Date: Wed Feb 24 04:38:06 2016 +0000 staging/android/ion : fix a race condition in the ion driver There is a use-after-free problem in the ion driver. This is caused by a race condition in the ion_ioctl() function. A handle has ref count of 1 and two tasks on different cpus calls ION_IOC_FREE simultaneously. cpu 0 cpu 1 ------------------------------------------------------- ion_handle_get_by_id() (ref == 2) ion_handle_get_by_id() (ref == 3) ion_free() (ref == 2) ion_handle_put() (ref == 1) ion_free() (ref == 0 so ion_handle_destroy() is called and the handle is freed.) ion_handle_put() is called and it decreases the slub's next free pointer The problem is detected as an unaligned access in the spin lock functions since it uses load exclusive instruction. In some cases it corrupts the slub's free pointer which causes a mis-aligned access to the next free pointer.(kmalloc returns a pointer like ffffc0745b4580aa). And it causes lots of other hard-to-debug problems. This symptom is caused since the first member in the ion_handle structure is the reference count and the ion driver decrements the reference after it has been freed. To fix this problem client->lock mutex is extended to protect all the codes that uses the handle. Signed-off-by: Eun Taik Lee Reviewed-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 55 ++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 13 deletions(-) commit 5a20df724f712e9daa9fd41b430ff63ecd203e85 Author: Sandhya Bankar Date: Sun Mar 6 16:06:18 2016 +0530 Staging: emxx_udc: Return NULL instead of 0. Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04309886935f7ab64d72d0624bbc7f766ea40713 Author: Amitoj Kaur Chawla Date: Mon Mar 7 21:09:30 2016 +0530 staging: netlogic: Replace pr_* with netdev_* Replace generic pr_info and pr_err with netdev_info and netdev_err respectively for net devices. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ expression e; identifier f,i; position p; @@ f(...,struct net_device *i,...) { ... ( - pr_debug@p (e) + netdev_dbg(i, e) | - pr_err@p (e) + netdev_err(i, e) | - pr_info@p (e) + netdev_info(i, e) ) ... } @@ expression e; identifier f,i; position p; @@ f(...) { ... struct net_device *n; ... ( - pr_debug@p (e) + netdev_dbg(n, e) | - pr_err@p (e) + netdev_err(n, e) | - pr_info@p (e) + netdev_info(n, e) ) ... } @a@ identifier s,x; @@ struct s { ... struct net_device *x; ... }; @b depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f ( ..., struct s *i, ...) { ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } @c depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f (...) { ... struct s *i = ...; ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 62e259ed5474a18b377e38dbf694ab1adbbdd8d3 Author: Janani Ravichandran Date: Thu Feb 25 14:09:22 2016 -0500 staging: netlogic: Drop unneeded void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6725b058d02a2c84743635514684342cfaadd6b Author: Amitoj Kaur Chawla Date: Tue Feb 23 22:12:16 2016 +0530 staging: netlogic: Simplify use of devm_ioremap_resource Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. The Coccinelle semantic patch that makes this change is as follows: // @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 7 ------- 1 file changed, 7 deletions(-) commit 3765dc92cb1ce1615538216c7870fcfbc026c714 Author: Shraddha Barke Date: Sun Mar 6 00:55:31 2016 +0530 Staging: gdm72xx: Remove gdm72xx driver Remove support for gdm72xx driver from the kernel since Wimax is dead. [1] http://www.networkworld.com/article/2220370/4g/wimax-is-dead.html [2] http://www.androidcentral.com/sprint-confirms-wimax-shutdown-november-6-2015 Chrome OS can distribute this driver alongside their library. Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/gdm72xx/Kconfig | 63 --- drivers/staging/gdm72xx/Makefile | 6 - drivers/staging/gdm72xx/TODO | 2 - drivers/staging/gdm72xx/gdm_qos.c | 438 ------------------- drivers/staging/gdm72xx/gdm_qos.h | 74 ---- drivers/staging/gdm72xx/gdm_sdio.c | 700 ------------------------------- drivers/staging/gdm72xx/gdm_sdio.h | 63 --- drivers/staging/gdm72xx/gdm_usb.c | 788 ----------------------------------- drivers/staging/gdm72xx/gdm_usb.h | 78 ---- drivers/staging/gdm72xx/gdm_wimax.c | 808 ------------------------------------ drivers/staging/gdm72xx/gdm_wimax.h | 49 --- drivers/staging/gdm72xx/hci.h | 212 ---------- drivers/staging/gdm72xx/netlink_k.c | 156 ------- drivers/staging/gdm72xx/netlink_k.h | 25 -- drivers/staging/gdm72xx/sdio_boot.c | 158 ------- drivers/staging/gdm72xx/sdio_boot.h | 21 - drivers/staging/gdm72xx/usb_boot.c | 361 ---------------- drivers/staging/gdm72xx/usb_boot.h | 22 - drivers/staging/gdm72xx/usb_ids.h | 86 ---- drivers/staging/gdm72xx/wm_ioctl.h | 101 ----- 22 files changed, 4214 deletions(-) commit e0a2d503a96b97d6478c5b00f4d3e3446f7b95e8 Author: Joe Perches Date: Thu Mar 10 03:43:22 2016 -0800 staging: skein: threefish_block: Use rol64 Use the inline instead of direct code to improve readability and shorten the code a little. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/skein/threefish_block.c | 2145 ++++++++++++++++--------------- 1 file changed, 1073 insertions(+), 1072 deletions(-) commit 5ed316d27f942a729f3290a896c682ed299439bb Author: Ben Marsh Date: Fri Mar 11 20:40:40 2016 +0100 Staging: xgifb: remove useless blank lines This is a patch to XGI_main_26.c that removes useless blanklines as flagged by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 4 ---- 1 file changed, 4 deletions(-) commit c7437f342d19840cf468b23e5588634ad9bed12e Author: Rehas Sachdeva Date: Fri Feb 26 17:47:51 2016 +0530 staging: xgifb: Avoid multiple blank lines This patch removes the checkpatch.pl warnings regarding multiple blank lines as single blank line is the preferred coding style. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_def.h | 1 - drivers/staging/xgifb/vb_setmode.c | 1 - drivers/staging/xgifb/vb_struct.h | 2 -- drivers/staging/xgifb/vb_table.h | 3 --- 4 files changed, 7 deletions(-) commit 9512349356ddc729db6eb03bc91f20afe0a22625 Author: Sandhya Bankar Date: Mon Mar 7 17:52:37 2016 +0530 Staging: wlan-ng: Do not print message if kzalloc() failed. Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2sta.c | 1 - 1 file changed, 1 deletion(-) commit c631cb07b4ac6a6c513591a581ac92a7f99da9d1 Author: Sandhya Bankar Date: Mon Mar 7 16:15:59 2016 +0530 Staging: wlan-ng: Handle error condition. Handle error condition. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2fw.c | 4 ++++ 1 file changed, 4 insertions(+) commit e2e77528a7dc80a9b5ff978a84b40e403ba9809d Author: Eva Rachel Retuya Date: Sat Feb 27 20:39:25 2016 +0800 staging: wlan-ng: simplify NULL tests Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 14 +++++++------- drivers/staging/wlan-ng/prism2fw.c | 2 +- drivers/staging/wlan-ng/prism2usb.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 94889150a1a0173d4c369e272c3f46560a3f7898 Author: Janani Ravichandran Date: Thu Feb 25 14:33:59 2016 -0500 staging: wlan-ng: prism2sta.c: Drop unneeded void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2sta.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 3cfcb95c72cf165176ddf66693747a7a7918182c Author: Janani Ravichandran Date: Thu Feb 25 14:22:27 2016 -0500 staging: wlan-ng: prism2mgmt.c: Drop void pointer cast Void pointers don't need to be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e83b0ab5086c2a745237f1e6854d588305e8cfd Author: Janani Ravichandran Date: Thu Feb 25 14:17:50 2016 -0500 staging: wlan-ng: prism2mib.c: Drop void pointer cast Void pointers don't need to be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0440107039cea810238233c494e40029bf2f54e6 Author: Janani Ravichandran Date: Thu Feb 25 14:13:24 2016 -0500 staging: wlan-ng: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5850c251faab28a9f76260ae1566d9c5179d37ab Author: Amitoj Kaur Chawla Date: Wed Feb 24 21:55:49 2016 +0530 staging: wlan-ng: Remove unnecessary macro Remove unnecessary macro SUBMIT_URB by replacing it with a direct call to usb_submit_urb() This change was made with the help of the following Coccinelle semantic patch: // @@ identifier f,g; @@ * #define f(...) g(...) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bbbdc23e30b813d90d1cc9dd5caaaaf5e35b6878 Author: Eva Rachel Retuya Date: Wed Mar 2 22:23:46 2016 +0800 staging: gs_fpgaboot: drop wrapper function 'finish_driver' Remove the function 'finish_driver' since a direct call to platform_device_unregister() is intuitive enough to signify the original intention of the function being removed. Coccinelle semantic patch used to detect this: @@ identifier wrapper, func; type T; @@ *T wrapper(...) { ( return func(...); | func(...); ) } Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 18f038e6bfb715310526ac05e4f20e55683471de Author: Sudip Mukherjee Date: Sat Feb 27 17:33:35 2016 +0530 staging: dgnc: cleanup properly dgnc_cleanup_module() was called when the module unloaded to do a total cleanup and it was also called if pci_register_driver() fails. But dgnc_cleanup_module() will try dgnc_remove_driver_sysfiles() but the sysfiles will be created only if pci_register_driver() succeeds. So if pci_register_driver() fails and we try dgnc_cleanup_module() then we were getting: [ 942.001479] BUG: unable to handle kernel NULL pointer dereference at 00000018 [ 942.001482] IP: [] sysfs_remove_file_ns+0x8/0x20 with part of the call trace as: [ 942.001544] Call Trace: [ 942.001555] [] driver_remove_file+0x16/0x20 [ 942.001571] [] dgnc_remove_driver_sysfiles+0x18/0x40 [dgnc] [ 942.001575] [] dgnc_cleanup_module+0x47/0x260 [dgnc] [ 942.001577] [] ? 0xf86cb000 [ 942.001580] [] dgnc_init_module+0x1e6/0x1000 [dgnc] Lets have a separate cleanup function which will execute dgnc_remove_driver_sysfiles() depending on the argument passed to it. Reported-by: Navy Cheng Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit b3ca2e08e7dbec872458742b5a7d3b2b15826649 Author: Sudip Mukherjee Date: Sat Feb 27 17:33:34 2016 +0530 staging: dgnc: unregister pci driver We may choose to load the module without the hardware present. That will register the pci driver but since probe will not succeed so dgnc_NumBoards will be 0. Now if we unload the module then the pci driver stays registered as dgnc_NumBoards is 0. And if we try to load the module again it fails with the error: "Driver 'dgnc' is already registered." Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e9961fc16f9f11979df616b749d36cf389082047 Author: Sudip Mukherjee Date: Sat Feb 27 17:33:33 2016 +0530 staging: dgnc: remove pci_unregister_driver If pci_register_driver() fails then dgnc_NumBoards can never be more than zero. dgnc_NumBoards is incremented only at the end of a successful probe. And moreover if the pci driver has failed to register then we never need to unregister it. Lets just print the warning, perform the cleanup and exit with the error code. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 757b816e40235e03e1d90c7ec06dad7a684282f3 Author: Sudip Mukherjee Date: Sat Feb 27 17:33:32 2016 +0530 staging: dgnc: remove unneeded else If pci_enable_device() fails then we can return directly. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8d0d4cc5a46933fbce0f75fb085fefc8b45f23aa Author: Rehas Sachdeva Date: Fri Feb 26 21:29:41 2016 +0530 staging: dgnc: Break line after boolean operator The preferred way to break up long math lines is to break after an arthimetic or boolean operator. This patch fixes the checkpatch.pl warning: Logical continuations should be on the previous line. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e8d27f7d5063a0f5aef00f9eb3e213d12927717 Author: Rehas Sachdeva Date: Fri Feb 26 21:29:20 2016 +0530 staging: dgnc: Fix block comment style This patch fixes the block comment style. 1. The checkpatch.pl warning: Block comments use a trailing */ on a separate line. 2. '====' separator is unnecessary and should not be used. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 05b30f49996364b706b229639107c69d1eef4748 Author: Rehas Sachdeva Date: Fri Feb 26 21:27:16 2016 +0530 staging: dgnc: Avoid multiple blank lines This patch fixes the checkpatch.pl warnings regarding multiple blank lines as single blank line is the preferred coding style. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 8 -------- drivers/staging/dgnc/dgnc_neo.h | 1 - drivers/staging/dgnc/dgnc_pci.h | 1 - 3 files changed, 10 deletions(-) commit adcb56f92e83e826e75ef39eaebfb5a09b2848f7 Author: Rehas Sachdeva Date: Fri Feb 26 21:26:43 2016 +0530 staging: dgnc: Add spaces around '|' and '<<' One space on either side of binary and ternary operators is preferred. This patch fixes the related checkpatch.pl warnings. Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 12 ++++++------ drivers/staging/dgnc/digi.h | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 22 deletions(-) commit 0b7ceaa665d2ff938d6e42f41eee944926e180ee Author: Eva Rachel Retuya Date: Wed Feb 24 00:34:56 2016 +0800 staging: dgnc: delete parentheses around right hand side of assignment Eliminate unneeded parentheses around the right hand side of an assignment. Coccinelle semantic patch used: @@ expression e1, e2; identifier v; @@ ( v = (e1 == e2) | v = (e1 != e2) | v = (e1 <= e2) | v = (e1 >= e2) | v = - ( e1 - ) ) Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 2 +- drivers/staging/dgnc/dgnc_mgmt.c | 2 +- drivers/staging/dgnc/dgnc_neo.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 0c566659237c910696c5187fd3edb3e5ef085af7 Author: Amitoj Kaur Chawla Date: Tue Feb 23 01:52:33 2016 +0530 staging: vme: devices: Replace kzalloc with devm_kzalloc Devm_ functions allocate memory that is released when a driver detaches. Replace kzalloc with devm_kzalloc and remove corresponding kfrees from probe and remove functions of a platform device. Also, unnecessary labels have been removed. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_pio2_core.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 5084d7c66248394d3887805c7f13c5d274573bfd Author: Janani Ravichandran Date: Thu Feb 25 13:44:39 2016 -0500 staging: fbtft: fb_uc1611.c: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_uc1611.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 264cd1d1c23dfe9b758e3e454ea2db84226c4a79 Author: Janani Ravichandran Date: Thu Feb 25 13:39:55 2016 -0500 staging: fbtft: fb_ra8875.c: Remove unneeded void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64f93e17243c8f6fad0d2f5c18b72282b8139234 Author: Janani Ravichandran Date: Thu Feb 25 13:34:28 2016 -0500 staging: fbtft: fbtft-bus.c: Drop unneeded void pointer cast Remove unneeded cast on the void pointer par->txbuf.buf . Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c9ab986e2dc87bd7c87384afeddd1326570d03e Author: Amitoj Kaur Chawla Date: Thu Feb 25 18:50:58 2016 +0530 staging: fbtft: Use devm_kcalloc instead of devm_kzalloc Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E2,E3,E4; @@ - devm_kzalloc(dev,E1*E2*sizeof(E3),E4) + devm_kcalloc(dev,E1*E2,sizeof(E3),E4) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 71e03f10384c16887d5dd32c6b1e7006b09ec592 Author: Amitoj Kaur Chawla Date: Thu Feb 25 11:07:28 2016 +0530 staging: fbtft: Remove unnecessary spi_set_drvdata() Unnecessary spi_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: @@ struct spi_device *spi; @@ - spi_set_drvdata(spi, NULL); // Due to this removal, variable `spi` was unused so dropped `spi` Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 5 ----- 1 file changed, 5 deletions(-) commit 3589d3c9e39889fcac8fa0cb9f5bb3006d7d0d51 Author: Alison Schofield Date: Wed Feb 24 09:20:17 2016 -0800 staging: fbtft: replace ternary operator with min macro Use macro min() to get the minimum of two values for brevity and readability. Found using Coccinelle: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 2 +- drivers/staging/fbtft/fbtft-bus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7ce1b3d3caa712686eaf295a200718b93dcd57da Author: Bhaktipriya Shridhar Date: Mon Feb 22 23:17:16 2016 +0530 staging: fbtft: Use kmalloc_array Use kmalloc_array instead of kmalloc for arrays to prevent integer overflows. This was done using Coccinelle: @@ expression e1, e2; constant C; type t; @@ ( - kmalloc( + kmalloc_array( e2 - * + , sizeof(e1), C) | - kmalloc( + kmalloc_array( e1 - * + , sizeof(t), C) | - kmalloc( + kmalloc_array( - sizeof(e1) - * e2 + , + sizeof(e1) , C) | - kmalloc( + kmalloc_array( - sizeof(t) - * e1 + , + sizeof(t) , C) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_agm1264k-fl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0df8f51eed506737a8ff3431e32a79135432cc3d Author: Ben Marsh Date: Thu Mar 10 21:24:59 2016 +0100 Staging: nvec: removes an unnecessary cast on a void pointer Patch to nvec_ps2.c to remove an unnecessary cast on a void pointer. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d0ed1c425c71b6a87b1bace9a3b0f5efda9251 Author: Janani Ravichandran Date: Thu Feb 25 15:17:38 2016 -0500 staging: nvec: nvec.c: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 350698f6efe844f9f40bf47da7bbab75eba34c61 Author: Laura Garcia Liebana Date: Wed Feb 24 18:11:07 2016 +0100 staging: nvec: Avoid the use of BUG_ON Prevent a kernel panic by avoiding the use of the BUG_ON macro. Checkpatch detected this issue. The BUG_ON macro is not needed as such cases shouldn't happen and they were introduced for debugging purposes. Signed-off-by: Laura Garcia Liebana Acked-by: Marc Dietrich Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec.c | 2 -- 1 file changed, 2 deletions(-) commit aaa657312a6b483af870bd7b412a1467b7808725 Author: Laura Garcia Liebana Date: Mon Feb 22 18:51:23 2016 +0100 staging: nvec: Remove blank lines before a close brace Blank lines aren't necessary before a close brace '}'. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_paz00.c | 1 - 1 file changed, 1 deletion(-) commit 78a729ff16ebc35db143980d660a3df4b0e2792d Author: Bhumika Goyal Date: Fri Mar 11 15:53:56 2016 +0530 Staging: rtl8188eu: Remove function rtw_freq2ch Remove function rtw_freq2ch as it is never used anywhere in the kernel. Also, remove the function prototype. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_rf.c | 17 ----------------- drivers/staging/rtl8188eu/include/rtw_rf.h | 1 - 2 files changed, 18 deletions(-) commit eb8329c6b39db6bc52c43265fb0c41367d99a6d2 Author: Claudiu Beznea Date: Fri Mar 11 12:18:48 2016 +0200 Staging: rtl8188eu: removed unnecessary check in core/rtw_ap.c This patch removes unnecessary "if (true)" check in update_BCNTIM() from core/rtw_ap.c file. After this remove the code alignment was necessary. Signed-off-by: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 131 ++++++++++++++++---------------- 1 file changed, 64 insertions(+), 67 deletions(-) commit 61a95c8d71fa048704c8edcb97fb623b4dd82cae Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:24:07 2016 +0530 staging: rtl8188eu: os_dep: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/osdep_service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e59b76cfca78179f7a5a796cb2a51a73ce70a8d1 Author: Sandhya Bankar Date: Mon Mar 7 18:03:58 2016 +0530 Staging: rtl8188eu: Use !x instead of x==NULL. Use !x instead of x==NULL. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b08e0fc0d4f5457aae0936c0c891c916cf63b852 Author: Sandhya Bankar Date: Mon Mar 7 17:48:16 2016 +0530 Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed. Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d4ff4e2967634ebed4a52074768d5875c640fc4c Author: Sandhya Bankar Date: Mon Mar 7 17:41:41 2016 +0530 Staging: rtl8188eu: Do not print message if kzalloc() failed. Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7a1586353b97a1bc4a6aeb9fa6b0997911c99791 Author: Kyle Kuffermann Date: Sun Mar 6 10:47:15 2016 -0500 rtl8188eu: Add spaces around arithmetic operators This fixes the checkpatch.pl issue: CHECK: spaces preferred around that '+' Signed-off-by: Kyle Kuffermann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 88 +++++++++++++------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit 0f94b0afcd382cd9c5f274c5204362c8a9139ef8 Author: Ivan Safonov Date: Wed Mar 2 15:09:02 2016 +0700 staging: rtl8188eu: remove PWR_BASEADDR_* macro definitions and "base" member of wl_pwr_cfg structure These macros and "base" member of wl_pwr_cfg structure are used only to produce debug output. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/pwrseqcmd.c | 3 +- drivers/staging/rtl8188eu/include/pwrseq.h | 165 ++++++++++---------------- drivers/staging/rtl8188eu/include/pwrseqcmd.h | 9 -- 3 files changed, 63 insertions(+), 114 deletions(-) commit 0e54dbd4c7c26c4279f3e8b0af81f772ed076aab Author: Ivan Safonov Date: Wed Mar 2 15:07:46 2016 +0700 staging: rtl8188eu: remove PWR_INTF_*_MSK macro definitions and interface_mask of wl_pwr_cfg structure This driver is intended only for usb devices. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/pwrseqcmd.c | 10 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 +- drivers/staging/rtl8188eu/include/pwrseq.h | 139 +++++++++----------------- drivers/staging/rtl8188eu/include/pwrseqcmd.h | 10 +- 4 files changed, 57 insertions(+), 108 deletions(-) commit 3f1599e8860439cd920bca3bb8368121589c02ff Author: Ivan Safonov Date: Wed Mar 2 15:07:09 2016 +0700 staging: rtl8188eu: remove PWR_FAB_*_MSK macro definitions and fab_msk of wl_pwr_cfg structure fab_msk used for marking commands for devices of a certain manufacturer. However, always used only PWR_FAB_ALL_MSK value of fab_msk. Most likely, such mark is useless. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/pwrseqcmd.c | 10 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 9 +- drivers/staging/rtl8188eu/include/pwrseq.h | 138 +++++++++++++------------- drivers/staging/rtl8188eu/include/pwrseqcmd.h | 9 +- 4 files changed, 77 insertions(+), 89 deletions(-) commit fd50e119e6b8e48a138af72b643301a4f2200368 Author: Ivan Safonov Date: Wed Mar 2 15:06:26 2016 +0700 staging: rtl8188eu: remove FabVersion member of odm_dm_struct struct Value of this variable is hardcoded and used only to produce debug output. Probably, FabVersion is useless. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 4 ---- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 4 +--- drivers/staging/rtl8188eu/include/odm.h | 9 --------- 3 files changed, 1 insertion(+), 16 deletions(-) commit 29b9e16884e4431e90542c42126364f8de8dd93f Author: Ivan Safonov Date: Wed Mar 2 15:05:47 2016 +0700 staging: rtl8188eu: remove chip_type of the adapter structure chip_type variable is unnecessary here, because this driver is only for one chip and it is not used after initialization. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 - 2 files changed, 3 deletions(-) commit 2e48f0df5cc793bccdde66b32e6a4fd134da534d Author: Ivan Safonov Date: Wed Mar 2 15:04:57 2016 +0700 staging: rtl8188eu: replace (a == NULL) to (!a) in rtw_drv_init It is a checkpatch cleanups: CHECK: Comparasion to NULL could be written ... Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43e02454d787b074a6864b5524a663c854a2d314 Author: Ivan Safonov Date: Wed Mar 2 15:04:19 2016 +0700 staging: rtl8188eu: remove unnecessary debug output from os_dep/usb_intf.c Debug output in rtw_drw_init is excess Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 ---- 1 file changed, 4 deletions(-) commit 02295b7f24295606853209898b2297f539d6ca8b Author: Ivan Safonov Date: Wed Mar 2 15:01:33 2016 +0700 staging: rtl8188eu: remove unused macros from include/basic_types.h FIELD_OFFSET, READEF1BYTE, READEF2BYTE, READEF4BYTE WRITEEF1BYTE, WRITEEF2BYTE, WRITEEF4BYTE are removed. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/basic_types.h | 29 ------------------------- 1 file changed, 29 deletions(-) commit e2d5d10dea39ebb1e7c35595f34f5195fdc78ac8 Author: Ivan Safonov Date: Wed Mar 2 15:00:30 2016 +0700 staging: rtl8188eu: remove unused include/ieee80211_ext.h This file is not used for the driver compiling Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211_ext.h | 290 ---------------------- 1 file changed, 290 deletions(-) commit 5e3027b6534b16d9740ed56ce8bd7840e3f96bd4 Author: Ivan Safonov Date: Wed Mar 2 14:59:01 2016 +0700 staging: rtl8188eu: FIELD_OFFSET macro replaced by offsetof macro FIELD_OFFSET and offsetof macro are equal Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/rtl8188eu/include/drv_types.h | 4 ++-- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 2c10efbd070624b742068d8050f3e95d7e1d9375 Author: Bhaktipriya Shridhar Date: Mon Feb 29 02:00:17 2016 +0530 staging: rtl8188eu: os_dep: Remove NULL test before vfree vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7570ad910445d3c38bc0a5f0a82606e4861f85a6 Author: Bhaktipriya Shridhar Date: Mon Feb 29 01:59:20 2016 +0530 staging: rtl8188eu: core: Remove NULL test before vfree vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 3 +-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 235a01036200992e8719c1f41260b11930448b72 Author: Bhaktipriya Shridhar Date: Fri Feb 26 15:11:07 2016 +0530 staging: rtl8188eu: core: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 92098c1f0b6ab8eac2ccb465435c2fbeae6f6f6e Author: Bhaktipriya Shridhar Date: Fri Feb 26 15:10:18 2016 +0530 staging: rtl8188eu: os_dep: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/osdep_service.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bd37c43c8dc686dc4d9102e58039e8a44ff36a08 Author: Bhaktipriya Shridhar Date: Thu Feb 25 18:11:35 2016 +0530 staging: rtl8188eu: core: Remove casts of pointer to same type Casting a pointer to a pointer of the same type is unnecessary, so remove these unnecessary casts. This was done with Coccinelle: @@ type T; T *ptr; @@ - (T *)ptr + ptr Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3edd192bb86c40833230fa57899d2f8718e29812 Author: Bhaktipriya Shridhar Date: Wed Feb 24 02:57:06 2016 +0530 staging: rtl8188eu: hal: Drop Useless Initialization Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @bad@ identifier i; position p; @@ i =@p <+...i...+>; @@ type T; constant C; expression e; identifier i; position p != bad.p; @@ T i - = C ; i =@p e; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47b67704a1f72700e374ad5a50b9ce9c0939eed7 Author: Bhaktipriya Shridhar Date: Mon Feb 22 22:38:03 2016 +0530 staging: rtl8188eu: Remove unnecessary parantheses Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = - ( b - ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce7e581e6bdeb4bc4ff4abf9aa97d7b0c25b916f Author: Bhumika Goyal Date: Fri Mar 11 12:28:49 2016 +0530 Staging: sm750fb: Remove unused functions The functions dviGetDeviceID and dviGetVendorID are not used anywhere in the kernel so remove them. Also, remove their function prototypes. Grepped to find occurences. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_dvi.c | 38 ------------------------------------ drivers/staging/sm750fb/ddk750_dvi.h | 3 --- 2 files changed, 41 deletions(-) commit 69988ba2c50202017c57a87a5d571ead4ac2c562 Author: Sandhya Bankar Date: Sun Mar 6 15:07:44 2016 +0530 Staging: sm750fb: Remove leading and trailing whitespace. Remove leading and trailing whitespace. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6504b9bdf6f330dc66667e8b2e0a91a2ffa84e33 Author: Eva Rachel Retuya Date: Sun Mar 6 13:20:21 2016 +0800 staging: sm750fb: convert pr_err() to dev_err() Replace pr_err() calls with respective dev_err() counterpart. Change is safe since pdev is not NULL, this was identified by hand. Semantic patch used to detect and apply the transformation: @r exists@ identifier f,s,i; position p; @@ f(...,struct s *i,...) { <+... pr_err@p(...) ...+> } @s@ identifier r.s, dev; @@ struct s { ... struct device dev; ... }; @t@ identifier r.i, s.dev; expression fmt; position r.p; @@ - pr_err@p( + dev_err(&i->dev, fmt, ...); Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit fcf59a7c611999f8b9b5fe1c08fe4d6c45b93e6b Author: Bhaktipriya Shridhar Date: Sun Feb 28 21:27:49 2016 +0530 staging: sm750fb: Remove Unused macro The macro PEEK32 is used nowhere in the file. Hence,removed. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_cursor.c | 2 -- 1 file changed, 2 deletions(-) commit 13b79a0d88e350ec874e45fdbd08cb6f37fa4a48 Author: Amitoj Kaur Chawla Date: Sun Feb 28 21:22:00 2016 +0530 staging: sm750fb: Use pcim_enable_device() Devm_ functions allocate memory that is released when a driver detaches. Replace pci_enable_device with the managed pcim_enable_device and remove corresponding pci_disable_device from probe and suspend functions of a pci_dev. Also, an unnecessary label has been removed by replacing it with a direct return statement. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 677c50721181b0375a763941ce188997588b1ace Author: Amitoj Kaur Chawla Date: Sun Feb 28 21:21:53 2016 +0530 staging: sm750fb: Replace kzalloc with devm_kzalloc Devm_ functions allocate memory that is released when a driver detaches. Replace kzalloc with devm_kzalloc and remove corresponding kfrees from probe and remove functions of a pci_dev. Also, an unnecessary label has been removed by replacing it with a direct return statement. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fad2564eaa350368d95be2b7f0c832541dc9d09a Author: Amitoj Kaur Chawla Date: Thu Feb 25 11:07:37 2016 +0530 staging: sm750fb: Remove unnecessary pci_set_drvdata() Unnecessary pci_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: // @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 1 - 1 file changed, 1 deletion(-) commit 732053a0a005397374e3afc54618ef5e3e524eed Author: Amitoj Kaur Chawla Date: Wed Feb 24 22:30:15 2016 +0530 staging: sm750fb: Remove parentheses from return arguments Remove unnecessary parentheses from return arguments. The Coccinelle semantic patch that makes this change is as follows: // @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_hwi2c.c | 4 ++-- drivers/staging/sm750fb/ddk750_sii164.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 720f7a7850556f8d9ed6069cbcfd9b34b105e04a Author: Amitoj Kaur Chawla Date: Sat Mar 12 00:11:47 2016 +0530 staging: most: hdm-usb: Remove invalid reference error commit e3479f77("staging: most: hdm-usb: Remove create_workqueue()") cancel_work_sync(&anchor->clear_work_obj) is introduced after freeing `anchor` causing a invalid reference error. This patch removes this error by shifting the call to cancel_work_sync before freeing `anchor`. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e6e1d57e080583da7aa851aca40369f1851dec57 Author: Bhaktipriya Shridhar Date: Sun Mar 6 02:39:51 2016 +0530 staging: rts5208: Change form of NULL comparisons Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b242d05fa3ec5baf83f7a51c7c58757fcf36e321 Author: Bhaktipriya Shridhar Date: Mon Feb 29 01:58:44 2016 +0530 staging: rts5208: Remove NULL test before vfree vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 30 ++++++++++-------------------- drivers/staging/rts5208/xd.c | 36 ++++++++++++------------------------ 2 files changed, 22 insertions(+), 44 deletions(-) commit 7586170c84de561c7bf05dd0df0c4bf9786417d5 Author: Eva Rachel Retuya Date: Sat Feb 27 20:39:24 2016 +0800 staging: rts5208: simplify NULL tests Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 8 ++++---- drivers/staging/rts5208/rtsx.c | 6 +++--- drivers/staging/rts5208/rtsx_scsi.c | 22 +++++++++++----------- drivers/staging/rts5208/sd.c | 4 ++-- drivers/staging/rts5208/spi.c | 2 +- drivers/staging/rts5208/xd.c | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) commit eff8bf82432b6a3cd367e765a1806ebe3d1556e8 Author: Bhumika Goyal Date: Fri Feb 26 15:34:34 2016 +0530 Staging: rts5208: Use min instead of ternary operator This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min returns the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51a4731133410a63bcc833068dba4a0e2ec1fcea Author: Janani Ravichandran Date: Thu Feb 25 14:42:24 2016 -0500 staging: rts5208: rtsx_transport.c: Drop void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86790d33da72dc5a1c50cef0aa3a5cb44dcc0dc6 Author: Janani Ravichandran Date: Thu Feb 25 14:37:56 2016 -0500 staging: rts5208: rtsx.c: Drop unneeded void pointer cast Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7a22f8d0a84c21ad0458c386f2fb2986702fa5d Author: Amitoj Kaur Chawla Date: Thu Feb 25 11:08:20 2016 +0530 staging: rts5208: Remove unnecessary pci_set_drvdata() Unnecessary pci_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: // @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx.c | 2 -- 1 file changed, 2 deletions(-) commit d1af6476e6f97f412db55c98b0a05b7a13cbd855 Author: Dilek Uzulmez Date: Tue Feb 23 20:32:24 2016 +0200 Staging: rts5208: Remove unnecessary parentheses Problem found using checkpatch.pl CHECK: Unnecessary parentheses around chip->ms_card Signed-off-by: Dilek Uzulmez Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 92 ++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit 040fa2217c417e87dd502938f8bd5edbd27fdbf1 Author: Bhaktipriya Shridhar Date: Sun Feb 21 15:23:37 2016 +0530 staging: rts5208: Prefer using BIT macro Replace all instances of bit shifting on 1 with the BIT(x) macro. This was done using Coccinelle. @@ int c; @@ - (1 << c) + BIT(c) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fdb78b64a7ba790e93a74f35778b431e71b5f48d Author: Bhaktipriya Shridhar Date: Sun Feb 21 13:05:20 2016 +0530 staging: rts5208: Removed unnecessary return variable This patch removes unnecessary return variables in switch statements. This was done with Coccinelle: @@ local idexpression ret; expression e1,e2; identifier label; @@ switch ( ... ) { case label : ... - ret = e1; - break; + return e1; ... default: ... - ret = e2; + return e2; ... } ... when != ret - return ret; @@ type T; identifier x; @@ - T x; ... when != x Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_scsi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 22d2666b7c0e66cf71e57d4b8b9a3654a6417415 Author: Bhaktipriya Shridhar Date: Thu Mar 10 23:06:23 2016 +0530 staging: media: davinci_vpfe: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fec692503055702e7eb0f03612e9bf3d509a9c06 Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:59:47 2016 +0530 staging: media: davinci_vpfe: dm365_ipipe_hw: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58f31812b0f42e821901343a12a589500912f2ad Author: Sandhya Bankar Date: Sun Mar 6 18:54:09 2016 +0530 Staging: media: Remove unnecessary goto. Remove unnecessary goto. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4a1e81bc5dbecb28c33851e8e571d2127462910d Author: Eva Rachel Retuya Date: Sat Feb 27 20:39:22 2016 +0800 staging: [media] mn88472: simplify NULL tests Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/media/mn88472/mn88472.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b7a3dac9204d1f1b5e7c314dbacb372a93b7c99 Author: Amitoj Kaur Chawla Date: Thu Feb 25 11:07:47 2016 +0530 staging: media: omap4iss: Remove unnecessary platform_set_drvdata() Unnecessary platform_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: // @@ struct platform_device *pdev; @@ - platform_set_drvdata(pdev, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/media/omap4iss/iss.c | 2 -- 1 file changed, 2 deletions(-) commit 0df56d78d26ac1560bfe9ba65f354e50428ab525 Author: Bhumika Goyal Date: Fri Mar 11 15:53:57 2016 +0530 Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd The function r8712_setptm_cmd and r8712_gettssi_cmd are not used anywhere in the kernel so remove them. Also, remove their function prototypes. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 47 ----------------------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 2 -- 2 files changed, 49 deletions(-) commit 336e8320e93064e1d290fa98fa5dae290161c0f8 Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:20:25 2016 +0530 staging: rtl8712: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8558ace8b7cf629b7d499e00462e4a8bf212e0e4 Author: Sandhya Bankar Date: Sun Mar 6 15:33:31 2016 +0530 Staging: rtl8712: Avoid multiple assignments. Avoid multiple assignments.This isssue is found by checkpatch.pl script. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d1b7e87a376d3cc213fdabfefce2734a9999054 Author: G Pooja Shamili Date: Sun Mar 6 15:12:30 2016 +0530 staging: rtl8712: Remove the unnecessary parantheses The unnecessary parantheses on the right side of assignments were removed, as in most cases (expect for ==, >=, <=, !=), they are futile. This was done using Coccinelle, the semantic patch being: @@ expression E1,E2,E3; binary operator bin_op = {==,>=,<=,!=}; @@ E1 = ( ( E2 bin_op E3 ) | -( E2 -) ) ; Signed-off-by: G Pooja Shamili Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bce2fc58b75a2e39dd50502aa8fe9f49b30fa478 Author: Amitoj Kaur Chawla Date: Sun Mar 6 06:14:43 2016 +0530 staging: rtl8712: rtl871x_mp_ioctl: Remove exceptional & on function name In this file, function names are otherwise used as pointers without &. The Coccinelle semantic patch that is used to make this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f @m@ type T; identifier f; @@ T f(...); @@ identifier m.f; @@ - &f + f // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 118 ++++++++++++++--------------- 1 file changed, 59 insertions(+), 59 deletions(-) commit 6806be3184132451a3e10cee7a52f0a8e9c4cea9 Author: Bhaktipriya Shridhar Date: Sun Mar 6 02:51:42 2016 +0530 drivers: staging: rtl8712: Change form of NULL comparisons Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40430f0ce24111cf616a51c704ecb371858e2028 Author: Bhaktipriya Shridhar Date: Thu Feb 25 16:17:33 2016 +0530 staging: rtl8712: Make return of 0 explicit Delete unnecessary local variable whose value is always 0 and return 0 as the result. The following Coccinelle script was used: @@ identifier ret; expression E; type T; @@ ( - T ret; | - T ret = 0; ) ... when != \(ret=E \|ret--\|ret++\|--ret\|++ret\|ret-=E\|ret+=E\|ret|=E\|ret&=E\) ( ?-ret = 0; ) ... when != \(ret=E \|ret--\|ret++\|--ret\|++ret\|ret-=E\|ret+=E\|ret|=E\|ret&=E\) ( return - ret + 0 ; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/xmit_linux.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9155c92463ecbb55c6eca6145e139869e9ba1546 Author: Bhumika Goyal Date: Wed Feb 24 16:09:31 2016 +0530 Staging: rtl8712: Clean up tests if NULL returned on failure Some functions like kmalloc/usb_alloc_urb/kmalloc_array returns NULL as their return value on failure. !x is generally preferred over x==NULL or NULL==x so make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 2 +- drivers/staging/rtl8712/rtl871x_io.c | 2 +- drivers/staging/rtl8712/rtl871x_mlme.c | 6 +++--- drivers/staging/rtl8712/rtl871x_mp.c | 4 ++-- drivers/staging/rtl8712/rtl871x_sta_mgt.c | 2 +- drivers/staging/rtl8712/rtl871x_xmit.c | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) commit bb106dc0e227f7a04d9034cad25913b3c21146a8 Author: Bhaktipriya Shridhar Date: Mon Feb 22 22:39:00 2016 +0530 staging: rtl8712: Remove unnecessary parantheses Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = - ( b - ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e4eb869132cb565826a7eb6970494fbd6b8b5ef Author: Bhaktipriya Shridhar Date: Mon Feb 22 18:59:45 2016 +0530 staging: rtl8712: Simplify return Simplified the multiline check to a single return statement. Signed-off-by: Bhaktipriya Shridhar Acked-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/xmit_linux.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ecf2e02cd419fa4e50711b467931f652943735fd Author: Amitoj Kaur Chawla Date: Sun Feb 21 19:53:27 2016 +0530 staging: rtl8712: Remove exceptional & on function name Remove exceptional '&' operator in front of a function name. The Coccinelle semantic patch that is used to make this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f @m@ type T; identifier f; @@ T f(...); @@ identifier m.f; @@ - &f + f // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_intf.c | 10 +++++----- drivers/staging/rtl8712/usb_ops.c | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) commit fe5e5e3a1627f2588fbdc3b554a54febf44395f6 Author: Bhaktipriya Shridhar Date: Sun Feb 21 12:56:16 2016 +0530 staging: rtl8712: Remove unnecessary cast on void pointer The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56238e456c58a6a3ed905828e16a6d8d6d9c2b04 Author: Bhaktipriya Shridhar Date: Sun Feb 21 12:51:32 2016 +0530 staging: rtl8712: Remove cast on void pointer The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f4e2706525d46eeb678759f8a626619e5461143 Author: Eva Rachel Retuya Date: Sat Feb 27 20:39:23 2016 +0800 staging: ste_rmi4: simplify NULL tests Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eea04b072d93ef0c2b6154e5f9c7a422767944be Author: Dilek Uzulmez Date: Tue Feb 23 01:01:07 2016 +0200 Staging: ste_rmi4: Add space around '/' Add space around operator '/'. Problem found using checkpatch.pl CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Dilek Uzulmez Signed-off-by: Greg Kroah-Hartman drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32680d9319ad7ee75fb6d8068d7a3721fbae826c Author: Laura Garcia Liebana Date: Sun Feb 28 00:47:09 2016 +0100 staging: octeon: Fix braces in condition statement Braces should be used on all arms of the if statement. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3f4a565a91e0f586056d91fbd8308ff5a5ae9e8d Author: Laura Garcia Liebana Date: Sun Feb 28 00:46:29 2016 +0100 staging: octeon: Remove multiple blank lines Avoid the use of multiple blank lines. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-tx.c | 2 -- 1 file changed, 2 deletions(-) commit 18f6970b636ec92062b5f91478793968c0d23e81 Author: Laura Garcia Liebana Date: Sun Feb 28 00:45:13 2016 +0100 staging: octeon: Fix lines over 80 characters The lines should be adjusted to 80 characters. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7ba18e852d8511ab4572f83b154861d2a974bf31 Author: Laura Garcia Liebana Date: Sun Feb 28 00:44:37 2016 +0100 staging: octeon: Remove blank lines after open brace Blank lines are not necessary after an open brace. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 1 - drivers/staging/octeon/ethernet-spi.c | 2 -- drivers/staging/octeon/ethernet-tx.c | 1 - 3 files changed, 4 deletions(-) commit b4ede7922e82f959499ea7a9867cda4d9379dc98 Author: Laura Garcia Liebana Date: Sun Feb 28 00:43:52 2016 +0100 staging: octeon: Fix block comments Remove commented source code. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-rx.c | 20 +++++--------------- drivers/staging/octeon/ethernet-tx.c | 33 ++++++++------------------------- 2 files changed, 13 insertions(+), 40 deletions(-) commit e8a4e572c4e75900c77a5854eb54a6c9173f9ac6 Author: Laura Garcia Liebana Date: Sun Feb 28 00:43:12 2016 +0100 staging: octeon: Remove comparison to NULL Comparison to NULL should be avoided in conditions. Chackpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-mdio.c | 2 +- drivers/staging/octeon/ethernet-mem.c | 4 ++-- drivers/staging/octeon/ethernet-rx.c | 6 +++--- drivers/staging/octeon/ethernet-tx.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 0e350e17b934ed9cbca7f5b3dfb08381c860b2df Author: Laura Garcia Liebana Date: Sun Feb 28 00:42:43 2016 +0100 staging: octeon: Insert blank line after struct declaration Blank line is inserted after a struct declaration. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7636941eb3c523cf1b75dbd4c24b00753e24c4a4 Author: Laura Garcia Liebana Date: Sun Feb 28 00:41:39 2016 +0100 staging: octeon: Move logical operators on the correct line Logical continuations should be on the previous line. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet-tx.c | 8 ++++---- drivers/staging/octeon/ethernet.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit 6fe5efa1415c841dfd22b29fd31133a28d548b5c Author: Bhaktipriya Shridhar Date: Sat Feb 27 23:21:47 2016 +0530 staging: octeon: Convert create_singlethread_workqueue() With conccurency managed workqueues, use of dedicated workqueues can be replaced by system_wq. Drop cvm_oct_poll_queue by using system_wq. There are multiple work items per cvm_oct_poll_queue (viz. cvm_oct_rx_refill_work, port_periodic_work) and different cvm_oct_poll_queues need not be be ordered. Hence, concurrency can be increased by switching to system_wq. All work items are sync canceled in cvm_oct_remove() so it is guaranteed that no work is in flight by the time exit path runs. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon/ethernet.c | 21 ++++----------------- drivers/staging/octeon/octeon-ethernet.h | 1 - 2 files changed, 4 insertions(+), 18 deletions(-) commit 2d5f6feca9d156e9f7cdd7221e9122ce2b38aff0 Author: Ben Marsh Date: Tue Mar 1 11:29:38 2016 +0100 Staging: slicoss: changes comparisons to NULL in slicoss.c This is a patch to slicoss.c to change the style of NULL comparisons in order to remove checkpatch.pl warnings. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 98589c419d75e28053de3393c4697836d31bd83c Author: Ben Marsh Date: Tue Mar 1 11:22:48 2016 +0100 Staging: slicoss: removes unnecessary blank lines in slicoss.c This is a patch to slicoss.c to remove unnecessary blank lines as found by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 -- 1 file changed, 2 deletions(-) commit 82554c2ffbb475609d381f0e258e247a96aad5b9 Author: Ben Marsh Date: Tue Mar 1 11:06:13 2016 +0100 Staging: slicoss: change memory allocation style in slicoss.c This is a patch to slicoss.c to change the memory allocation style in slicoss.c as found by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4a34826d16ed4dd5aa93f0cafd836066a4ba243 Author: Ben Marsh Date: Tue Mar 1 10:55:35 2016 +0100 Staging: slicoss: changes the style of memory allocation in slicoss.c This is a patch to slicoss.c to change the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d7a3876cad517becf0eb9db0b05c48ccc5230dd Author: Ben Marsh Date: Mon Feb 29 12:37:34 2016 +0100 Staging: slicoss: changes memory allocation style in slicoss.c This is a patch to slicoss.c that changes the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4374849e1e0cd6108ec7b4c1146116911adbba11 Author: Ben Marsh Date: Mon Feb 29 12:33:30 2016 +0100 Staging: slicoss: memory allocation style change in slicoss.c This is a patch to slicoss.c to change the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e0a66d01613ec8f40d166b0095cf9026e811ff2 Author: Janani Ravichandran Date: Sun Feb 21 16:31:44 2016 -0500 staging: slicoss: Eliminate commented out code Remove commented out code to reduce code clutter. Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/slicoss/slicoss.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit db7425b130cbcfaf468d3e45f8c5e1659f8d1fb9 Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:47:22 2016 +0530 staging: rtl8192u: ieee80211_crypt: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0834ffac90526418fbcd877758840e811da817d2 Author: Bhumika Goyal Date: Wed Mar 2 01:14:57 2016 +0530 Staging: rtl8192u: Replace random_ether_addr with eth_random_addr The macro random_ether_addr is calling the function eth_random_addr. Therefore, the call to random_ether_addr can be replaced with eth_random_addr. Remove the wrapper function ieee80211_randomize_cell and replace its call with eth_random_addr as it is wrapping random_ether_addr. Done using coccinelle: @@ expression addr; @@ - random_ether_addr(addr); + eth_random_addr(addr); Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f80c1d57637800f3da8eece0859d1e942a119ea8 Author: Bhumika Goyal Date: Wed Mar 2 00:18:31 2016 +0530 Staging: rtl8192u: Replace memset with eth_broadcast_addr Use eth_broadcast_addr to assign the broadcast address to the given address array instead of memset when the second argument is a broacast address 0xff. ETH_ALEN is a macro with value 6, so 6 is treated as ETH_ALEN if it is the third argument of memset. Done using coccinelle. @@ expression e; @@ - memset(e,\(0xff\|0xFF\|255\),\(ETH_ALEN\|6\)); + eth_broadcast_addr(e); Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7288cadc199ebeb1e34237f999efa1368e4a3daf Author: Bhaktipriya Shridhar Date: Sun Feb 28 17:48:36 2016 +0530 staging: rtl8192u: ieee80211: Remove unused variables The pointer *skb2 is declared 'globally' inside ifdef NOT_YET. It's used nowhere in the directory. Another pointer *skb2 is declared 'locally', again inside another ifdef NOT_YET in the function ieee80211_rx_frame_mgmt. Hence, skb2 stays unused and has been removed. This was done using Coccinelle: @@ type T; identifier i; constant c; @@ -T i; <... when != i -i = c; ...> Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 1 - 1 file changed, 1 deletion(-) commit 5a95f073b631ad8038c2f771b04bae737344df07 Author: Bhumika Goyal Date: Wed Feb 24 22:46:00 2016 +0530 Staging: rtl8192u: Remove debug messages As kmalloc generates a backtrace on failure so there is no need of these debug messages when kmalloc fails. Also remove unwanted {} around if block after removal of these messages. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 61645cc3124ef012d4e8ca576aa13adf16c17393 Author: Bhumika Goyal Date: Wed Feb 24 15:47:35 2016 +0530 Staging: rtl8192u: Clean up tests if NULL returned on failure Some functions return Null as their return value on failure. !x is generally preferred over x==NULL or NULL==x. So make use of !x if the value returned on failure is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f705a2dddd206b31ff7731b3adc69a2433ca6d00 Author: Bhaktipriya Shridhar Date: Wed Feb 24 02:57:57 2016 +0530 staging: rtl8192u: ieee802111: Drop Useless Initialization Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @bad@ identifier i; position p; @@ i =@p <+...i...+>; @@ type T; constant C; expression e; identifier i; position p != bad.p; @@ T i - = C ; i =@p e; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b1b20e7155de612f065dbc0cda53186605fa944c Author: Bhaktipriya Shridhar Date: Sun Feb 21 15:43:00 2016 +0530 staging: rtl8192u: ieee80211: Use macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4532150762ceb0d6fd765ebcb3ba6966fbb8faab Author: Greg Hackmann Date: Fri Feb 26 19:00:18 2016 +0000 staging: goldfish: audio: fix compiliation on arm We do actually need slab.h, by luck we get it on other platforms but not always on ARM. Include it properly. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian Signed-off-by: Alan Signed-off-by: Greg Kroah-Hartman drivers/staging/goldfish/goldfish_audio.c | 1 + 1 file changed, 1 insertion(+) commit 283ded10312a3b75e384313f6f529ec2c636cf2c Author: Greg Hackmann Date: Fri Feb 26 19:00:03 2016 +0000 staging: goldfish: audio: add devicetree bindings Introduce devicetree bindings to the Goldfish staging audio driver. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/goldfish/audio.txt | 17 +++++++++++++++++ drivers/staging/goldfish/goldfish_audio.c | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 76134b3f19088b46552d0580bb0ee650fe9d2d2c Author: Bhaktipriya Shridhar Date: Thu Mar 10 22:43:34 2016 +0530 staging: rtl8192e: rtllib_crypt_tkip: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 372419776a023f7f0eede837cd866c2d544ba4a4 Author: Bhumika Goyal Date: Wed Mar 2 01:12:03 2016 +0530 Staging: rtl8192e: Replace random_ether_addr with eth_random_addr The macro random_ether_addr is calling the function eth_random_addr. Therefore, the call to random_ether_addr can be replaced with eth_random_addr. Remove the wrapper function rtllib_randomize_cell and replace its call with eth_random_addr as it is wrapping random_ether_addr. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 314e4be76e20f1d799ee386380623375b0555372 Author: Janani Ravichandran Date: Thu Feb 25 14:56:33 2016 -0500 staging: rtl8192e: Drop cast on void pointer Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecfdd3a010a18cd3e35bff4637e3a6e03bb3480e Author: Amitoj Kaur Chawla Date: Thu Feb 25 09:23:31 2016 +0530 staging: rtl8192e: rtl8192e: Remove create_workqueue() With conccurency managed workqueues, use of dedicated workqueues can be replaced by system_wq. Drop priv_wq by using system_wq. Since there are multiple work items per priv but they do not need to be ordered, increase of concurrency by switching to system_wq should not break anything. All work items are sync canceled on so it is guaranteed that no work is running when rtl92e_suspend function is called. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 20 +++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 7 +++---- drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 2 +- 4 files changed, 13 insertions(+), 18 deletions(-) commit 138bdc6de21c8b48d1e048c8a902ee722350c226 Author: Tapan Prakash T Date: Wed Feb 24 23:06:12 2016 +0530 drivers: staging: rtl8192e: rtllib_rx.c: Fix blank lines before a close brace Fixed checkpatch.pl issue 'Blank lines aren't necessary before a close brace' Signed-off-by: Tapan Prakash T Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_rx.c | 2 -- 1 file changed, 2 deletions(-) commit 3d15286201b3d0c28777a0cb1a9e965ffad9d3bd Author: Tapan Prakash T Date: Wed Feb 24 22:47:47 2016 +0530 drivers: staging: rtl8192e: rtllib_rx.c: Fix code indent for conditional statement Fixed checkpatch.pl warning 'suspect code indent for conditional statements' Signed-off-by: Tapan Prakash T Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdd3836442c4be8f8dee42421b111ac1c13c170c Author: Bhaktipriya Shridhar Date: Tue Mar 8 23:29:37 2016 +0530 staging: rtl8192e: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 354605f4e6190ac2c80be5e1a1c7c80a2f7f30a1 Author: Amitoj Kaur Chawla Date: Sat Feb 20 15:36:26 2016 +0530 staging: rtl8192e: Remove create_workqueue() With conccurency managed workqueues, use of dedicated workqueues can be replaced by system_wq. Drop wq by using system_wq. Since there are multiple work items per rtllib but they do not need to be ordered, increase of concurrency by switching to system_wq should not break anything. All work items are sync canceled on rtllib_stop_protocol() so it is guaranteed that no work is running when rtl92e_disable/reset/restart functions are called. Signed-off-by: Amitoj Kaur Chawla Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 14 +++------ drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_softmac.c | 47 +++++++++++++++------------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +- 5 files changed, 34 insertions(+), 36 deletions(-) commit e27604efde9e8e296b78e5d2b1ee27838b289626 Author: Anchal Jain Date: Fri Mar 11 19:49:50 2016 +0530 staging: wilc1000: Possible unnecessary 'out of memory' message Remove unnnecessary debug message. Problem detected by checkpatch. Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1f12f148073380a1f78be533471fc8c46b19f452 Author: Chaehyun Lim Date: Tue Mar 8 10:04:32 2016 +0900 staging: wilc1000: use mutex instead of semaphore sem_cfg_values This patch replaces struct semaphore sem_cfg_values with struct mutex cfg_values_lock. It is better to use mutex than semaphore. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 10 +++++----- drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 8f5b1435a13b30c9439095abf0bb37d326515d95 Author: Bhumika Goyal Date: Sun Mar 6 20:26:58 2016 +0530 Staging: lustre: Use list_{next/prev}_entry instead of list_entry This patch replace list_entry with list_{next/prev}_entry as it makes the code more clear to read. Done using coccinelle: @@ expression e1; identifier e3; type t; @@ ( - list_entry(e1->e3.next,t,e3) + list_next_entry(e1,e3) | - list_entry(e1->e3.prev,t,e3) + list_prev_entry(e1,e3) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 3 +-- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) commit 2d513ef6c3fc9cb09225d0ff3fc7a31e76924913 Author: Bhumika Goyal Date: Sun Mar 6 20:08:44 2016 +0530 Staging: lustre: lnet: Use list_first_entry_or_null This patch replaces list_empty and list_entry with list_first_entry_or_null. Done using coccinelle: @@ expression e1,e2; statement S; @@ - if(!list_empty(...)){ e2= - list_entry(e1.next, + list_first_entry_or_null(&e1, ...); + if(e2){ ... } Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conrpc.c | 7 +++---- drivers/staging/lustre/lnet/selftest/framework.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) commit f907a0a9498db29fb7c91b798d7af70add7dd86e Author: Laxman Dewangan Date: Tue Mar 8 16:23:22 2016 +0530 regulator: pwm: Add support to have multiple instance of pwm regulator Some of platforms like Nvidia's Tegra210 Jetson-TX1 platform has multiple PMW based regulators. Add support to have multiple instances of the driver by not changing any global data of pwm regulator and if required, making instance specific copy and then making changes. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/pwm-regulator.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 1aaab34878ac14efede3f0e737b99447745699d1 Author: Laxman Dewangan Date: Tue Mar 8 16:23:21 2016 +0530 regulator: pwm: Fix calculation of voltage-to-duty cycle With following equation for calculating voltage_to_duty_cycle_percentage 100 - (((req_uV * 100) - (min_uV * 100)) / diff); we get 0% for max_uV and 100% for min_uV. Correcting this to ((req_uV * 100) - (min_uV * 100)) / diff; to get proper duty cycle. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/pwm-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1511a14a4a94d063cf8f8f12f36cf2ebb0cc8a8 Author: Kuninori Morimoto Date: Thu Mar 10 05:29:21 2016 +0000 ASoC: rsnd: add simplified module explanation Renesas sound driver user needs to read its datasheet when create DT. But it is difficult to understand, because it has many modules (SRC/CTU/MIX/DVC/SSIU/SSI/AudioDMAC/AudioDMACperiperi), and many features (Asynchronous/Synchronous mode on SRC, CTU matrix, DVC volume settings feature, Multi-SSI/TDM-SSI, etc). This patch adds simplified explanation to help setting/understanding. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../devicetree/bindings/sound/renesas,rsnd.txt | 340 +++++++++++++++++++++ sound/soc/sh/rcar/dvc.c | 23 ++ 2 files changed, 363 insertions(+) commit e2304803fd05eac509c8e37bb626c192510e4e77 Author: Jeeja KP Date: Fri Mar 11 10:12:55 2016 +0530 ASoC: hdac_hdmi: Add broxton device ID Broxton HDMI codec is similar to Skylake so add the device ID Signed-off-by: Jeeja KP Signed-off-by: GuruprasadX Pawse Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit b379b1fad6e80274309f650f3a82c6f3c4fe9d6b Author: Senthilnathan Veppur Date: Fri Mar 11 10:12:54 2016 +0530 ASoC: Intel: Bxtn: Add Broxton PCI ID Broxton is an Intel SoC which sports a DSP and system is quite like Skylake. So add this ID in Skylake driver Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bc23ca35cfb18b0a98afa42de1df1efc7e2e9f8f Author: Jeeja KP Date: Fri Mar 11 10:12:53 2016 +0530 ASoC: Intel: Skylake: Move Skylake dsp ops & loader ops The code loading for Skylake and other platforms is different, so add a dsp_ops and a loader_ops which can be defined for each platform. Move the dsp init, cleanup and loader ops (alloc and free dma) to these ops Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 62 +++++++++++++++++++++++++++++----- sound/soc/intel/skylake/skl.h | 12 ++++++- 2 files changed, 64 insertions(+), 10 deletions(-) commit b822ee63586c7150c10b445ae6b4bb29486f01e4 Author: Jeeja KP Date: Fri Mar 11 10:12:52 2016 +0530 ASoC: Intel: add dmabuffer to common sst_dsp Broxton uses HDA DMA so needs to keep dmab in the driver context so add it Signed-off-by: GuruprasadX Pawse Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-dsp-priv.h | 1 + 1 file changed, 1 insertion(+) commit 130e69a4773fb65af284d3fd1f3de762324d06e6 Author: Jayachandran B Date: Fri Mar 11 10:12:51 2016 +0530 ASoC: Intel: Skylake: Unstatify skl_dsp_enable_core The function skl_dsp_enable_core will be called by other parts of driver so this can no longer be a static function. Signed-off-by: Jayachandran B Signed-off-by: GuruprasadX Pawse Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit a360b623fc5593d896a8762153bacdabfe29dfb9 Author: Vinod Koul Date: Fri Mar 11 10:12:50 2016 +0530 ASoC: Intel: Skylake: Fix whitepsace issues Some double whitespaces issues existed in driver, so fix them up. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.c | 14 +++++++------- sound/soc/intel/skylake/skl-sst-dsp.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit 39fa37d51ae904968c49ef49165df7fec66fd9ea Author: Vinod Koul Date: Fri Mar 11 10:12:49 2016 +0530 ASoC: Intel: Skylake: Move module id defines The module ID defines are common to other platforms so can be reused if moved to a common driver header so move it Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-dsp.h | 4 ++++ sound/soc/intel/skylake/skl-sst.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) commit a34785f10d33f70680941da284d7ec3a612aad1a Author: Laxman Dewangan Date: Thu Mar 10 17:42:47 2016 +0530 regulator: of: Use of_property_read_u32() for reading min/max OF interface provides to read the u32 value via standard interface of_property_read_u32(). Use this API to read "regulator-min-microvolts" and "regulator-max-microvolt". This will make consistent with other property value reads. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e04fadaa169b09609fb55779236d35fb3197c932 Author: Peter Ujfalusi Date: Fri Mar 11 16:04:54 2016 +0200 ASoC: omap-hdmi-audio: Support for DRA7xx family DRA7xx family is compatible with the OMAP5 HDMI. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/omap/omap-hdmi-audio.c | 1 + 1 file changed, 1 insertion(+) commit 45d5eb3a342f2ef3d6dae16b074fdd9a01992fb5 Author: John Hsu Date: Fri Mar 11 17:33:58 2016 -0800 ASoC: nau8825: fix issue that pop noise when start playback Reduce pop noise in power up and down sequence when playback. The DAPM widgets graph is reconstructed to ensure the register write sequence at playback matches exactly to the v5 clickless sequence provided by Nuvoton. Signed-off-by: John Hsu Signed-off-by: Ben Zhang Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 169 +++++++++++++++++++++++++++++++++------------ sound/soc/codecs/nau8825.h | 16 ++++- 2 files changed, 141 insertions(+), 44 deletions(-) commit 7cab91b87dd8eeee5911ec34be8bb0288ebba18b Author: Vineet Gupta Date: Wed Feb 17 19:37:33 2016 +0530 ARCv2: Allow enabling PAE40 w/o HIGHMEM This allows for regression testing in PAE specific code as we lack a 32+ bit physical memory platform other than nSIM. Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit f778cc65717687a3d3f26dd21bef62cd059f1b8b Author: Lada Trimasova Date: Wed Mar 9 20:21:04 2016 +0300 ARC: [BE] readl()/writel() to work in Big Endian CPU configuration read{l,w}() write{l,w}() primitives should use le{16,32}_to_cpu() and cpu_to_le{16,32}() respectively to ensure device registers are read correctly in Big Endian CPU configuration. Per Arnd Bergmann | Most drivers using readl() or readl_relaxed() expect those to perform byte | swaps on big-endian architectures, as the registers tend to be fixed endian This was needed for getting UART to work correctly on a Big Endian ARC. The ARC accessors originally were fine, and the bug got introduced inadventently by commit b8a033023994 ("ARCv2: barriers") Fixes: b8a033023994 ("ARCv2: barriers") Link: http://lkml.kernel.org/r/201603100845.30602.arnd@arndb.de Cc: Alexey Brodkin Cc: stable@vger.kernel.org [4.2+] Cc: Arnd Bergmann Signed-off-by: Lada Trimasova [vgupta: beefed up changelog, added Fixes/stable tags] Signed-off-by: Vineet Gupta arch/arc/include/asm/io.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 568cecf42f35bf40bdf94107fb638997f82827f7 Author: Sudip Mukherjee Date: Fri Mar 11 23:42:52 2016 +0530 ASoC: qcom: fix build error While building m32r allmodconfig the build failed with: ERROR: "bad_dma_ops" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined! ERROR: "dma_common_mmap" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined! To satisfy the dependency CONFIG_SND_SOC_LPASS_PLATFORM should depend on HAS_DMA. Some other configs also needs the dependency on HAS_DMA as they are directly or indirectly selecting SND_SOC_LPASS_PLATFORM. Signed-off-by: Sudip Mukherjee Signed-off-by: Mark Brown sound/soc/qcom/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dc6cdb420359103e1f20752d01cb1e2bbe8ba8b8 Author: Peter Ujfalusi Date: Fri Mar 11 16:04:20 2016 +0200 ASoC: davinci: Kconfig: Update the edma-pcm section's dependency and help Instead of depending on individual SoCs make the edma-pcm depend on the eDMA dmaengine driver (TI_EDMA). Update the help text and add DRA7xx family since they have eDMA integrated as well along with sDMA. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/davinci/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a11ff260053b1097a5afa6c51e8d5e064aa88a7 Author: Peter Ujfalusi Date: Fri Mar 11 13:18:51 2016 +0200 ASoC: davinci-mcasp: dai format runtime reconfiguration In case when the dai format is set via the dai_link the format configuration happens once when the links are probed. If the McASP lose context after this, the information will be lost and McASP will not going to work correctly. To overcome this issue, we save the fmt and set it within hw_params as well. Reported-by: Misael Lopez Cruz Signed-off-by: Peter Ujfalusi Signed-off-by: Jyri Sarha Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fba4e9f9898ab181703723b9890ba29345edfe08 Author: Hou Zhiqiang Date: Wed Mar 9 17:50:55 2016 +0800 powerpc/fsl/dts: Add "jedec,spi-nor" flash compatible Starting with commit <8947e396a829> ("Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"") we have "jedec,spi-nor" binding indicating support for JEDEC identification. Use it for all flashes that are supposed to support READ ID op according to the datasheets. Signed-off-by: Hou Zhiqiang Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/b4qds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/bsc9131rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/bsc9132qds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/c293pcie.dts | 2 +- arch/powerpc/boot/dts/fsl/kmcoge4.dts | 4 ++-- arch/powerpc/boot/dts/fsl/mpc8536ds.dtsi | 8 ++++---- arch/powerpc/boot/dts/fsl/mvme2500.dts | 4 ++-- arch/powerpc/boot/dts/fsl/p1010rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1020rdb-pc.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts | 2 +- arch/powerpc/boot/dts/fsl/p1020rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1021mds.dts | 2 +- arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1022ds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1022rdk.dts | 2 +- arch/powerpc/boot/dts/fsl/p1024rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p1025rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi | 2 +- arch/powerpc/boot/dts/fsl/p2020rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/p2041rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/p3041ds.dts | 2 +- arch/powerpc/boot/dts/fsl/p4080ds.dts | 2 +- arch/powerpc/boot/dts/fsl/p5020ds.dts | 2 +- arch/powerpc/boot/dts/fsl/p5040ds.dts | 2 +- arch/powerpc/boot/dts/fsl/t1023rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/t1024qds.dts | 6 +++--- arch/powerpc/boot/dts/fsl/t1024rdb.dts | 2 +- arch/powerpc/boot/dts/fsl/t104xd4rdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t104xqds.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t208xqds.dtsi | 6 +++--- arch/powerpc/boot/dts/fsl/t208xrdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t4240qds.dts | 2 +- arch/powerpc/boot/dts/fsl/t4240rdb.dts | 2 +- 34 files changed, 43 insertions(+), 43 deletions(-) commit fd5475a75bdce0d1f77aeb18e6d5d44d67a0838f Author: Zhao Qiang Date: Fri Mar 11 08:42:33 2016 +0800 powerpc/T104xRDB: add tdm riser card node to device tree Signed-off-by: Zhao Qiang Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 060ef9d89d18ea16f05e7c28875cee068220e248 Author: Christophe Leroy Date: Wed Feb 10 08:17:08 2016 +0100 powerpc32: PAGE_EXEC required for inittext PAGE_EXEC is required for inittext, otherwise CONFIG_DEBUG_PAGEALLOC ends up with an Oops [ 0.000000] Inode-cache hash table entries: 8192 (order: 1, 32768 bytes) [ 0.000000] Sorting __ex_table... [ 0.000000] bootmem::free_all_bootmem_core nid=0 start=0 end=2000 [ 0.000000] Unable to handle kernel paging request for instruction fetch [ 0.000000] Faulting instruction address: 0xc045b970 [ 0.000000] Oops: Kernel access of bad area, sig: 11 [#1] [ 0.000000] PREEMPT DEBUG_PAGEALLOC CMPC885 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.25-local-dirty #1673 [ 0.000000] task: c04d83d0 ti: c04f8000 task.ti: c04f8000 [ 0.000000] NIP: c045b970 LR: c045b970 CTR: 0000000a [ 0.000000] REGS: c04f9ea0 TRAP: 0400 Not tainted (3.18.25-local-dirty) [ 0.000000] MSR: 08001032 CR: 39955d35 XER: a000ff40 [ 0.000000] GPR00: c045b970 c04f9f50 c04d83d0 00000000 ffffffff c04dcdf4 00000048 c04f6b10 GPR08: c04f6ab0 00000001 c0563488 c04f6ab0 c04f8000 00000000 00000000 b6db6db7 GPR16: 00003474 00000180 00002000 c7fec000 00000000 000003ff 00000176 c0415014 GPR24: c0471018 c0414ee8 c05304e8 c03aeaac c0510000 c0471018 c0471010 00000000 [ 0.000000] NIP [c045b970] free_all_bootmem+0x164/0x228 [ 0.000000] LR [c045b970] free_all_bootmem+0x164/0x228 [ 0.000000] Call Trace: [ 0.000000] [c04f9f50] [c045b970] free_all_bootmem+0x164/0x228 (unreliable) [ 0.000000] [c04f9fa0] [c0454044] mem_init+0x3c/0xd0 [ 0.000000] [c04f9fb0] [c045080c] start_kernel+0x1f4/0x390 [ 0.000000] [c04f9ff0] [c0002214] start_here+0x38/0x98 [ 0.000000] Instruction dump: [ 0.000000] 2f150000 7f968840 72a90001 3ad60001 56b5f87e 419a0028 419e0024 41a20018 [ 0.000000] 807cc20c 38800000 7c638214 4bffd2f5 <3a940001> 3a100024 4bffffc8 7e368b78 [ 0.000000] ---[ end trace dc8fa200cb88537f ]--- Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/mm/pgtable_32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 84d3e2480564949a26870b6750a9168eb11f4c17 Author: Igal Liberman Date: Thu Dec 24 04:56:59 2015 +0200 powerpc/mpc85xx: Add pcsphy nodes to FManV3 device tree This patch adds pcsphy node to FManV3 device tree. Signed-off-by: Igal Liberman Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 5 +++++ arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 5 +++++ 18 files changed, 90 insertions(+) commit 84e0f1c138061c2494d240f9ad3f94edcf69e29d Author: Igal Liberman Date: Mon Aug 3 11:14:10 2015 +0300 powerpc/mpc85xx: Add MDIO bus muxing support to the board device tree(s) Describe the PHY topology for all configurations supported by each board Based on prior work by Andy Fleming Signed-off-by: Shruti Kanetkar Signed-off-by: Emil Medve Signed-off-by: Igal Liberman Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/b4860qds.dts | 60 ++++- arch/powerpc/boot/dts/fsl/b4qds.dtsi | 51 +++- arch/powerpc/boot/dts/fsl/p2041rdb.dts | 92 ++++++- arch/powerpc/boot/dts/fsl/p3041ds.dts | 112 ++++++++- arch/powerpc/boot/dts/fsl/p4080ds.dts | 184 +++++++++++++- arch/powerpc/boot/dts/fsl/p5020ds.dts | 112 ++++++++- arch/powerpc/boot/dts/fsl/p5040ds.dts | 234 ++++++++++++++++- arch/powerpc/boot/dts/fsl/t1023rdb.dts | 41 +++ arch/powerpc/boot/dts/fsl/t1024rdb.dts | 45 ++++ arch/powerpc/boot/dts/fsl/t1040rdb.dts | 32 ++- arch/powerpc/boot/dts/fsl/t1042rdb.dts | 30 ++- arch/powerpc/boot/dts/fsl/t1042rdb_pi.dts | 18 +- arch/powerpc/boot/dts/fsl/t104xqds.dtsi | 178 ++++++++++++- arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 33 ++- arch/powerpc/boot/dts/fsl/t2080qds.dts | 158 +++++++++++- arch/powerpc/boot/dts/fsl/t2080rdb.dts | 67 ++++- arch/powerpc/boot/dts/fsl/t2081qds.dts | 221 ++++++++++++++++- arch/powerpc/boot/dts/fsl/t4240qds.dts | 400 +++++++++++++++++++++++++++++- arch/powerpc/boot/dts/fsl/t4240rdb.dts | 149 ++++++++++- 19 files changed, 2198 insertions(+), 19 deletions(-) commit 9979c1c70724ccca8fec10012e320b8145ad5368 Author: Vladimir Zapolskiy Date: Tue Mar 8 11:06:39 2016 -0800 Input: snvs_pwrkey - fix returned value check of syscon_regmap_lookup_by_phandle() On error syscon_regmap_lookup_by_phandle() returns ERR_PTR() value, which makes a check for NULL invalid and may lead to oops on error path. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Dmitry Torokhov drivers/input/keyboard/snvs_pwrkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 334479d1ccc2dd8f3b4a66a8aa8ff72ef93e4b67 Author: Alessio Igor Bogani Date: Fri Mar 4 11:09:11 2016 +0100 powerpc/86xx: Introduce and use common dtsi Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/gef_ppc9a.dts | 258 +++------------------ arch/powerpc/boot/dts/fsl/gef_sbc310.dts | 246 +++----------------- arch/powerpc/boot/dts/fsl/gef_sbc610.dts | 258 +++------------------ arch/powerpc/boot/dts/fsl/mpc8641_hpcn.dts | 300 ++++--------------------- arch/powerpc/boot/dts/fsl/mpc8641_hpcn_36b.dts | 298 ++++-------------------- arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi | 120 ++++++++++ arch/powerpc/boot/dts/fsl/mpc8641si-pre.dtsi | 58 +++++ arch/powerpc/boot/dts/fsl/sbc8641d.dts | 299 +++--------------------- 8 files changed, 394 insertions(+), 1443 deletions(-) commit 595207b93fe43e651548dcb3e6f0ec64e21205fd Author: Alessio Igor Bogani Date: Fri Mar 4 11:09:10 2016 +0100 powerpc/86xx: Update device tree Avoid duplication of the interrupt-parent, migrate to 4 interrupt-cells and set the right clock-frequency for pcie (100 Mhz). Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/gef_ppc9a.dts | 73 ++++++++------------ arch/powerpc/boot/dts/fsl/gef_sbc310.dts | 79 ++++++++------------- arch/powerpc/boot/dts/fsl/gef_sbc610.dts | 73 ++++++++------------ arch/powerpc/boot/dts/fsl/mpc8641_hpcn.dts | 95 ++++++++++---------------- arch/powerpc/boot/dts/fsl/mpc8641_hpcn_36b.dts | 78 ++++++++------------- arch/powerpc/boot/dts/fsl/sbc8641d.dts | 59 ++++++---------- 6 files changed, 169 insertions(+), 288 deletions(-) commit 46f26ec7f6435a2b149279d5e5d3806b9e690659 Author: Alessio Igor Bogani Date: Fri Mar 4 11:09:09 2016 +0100 powerpc/86xx: Move dts files to fsl directory Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/gef_ppc9a.dts | 425 ++++++++++++++++ arch/powerpc/boot/dts/fsl/gef_sbc310.dts | 459 +++++++++++++++++ arch/powerpc/boot/dts/fsl/gef_sbc610.dts | 423 ++++++++++++++++ arch/powerpc/boot/dts/fsl/mpc8641_hpcn.dts | 663 +++++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/mpc8641_hpcn_36b.dts | 605 ++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/sbc8641d.dts | 447 +++++++++++++++++ arch/powerpc/boot/dts/gef_ppc9a.dts | 425 ---------------- arch/powerpc/boot/dts/gef_sbc310.dts | 459 ----------------- arch/powerpc/boot/dts/gef_sbc610.dts | 423 ---------------- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 663 ------------------------- arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts | 605 ---------------------- arch/powerpc/boot/dts/sbc8641d.dts | 447 ----------------- 12 files changed, 3022 insertions(+), 3022 deletions(-) commit 43de32c5630f712b3ab06f22db96a6eeb8bfafdd Author: Alessio Igor Bogani Date: Mon Feb 22 10:26:14 2016 +0100 powerpc/86xx: Switch to kconfig fragments approach Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/Makefile | 10 + arch/powerpc/configs/86xx-hw.config | 104 ++++++++++ arch/powerpc/configs/86xx-smp.config | 2 + arch/powerpc/configs/86xx/gef_ppc9a_defconfig | 234 ----------------------- arch/powerpc/configs/86xx/gef_sbc310_defconfig | 234 ----------------------- arch/powerpc/configs/86xx/gef_sbc610_defconfig | 234 ----------------------- arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig | 231 ---------------------- arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | 234 ----------------------- arch/powerpc/configs/86xx/sbc8641d_defconfig | 234 ----------------------- arch/powerpc/configs/mpc86xx_basic_defconfig | 10 + arch/powerpc/configs/mpc86xx_defconfig | 162 ---------------- 11 files changed, 126 insertions(+), 1563 deletions(-) commit 3d363285a100dd3fc63793662cbb8a2ef79d74b4 Author: Alessio Igor Bogani Date: Mon Feb 22 10:26:13 2016 +0100 powerpc/86xx: Update defconfigs This patch show how defconfigs appear if the kconfig fragment approach is used. Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/configs/86xx/gef_ppc9a_defconfig | 208 +++++++------- arch/powerpc/configs/86xx/gef_sbc310_defconfig | 212 +++++++------- arch/powerpc/configs/86xx/gef_sbc610_defconfig | 277 ++++++++----------- arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig | 156 +++++++++-- arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | 92 ++++++- arch/powerpc/configs/86xx/sbc8641d_defconfig | 336 +++++++++++------------ 6 files changed, 734 insertions(+), 547 deletions(-) commit 4f9d6e95bc31592f0900650cb86c3c74aca4fd53 Author: Alessio Igor Bogani Date: Thu Feb 11 15:38:46 2016 +0100 powerpc/86xx: Consolidate common platform code Signed-off-by: Alessio Igor Bogani Signed-off-by: Scott Wood arch/powerpc/platforms/86xx/Makefile | 2 +- arch/powerpc/platforms/86xx/common.c | 43 ++++++++++++++++++++++++++++++ arch/powerpc/platforms/86xx/gef_ppc9a.c | 32 +--------------------- arch/powerpc/platforms/86xx/gef_sbc310.c | 32 +--------------------- arch/powerpc/platforms/86xx/gef_sbc610.c | 32 +--------------------- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 20 ++------------ arch/powerpc/platforms/86xx/mpc86xx.h | 2 ++ arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 21 +-------------- arch/powerpc/platforms/86xx/sbc8641d.c | 32 +--------------------- 9 files changed, 53 insertions(+), 163 deletions(-) commit 737b01fca3f853a1f3373a79c06e4ee3a574e5b7 Author: Christophe Leroy Date: Tue Feb 9 17:08:33 2016 +0100 powerpc32: Remove one insn in mulhdu Remove one instruction in mulhdu Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/misc_32.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 716fa91d19fb122a1392b362e85929e8385b1fd2 Author: Christophe Leroy Date: Tue Feb 9 17:08:31 2016 +0100 powerpc32: small optimisation in flush_icache_range() Inlining of _dcache_range() functions has shown that the compiler does the same thing a bit better with one insn less Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8478d7f091138be32154c8fc28c52978e342cc6f Author: Christophe Leroy Date: Tue Feb 9 17:08:29 2016 +0100 powerpc: Simplify test in __dma_sync() This simplification helps the compiler. We now have only one test instead of two, so it reduces the number of branches. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit affe587bacf48e328fb8d4c5ef9007b9c555b128 Author: Christophe Leroy Date: Tue Feb 9 17:08:27 2016 +0100 powerpc32: move xxxxx_dcache_range() functions inline flush/clean/invalidate _dcache_range() functions are all very similar and are quite short. They are mainly used in __dma_sync() perf_event locate them in the top 3 consumming functions during heavy ethernet activity They are good candidate for inlining, as __dma_sync() does almost nothing but calling them Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/cacheflush.h | 52 ++++++++++++++++++++++++++-- arch/powerpc/kernel/misc_32.S | 65 ----------------------------------- arch/powerpc/kernel/ppc_ksyms.c | 2 ++ 3 files changed, 51 insertions(+), 68 deletions(-) commit 5736f96d12dd4204d3aac43bf7b512ab434b904f Author: Christophe Leroy Date: Tue Feb 9 17:08:25 2016 +0100 powerpc32: Remove clear_pages() and define clear_page() inline clear_pages() is never used expect by clear_page, and PPC32 is the only architecture (still) having this function. Neither PPC64 nor any other architecture has it. This patch removes clear_pages() and moves clear_page() function inline (same as PPC64) as it only is a few isns Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/page_32.h | 17 ++++++++++++++--- arch/powerpc/kernel/misc_32.S | 16 ---------------- arch/powerpc/kernel/ppc_ksyms_32.c | 1 - 3 files changed, 14 insertions(+), 20 deletions(-) commit d6bfa02fccf58b957f457c1bd0bb71f6ab169a0b Author: Christophe Leroy Date: Tue Feb 9 17:08:23 2016 +0100 powerpc: add inline functions for cache related instructions This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/cache.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 766d45cbeecc383b8ee230370b316d0b1e30d915 Author: Christophe Leroy Date: Tue Feb 9 17:08:21 2016 +0100 powerpc/8xx: rewrite flush_instruction_cache() in C On PPC8xx, flushing instruction cache is performed by writing in register SPRN_IC_CST. This registers suffers CPU6 ERRATA. The patch rewrites the fonction in C so that CPU6 ERRATA will be handled transparently Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/misc_32.S | 10 ++++------ arch/powerpc/mm/8xx_mmu.c | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) commit a7761fe48993f103d6deac6037bf786bd1db0501 Author: Christophe Leroy Date: Tue Feb 9 17:08:18 2016 +0100 powerpc/8xx: rewrite set_context() in C There is no real need to have set_context() in assembly. Now that we have mtspr() handling CPU6 ERRATA directly, we can rewrite set_context() in C language for easier maintenance. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 44 ------------------------------------------ arch/powerpc/mm/8xx_mmu.c | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 44 deletions(-) commit 63e9e1c28fa6fe714364c7817e60dbaed3cec95e Author: Christophe Leroy Date: Tue Feb 9 17:08:16 2016 +0100 powerpc/8xx: remove special handling of CPU6 errata in set_dec() CPU6 ERRATA is now handled directly in mtspr(), so we can use the standard set_dec() fonction in all cases. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/time.h | 6 +----- arch/powerpc/kernel/head_8xx.S | 18 ------------------ 2 files changed, 1 insertion(+), 23 deletions(-) commit 1458dd951f7cc0127508f928497c9ab06b5e557d Author: Christophe Leroy Date: Tue Feb 9 17:08:14 2016 +0100 powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro MPC8xx has an ERRATA on the use of mtspr() for some registers This patch includes the ERRATA handling directly into mtspr() macro so that mtspr() users don't need to bother about that errata Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/reg.h | 2 + arch/powerpc/include/asm/reg_8xx.h | 82 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit 7ee5cf6bfad7990cc33d10888d869c1eb7d4a927 Author: Christophe Leroy Date: Tue Feb 9 17:08:12 2016 +0100 powerpc/8xx: Add missing SPRN defines into reg_8xx.h Add missing SPRN defines into reg_8xx.h Some of them are defined in mmu-8xx.h, so we include mmu-8xx.h in reg_8xx.h, for that we remove references to PAGE_SHIFT in mmu-8xx.h to have it self sufficient, as includers of reg_8xx.h don't all include asm/page.h Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/mmu-8xx.h | 4 ++-- arch/powerpc/include/asm/reg_8xx.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit e974cd4be0be8de0d370ee4dbf181d614c0de386 Author: Christophe Leroy Date: Tue Feb 9 17:08:10 2016 +0100 powerpc32: remove ioremap_base ioremap_base is not initialised and is nowhere used so remove it Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c | 3 +-- arch/powerpc/platforms/embedded6xx/mpc10x.h | 10 ---------- 4 files changed, 2 insertions(+), 14 deletions(-) commit c562eb06d563b8a79824a93641e9a37821cbbc34 Author: Christophe Leroy Date: Tue Feb 9 17:08:08 2016 +0100 powerpc32: Remove useless/wrong MMU:setio progress message Commit 771168494719 ("[POWERPC] Remove unused machine call outs") removed the call to setup_io_mappings(), so remove the associated progress line message Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/mm/init_32.c | 4 ---- 1 file changed, 4 deletions(-) commit 3084cdb7cd6a1609d0a4480291f5e4da80765d03 Author: Christophe Leroy Date: Tue Feb 9 17:07:58 2016 +0100 powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of purpose, and are never defined at the same time. So rename them x_block_mapped() and define them in the relevant places Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/mm/fsl_booke_mmu.c | 6 ++++-- arch/powerpc/mm/mmu_decl.h | 10 ++++++++++ arch/powerpc/mm/pgtable_32.c | 44 ++++++----------------------------------- arch/powerpc/mm/ppc_mmu_32.c | 4 ++-- 4 files changed, 22 insertions(+), 42 deletions(-) commit be00ed728c32ed8311d5191637067c9eaf0fca4b Author: Christophe Leroy Date: Tue Feb 9 17:07:56 2016 +0100 powerpc32: Fix pte_offset_kernel() to return NULL for bad pages The fixmap related functions try to map kernel pages that are already mapped through Large TLBs. pte_offset_kernel() has to return NULL for LTLBs, otherwise the caller will try to access level 2 table which doesn't exist Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/nohash/32/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 516d91893b548d7868adb9e0173a7ca307dc9c17 Author: Christophe Leroy Date: Tue Feb 9 17:07:54 2016 +0100 powerpc/8xx: move setup_initial_memory_limit() into 8xx_mmu.c Now we have a 8xx specific .c file for that so put it in there as other powerpc variants do Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/mm/8xx_mmu.c | 17 +++++++++++++++++ arch/powerpc/mm/init_32.c | 19 ------------------- 2 files changed, 17 insertions(+), 19 deletions(-) commit f15eea6684ee7d23a8be5bc3e7c8323e0e4a5355 Author: Christophe Leroy Date: Tue Feb 9 17:07:52 2016 +0100 powerpc: Update documentation for noltlbs kernel parameter Now the noltlbs kernel parameter is also applicable to PPC8xx Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a372acfac51e0d5858f8f6f84da52defcabf054b Author: Christophe Leroy Date: Tue Feb 9 17:07:50 2016 +0100 powerpc/8xx: Map linear kernel RAM with 8M pages On a live running system (VoIP gateway for Air Trafic Control), over a 10 minutes period (with 277s idle), we get 87 millions DTLB misses and approximatly 35 secondes are spent in DTLB handler. This represents 5.8% of the overall time and even 10.8% of the non-idle time. Among those 87 millions DTLB misses, 15% are on user addresses and 85% are on kernel addresses. And within the kernel addresses, 93% are on addresses from the linear address space and only 7% are on addresses from the virtual address space. MPC8xx has no BATs but it has 8Mb page size. This patch implements mapping of kernel RAM using 8Mb pages, on the same model as what is done on the 40x. In 4k pages mode, each PGD entry maps a 4Mb area: we map every two entries to the same 8Mb physical page. In each second entry, we add 4Mb to the page physical address to ease life of the FixupDAR routine. This is just ignored by HW. In 16k pages mode, each PGD entry maps a 64Mb area: each PGD entry will point to the first page of the area. The DTLB handler adds the 3 bits from EPN to map the correct page. With this patch applied, we now get only 13 millions TLB misses during the 10 minutes period. The idle time has increased to 313s and the overall time spent in DTLB miss handler is 6.3s, which represents 1% of the overall time and 2.2% of non-idle time. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 35 +++++++++++++++++- arch/powerpc/mm/8xx_mmu.c | 83 ++++++++++++++++++++++++++++++++++++++++++ arch/powerpc/mm/Makefile | 1 + arch/powerpc/mm/mmu_decl.h | 15 ++------ 4 files changed, 120 insertions(+), 14 deletions(-) commit 913a6b3d10d85a032eff2f31254c35e0976f5e32 Author: Christophe Leroy Date: Tue Feb 9 17:07:48 2016 +0100 powerpc/8xx: Save r3 all the time in DTLB miss handler We are spending between 40 and 160 cycles with a mean of 65 cycles in the DTLB handling routine (measured with mftbl) so make it more simple althought it adds one instruction. With this modification, we get three registers available at all time, which will help with following patch. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 7b6e7ba8e81a862e20d213d90aa5ba1e5a02aba6 Author: David Daney Date: Fri Mar 4 14:31:48 2016 -0800 PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices The cavium,pci-thunder-ecam devices are exactly ECAM-based PCI root complexes. These root complexes (loosely referred to as ECAM units in the hardware manuals) are used to access the Thunder on-chip devices. They are special in that all the BARs on devices behind these root complexes are at fixed addresses. Add a driver for these devices that synthesizes Enhanced Allocation (EA) capability entries for each BAR. Since this EA synthesis is needed for exactly two chip models, we can hard- code some assumptions about the device topology and the layout of the config space of specific DEVFNs in the driver. [bhelgaas: changelog, whitespace] Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/pci-thunder-ecam.txt | 30 ++ drivers/pci/host/Kconfig | 7 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-thunder-ecam.c | 403 +++++++++++++++++++++ 4 files changed, 441 insertions(+) commit f12b76e56ada6e276a3d45b60c4e26e2dda7e547 Author: David Daney Date: Fri Mar 4 14:31:47 2016 -0800 PCI: thunder: Add PCIe host driver for ThunderX processors The root complexes used to access off-chip PCIe devices (called PEM units in the hardware manuals) on some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config space accessor functions. Use the pci-host-common code to configure the PCI machinery. Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Acked-by: Arnd Bergmann .../devicetree/bindings/pci/pci-thunder-pem.txt | 43 +++ MAINTAINERS | 8 + drivers/pci/host/Kconfig | 7 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-thunder-pem.c | 346 +++++++++++++++++++++ 5 files changed, 405 insertions(+) commit 4e64dbe226e707b442d45c2096dde2090f34f84d Author: David Daney Date: Fri Mar 11 15:35:55 2016 -0600 PCI: generic: Expose pci_host_common_probe() for use by other drivers Move pci_host_common_probe() and associated functions to pci-host-common.c, where it can be shared with other drivers. Make it public (not static) and update Kconfig and Makefile to build it. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Acked-by: Will Deacon MAINTAINERS | 1 + drivers/pci/host/Kconfig | 4 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-host-common.c | 194 ++++++++++++++++++++++++++++++++++++ drivers/pci/host/pci-host-common.h | 3 + drivers/pci/host/pci-host-generic.c | 165 ------------------------------ 6 files changed, 203 insertions(+), 165 deletions(-) commit d51b371087d7198c733d2ef3c4db8165aee4de4e Author: David Daney Date: Fri Mar 11 15:25:13 2016 -0600 PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe() Factor gen_pci_probe(), moving most of it into pci_host_common_probe() where it can be shared with other drivers that have slightly different config accessors. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Acked-by: Will Deacon drivers/pci/host/pci-host-generic.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 7149b9fdaa5e160a7ee2af9014d9af77e87d9689 Author: David Daney Date: Fri Mar 11 15:18:38 2016 -0600 PCI: generic: Move structure definitions to separate header file Move definitions for generic PCI host controller driver structures to a separate header file so we can share them with other drivers. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: David Daney Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Acked-by: Will Deacon drivers/pci/host/pci-host-common.h | 44 +++++++++++++++++++++++++++++++++++++ drivers/pci/host/pci-host-generic.c | 19 +--------------- 2 files changed, 45 insertions(+), 18 deletions(-) commit c3667cc6190469d2c7196c2d4dc75fcb33a0814f Author: Mike Snitzer Date: Thu Mar 10 11:31:35 2016 -0500 dm thin: consistently return -ENOSPC if pool has run out of data space Commit 0a927c2f02 ("dm thin: return -ENOSPC when erroring retry list due to out of data space") was a step in the right direction but didn't go far enough. Add a new 'out_of_data_space' flag to 'struct pool' and set it if/when the pool runs of of data space. This fixes cell_error() and error_retry_list() to not blindly return -EIO. We cannot rely on the 'error_if_no_space' feature flag since it is transient (in that it can be reset once space is added, plus it only controls whether errors are issued, it doesn't reflect whether the pool is actually out of space). Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 125234dc8b1cc862f52d8bd5b37c36cc59b2cb86 Merge: 2a4fb27 0bbca27 Author: Dave Airlie Date: Sat Mar 12 06:53:30 2016 +1000 Merge tag 'drm-intel-fixes-2016-03-11' of git://anongit.freedesktop.org/drm-intel into drm-next Two i915 regression fixes. * tag 'drm-intel-fixes-2016-03-11' of git://anongit.freedesktop.org/drm-intel: drm/i915: Actually retry with bit-banging after GMBUS timeout drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW commit 2aa45984c2180eecbbc9cc4e1321243308f41a01 Merge: 627caa9 8f60baf Author: David S. Miller Date: Fri Mar 11 15:20:21 2016 -0500 Merge branch 'qed-mf-updates' Yuval Mintz says: ==================== qed: Management firmware updates This series contains several changes to driver interaction with the management fw. The biggest [& most significant] change here is a change in the locking scheme and re-definition of the 'critical section' when accessing shared resources toward the goal of interacting with the management firmware. ==================== Signed-off-by: David S. Miller commit 8f60bafec368191594a8a6ed5f0ce14968131754 Author: Yuval Mintz Date: Wed Mar 9 09:16:26 2016 +0200 qed: Enlrage the drain timeout In the scenario where slowpath configuration isn't passing due to various pause configurations affecting the chip, the theoretical time required in worst-case-scenario to empty hw fifos sufficiently to guarantee that slowpath configuration would flow is currently insufficient. This increases such a drain request to the theoretical maximum. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 334c03b59ba28aa76384474e705a8a0d47f0bb39 Author: Zvi Nachmani Date: Wed Mar 9 09:16:25 2016 +0200 qed: Notify of transciever changes Handle a new message from the MFW, one that indicate that the transciever state has changed, and log that into the system logs. Signed-off-by: Zvi Nachmani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 11 +++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 5529bad98f10f742e3ab490733bed8e108508759 Author: Tomer Tayar Date: Wed Mar 9 09:16:24 2016 +0200 qed: Major changes to MB locking Driver interaction with the managemnt firmware is done via mailbox commands which the management firmware periodically sample, as well as placing of additional data in set places in the shared memory. Each PF has a single designated mailbox address, and all flows that require messaging to the management should use it. This patch does 2 things: 1. It re-defines the critical section surrounding the mailbox sending - that section should include the setting of the shared memory as well as the sending of the command [otherwise a race might send a command with the data of a different command]. 2. It moves the locking scheme from using mutices into using spinlocks. This lays the groundwork for sending MFW commands from non-sleepable contexts. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 250 ++++++++++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 14 +- 2 files changed, 167 insertions(+), 97 deletions(-) commit fc916ff2027760900f3b373c388a2098253f3c2a Author: Sudarsana Reddy Kalluru Date: Wed Mar 9 09:16:23 2016 +0200 qed: Prevent MF link notifications When device is configured for Multi-function mode, some older management firmware might incorrectly notify interfaces of link changes while they haven't requested the physical link configuration to be set. This can create bizzare race conditions where unloading interfaces are getting notified that the link is up. Let the driver compensate - store the logical requested state of the link and don't propagate notifications after protocol driver explicitly requires the link to be unset. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 3 +++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 627caa9d319d2402f3d41ebd8dd0fde9d41a33a7 Merge: e327f4e 4018ab1 Author: David S. Miller Date: Fri Mar 11 15:14:27 2016 -0500 Merge branch 'bpf-flow-labels' Daniel Borkmann says: ==================== BPF support for flow labels This set adds support for tunnel key flow labels for vxlan and geneve devices in collect meta data mode and eBPF support for managing these. For details please see individual patches. ==================== Signed-off-by: David S. Miller commit 4018ab1875e0d00b84ac61bc15427136ad55849e Author: Daniel Borkmann Date: Wed Mar 9 03:00:05 2016 +0100 bpf: support flow label for bpf_skb_{set, get}_tunnel_key This patch extends bpf_tunnel_key with a tunnel_label member, that maps to ip_tunnel_key's label so underlying backends like vxlan and geneve can propagate the label to udp_tunnel6_xmit_skb(), where it's being set in the IPv6 header. It allows for having 20 more bits to encode/decode flow related meta information programmatically. Tested with vxlan and geneve. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 8eb3b99554b82da968d1fbc00df9f3156c5e2d63 Author: Daniel Borkmann Date: Wed Mar 9 03:00:04 2016 +0100 geneve: support setting IPv6 flow label This work adds support for setting the IPv6 flow label for geneve per device and through collect metadata (ip_tunnel_key) frontends. Also here, the geneve dst cache does not need any special considerations, for the cases where caches can be used, the label is static per cache. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/geneve.c | 35 +++++++++++++++++++++++++++-------- include/uapi/linux/if_link.h | 1 + 2 files changed, 28 insertions(+), 8 deletions(-) commit e7f70af111f086a20800ad2e17f544b2e3e0f375 Author: Daniel Borkmann Date: Wed Mar 9 03:00:03 2016 +0100 vxlan: support setting IPv6 flow label This work adds support for setting the IPv6 flow label for vxlan per device and through collect metadata (ip_tunnel_key) frontends. The vxlan dst cache does not need any special considerations here, for the cases where caches can be used, the label is static per cache. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/vxlan.c | 26 +++++++++++++++++++++----- include/net/vxlan.h | 1 + include/uapi/linux/if_link.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) commit 134611446dc657e1bbc73ca0e4e6b599df687db0 Author: Daniel Borkmann Date: Wed Mar 9 03:00:02 2016 +0100 ip_tunnel: add support for setting flow label via collect metadata This patch extends udp_tunnel6_xmit_skb() to pass in the IPv6 flow label from call sites. Currently, there's no such option and it's always set to zero when writing ip6_flow_hdr(). Add a label member to ip_tunnel_key, so that flow-based tunnels via collect metadata frontends can make use of it. vxlan and geneve will be converted to add flow label support separately. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 2 +- include/net/dst_metadata.h | 5 ++++- include/net/ip_tunnels.h | 4 +++- include/net/udp_tunnel.h | 4 ++-- net/ipv6/ip6_udp_tunnel.c | 6 +++--- net/tipc/udp_media.c | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) commit e327f4e193b6a176f4dc3b19faf6371a8917588d Author: Joe Perches Date: Tue Mar 8 13:54:56 2016 -0800 cisco: enic: Update logging macros and uses Don't hide varibles used by the logging macros. Miscellanea: o Use the more common ##__VA_ARGS__ extension o Add missing newlines to formats o Realign arguments Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 22 ++++++++------ drivers/net/ethernet/cisco/enic/vnic_cq.c | 2 +- drivers/net/ethernet/cisco/enic/vnic_dev.c | 45 +++++++++++++++-------------- drivers/net/ethernet/cisco/enic/vnic_intr.c | 3 +- drivers/net/ethernet/cisco/enic/vnic_rq.c | 4 +-- drivers/net/ethernet/cisco/enic/vnic_wq.c | 4 +-- 6 files changed, 43 insertions(+), 37 deletions(-) commit 5390dba1a5390c9724db5c5714506301dfe31a7b Merge: 8e2ad41 4c656c1 Author: David S. Miller Date: Fri Mar 11 14:59:55 2016 -0500 Merge branch 'bridge_ageing_time' Stephen Hemminger says: ==================== bridge: ageing timer regression fix This fixes regression in how ageing timer is managed. Backing out the change required fixing switch drivers as well. ==================== Signed-off-by: David S. Miller commit 4c656c13b254d598e83e586b7b4d36a2043dad85 Author: Stephen Hemminger Date: Tue Mar 8 12:59:35 2016 -0800 bridge: allow zero ageing time This fixes a regression in the bridge ageing time caused by: commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") There are users of Linux bridge which use the feature that if ageing time is set to 0 it causes entries to never expire. See: https://www.linuxfoundation.org/collaborate/workgroups/networking/bridge For a pure software bridge, it is unnecessary for the code to have arbitrary restrictions on what values are allowable. Signed-off-by: Stephen Hemminger Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/if_bridge.h | 4 ---- net/bridge/br_stp.c | 11 ++++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) commit 88de1cd457e5cb664d6d437e2ea4750d089165f5 Author: Ido Schimmel Date: Tue Mar 8 12:59:34 2016 -0800 rocker: set FDB cleanup timer according to lowest ageing time In rocker, ageing time is a per-port attribute, so the next time the FDB cleanup timer fires should be set according to the lowest ageing time. This will later allow us to delete the BR_MIN_AGEING_TIME macro, which was added to guarantee minimum ageing time in the bridge layer, thereby breaking existing behavior. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker.h | 1 + drivers/net/ethernet/rocker/rocker_main.c | 2 ++ drivers/net/ethernet/rocker/rocker_ofdpa.c | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) commit 869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10 Author: Ido Schimmel Date: Tue Mar 8 12:59:33 2016 -0800 mlxsw: spectrum: Check requested ageing time is valid Commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") added a check for minimum and maximum ageing time, but this breaks existing behaviour where one can set ageing time to 0 for a non-learning bridge. Push this check down to the driver and allow the check in the bridge layer to be removed. Currently ageing time 0 is refused by the driver, but we can later add support for this functionality. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 8e2ad4113ce4671686740f808ff2795395c39eef Author: Willem de Bruijn Date: Tue Mar 8 15:18:54 2016 -0500 macvtap: always pass ethernet header in linear The stack expects link layer headers in the skb linear section. Macvtap can create skbs with llheader in frags in edge cases: when (IFF_VNET_HDR is off or vnet_hdr.hdr_len < ETH_HLEN) and prepad + len > PAGE_SIZE and vnet_hdr.flags has no or bad csum. Add checks to ensure linear is always at least ETH_HLEN. At this point, len is already ensured to be >= ETH_HLEN. For backwards compatiblity, rounds up short vnet_hdr.hdr_len. This differs from tap and packet, which return an error. Fixes b9fb9ee07e67 ("macvtap: add GSO/csum offload support") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/macvtap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ab597d35ef11d2a921e0ec507a9b7861bcb44cbd Author: Bharat Kumar Gogada Date: Sun Mar 6 22:02:14 2016 +0530 PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller Add PCIe Root Port driver for Xilinx PCIe NWL bridge IP. [bhelgaas: wait for link like dw_pcie_wait_for_link(), simplify bitmap error path, typos, whitespace, fold in Dan Carpenter's PTR_ERR() fix] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Reviewed-by: Marc Zyngier Acked-by: Rob Herring .../devicetree/bindings/pci/xilinx-nwl-pcie.txt | 68 ++ drivers/pci/host/Kconfig | 10 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-xilinx-nwl.c | 881 +++++++++++++++++++++ 4 files changed, 960 insertions(+) commit 25de15c958e98747c7dada3983474bd4b8ae381b Author: Shawn Lin Date: Mon Mar 7 12:32:21 2016 +0800 PCI: keystone: Defer probing if devm_phy_get() returns -EPROBE_DEFER A SerDes PHY is optional, so if devm_phy_get() doesn't find one at all, that's fine. But if devm_phy_get() finds a PHY that doesn't have a driver yet, it returns -EPROBE_DEFER. In that case, defer probing the Keystone driver. We may be able to load it later after a PHY driver is loaded. [bhelgaas: changelog, check for -EPROBE_DEFER first] Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-keystone.c | 3 +++ 1 file changed, 3 insertions(+) commit eff31f4002c4e25b9b8c39d0a3a551c6c64c77e8 Author: Ley Foon Tan Date: Wed Mar 2 17:43:07 2016 +0800 PCI: altera: Fix altera_pcie_link_is_up() Originally altera_pcie_link_is_up() decided the link was up if any of the low four bits of the LTSSM register were set. But the link is only up if the LTSSM state is L0, so check for that exact value. [bhelgaas: changelog] Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-altera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 304e6d572bf2dc810b806254123f7412dba334fa Author: Simon Horman Date: Thu Feb 25 09:45:56 2016 +0900 PCI: rcar: Depend on ARCH_RENESAS, not ARCH_SHMOBILE Make the R-Car drivers depend on ARCH_RENESAS instead of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS. The motivation is that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM-based SoCs. Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas Acked-by: Geert Uytterhoeven drivers/pci/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62d5bdf972ebcfc99f72f734ae979713e4ca6450 Merge: e52d839 48147b9 Author: Dmitry Torokhov Date: Fri Mar 11 09:51:25 2016 -0800 Merge branch 'synaptics-rmi4' into next Bring in support for devices using Synaptics RMI4 protocol, including RMI4 bus, 2D sensor and button handlers, and SPI and I2C interface drivers. commit 6871c1b96de88d3576d935b528fd1b0ec70e81f5 Author: Brian Norris Date: Thu Mar 10 12:47:23 2016 -0800 mtd: nand: remove kerneldoc for removed function parameter The 'getchip' parameter is gone as of commit 9f3e04297b08 ("mtd: nand: don't select chip in nand_chip's block_bad op"), so kill the doc with it. Reported-by: kbuild test robot Signed-off-by: Brian Norris Acked-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 1 - 1 file changed, 1 deletion(-) commit 8134233e8d346aaa1c929dc510e75482ae318bce Author: Dan Carpenter Date: Thu Mar 10 10:45:32 2016 +0300 ata: ahci_xgene: dereferencing uninitialized pointer in probe If the call to acpi_get_object_info() fails then "info" hasn't been initialized. In that situation, we already know that "version" should be XGENE_AHCI_V1 so we don't actually need to dereference "info". Fixes: c9802a4be661 ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.') Signed-off-by: Dan Carpenter Signed-off-by: Tejun Heo drivers/ata/ahci_xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22aceb317678057dced5f1d6e3ac15acdb863e7b Author: Anna-Maria Gleixner Date: Thu Mar 10 12:07:38 2016 +0100 workqueue: Fix comment for work_on_cpu() Function is processed in thread context, not in user context. Cc: Tejun Heo Cc: Lai Jiangshan Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Anna-Maria Gleixner Signed-off-by: Tejun Heo kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ba559fd09bcf4e87faad3efa465dacf04c076c9 Author: Scott Lawson Date: Fri Feb 26 10:09:52 2016 -0800 AHCI: Remove obsolete Intel Lewisburg SATA RAID device IDs These PCI device IDs have been removed from the Intel Lewisburg design specification. They are no longer needed. Signed-off-by: Scott Lawson Signed-off-by: Tejun Heo drivers/ata/ahci.c | 4 ---- 1 file changed, 4 deletions(-) commit fe6c58146d42785386ca69bb1e35d53ac5940cb7 Merge: 51b1b28 dc8b4af Author: Tejun Heo Date: Fri Mar 11 12:30:17 2016 -0500 Merge branch 'for-4.5-fixes' into for-4.6 commit 6c83e6cb0ce897818878a7d3b1b25d5dc8f611a2 Author: Parav Pandit Date: Sat Mar 5 11:20:58 2016 +0530 Documentation: cgroup v2: Trivial heading correction. Corrected the heading to match with index. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8208d21bf309551686b7a76d19059ae182a956d0 Author: Amir Vadai Date: Fri Mar 11 11:08:45 2016 +0200 net/flower: Fix pointer cast Cast pointer to unsigned long instead of u64, to fix compilation warning on 32 bit arch, spotted by 0day build. Fixes: 5b33f48 ("net/flower: Introduce hardware offload support") Signed-off-by: Amir Vadai Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 +- net/sched/cls_flower.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 4c9d6c18fdebfcfb18918a656355a3c7c3d45e13 Author: Sukadev Bhattiprolu Date: Thu Dec 3 18:26:40 2015 -0500 perf test: Remove 'core_id' check in topo test The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online. There are 8 online CPUs: $ cat /sys/devices/system/cpu/online 0-7 but core-ids are not sequential and some core-ids exceed the number of online CPUs. $ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10 Looks like we can safely remove the check. Output before: $ perf --version perf version 4.4.rc1.g34258a $ perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED! and after: $ perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 6532 templ file: /tmp/perf-test-y10wFJ CPU 0, core 0, socket 0 CPU 1, core 1, socket 0 CPU 2, core 9, socket 0 CPU 3, core 10, socket 0 CPU 4, core 0, socket 1 CPU 5, core 1, socket 1 CPU 6, core 9, socket 1 CPU 7, core 10, socket 1 test child finished with 0 ---- end ---- Test topology in session: Ok Signed-off-by: Sukadev Bhattiprolu Cc: Jan Stancek Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/20151203233219.GA27696@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-) commit 07c9a8e07771fce74620aa4f8132537196b8e43a Author: Dan Carpenter Date: Fri Mar 11 11:08:56 2016 +0300 btrfs: scrub: silence an uninitialized variable warning It's basically harmless if "ref_level" isn't initialized since it's only used for an error message, but it causes a static checker warning. Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebb8765b2ded869b75bf5154b048119eb52571f7 Author: Anand Jain Date: Thu Mar 10 17:26:59 2016 +0800 btrfs: move btrfs_compression_type to compression.h So that its better organized. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 1 + fs/btrfs/compression.h | 9 +++++++++ fs/btrfs/ctree.h | 8 -------- fs/btrfs/disk-io.c | 1 + fs/btrfs/extent_map.c | 1 + fs/btrfs/file-item.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/ordered-data.c | 1 + fs/btrfs/props.c | 1 + fs/btrfs/send.c | 1 + fs/btrfs/tests/inode-tests.c | 1 + fs/btrfs/tree-log.c | 1 + 13 files changed, 20 insertions(+), 8 deletions(-) commit 8ae1af3cd127d507dcb1acf67f16120f20632aed Author: Anand Jain Date: Thu Mar 10 12:49:14 2016 +0800 btrfs: rename btrfs_print_info to btrfs_print_mod_info So that it indicates what it does. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c1d84b71ebee2757b6c8691494a5716a7806bfa Author: Satoru Takeuchi Date: Wed Mar 9 15:18:57 2016 +0900 Btrfs: Show a warning message if one of objectid reaches its highest value It's better to show a warning message for the exceptional case that one of objectid (in most case, inode number) reaches its highest value. For example, if inode cache is off and this event happens, we can't create any file even if there are not so many files. This message ease detecting such problem. Signed-off-by: Satoru Takeuchi Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode-map.c | 3 +++ 1 file changed, 3 insertions(+) commit 3c177a166253653bf9c377eb28a5155ea2d9b631 Author: Sudeep Holla Date: Mon Feb 1 18:28:17 2016 +0000 pinctrl: single: Use a separate lockdep class The single pinmux controller can be cascaded to the other interrupt controllers. Hence when propagating wake-up settings to its parent interrupt controller, there's possiblity of detecting possible recursive locking and getting lockdep warning. This patch avoids this false positive by using a separate lockdep class for this single pinctrl interrupts. Cc: linux-gpio@vger.kernel.org Suggested-by: Thomas Gleixner Signed-off-by: Sudeep Holla Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6788f5ca6402020dc02eda1a5c8748e8c3c99bf4 Author: David Sterba Date: Tue Mar 8 18:04:46 2016 +0100 Documentation: btrfs: remove usage specific information The document in the kernel sources is yet another palce where the documentation would need to be updated, while it is not the primary source. We actively maintain the wiki pages. Signed-off-by: David Sterba Documentation/filesystems/btrfs.txt | 274 ++---------------------------------- 1 file changed, 11 insertions(+), 263 deletions(-) commit 02def69fae9298331684a2782b91c14362936fe8 Author: Rasmus Villemoes Date: Fri Nov 27 09:42:11 2015 +0100 btrfs: use kbasename in btrfsic_mount This is more readable. Signed-off-by: Rasmus Villemoes Reviewed-by Andy Shevchenko Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 96851d391d02142f358fe7030f8795f84921329b Author: Andre Przywara Date: Tue Mar 8 16:37:59 2016 +0700 drivers: pinctrl: add driver for Allwinner A64 SoC Based on the Allwinner A64 user manual and on the previous sunxi pinctrl drivers this introduces the pin multiplex assignments for the ARMv8 Allwinner A64 SoC. Port A is apparently used for the fixed function DRAM controller, so the ports start at B here (the manual mentions "n from 1 to 7", so not starting at 0). Signed-off-by: Andre Przywara Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Linus Walleij .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c | 601 +++++++++++++++++++++ 4 files changed, 607 insertions(+) commit 6a0e78072c2ae7b20b14e0249d8108441ea928d2 Author: Johan Hedberg Date: Fri Mar 11 09:56:33 2016 +0200 Bluetooth: Fix potential buffer overflow with Add Advertising The Add Advertising command handler does the appropriate checks for the AD and Scan Response data, however fails to take into account the general length of the mgmt command itself, which could lead to potential buffer overflows. This patch adds the necessary check that the mgmt command length is consistent with the given ad and scan_rsp lengths. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org net/bluetooth/mgmt.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6a19cc8c892b113fb84947207346f783de76dbd1 Author: Johan Hedberg Date: Fri Mar 11 09:56:32 2016 +0200 Bluetooth: Fix setting correct flags in AD A recent change added MGMT_ADV_FLAG_DISCOV to the flags returned by get_adv_instance_flags(), however failed to take into account limited discoverable mode. This patch fixes the issue by setting the correct discoverability flag in the AD data. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 34074205bb9f04b416efb3cbedcd90f418c86200 Author: Tadeusz Struk Date: Tue Mar 8 10:37:15 2016 -0800 crypto: qat - remove redundant arbiter configuration The default arbiter configuration for ring weights and response ordering is exactly what we want so we don't need to configure anything more. This will also fix the problem where number of bundles is different between different devices. Reported-by: Ahsan Atta Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_hw_arbiter.c | 19 ------------------- 1 file changed, 19 deletions(-) commit b62917a2622ebcb03a500ef20da47be80d8c8951 Author: Vladimir Zapolskiy Date: Sun Mar 6 03:22:04 2016 +0200 crypto: ux500 - fix checks of error code returned by devm_ioremap_resource() The change fixes potential oops while accessing iomem on invalid address, if devm_ioremap_resource() fails due to some reason. The devm_ioremap_resource() function returns ERR_PTR() and never returns NULL, which makes useless a following check for NULL. Signed-off-by: Vladimir Zapolskiy Fixes: 5a4eea2658c93 ("crypto: ux500 - Use devm_xxx() managed function") Signed-off-by: Herbert Xu drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- drivers/crypto/ux500/hash/hash_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9b52d55f4f0e2bb9a34abbcf99e05e17f1b3b281 Author: Vladimir Zapolskiy Date: Sun Mar 6 03:21:52 2016 +0200 crypto: atmel - fix checks of error code returned by devm_ioremap_resource() The change fixes potential oops while accessing iomem on invalid address, if devm_ioremap_resource() fails due to some reason. The devm_ioremap_resource() function returns ERR_PTR() and never returns NULL, which makes useless a following check for NULL. Signed-off-by: Vladimir Zapolskiy Fixes: b0e8b3417a62 ("crypto: atmel - use devm_xxx() managed function") Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 4 ++-- drivers/crypto/atmel-sha.c | 4 ++-- drivers/crypto/atmel-tdes.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 84a0ced0b6b47755bf26931ad5ed0ad267139964 Author: Pingchao Yang Date: Thu Mar 3 02:46:45 2016 -0500 crypto: qat - Change the definition of icp_qat_uof_regtype The definition of icp_qat_uof_regtype should be coherent with the definition in firmware compiler. Signed-off-by: Yang Pingchao Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/icp_qat_uclo.h | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit b93f342da1766ef1740e6277508329356c4ea48b Author: Arnd Bergmann Date: Wed Mar 2 16:58:59 2016 +0100 hwrng: exynos - use __maybe_unused to hide pm functions The exynos random driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function] drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu drivers/char/hw_random/exynos-rng.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ea0375afa17281e9e0190034215d0404dbad7449 Author: Gary R Hook Date: Tue Mar 1 13:49:25 2016 -0600 crypto: ccp - Add abstraction for device-specific calls Support for different generations of the coprocessor requires that an abstraction layer be implemented for interacting with the hardware. This patch splits out version-specific functions to a separate file and populates the version structure (acting as a driver) with function pointers. Signed-off-by: Gary R Hook Acked-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/Makefile | 2 +- drivers/crypto/ccp/ccp-dev-v3.c | 533 ++++++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.c | 306 ++-------------------- drivers/crypto/ccp/ccp-dev.h | 138 +++++++++- drivers/crypto/ccp/ccp-ops.c | 381 +-------------------------- drivers/crypto/ccp/ccp-pci.c | 10 +- drivers/crypto/ccp/ccp-platform.c | 7 +- 7 files changed, 710 insertions(+), 667 deletions(-) commit c7019c4d739e79d7baaa13c86dcaaedec8113d70 Author: Gary R Hook Date: Tue Mar 1 13:49:15 2016 -0600 crypto: ccp - CCP versioning support Future hardware may introduce new algorithms wherein the driver will need to manage resources for different versions of the cryptographic coprocessor. This precursor patch determines the version of the available device, and marks and registers algorithms accordingly. A structure is added which manages the version-specific data. Signed-off-by: Gary R Hook Acked-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes.c | 12 +++++++++++- drivers/crypto/ccp/ccp-crypto-sha.c | 9 ++++++++- drivers/crypto/ccp/ccp-dev.c | 27 +++++++++++++++++++++++++ drivers/crypto/ccp/ccp-dev.h | 8 ++++++++ drivers/crypto/ccp/ccp-pci.c | 8 +++++++- drivers/crypto/ccp/ccp-platform.c | 39 +++++++++++++++++++++++++++++++++++-- include/linux/ccp.h | 17 ++++++++++++++++ 7 files changed, 115 insertions(+), 5 deletions(-) commit 553d2374db0bb3f48bbd29bef7ba2a4d1a3f325d Author: Gary R Hook Date: Tue Mar 1 13:49:04 2016 -0600 crypto: ccp - Support for multiple CCPs Enable management of >1 CCPs in a system. Each device will get a unique identifier, as well as uniquely named resources. Treat each CCP as an orthogonal unit and register resources individually. Signed-off-by: Gary R Hook Acked-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 113 +++++++++++++++++++++++++++++++++----- drivers/crypto/ccp/ccp-dev.h | 9 ++- drivers/crypto/ccp/ccp-pci.c | 7 ++- drivers/crypto/ccp/ccp-platform.c | 4 +- 4 files changed, 114 insertions(+), 19 deletions(-) commit 3f19ce2054541a6c663c8a5fcf52e7baa1c6c5f5 Author: Gary R Hook Date: Tue Mar 1 13:48:54 2016 -0600 crypto: ccp - Remove check for x86 family and model Each x86 SoC will make use of a unique PCI ID for the CCP device so it is not necessary to check for the CPU family and model. Signed-off-by: Gary R Hook Acked-by: Tom Lendacky Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 47 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 36 deletions(-) commit 13aa38e291bdd4e4018f40dd2f75e464814dcbf3 Author: Arnd Bergmann Date: Tue Feb 16 16:03:23 2016 +0100 xen kconfig: don't "select INPUT_XEN_KBDDEV_FRONTEND" The Xen framebuffer driver selects the xen keyboard driver, so the latter will be built-in if XEN_FBDEV_FRONTEND=y. However, when CONFIG_INPUT is a loadable module, this configuration cannot work. On mainline kernels, the symbol will be enabled but not used, while in combination with a patch I have to detect such useless configurations, we get the expected link failure: drivers/input/built-in.o: In function `xenkbd_remove': xen-kbdfront.c:(.text+0x2f0): undefined reference to `input_unregister_device' xen-kbdfront.c:(.text+0x30e): undefined reference to `input_unregister_device' This removes the extra "select", as it just causes more trouble than it helps. In theory, some defconfig file might break if it has XEN_FBDEV_FRONTEND in it but not INPUT_XEN_KBDDEV_FRONTEND. The Kconfig fragment we ship in the kernel (kernel/configs/xen.config) however already enables both, and anyone using an old .config file would keep having both enabled. Signed-off-by: Arnd Bergmann Suggested-by: David Vrabel Fixes: 36c1132e34bd ("xen kconfig: fix select INPUT_XEN_KBDDEV_FRONTEND") Acked-by: Stefano Stabellini Signed-off-by: Tomi Valkeinen drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 2776e0e8ef683a42fe3e9a5facf576b73579700e Author: Catalin Marinas Date: Thu Mar 10 18:41:16 2016 +0000 arm64: kasan: Fix zero shadow mapping overriding kernel image shadow With the 16KB and 64KB page size configurations, SWAPPER_BLOCK_SIZE is PAGE_SIZE and ARM64_SWAPPER_USES_SECTION_MAPS is 0. Since kimg_shadow_end is not page aligned (_end shifted by KASAN_SHADOW_SCALE_SHIFT), the edges of previously mapped kernel image shadow via vmemmap_populate() may be overridden by subsequent calls to kasan_populate_zero_shadow(), leading to kernel panics like below: ------------------------------------------------------------------------------ Unable to handle kernel paging request at virtual address fffffc100135068c pgd = fffffc8009ac0000 [fffffc100135068c] *pgd=00000009ffee0003, *pud=00000009ffee0003, *pmd=00000009ffee0003, *pte=00e0000081a00793 Internal error: Oops: 9600004f [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.5.0-rc4+ #1984 Hardware name: Juno (DT) task: fffffe09001a0000 ti: fffffe0900200000 task.ti: fffffe0900200000 PC is at __memset+0x4c/0x200 LR is at kasan_unpoison_shadow+0x34/0x50 pc : [] lr : [] pstate: 00000245 sp : fffffe0900203db0 x29: fffffe0900203db0 x28: 0000000000000000 x27: 0000000000000000 x26: 0000000000000000 x25: fffffc80099b69d0 x24: 0000000000000001 x23: 0000000000000000 x22: 0000000000002000 x21: dffffc8000000000 x20: 1fffff9001350a8c x19: 0000000000002000 x18: 0000000000000008 x17: 0000000000000147 x16: ffffffffffffffff x15: 79746972100e041d x14: ffffff0000000000 x13: ffff000000000000 x12: 0000000000000000 x11: 0101010101010101 x10: 1fffffc11c000000 x9 : 0000000000000000 x8 : fffffc100135068c x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000040 x4 : 0000000000000004 x3 : fffffc100134f651 x2 : 0000000000000400 x1 : 0000000000000000 x0 : fffffc100135068c Process swapper/0 (pid: 1, stack limit = 0xfffffe0900200020) Call trace: [] __memset+0x4c/0x200 [] __asan_register_globals+0x5c/0xb0 [] _GLOBAL__sub_I_65535_1_sunrpc_cache_lookup+0x1c/0x28 [] kernel_init_freeable+0x104/0x274 [] kernel_init+0x10/0xf8 [] ret_from_fork+0x10/0x50 ------------------------------------------------------------------------------ This patch aligns kimg_shadow_start and kimg_shadow_end to SWAPPER_BLOCK_SIZE in all configurations. Fixes: f9040773b7bb ("arm64: move kernel image to base of vmalloc area") Signed-off-by: Catalin Marinas Acked-by: Mark Rutland Acked-by: Ard Biesheuvel arch/arm64/mm/kasan_init.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2f76969f2eef051bdd63d38b08d78e790440b0ad Author: Catalin Marinas Date: Thu Mar 10 18:30:56 2016 +0000 arm64: kasan: Use actual memory node when populating the kernel image shadow With the 16KB or 64KB page configurations, the generic vmemmap_populate() implementation warns on potential offnode page_structs via vmemmap_verify() because the arm64 kasan_init() passes NUMA_NO_NODE instead of the actual node for the kernel image memory. Fixes: f9040773b7bb ("arm64: move kernel image to base of vmalloc area") Signed-off-by: Catalin Marinas Reported-by: James Morse Acked-by: Ard Biesheuvel Acked-by: Mark Rutland arch/arm64/mm/kasan_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fdc69e7df3cb24f18a93192641786e5b7ecd1dfe Author: Catalin Marinas Date: Wed Mar 9 16:31:29 2016 +0000 arm64: Update PTE_RDONLY in set_pte_at() for PROT_NONE permission The set_pte_at() function must update the hardware PTE_RDONLY bit depending on the state of the PTE_WRITE and PTE_DIRTY bits of the given entry value. However, it currently only performs this for pte_valid() entries, ignoring PTE_PROT_NONE. The side-effect is that PROT_NONE mappings would not have the PTE_RDONLY bit set. Without CONFIG_ARM64_HW_AFDBM, this is not an issue since such PROT_NONE pages are not accessible anyway. With commit 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits"), the ptep_set_wrprotect() function was re-written to cope with automatic hardware updates of the dirty state. As an optimisation, only PTE_RDONLY is checked to assess the "dirty" status. Since set_pte_at() does not set this bit for PROT_NONE mappings, such pages may be considered "dirty" as a result of ptep_set_wrprotect(). This patch updates the pte_valid() check to pte_present() in set_pte_at(). It also adds PTE_PROT_NONE to the swap entry bits comment. Fixes: 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits") Signed-off-by: Catalin Marinas Reported-by: Ganapatrao Kulkarni Tested-by: Ganapatrao Kulkarni Cc: arch/arm64/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f0716cd6eb89f769bff3b37120219720c994bb7e Author: Florian Westphal Date: Wed Mar 9 00:04:21 2016 +0100 netfilter: nft_compat: check match/targetinfo attr size We copy according to ->target|matchsize, so check that the netlink attribute (which can include padding and might be larger) contains enough data. Reported-by: Julia Lawall Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_compat.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d387eaf51f8c869a41d90474d3599d1e89826254 Merge: 793882bf 7617a24 Author: Pablo Neira Ayuso Date: Fri Mar 11 11:35:06 2016 +0100 Merge tag 'ipvs-fixes-for-v4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs Simon Horman says: ==================== please consider these IPVS fixes for v4.5 or if it is too late please consider them for v4.6. * Arnd Bergman has corrected an error whereby the SIP persistence engine may incorrectly access protocol fields * Julian Anastasov has corrected a problem reported by Jiri Bohac with the connection rescheduling mechanism added in 3.10 when new SYNs in connection to dead real server can be redirected to another real server. * Marco Angaroni resolved a problem in the SIP persistence engine whereby the Call-ID could not be found if it was at the beginning of a SIP message. ==================== Signed-off-by: Pablo Neira Ayuso commit 2d746eeb4f70e3602dea0aec174072adc0ab8ce5 Author: Vineet Gupta Date: Fri Mar 11 12:40:17 2016 +0530 ARC: [*defconfig] No need to specify CONFIG_CROSS_COMPILE The problem is with CONFIG_CPU_BIG_ENDIAN=y we still needed .config fixup to override the the defconfig prefix to arceb-linux- So remove these from defconfig and let user pass this via CROSS_COMPILE environment var or use the default for ENDIAN (per previous patch) No other arch carries them in defconfigs anyways ! Cc: Noam Camus Cc: Alexey Brodkin Cc: Anton Kolesov Signed-off-by: Vineet Gupta arch/arc/configs/axs101_defconfig | 1 - arch/arc/configs/axs103_defconfig | 1 - arch/arc/configs/axs103_smp_defconfig | 1 - arch/arc/configs/nsim_700_defconfig | 1 - arch/arc/configs/nsim_hs_defconfig | 1 - arch/arc/configs/nsim_hs_smp_defconfig | 1 - arch/arc/configs/nsimosci_defconfig | 1 - arch/arc/configs/nsimosci_hs_defconfig | 1 - arch/arc/configs/nsimosci_hs_smp_defconfig | 1 - arch/arc/configs/tb10x_defconfig | 1 - arch/arc/configs/vdk_hs38_defconfig | 1 - arch/arc/configs/vdk_hs38_smp_defconfig | 1 - 12 files changed, 12 deletions(-) commit 89a269285fe350346b794676c79119b31015292f Author: Vineet Gupta Date: Fri Mar 11 12:47:58 2016 +0530 ARC: [BE] Select correct CROSS_COMPILE prefix This allows CONFIG_CPU_BIG_ENDIAN=y to build correctly out of the box, w/o any other tweaks. Cc: Noam Camus Cc: Alexey Brodkin Cc: Anton Kolesov Signed-off-by: Vineet Gupta arch/arc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit 2a41b6dc28dc71c1a3f1622612a26edc58f7561e Author: Vineet Gupta Date: Tue Mar 8 19:31:24 2016 +0530 ARC: bitops: Remove non relevant comments commit 80f420842ff42 removed the ARC bitops microoptimization but failed to prune the comments to same effect Fixes: 80f420842ff42 ("ARC: Make ARC bitops "safer" (add anti-optimization)") Signed-off-by: Vineet Gupta arch/arc/include/asm/bitops.h | 15 --------------- 1 file changed, 15 deletions(-) commit 7423cc0caee7a42735ee2908f24ec69957c9bc85 Author: Adam Buchbinder Date: Tue Feb 23 15:24:55 2016 -0800 ARC: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Signed-off-by: Vineet Gupta arch/arc/include/asm/cmpxchg.h | 2 +- arch/arc/include/asm/entry-compact.h | 2 +- arch/arc/include/asm/pgtable.h | 2 +- arch/arc/kernel/stacktrace.c | 2 +- arch/arc/kernel/time.c | 4 ++-- arch/arc/mm/cache.c | 2 +- arch/arc/mm/highmem.c | 2 +- arch/arc/mm/tlb.c | 8 ++++---- 8 files changed, 12 insertions(+), 12 deletions(-) commit 143d36a33b4d59a56bb8e913a17a105578fd3237 Author: Dan Carpenter Date: Fri Mar 11 11:14:43 2016 +0300 irqchip/irq-alpine-msi: Release the correct domain on error The "msi_domain" variable is NULL here so it leads to a NULL dereference. It looks like we actually intended to free "middle_domain". Fixes: e6b78f2c3e14 ('irqchip: Add the Alpine MSIX interrupt controller') Signed-off-by: Dan Carpenter Cc: Jason Cooper Cc: Marc Zyngier Cc: Antoine Tenart Cc: kernel-janitors@vger.kernel.org Cc: Tsahee Zidenberg Link: http://lkml.kernel.org/r/20160311081442.GE31887@mwanda Signed-off-by: Thomas Gleixner drivers/irqchip/irq-alpine-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d47638f80a02b15869f1fe1fc09e5bf996750fd Author: Dave Hansen Date: Thu Mar 10 14:12:13 2016 -0800 x86/mm/pkeys: Fix mismerge of protection keys CPUID bits Kirill Shutemov pointed this out to me. The tip tree currently has commit: dfb4a70f2 [x86/cpufeature, x86/mm/pkeys: Add protection keys related CPUID definitions] whioch added support for two new CPUID bits: X86_FEATURE_PKU and X86_FEATURE_OSPKE. But, those bits were mis-merged and put in cpufeature.h instead of cpufeatures.h. This didn't cause any breakage *except* it keeps the "ospke" and "pku" bits from showing up in cpuinfo. Now cpuinfo has the two new flags: flags : ... pku ospke BTW, is it really wise to have cpufeature.h and cpufeatures.h? It seems like they can only cause confusion and mahem with tab completion. Reported-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160310221213.06F9DB53@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeature.h | 4 ---- arch/x86/include/asm/cpufeatures.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit c91e02bd9702f2c00c6a6dc82dec1b2d5bb9f039 Author: Max Filippov Date: Sun Jan 24 10:32:10 2016 +0300 xtensa: support hardware breakpoints/watchpoints Use perf framework to manage hardware instruction and data breakpoints. Add two new ptrace calls: PTRACE_GETHBPREGS and PTRACE_SETHBPREGS to query and set instruction and data breakpoints. Address bit 0 choose instruction (0) or data (1) break register, bits 31..1 are the register number. Both calls transfer two 32-bit words: address (0) and control (1). Instruction breakpoint contorl word is 0 to clear breakpoint, 1 to set. Data breakpoint control word bit 31 is 'trigger on store', bit 30 is 'trigger on load, bits 29..0 are length. Length 0 is used to clear a breakpoint. To set a breakpoint length must be a power of 2 in the range 1..64 and the address must be length-aligned. Introduce new thread_info flag: TIF_DB_DISABLED. Set it if debug exception is raised by the kernel code accessing watched userspace address and disable corresponding data breakpoint. On exit to userspace check that flag and, if set, restore all data breakpoints. Handle debug exceptions raised with PS.EXCM set. This may happen when window overflow/underflow handler or fast exception handler hits data breakpoint, in which case save and disable all data breakpoints, single-step faulting instruction and restore data breakpoints. Signed-off-by: Max Filippov arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/hw_breakpoint.h | 58 ++++++ arch/xtensa/include/asm/irqflags.h | 1 + arch/xtensa/include/asm/processor.h | 9 +- arch/xtensa/include/asm/regs.h | 3 + arch/xtensa/include/asm/thread_info.h | 1 + arch/xtensa/include/asm/traps.h | 8 + arch/xtensa/include/uapi/asm/ptrace.h | 2 + arch/xtensa/kernel/Makefile | 1 + arch/xtensa/kernel/asm-offsets.c | 6 + arch/xtensa/kernel/entry.S | 72 +++++++- arch/xtensa/kernel/hw_breakpoint.c | 317 ++++++++++++++++++++++++++++++++ arch/xtensa/kernel/process.c | 5 + arch/xtensa/kernel/ptrace.c | 164 ++++++++++++++++- arch/xtensa/kernel/traps.c | 14 ++ 15 files changed, 649 insertions(+), 13 deletions(-) commit 6ec7026ac01f3db039e0428db1f37590685ad3e7 Author: Max Filippov Date: Mon Mar 7 01:36:33 2016 +0300 xtensa: use context structure for debug exceptions With implementation of data breakpoints debug exceptions raised when PS.EXCM is set need to be handled, e.g. window overflow code can write to watched userspace address. Currently debug exception handler uses EXCSAVE and DEPC SRs to save temporary registers, but DEPC may not be available when PS.EXCM is set and more space will be needed to save additional state. Reorganize debug context: create per-CPU structure debug_table instance and store its address in the EXCSAVE instead of debug_exception function address. Expand this structure when more save space is needed. Signed-off-by: Max Filippov arch/xtensa/include/asm/traps.h | 9 +++++++++ arch/xtensa/kernel/asm-offsets.c | 6 ++++++ arch/xtensa/kernel/entry.S | 20 ++++++++------------ arch/xtensa/kernel/head.S | 5 ----- arch/xtensa/kernel/traps.c | 13 +++++++++++++ arch/xtensa/kernel/vectors.S | 4 +++- 6 files changed, 39 insertions(+), 18 deletions(-) commit 816aa58895ca4a6176caded477a655fc82aab5f5 Author: Max Filippov Date: Mon Jan 25 09:57:31 2016 +0300 xtensa: remove remaining non-functional KGDB bits KGDB is not supported on xtensa, but there are bits of related code under arch/xtensa/kernel. Remove these bits. Signed-off-by: Max Filippov arch/xtensa/kernel/Makefile | 1 - arch/xtensa/kernel/traps.c | 19 ------------------- 2 files changed, 20 deletions(-) commit 7de7ac785ae18a2cdc78d7560f48e3213d9ea0ab Author: Max Filippov Date: Thu Mar 3 18:34:29 2016 +0300 xtensa: clear all DBREAKC registers on start There are XCHAL_NUM_DBREAK registers, clear them all. This also fixes cryptic assembler error message with binutils 2.25 when XCHAL_NUM_DBREAK is 0: as: out of memory allocating 18446744073709551575 bytes after a total of 495616 bytes Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56b9f9d672fe373093b764cf046da7c7d3737bda Author: Max Filippov Date: Tue Sep 22 14:19:55 2015 +0300 xtensa: xtfpga: fix earlycon endianness Serial port is attached to XTFPGA boards as native endian device, now that earlycon parameter parser understands mmio32native put it into earlycon kernel parameter. This makes early console functional on both little- and big-endian CPUs with identical kernel command lines. Signed-off-by: Max Filippov arch/xtensa/boot/dts/kc705.dts | 2 +- arch/xtensa/boot/dts/xtfpga.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bce299ca54735740a4f2232d23001dea679fbbef Author: Max Filippov Date: Tue Aug 25 18:19:13 2015 +0300 xtensa: xtfpga: fix i2c controller register width and endianness I2C controller is attached to XTFPGA boards as native endian device, mark it as such in DTS. Set register width in DTS to 4, this way it works both for little- and big-endian CPUs. Signed-off-by: Max Filippov arch/xtensa/boot/dts/xtfpga.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d99434e1760b94e08512821b5a05992398c1aa9e Author: Max Filippov Date: Tue Aug 25 09:04:12 2015 +0300 xtensa: xtfpga: fix ethernet controller endianness Ethernet controller is attached to XTFPGA boards as native endian device, mark it as such in DTS and pass correct endianness in platform data. This makes network functional on big-endian CPUs. Signed-off-by: Max Filippov arch/xtensa/boot/dts/xtfpga.dtsi | 1 + arch/xtensa/platforms/xtfpga/setup.c | 1 + 2 files changed, 2 insertions(+) commit abfbd89595e91d5108f807e10bbd2152bc55f36b Author: Max Filippov Date: Mon Aug 24 19:44:46 2015 +0300 xtensa: xtfpga: fix serial port register width and endianness Serial port is attached to XTFPGA boards as native endian device, mark it as such in DTS and pass correct endianness in platform data. Set register width in DTS to 4, this way it matches the platform data and works correctly on big-endian CPUs. Signed-off-by: Max Filippov arch/xtensa/boot/dts/xtfpga.dtsi | 2 ++ arch/xtensa/platforms/xtfpga/setup.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 4611bf7eb52599cb7549eed10f1ab609cbcdfa4b Author: Max Filippov Date: Tue Mar 1 02:00:59 2016 +0300 xtensa: define CONFIG_CPU_{BIG,LITTLE}_ENDIAN Query compiler for the CPU endianness and add corresponding definition to KBUILD_CPPFLAGS. This allows using 'native-endian' property in DTS. Signed-off-by: Max Filippov arch/xtensa/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit a67cc9aa2dfc6e66addf240bbd79e16e01565e81 Author: Max Filippov Date: Thu Feb 25 23:27:51 2016 +0300 xtensa: fix preemption in {clear,copy}_user_highpage Disabling pagefault makes little sense there, preemption disabling is what was meant. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/mm/cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 362014c8d9d51d504c167c44ac280169457732be Author: Max Filippov Date: Tue Feb 9 01:02:38 2016 +0300 xtensa: ISS: don't hang if stdin EOF is reached Simulator stdin may be connected to a file, when its end is reached kernel hangs in infinite loop inside rs_poll, because simc_poll always signals that descriptor 0 is readable and simc_read always returns 0. Check simc_read return value and exit loop if it's not positive. Also don't rewind polling timer if it's zero. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/platforms/iss/console.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8b8addf891de8a00e4d39fc32f93f7c5eb8feceb Author: Hector Marco-Gisbert Date: Thu Mar 10 20:51:00 2016 +0100 x86/mm/32: Enable full randomization on i386 and X86_32 Currently on i386 and on X86_64 when emulating X86_32 in legacy mode, only the stack and the executable are randomized but not other mmapped files (libraries, vDSO, etc.). This patch enables randomization for the libraries, vDSO and mmap requests on i386 and in X86_32 in legacy mode. By default on i386 there are 8 bits for the randomization of the libraries, vDSO and mmaps which only uses 1MB of VA. This patch preserves the original randomness, using 1MB of VA out of 3GB or 4GB. We think that 1MB out of 3GB is not a big cost for having the ASLR. The first obvious security benefit is that all objects are randomized (not only the stack and the executable) in legacy mode which highly increases the ASLR effectiveness, otherwise the attackers may use these non-randomized areas. But also sensitive setuid/setgid applications are more secure because currently, attackers can disable the randomization of these applications by setting the ulimit stack to "unlimited". This is a very old and widely known trick to disable the ASLR in i386 which has been allowed for too long. Another trick used to disable the ASLR was to set the ADDR_NO_RANDOMIZE personality flag, but fortunately this doesn't work on setuid/setgid applications because there is security checks which clear Security-relevant flags. This patch always randomizes the mmap_legacy_base address, removing the possibility to disable the ASLR by setting the stack to "unlimited". Signed-off-by: Hector Marco-Gisbert Acked-by: Ismael Ripoll Ripoll Acked-by: Kees Cook Acked-by: Arjan van de Ven Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: kees Cook Link: http://lkml.kernel.org/r/1457639460-5242-1-git-send-email-hecmargi@upv.es Signed-off-by: Ingo Molnar arch/x86/mm/mmap.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit ced30bc9129777d715057d06fc8dbdfd3b81e94d Merge: 3a99e6d 206cab6 Author: Ingo Molnar Date: Fri Mar 11 09:40:25 2016 +0100 Merge tag 'perf-core-for-mingo-20160310' 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: - Implement 'perf stat --metric-only' (Andi Kleen) - Fix perf script python database export crash (Chris Phlipot) Infrastructure changes: - perf top/report --hierarchy assorted fixes for problems introduced in this perf/core cycle (Namhyung Kim) - Support '~' operation in libtraceevent (Steven Rosted) Build fixes: - Fix bulding of jitdump on opensuse on ubuntu systems when the DWARF devel files are not installed (Arnaldo Carvalho de Melo) - Do not try building jitdump on unsupported arches (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit c508709bcffb644afbf5e5016fc7c90bf80c30ff Merge: b9facea d649781 108b5c8 3aec316 4dea6c9 82b3aea Author: Mark Brown Date: Fri Mar 11 14:28:53 2016 +0700 Merge remote-tracking branches 'spi/topic/res', 'spi/topic/rockchip', 'spi/topic/sh', 'spi/topic/ti-qspi' and 'spi/topic/xilinx' into spi-next commit b9facea19b6382b3f24edd25ec5d9a84f93e9f3b Merge: f91c75d 14a2042 10f11a2 22640c8 5907450 Author: Mark Brown Date: Fri Mar 11 14:28:43 2016 +0700 Merge remote-tracking branches 'spi/topic/lp8841', 'spi/topic/msg', 'spi/topic/pl022' and 'spi/topic/pxa2xx' into spi-next commit f91c75d6faefdded97d2ecbe8c4f9cf197f68110 Merge: 6beb9fe ee7683a 2f6fdef 49023d2 Author: Mark Brown Date: Fri Mar 11 14:28:35 2016 +0700 Merge remote-tracking branches 'spi/topic/doc', 'spi/topic/dw' and 'spi/topic/flash' into spi-next commit 6beb9fecbde45f09ea79a67ed5fd8d17e3bf6213 Merge: ce7fb74 a0a9071 b1353d1 763dedf e9dd4ed Author: Mark Brown Date: Fri Mar 11 14:28:25 2016 +0700 Merge remote-tracking branches 'spi/topic/acpi', 'spi/topic/axi-engine', 'spi/topic/bcm2835' and 'spi/topic/bcm2835aux' into spi-next commit ce7fb74f546cdd5a83fe9393263364f9d38cc96f Merge: a75481a 6b6192c Author: Mark Brown Date: Fri Mar 11 14:28:22 2016 +0700 Merge remote-tracking branch 'spi/topic/imx' into spi-next commit a75481ab4a5276770e0fb7e137a4f170b90fc48b Merge: df9633a df88e91 Author: Mark Brown Date: Fri Mar 11 14:28:20 2016 +0700 Merge remote-tracking branch 'spi/topic/dma' into spi-next commit df9633a7805e6208fddd8248603a2543fe997b0a Merge: bad0ae3 6282697 Author: Mark Brown Date: Fri Mar 11 14:28:17 2016 +0700 Merge remote-tracking branch 'spi/topic/core' into spi-next commit bad0ae3f3c5cf0eceae5bb1def341efb5b972ce7 Merge: f6cede5 3ee20ab Author: Mark Brown Date: Fri Mar 11 14:28:07 2016 +0700 Merge tag 'spi-fix-v4.5-rc7' into spi-linus spi: Fixes for v4.5 A few driver specific fixes for the Rockchip and i.MX SPI controllers, especially for the i.MX they're annoying bugs if you run into them. # gpg: Signature made Thu 10 Mar 2016 11:09:57 ICT 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 " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " commit 10f11a2238d4d66e74438b629214b530a77db8e1 Author: Javier Martinez Canillas Date: Thu Mar 10 15:01:14 2016 -0300 spi: Add gfp parameter to kernel-doc to fix build warning The spi_split_transfers_maxsize() gfp parameter is missing in the function kernel-doc so building gives the following warning: .//drivers/spi/spi.c:2359: warning: No description found for parameter 'gfp' Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/spi/spi.c | 1 + 1 file changed, 1 insertion(+) commit c76d9ae415f1a80489a76ea41620c3f17383b7fb Author: Javier Martinez Canillas Date: Thu Mar 10 15:01:13 2016 -0300 spi: Fix htmldocs build error due struct spi_replaced_transfers The kernel-doc has to be just before the structure definition but the one for struct spi_replaced_transfers was before a structure declaration and that confuses kernel-doc which complains with the following build error: .//include/linux/spi/spi.h:933: error: Cannot parse struct or union! Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown include/linux/spi/spi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6ef2f68fa38bf415830f67903d87180d933e0f47 Author: Hui Wang Date: Fri Mar 11 12:04:02 2016 +0800 ALSA: hda - fix the mic mute button and led problem for a Lenovo AIO This Lenovo ThinkCentre AIO also uses Line2 as mic mute button and uses GPIO2 to control the mic mute led, so applying this quirk can make both the button and led work. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1555912 Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 5602a64318a4a6aad028141bb68e9bbd6bb5749a Author: Charles Keepax Date: Thu Mar 10 10:46:07 2016 +0000 ASoC: wm_adsp: Use correct local length in error message Fixes: 44029e9e1290 ("ASoC: wm_adsp: wm_coeff_{read|write}_control should use passed length") Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4347ab5a086efcba449e7a6f0a14d1474060006b Author: Nicholas Bellinger Date: Fri Mar 4 22:30:52 2016 -0800 target: Avoid DataIN transfers for non-GOOD SAM status This patch modifies existing transport_complete_*() code to avoid invoking target_core_fabric_ops->queue_data_in() driver callbacks for I/O READs with non-GOOD SAM status. Some initiators expect GOOD status when a DATA-IN payload transfer is involved, so to be safe go ahead and always invoke target_core_fabric_ops->queue_status() to generate fabric responses instead. Note this is a prerequisite for IBLOCK supporting retriable status, so SAM_STAT_BUSY + SAM_STAT_TASK_SET_FULL always generates fabric driver responses instead of initiating DataIN payload transfer when non-GOOD status is present Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Andy Grover Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 32c76de3466ed2a875e36c140ac4e3800fdfab6e Author: Sheng Yang Date: Mon Feb 29 16:02:15 2016 -0800 target/user: Report capability of handling out-of-order completions to userspace TCMU_MAILBOX_FLAG_CAP_OOOC was introduced, and userspace can check the flag for out-of-order completion capability support. Also update the document on how to use the feature. Signed-off-by: Sheng Yang Reviewed-by: Andy Grover Signed-off-by: Nicholas Bellinger Documentation/target/tcmu-design.txt | 11 ++++++++++- drivers/target/target_core_user.c | 1 + include/uapi/linux/target_core_user.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) commit 0241fd39ce7bc9b82b7e57305cb0d6bb1364d45b Author: Nicholas Bellinger Date: Sat Feb 27 18:25:22 2016 -0800 target/user: Fix size_t format-spec build warning Fix the following printk size_t warning as per 0-day build: All warnings (new ones prefixed by >>): drivers/target/target_core_user.c: In function 'is_ring_space_avail': >> drivers/target/target_core_user.c:385:12: warning: format '%lu' >> expects argument of type 'long unsigned int', but argument 3 has type >> 'size_t {aka unsigned int}' [-Wformat=] pr_debug("no data space: only %lu available, but ask for %lu\n", ^ Reported-by: kbuild test robot Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b25c786399367b9a8bd955d8496669d019409bec Author: Sheng Yang Date: Fri Feb 26 14:59:58 2016 -0800 target/user: Don't free expired command when time out Which would result in NPE after when userspace connected again. Expired command would be freed either when handling command(by userspace), or when device was tearing down Reviewed-by: Andy Grover Signed-off-by: Sheng Yang Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 26418649eead52619d8dd6cbc6760a1b144dbcd2 Author: Sheng Yang Date: Fri Feb 26 14:59:57 2016 -0800 target/user: Introduce data_bitmap, replace data_length/data_head/data_tail The data_bitmap was introduced to support asynchornization accessing of data area. We divide mailbox data area into blocks, and use data_bitmap to track the usage of data area. All the new command's data would start with a new block, and may left unusable space after it end. But it's easy to track using data_bitmap. Now we can allocate data area for asynchronization accessing from userspace, since we can track the allocation using data_bitmap. The userspace part would be the same as Maxim's previous asynchronized implementation. Signed-off-by: Sheng Yang Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 221 +++++++++++++++++++++----------------- 1 file changed, 121 insertions(+), 100 deletions(-) commit 0c28481ffb4683ef21c6664d15dbd5ae5a6cd027 Author: Sheng Yang Date: Fri Feb 26 14:59:56 2016 -0800 target/user: Free data ring in unified function Prepare for data_bitmap in the next patch. Reviewed-by: Andy Grover Signed-off-by: Sheng Yang Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit f1dbd087cc7a28c6c174cb28cf98c19f4efb1fba Author: Sheng Yang Date: Fri Feb 26 14:59:55 2016 -0800 target/user: Use iovec[] to describe continuous area We don't need use one iovec per scatter-gather list entry, since data area are continuous. Reviewed-by: Andy Grover Signed-off-by: Sheng Yang Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 41 +++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 03a68b44faff1b3eef5424952044747c9c555f0e Author: Andy Grover Date: Thu Feb 25 15:14:32 2016 -0800 target: Remove enum transport_lunflags_table se_dev_entry.lun_flags and se_lun.lun_access are only used for keeping track of read-write vs. read-only state. Since this is an either/or thing we can represent it as bool, and remove the unneeded enum transport_lunflags_table, which is left over from when there were more flags. Change code that uses this enum to just use true/false, and make it clear through variable and param names that true means read-only, false means read-write. Signed-off-by: Andy Grover Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 41 ++++++++++------------------ drivers/target/target_core_fabric_configfs.c | 32 ++++++++++------------ drivers/target/target_core_internal.h | 8 +++--- drivers/target/target_core_spc.c | 3 +- drivers/target/target_core_tpg.c | 21 +++++++------- include/target/target_core_base.h | 11 ++------ 6 files changed, 45 insertions(+), 71 deletions(-) commit 07b6319687026bdac90a0bb9eeb0509f1ff27179 Author: Mike Christie Date: Wed Feb 24 13:56:33 2016 -0600 target/iblock: pass WRITE_SAME to device if possible This patch has iblock pass the WRITE_SAME command to the device for offloading if possible. It is similar to what is done for UNMAP/discards, except that we export a large max write same value to the initiator, and then rely on the block layer to break it up into multiple requests if it cannot fit into one. v2. - Drop file backend changes and move helper function to iblock backend. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_iblock.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit e3416ab2d156ac0f0a3d9e55bcdff69d109ba403 Author: Christoph Hellwig Date: Wed Feb 24 19:24:08 2016 +0200 iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc We only use the pointer when processing regular iSER commands, and it then always points to the struct iser_cmd that contains the TX descriptor. Remove it and rely on container_of to save a little space and avoid a pointer that is updated multiple times per processed command. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 11 +++-------- drivers/infiniband/ulp/isert/ib_isert.h | 6 +++++- 2 files changed, 8 insertions(+), 9 deletions(-) commit d1ca2ed7dcf859dcb7fc642d4d3ed42c1693d20c Author: Christoph Hellwig Date: Wed Feb 24 19:24:07 2016 +0200 iser-target: Kill struct isert_rdma_wr There is exactly one instance per struct isert_cmd, so merge the two to simplify everyones life. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 219 ++++++++++++++++---------------- drivers/infiniband/ulp/isert/ib_isert.h | 30 ++--- 2 files changed, 119 insertions(+), 130 deletions(-) commit 9679cc51eb138137bcc96560bf4e04cc047fcd20 Author: Christoph Hellwig Date: Wed Feb 24 19:24:06 2016 +0200 iser-target: Convert to new CQ API Use the workqueue based CQ type similar to what isert was using previously, and properly split up the completion handlers. Note that this also takes special care to handle the magic login WRs separately, and also renames the submission functions so that it's clear that they are only to be used for the login buffers. (Fix up isert_print_wc usage in isert_beacon_done - nab) Signed-off-by: Christoph Hellwig [sagig: added iscsi conn reinstatement in non-flush error completions and added error completion type print] Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 405 +++++++++++++------------------- drivers/infiniband/ulp/isert/ib_isert.h | 22 +- 2 files changed, 184 insertions(+), 243 deletions(-) commit 5adabdd122e471fe978d49471624bab08b5373a7 Author: Christoph Hellwig Date: Wed Feb 24 19:24:05 2016 +0200 iser-target: Split and properly type the login buffer The login receive buffer is used as a iser_rx_desc, so type it as such in struct isert_conn and allocate the exactly right space for it. The TX buffer is moved to a separate variable and properly sized as well. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 56 ++++++++++++++++----------------- drivers/infiniband/ulp/isert/ib_isert.h | 3 +- 2 files changed, 29 insertions(+), 30 deletions(-) commit ed1083b251f0ed992e90739994c31cffa597abfa Author: Christoph Hellwig Date: Wed Feb 24 19:24:04 2016 +0200 iser-target: Remove ISER_RECV_DATA_SEG_LEN This is the same as ISCSI_DEF_MAX_RECV_SEG_LEN (and must be the same given the structure layouts), so just use that constant instead. This also allows removing ISER_RX_LOGIN_SIZE in favor of ISER_RX_PAYLOAD_SIZE. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 10 +++++----- drivers/infiniband/ulp/isert/ib_isert.h | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) commit 26c7b673db576b6345e2de1c53bdce125d2f180a Author: Jenny Derzhavetz Date: Wed Feb 24 19:24:03 2016 +0200 iser-target: Remove impossible condition from isert_wait_conn We can never get to isert_wait_conn in INIT state anymore, so get rid of this condition. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 8 -------- 1 file changed, 8 deletions(-) commit 69c48846f1c7dde81d9bfff6a029fe36651bc7c0 Author: Jenny Derzhavetz Date: Wed Feb 24 19:24:02 2016 +0200 iser-target: Remove redundant wait in release_conn With current termination flow we call release_conn after completion. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 7 ------- drivers/infiniband/ulp/isert/ib_isert.h | 1 - 2 files changed, 8 deletions(-) commit 6d1fba0c2cc7efe42fd761ecbba833ed0ea7b07e Author: Jenny Derzhavetz Date: Wed Feb 24 19:24:01 2016 +0200 iser-target: Rework connection termination When we receive an event that triggers connection termination, we have a a couple of things we may want to do: 1. In case we are already terminating, bailout early 2. In case we are connected but not bound, disconnect and schedule a connection cleanup silently (don't reinstate) 3. In case we are connected and bound, disconnect and reinstate the connection This rework fixes a bug that was detected against a mis-behaved initiator which rejected our rdma_cm accept, in this stage the isert_conn is no bound and reinstate caused a bogus dereference. What's great about this is that we don't need the post_recv_buf_count anymore, so get rid of it. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 107 ++++++++++++++++---------------- drivers/infiniband/ulp/isert/ib_isert.h | 1 - 2 files changed, 52 insertions(+), 56 deletions(-) commit f81bf458208ef6d12b2fc08091204e3859dcdba4 Author: Jenny Derzhavetz Date: Wed Feb 24 19:24:00 2016 +0200 iser-target: Separate flows for np listeners and connections cma events No need to restrict this check to specific events. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit aea92980601f7ddfcb3c54caa53a43726314fe46 Author: Jenny Derzhavetz Date: Wed Feb 24 19:23:59 2016 +0200 iser-target: Add new state ISER_CONN_BOUND to isert_conn We need an indication that isert_conn->iscsi_conn binding has happened so we'll know not to invoke a connection reinstatement on an unbound connection which will lead to a bogus isert_conn->conn dereferece. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 7 +++++-- drivers/infiniband/ulp/isert/ib_isert.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) commit b89a7c25462b164db280abc3b05d4d9d888d40e9 Author: Jenny Derzhavetz Date: Wed Feb 24 19:23:58 2016 +0200 iser-target: Fix identification of login rx descriptor type Once connection request is accepted, one rx descriptor is posted to receive login request. This descriptor has rx type, but is outside the main pool of rx descriptors, and thus was mistreated as tx type. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36c7845282eef0104ba6ecc6761ba1dce57b2b87 Author: Quinn Tran Date: Thu Feb 4 11:45:18 2016 -0500 qla2xxx: Add DebugFS node for target sess list. #cat /sys/kernel/debug/qla2xxx/qla2xxx_31/tgt_sess qla2xxx_31 Port ID Port Name Handle ff:fc:01 21:fd:00:05:33:c7:ec:16 0 01:0e:00 21:00:00:24:ff:7b:8a:e4 1 01:0f:00 21:00:00:24:ff:7b:8a:e5 2 .... (Drop ->check_initiator_node_acl() parameter usage - nab) Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_dfs.c | 55 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_target.c | 53 +++++++++++++++++++++++-------------- 3 files changed, 89 insertions(+), 20 deletions(-) commit 0fd10721fe3664f7549e74af9d28a509c9a68719 Author: Nicholas Bellinger Date: Fri Jan 29 22:47:58 2016 -0800 ib_srpt: Convert to percpu_ida tag allocation This patch converts ib_srpt to use existing percpu_ida tag pre-allocation for struct srpt_send_ioctx. This allows ib_srpt to drop it's internal pre-allocation mechanisms with the extra spin_lock_irqsave, and use percpu_ida common code for doing this. Cc: Vu Pham Cc: Sagi Grimberg Cc: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 55 +++++++++++------------------------ drivers/infiniband/ulp/srpt/ib_srpt.h | 2 -- 2 files changed, 17 insertions(+), 40 deletions(-) commit 91973cd60e2db7536228ce2732ffea4e50d03ca9 Author: Nicholas Bellinger Date: Fri Jan 29 22:08:54 2016 -0800 tcm_fc: Convert to TARGET_SCF_ACK_KREF I/O + TMR krefs This patch converts tcm_fc to modern TARGET_SCF_ACK_KREF usage for ft_queue_status(), and fixes ft_check_stop_free() to return transport_generic_free_cmd() for ->cmd_kref. It also converts TM request -> ft_send_tm() to use ACK_KREF, and update ft_queue_tm_resp() to drop the outstanding kref after queueing TM response into fabric code. Cc: Vasu Dev Cc: Mark Rustad Cc: Robert Love Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_cmd.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit fa22e7b7741b202ee8f0cb28461189418d9b52ea Author: Nicholas Bellinger Date: Sun Jan 24 22:44:38 2016 -0800 xen-scsiback: Convert to TARGET_SCF_ACK_KREF I/O krefs This patch converts xen-scsiback to modern TARGET_SCF_ACK_KREF usage for scsiback_cmd_done() callback path. It also also converts TMR -> scsiback_device_action() to use modern target_submit_tmr() code. Acked-by: Juergen Gross Tested-by: Juergen Gross Cc: Hannes Reinecke Cc: David Vrabel Signed-off-by: Nicholas Bellinger drivers/xen/xen-scsiback.c | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 2dbcdf33dbf61f44b29adb52338282c3d7840d0e Author: Nicholas Bellinger Date: Sun Jan 24 22:41:50 2016 -0800 xen-scsiback: Convert to percpu_ida tag allocation This patch converts xen-scsiback to use percpu_ida tag pre-allocation for struct vscsibk_pend descriptor, in order to avoid fast-path struct vscsibk_pend memory allocations. Note by default this is currently hardcoded to 128. (Add wrapper for handling pending_req tag failure - Juergen) (Drop left-over se_cmd memset in scsiback_cmd_exec - Juergen) Acked-by: Juergen Gross Tested-by: Juergen Gross Cc: Hannes Reinecke Cc: David Vrabel Signed-off-by: Nicholas Bellinger drivers/xen/xen-scsiback.c | 167 ++++++++++++++++++++++++--------------------- 1 file changed, 89 insertions(+), 78 deletions(-) commit cff834c16d23d614388aab1b86d19eb67b3f80c4 Author: Nicholas Bellinger Date: Sun Jan 24 23:28:27 2016 -0800 usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs This patch drops struct usbg_cmd->kref internal kref-erence usage, for proper TARGET_SCF_ACK_KREF conversion. Tested-by: Andrzej Pietrasiewicz Cc: Sebastian Andrzej Siewior Cc: Felipe Balbi Signed-off-by: Nicholas Bellinger drivers/usb/gadget/function/f_tcm.c | 51 ++++++++----------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) commit 71e7ae8e1fb2102bb373e6507c3f6540ead999f0 Author: Nicholas Bellinger Date: Sat Jan 23 01:05:05 2016 -0800 usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation This patch converts usb-gadget target to use percpu_ida tag pre-allocation for struct usbg_cmd descriptor, in order to avoid fast-path struct usbg_cmd memory allocations. Note by default this is currently hardcoded to 128. Tested-by: Andrzej Pietrasiewicz Cc: Sebastian Andrzej Siewior Cc: Felipe Balbi Signed-off-by: Nicholas Bellinger drivers/usb/gadget/function/f_tcm.c | 97 ++++++++++++++++++++++--------------- drivers/usb/gadget/function/tcm.h | 2 + 2 files changed, 60 insertions(+), 39 deletions(-) commit 5f27edad953cfde6339f17ce461f57bc7060dc4f Author: Nicholas Bellinger Date: Sun Jan 24 22:04:14 2016 -0800 sbp-target: Convert to TARGET_SCF_ACK_KREF I/O krefs This patch converts sbp-target to modern TARGET_SCF_ACK_KREF usage for sbp_send_status() callback path, and drops the now obsolete sbp_free_request() failure path calls. Acked-by: Chris Boot Tested-by: Chris Boot Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/sbp/sbp_target.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 5a3ee221b543100ce3bed5b59bfb155d0ef293b7 Author: Nicholas Bellinger Date: Sat Jan 23 01:04:36 2016 -0800 sbp-target: Conversion to percpu_ida tag pre-allocation This patch converts sbp-target to use struct sbp_target_request descriptor tag pre-allocation using percpu_ida. (Fix sbp_mgt_get_req() IS_ERR failure checking - Dan Carpenter) (Add missing sbp_target_request tag memset - Chris Boot) Acked-by: Chris Boot Tested-by: Chris Boot Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/sbp/sbp_target.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit b42057ab174d227d79eb426a9c66fb52cc2275ed Author: Nicholas Bellinger Date: Sat Jan 9 20:42:43 2016 -0800 ib_srpt: Convert to target_alloc_session usage This patch converts ib_srpt internal assignments of se_node_acl and transport_register_session() to use the new alloc_session method. Cc: Vu Pham Cc: Sagi Grimberg Cc: Bart Van Assche Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 9ed5965588603840100fb31e579c2996d81aaea9 Author: Nicholas Bellinger Date: Sat Jan 9 20:12:40 2016 -0800 tcm_fc: Convert to target_alloc_session usage This patch converts tcm_fc target mode addition of tf_sess->hash to port_id hlist_head using the new alloc_session callback(). Cc: Vasu Dev Cc: Mark Rustad Cc: Robert Love Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_sess.c | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 1b655b19e28b70a45db2e30b5a864af503afff89 Author: Nicholas Bellinger Date: Sat Jan 9 06:47:58 2016 -0800 tcm_qla2xxx: Convert to target_alloc_session usage This patch converts existing qla2xxx target mode assignment of struct qla_tgt_sess related sid + loop_id values to use a callback via the new target_alloc_session API caller. Cc: Himanshu Madhani Cc: Quinn Tran Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 8 +--- drivers/scsi/qla2xxx/qla_target.h | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 79 +++++++++++++++++++------------------- 3 files changed, 43 insertions(+), 46 deletions(-) commit 65ea789869a519b63382418bb38ba61b62ec4b4c Author: Nicholas Bellinger Date: Sat Jan 9 05:47:55 2016 -0800 vhost/scsi: Convert to target_alloc_session usage This patch converts vhost/scsi pre-allocation of vhost_scsi_cmd descriptors to use the new alloc_session callback(). Acked-by: Michael S. Tsirkin Signed-off-by: Nicholas Bellinger drivers/vhost/scsi.c | 99 ++++++++++++++++++++++------------------------------ 1 file changed, 41 insertions(+), 58 deletions(-) commit fb444abe61f5a943a41870d71eab8c4402bd46ab Author: Christoph Hellwig Date: Sat Jan 9 05:30:45 2016 -0800 target: Convert demo-mode only drivers to target_alloc_session This patch converts existing loopback, usb-gadget, and xen-scsiback demo-mode only fabric drivers to use the new target_alloc_session API caller. This includes adding a new alloc_session callback for fabric driver internal nexus pointer assignments. (Fixes for early for-next nexus breakage - Dan Carpenter) Cc: Christoph Hellwig Cc: Hannes Reinecke Acked-by: Juergen Gross Tested-by: Andrzej Pietrasiewicz Tested-by: Chris Boot Signed-off-by: Nicholas Bellinger drivers/target/loopback/tcm_loop.c | 46 +++++++++++----------------- drivers/target/sbp/sbp_target.c | 33 +++++--------------- drivers/usb/gadget/function/f_tcm.c | 55 ++++++++++++++-------------------- drivers/xen/xen-scsiback.c | 60 ++++++++++++++----------------------- 4 files changed, 72 insertions(+), 122 deletions(-) commit 19cc827b6c7baa01e9f5f2b792e5b6b9550749d2 Author: Bhaktipriya Shridhar Date: Thu Feb 25 17:34:43 2016 +0530 staging: rtl8723au: hal: Remove useless return variables This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit b29f8096d8e0baccf9639eafd8132d13dfa4e464 Author: Bhumika Goyal Date: Wed Feb 24 22:34:31 2016 +0530 Staging: rtl8723au: Remove debug messages As kmalloc generates a backtrace on failure so there is no need of these debug messages when kmalloc fails. Also remove unwanted {} around if block after removal of these messages. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 28f5caa1679e18d4718f5ca6c6aaf95cbfc7afb5 Author: Bhumika Goyal Date: Wed Feb 24 15:53:57 2016 +0530 Staging: rtl8723au: Clean up tests if NULL returned on failure Some functions like kmalloc/usb_alloc_urb returns Null as their return value on failure. !x is generally preferred over x==NULL or NULL==x. So make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 4 ++-- drivers/staging/rtl8723au/os_dep/xmit_linux.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4e7c855eae56f9723b92d058505a9d87a5e9c76f Author: Bhaktipriya Shridhar Date: Mon Feb 22 22:37:00 2016 +0530 staging: rtl8723au: Remove unnecessary parantheses Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = - ( b - ) ; Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b279420ac3bdde45714d107a3943df58d8eea07 Author: Geliang Tang Date: Tue Mar 1 23:35:33 2016 +0800 staging: rtl8723au: core: rtw_recv: use list_first_entry() Use list_first_entry() instead of container_of() to simplify the code. Signed-off-by: Geliang Tang Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_recv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2cb5780a41714ef91a47b8e33eb7f59ac30c6346 Author: Geliang Tang Date: Tue Mar 1 23:35:32 2016 +0800 staging: rtl8723au: core: rtw_xmit: use list_first_entry_or_null() Use list_first_entry_or_null() instead of list_empty() + container_of() to simplify the code. Signed-off-by: Geliang Tang Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_xmit.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 8584394bdf9bd4d18cd7fc43e5221ff71539cf4a Author: Geliang Tang Date: Tue Mar 1 23:35:31 2016 +0800 staging: rtl8723au: core: rtw_recv: use list_first_entry_or_null() Use list_first_entry_or_null() instead of list_empty() + container_of() to simplify the code. Signed-off-by: Geliang Tang Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723au/core/rtw_recv.c | 42 ++++++++----------------------- 1 file changed, 11 insertions(+), 31 deletions(-) commit f70ed3b5dc8b0810a01a24b198eca3f562aedc14 Author: Caesar Wang Date: Tue Oct 27 15:31:45 2015 +0800 mailbox: rockchip: Add Rockchip mailbox driver This driver is found on RK3368 SoCs. The Mailbox module is a simple APB peripheral that allows both the Cortex-A53 MCU system to communicate by writing operation to generate interrupt. The registers are accessible by both CPU via APB interface. The Mailbox has the following main features: 1) Support dual-core system: Cortex-A53 and MCU. 2) Support APB interface. 3) Support four mailbox elements, each element includes one data word, one command word register and one flag bit that can represent one interrupt. 4) Four interrupts to Cortex-A53. 5) Four interrupts to MCU. 6) Provide 32 lock registers for software to use to indicate whether mailbox is occupied. [Jassi: Removed unused variable buf_base] Signed-off-by: Caesar Wang Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 9 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/rockchip-mailbox.c | 283 +++++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) commit a7065bc37b6764df681d12b1059415a0a262c4e0 Author: Caesar Wang Date: Tue Oct 27 15:31:44 2015 +0800 dt-bindings: rockchip-mailbox: Add mailbox controller document on Rockchip SoCs This add the necessary binding documentation for mailbox found on RK3368 SoC. Signed-off-by: Caesar Wang Acked-by: Rob Herring Signed-off-by: Jassi Brar .../bindings/mailbox/rockchip-mailbox.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7bf777fbfe7926398063bf669c672e52b28b69d2 Author: Greg Kroah-Hartman Date: Thu Mar 10 19:35:54 2016 -0800 Revert "staging: comedi: drivers: Remove unneeded NULL check before kfree()" This reverts commit 3545bee9b8ec00ba733e17363f494c8761fb5e49. It's not correct. Reported-by: Hartley Sweeten Cc: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci224.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b44483e7be1a713ed1f522696dc48909487fa794 Author: Bhaktipriya Shridhar Date: Thu Mar 10 00:34:44 2016 +0530 staging: comedi: ni_pcidio.c: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_pcidio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 621ab40df94c00e197bb06d9b853dce9a47139c6 Author: Bhaktipriya Shridhar Date: Thu Mar 10 00:24:49 2016 +0530 staging: comedi: dt282x: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt282x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0116317636ad2cf99918679517fb62d7c1c40f77 Author: Bhaktipriya Shridhar Date: Thu Mar 10 00:19:38 2016 +0530 staging: comedi: rtd520: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/rtd520.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7f9d2b1ce5f01e76a26ca9dd087c87fd47cb0cfd Author: Bhaktipriya Shridhar Date: Thu Mar 10 00:05:16 2016 +0530 staging: comedi: drivers: ni_mio_common: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit df6ba4f16170838482319f40ce1a2b280b9e80f3 Author: Bhaktipriya Shridhar Date: Thu Mar 10 00:03:49 2016 +0530 staging: comedi: drivers: amplc_pci230: Prefer using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44b8c793fc0d63060c6c87f0af4f9b367e2ec4fc Author: Sandhya Bankar Date: Sun Mar 6 12:35:29 2016 +0530 Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3b1e4db825aeef5337501c88c15894ac33f732e Author: Amitoj Kaur Chawla Date: Sun Mar 6 05:51:52 2016 +0530 staging: comedi: drivers: gsc_hpdi: Remove use of deprecated pci API Replace pci_[alloc|free]_consistent occurences with dma_[alloc|free]_coherent. The Coccinelle semantic patch that was used to make some of these changes is as follows: @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_KERNEL ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_KERNEL ) ) gsc_hpdi_auto_attach does not affect interrupt status but contains a call to comedi_alloc_devpriv() which calls kzalloc with GFP_KERNEL flag. Thus, there seems to be no danger that dma_alloc_coherent can be called with interrupts turned off, and GFP_KERNEL can be used. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/gsc_hpdi.c | 32 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 6e1edc0f8bd9c447b152c29252a9915225d7b8cc Author: Bhaktipriya Shridhar Date: Thu Mar 10 23:09:14 2016 +0530 staging: unisys: visornic: Remove unnecessary else after return This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d342c060433a0f5b6b710cf2ab2591576c2f2d62 Author: David Kershner Date: Tue Mar 8 21:28:28 2016 -0500 staging: unisys: visorbus: clean up visorchannel_clear Goto label was ambiguous change to out_free_page to signify that we will always go through the path even on success. Signed-off-by: David Kershner Signed-off-by: Timothy Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bf49a6c74f4221e7ede7c741d3506518728471e Author: David Kershner Date: Tue Mar 8 21:28:27 2016 -0500 staging: unisys: visorbus: cleanup gotos in visorchannel_create_guts Away label is ambiguous change to it err_destroy_channel to make it clear this is an error path. Signed-off-by: David Kershner Signed-off-by: Timothy Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit afd14cef0156bc5afb5f4a59bfec510a1ce87a4e Author: Sandhya Bankar Date: Sun Mar 6 15:50:35 2016 +0530 Staging: most: Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN). Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN) to check if the endpoint has IN direction. This correction is based on following semantic patch, @@ struct usb_endpoint_descriptor *endpoint; expression E; @@ ( - endpoint->bEndpointAddress & USB_DIR_IN + usb_endpoint_dir_in(endpoint) | - endpoint->bEndpointAddress == USB_DIR_IN + usb_endpoint_dir_in(endpoint) | - (endpoint->bEndpointAddress & E) == USB_DIR_IN + usb_endpoint_dir_in(endpoint) ) Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d93f27b732062bbd7f93275613fc3f4081cda381 Author: Bhumika Goyal Date: Sun Mar 6 21:06:47 2016 +0530 Staging: most: Use list_first_entry instead of list_entry This patch replaces list_entry with list_first_entry as it makes the code more clear. Done using coccinelle: @@ expression e; @@ ( - list_entry(e->next, + list_first_entry(e, ...) | - list_entry(e->prev, + list_last_entry(e, ...) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b50908a5eee25125023e22c5fed93f659bddd00 Author: Eva Rachel Retuya Date: Sat Mar 5 23:16:17 2016 +0800 staging: unisys: visorinput: convert pr_err() to dev_err() Replace pr_err() calls with respective dev_err() counterpart. Semantic patch used to detect and apply the transformation: @r exists@ identifier f,s,i; position p; @@ f(...,struct s *i,...) { <+... pr_err@p(...) ...+> } @s@ identifier r.s, dev; @@ struct s { ... struct device dev; ... }; @t@ identifier r.i, s.dev; expression fmt; position r.p; @@ - pr_err@p( + dev_err(&i->dev, fmt, ...); Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9d521ca71d95a5aede00559db64622fdf5ee7dde Author: Bhumika Goyal Date: Sat Mar 5 19:16:40 2016 +0530 Staging: most: Replace pr_err with dev_err All devm functions has a device structure as the first argument which is required by dev_{err,info,dbg} printing functions. This patch converts pr_err to dev_err as dev_* is preferred after calls to devm functions. Done using coccinelle: @r1 exists@ expression e,e1; identifier f =~ "^devm_"; identifier g =~ "^pcim_"; identifier h =~ "^dmam_"; @@ e=\(f\|g\|h\)(e1,...); <+... ( - pr_info( + dev_info(e1, ...); | - pr_err( + dev_err(e1, ...); | - pr_debug( + dev_dbg(e1, ...); ) ...+> Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2500276efe1c3a1c0a24e0e5bab4b7902a7cff50 Author: David Kershner Date: Thu Mar 3 13:00:38 2016 -0500 staging: unisys: visorbus: variable adjustment should be a u64 This patch fixes the smatch error: drivers/staging/unisys/visorbus/visorchipset.c:2217 visorchipset_ioctl() warn: user controlled 'adjustment' cast to postive rl = 's64min-s64max' This is because we read a s64 and pass it to a function as u64. Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50aefc19c7696973ea6d2cea3c2620b1217a6756 Author: Sandhya Bankar Date: Sun Mar 6 12:43:27 2016 +0530 Staging: vt6655: Remove & from function name. Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9097b1c3f138cd0738c8f61ac01ea43465d8d7f Author: Ben Marsh Date: Tue Mar 1 19:45:09 2016 +0100 Staging: vt6655: remove unnecessary blank lines from card.c This a patch to card.c to remove unnecessary blank lines in order to remove a checkpatch.pl warning. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 4 ---- 1 file changed, 4 deletions(-) commit dcf8343d549acd8623d9457f8553745951ec1b10 Author: Rehas Sachdeva Date: Fri Feb 26 18:27:05 2016 +0530 staging: vt6656: Remove unnecessary parentheses This patch removes the following checkpatch.pl warnings: Unnecessary parentheses around al7230_init_table_amode[0][0] Unnecessary parentheses around al7230_channel_table2[0][0] Signed-off-by: Rehas Sachdeva Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efa21f9d0ddd140e73830b051a0fb45893c2d7ae Author: Malcolm Priestley Date: Sun Mar 6 12:57:12 2016 +0000 staging: vt6655: mac.c replace dwData with data. Removing camel case and type prefix. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 0e7997c18fcce692c994c45dcf9e6f3db2fdad17 Author: Malcolm Priestley Date: Sun Mar 6 12:57:11 2016 +0000 staging: vt6655: mac.c replace wOffset with offset. Removing camel case and type prefix. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit ebc9bd832f5e7ec42bfafb31d29eb24ed3c2f47c Author: Malcolm Priestley Date: Sun Mar 6 12:57:10 2016 +0000 staging: vt6655: mac.c replace byOrgDMACtl with org_dma_ctl Removing camel case and type prefix. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 28029472aa1e18fd5c5777379eb28c8f7b837381 Author: Malcolm Priestley Date: Sun Mar 6 12:57:09 2016 +0000 staging: vt6655: mac Replace dwCurrDescAddr with curr_desc_addr. Removing camel case and type prefix. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 30 +++++++++++++++--------------- drivers/staging/vt6655/mac.h | 14 +++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) commit 17c4c51e0360e72dc752768927cd13a00c06e421 Author: Malcolm Priestley Date: Sun Mar 6 12:57:08 2016 +0000 staging: vt6655: mac.c replace VNSvInPortB with ioread8 Removing the macro from functions. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 58fe2702c430e2db1210075ed890b5abb15e90f3 Author: Malcolm Priestley Date: Sun Mar 6 12:57:07 2016 +0000 staging: vt6655: MACvSetLoopbackMode replace byOrgValue with ioread8 Removing VNSvInPortB and nesting inside iowrite8. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e206939f99a1ed1625bcce32f6eb53c296576eff Author: Malcolm Priestley Date: Sun Mar 6 12:57:06 2016 +0000 staging: vt6655: MACbPSWakeup replace VNSvInPortB byOrgValue with ioread8 removing byOrgValue variable. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3b8eb64c1b26f89de69b93907e6ada6e71e18df4 Author: Malcolm Priestley Date: Sun Mar 6 12:57:05 2016 +0000 staging: vt6655: mac.c replace VNSvOutPortB with iowrite8 removing macro from functions Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 54a14e62f406197644384d7d68910997ce2fe203 Author: Malcolm Priestley Date: Sun Mar 6 12:57:04 2016 +0000 staging: vt6655: mac.c replace VNSvOutPortW with iowrite16 removig macro from functions. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e2ad8e23ae259202a51c8762ef2c52fdbbd27196 Author: Malcolm Priestley Date: Sun Mar 6 12:57:03 2016 +0000 staging: vt6655: mac.c replace VNSvOutPortD with iowrite32. Removing the macro from functions. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit e984c758ec88f9c36a3f49311a842e4abc0d726b Author: Malcolm Priestley Date: Sun Mar 6 12:57:02 2016 +0000 staging: vt6655: mac.c/h resize all unsigned long to u32 All addressing is limited to 32 bits match this to all functions and port out functions. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 22 +++++++++++----------- drivers/staging/vt6655/mac.h | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-) commit 4633195295008e565b8142f3e73376b8116dac49 Author: Malcolm Priestley Date: Sun Mar 6 12:57:01 2016 +0000 staging: vt6655: MACvRestoreContext replace for loops with memcpy_toio. Removing the need for variable ii. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 70715017442e68ddb100b7b07ac9cb092e57a8e9 Author: Malcolm Priestley Date: Sun Mar 6 12:57:00 2016 +0000 staging: vt6655: mac.c rename pbyCxtBuf to cxt_buf Removing camel case and type prefix. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 7e5120e949dac3ce436714ad686dff60ee75fc68 Author: Malcolm Priestley Date: Sun Feb 28 19:02:57 2016 +0000 staging: vt6655: MACvSaveContext use memcpy_fromio to read context. Use memcpy_fromio to store data removing the need for local count. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e52ab0ecb2ba7f6e3ec121a595cd4eba6e854d13 Author: Malcolm Priestley Date: Sun Feb 28 19:02:56 2016 +0000 staging: vt6655: replace VNSvInPortD dwData reads with ioread32 Removing dwData variable altogether. The reads are always 32 bit insize. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit f205e8d129b172ae8ab33bb19abf2a7e6984f200 Author: Malcolm Priestley Date: Sun Feb 28 19:02:55 2016 +0000 staging: vt6655: mac.c Replace VNSvInPortB byData reads with ioread8. Removing byData variable altogether. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) commit c2d845de8fcf2df676761963fd46b1ecb1783772 Author: Malcolm Priestley Date: Sun Feb 28 19:02:54 2016 +0000 staging: vt6655: mac.c rename dwIoBase to io_base Removing camel case. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/mac.c | 274 +++++++++++++++++++++---------------------- 1 file changed, 137 insertions(+), 137 deletions(-) commit c997e30e7f65f00832abc5d92f7fd3d6ca325402 Author: Dave Jiang Date: Thu Mar 10 16:18:40 2016 -0700 dmaengine: IOATDMA: revise channel reset workaround on CB3.3 platforms Previously we unloaded the interrupts and reloaded in order to work around a channel reset bug that cleared the MSIX table. This approach just isn't practical when a reset needs to happen in the error handler that just happens to be running in interrupt context (bottom half). It looks like we can work around the hardware issue by just storing a shadow copy of the MSIX table and restore it after reset. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 50 ++++++++++++++------------------------------------ drivers/dma/ioat/dma.h | 5 +++++ 2 files changed, 19 insertions(+), 36 deletions(-) commit 67a2003e060739747cfa3ea9b0d88b3d321ebf24 Author: Sinan Kaya Date: Thu Feb 4 23:34:35 2016 -0500 dmaengine: add Qualcomm Technologies HIDMA channel driver This patch adds support for hidma engine. The driver consists of two logical blocks. The DMA engine interface and the low-level interface. The hardware only supports memcpy/memset and this driver only support memcpy interface. HW and driver doesn't support slave interface. Signed-off-by: Sinan Kaya Reviewed-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/qcom/Kconfig | 10 + drivers/dma/qcom/hidma.c | 706 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/qcom/hidma.h | 160 +++++++++++ 3 files changed, 876 insertions(+) commit 7f8f209fd6e09a07fd1820144452caba419cf2b4 Author: Sinan Kaya Date: Thu Feb 4 23:34:34 2016 -0500 dmaengine: add Qualcomm Technologies HIDMA management driver The Qualcomm Technologies HIDMA device has been designed to support virtualization technology. The driver has been divided into two to follow the hardware design. 1. HIDMA Management driver 2. HIDMA Channel driver Each HIDMA HW consists of multiple channels. These channels share some set of common parameters. These parameters are initialized by the management driver during power up. Same management driver is used for monitoring the execution of the channels. Management driver can change the performance behavior dynamically such as bandwidth allocation and prioritization. The management driver is executed in host context and is the main management entity for all channels provided by the device. Signed-off-by: Sinan Kaya Reviewed-by: Andy Shevchenko Signed-off-by: Vinod Koul .../ABI/testing/sysfs-platform-hidma-mgmt | 97 +++++++ drivers/dma/qcom/Kconfig | 11 + drivers/dma/qcom/Makefile | 2 + drivers/dma/qcom/hidma_mgmt.c | 302 +++++++++++++++++++++ drivers/dma/qcom/hidma_mgmt.h | 39 +++ drivers/dma/qcom/hidma_mgmt_sys.c | 295 ++++++++++++++++++++ 6 files changed, 746 insertions(+) commit 858de34c0a31b9438eeab2ae0465c20c68bf63f0 Author: Sinan Kaya Date: Thu Feb 4 23:34:33 2016 -0500 dmaengine: hidma: Add Device Tree binding Add documentation for the Qualcomm Technologies HIDMA binding. Signed-off-by: Sinan Kaya Acked-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/qcom_hidma_mgmt.txt | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit d9b31efcbf41cd249419bca82065976ca44e3ae9 Author: Sinan Kaya Date: Thu Feb 4 23:34:32 2016 -0500 dmaengine: qcom_bam_dma: move to qcom directory Creating a QCOM directory for all QCOM DMA source files. Signed-off-by: Sinan Kaya Reviewed-by: Andy Gross Signed-off-by: Vinod Koul drivers/dma/Kconfig | 11 +- drivers/dma/Makefile | 2 +- drivers/dma/qcom/Kconfig | 8 + drivers/dma/qcom/Makefile | 1 + drivers/dma/qcom/bam_dma.c | 1262 ++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/qcom_bam_dma.c | 1262 -------------------------------------------- 6 files changed, 1274 insertions(+), 1272 deletions(-) commit 7cf20fc62428367bbf853a8d968804a6ec6a4973 Author: Christoph Hellwig Date: Thu Mar 3 09:36:06 2016 +0100 net/9p: convert to new CQ API Trivial conversion to the new RDMA CQ API. Signed-off-by: Christoph Hellwig Acked-by: Dominique Martinet Signed-off-by: Doug Ledford net/9p/trans_rdma.c | 86 +++++++++++++++++++---------------------------------- 1 file changed, 31 insertions(+), 55 deletions(-) commit b08bb6bb5af5d1df8f41399f931efa1673fac1ac Author: James Simmons Date: Tue Mar 8 17:35:29 2016 -0500 staging: lustre: make lustre dependent on LNet In the case of lustre routers you only need a functioning LNet stack. Especially since often the routers are very light weight and want to avoid any addition software that would create additional pressures on the system. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/Makefile | 2 +- drivers/staging/lustre/Kconfig | 4 ++-- drivers/staging/lustre/lnet/Kconfig | 2 +- drivers/staging/lustre/lustre/Kconfig | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit b2b60cddb56729a0de1bfac3a9406b5631e7fcb7 Author: James Simmons Date: Tue Mar 8 17:35:28 2016 -0500 staging: lustre: add help section of Kconfig config LNET Include a help section for Kconfig LNET. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/Kconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 78ed9534df5b6f0371de14f9bcae18f2055d9997 Author: James Simmons Date: Tue Mar 8 17:35:27 2016 -0500 staging: lustre: fixup kernel Kconfig option LNET_MAX_PAYLOAD A few errors exist for the Kconfig option LNET_MAX_PAYLOAD. First mistake is the default size is 1MB not 2MB as it is shown to the person configuring the kernel. Second the LNET_MAX_PAYLOAD option is more closely related to LNET than the LUSTRE_FS option. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71bf3883ae5723f7895226c4b5fafa452c0cd00f Author: James Simmons Date: Tue Mar 8 17:35:26 2016 -0500 staging: lustre: move libcfs to lnet layer The lustre file system has a layered architecture with libcfs as the lowest layer and LNet layered on top. Then on top of LNet we run the lustre client. This patch moves the libcfs module code out of lustre into the lnet tree. This fits into the long term goal of eventually merging libcfs into LNet. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/Makefile | 2 +- drivers/staging/lustre/lnet/libcfs/Makefile | 17 + drivers/staging/lustre/lnet/libcfs/debug.c | 560 ++++++ drivers/staging/lustre/lnet/libcfs/fail.c | 139 ++ drivers/staging/lustre/lnet/libcfs/hash.c | 2085 ++++++++++++++++++++ drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 227 +++ drivers/staging/lustre/lnet/libcfs/libcfs_lock.c | 185 ++ drivers/staging/lustre/lnet/libcfs/libcfs_mem.c | 196 ++ drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 581 ++++++ .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 1040 ++++++++++ .../lustre/lnet/libcfs/linux/linux-crypto-adler.c | 137 ++ .../lustre/lnet/libcfs/linux/linux-crypto.c | 284 +++ .../lustre/lnet/libcfs/linux/linux-crypto.h | 29 + .../lustre/lnet/libcfs/linux/linux-curproc.c | 111 ++ .../staging/lustre/lnet/libcfs/linux/linux-debug.c | 200 ++ .../staging/lustre/lnet/libcfs/linux/linux-mem.c | 59 + .../lustre/lnet/libcfs/linux/linux-module.c | 159 ++ .../staging/lustre/lnet/libcfs/linux/linux-prim.c | 147 ++ .../lustre/lnet/libcfs/linux/linux-tracefile.c | 259 +++ drivers/staging/lustre/lnet/libcfs/module.c | 674 +++++++ drivers/staging/lustre/lnet/libcfs/prng.c | 140 ++ drivers/staging/lustre/lnet/libcfs/tracefile.c | 1208 ++++++++++++ drivers/staging/lustre/lnet/libcfs/tracefile.h | 266 +++ drivers/staging/lustre/lnet/libcfs/workitem.c | 470 +++++ drivers/staging/lustre/lustre/Makefile | 2 +- drivers/staging/lustre/lustre/libcfs/Makefile | 17 - drivers/staging/lustre/lustre/libcfs/debug.c | 560 ------ drivers/staging/lustre/lustre/libcfs/fail.c | 139 -- drivers/staging/lustre/lustre/libcfs/hash.c | 2085 -------------------- drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c | 227 --- drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 185 -- drivers/staging/lustre/lustre/libcfs/libcfs_mem.c | 196 -- .../staging/lustre/lustre/libcfs/libcfs_string.c | 581 ------ .../staging/lustre/lustre/libcfs/linux/linux-cpu.c | 1040 ---------- .../lustre/libcfs/linux/linux-crypto-adler.c | 137 -- .../lustre/lustre/libcfs/linux/linux-crypto.c | 284 --- .../lustre/lustre/libcfs/linux/linux-crypto.h | 29 - .../lustre/lustre/libcfs/linux/linux-curproc.c | 111 -- .../lustre/lustre/libcfs/linux/linux-debug.c | 200 -- .../staging/lustre/lustre/libcfs/linux/linux-mem.c | 59 - .../lustre/lustre/libcfs/linux/linux-module.c | 159 -- .../lustre/lustre/libcfs/linux/linux-prim.c | 147 -- .../lustre/lustre/libcfs/linux/linux-tracefile.c | 259 --- drivers/staging/lustre/lustre/libcfs/module.c | 674 ------- drivers/staging/lustre/lustre/libcfs/prng.c | 140 -- drivers/staging/lustre/lustre/libcfs/tracefile.c | 1208 ------------ drivers/staging/lustre/lustre/libcfs/tracefile.h | 266 --- drivers/staging/lustre/lustre/libcfs/workitem.c | 470 ----- 48 files changed, 9175 insertions(+), 9175 deletions(-) commit 79d0c088801b221330ee3b75cd10912003e3c6dd Author: Jubin John Date: Fri Feb 26 13:33:33 2016 -0800 staging/rdma/hfi1: Fix memory leaks Fix 3 memory leaks reported by the LeakCheck tool in the KEDR framework. The following resources were allocated memory during their respective initializations but not freed during cleanup: 1. SDMA map elements 2. PIO map elements 3. HW send context to SW index map This patch fixes the memory leaks by freeing the allocated memory in the cleanup path. Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 2 ++ drivers/staging/rdma/hfi1/pio.c | 2 +- drivers/staging/rdma/hfi1/sdma.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit 409b146225cdefcc76d9956e323e84e510208884 Author: Easwar Hariharan Date: Fri Feb 26 13:33:28 2016 -0800 staging/rdma/hfi1: Fix reporting of LED status in Get(LedInfo) and Get(PortInfo) The LedInfo SMA attribute is redefined to control the LED beaconing state machine instead of the LED directly. In accordance, we now return the state of LED beaconing, represented by whether the beaconing timer is active, instead of the state of the LED itself for SMA queries Get(LedInfo) and Get(PortInfo). While we are at it, we fix the beaconing timer control code so that the state of the timer is accurately updated. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 13 +++++++++++-- drivers/staging/rdma/hfi1/mad.c | 24 +++++++++++++++++++----- 2 files changed, 30 insertions(+), 7 deletions(-) commit 24487dd39cb24c23560c2dc726c6d3375f42a697 Author: Kaike Wan Date: Fri Feb 26 13:33:23 2016 -0800 staging/rdma/hfi1: Check interrupt registers mapping This patch tests the interrupt registers when the driver has no access to its upstream component. In this case, it is highly likely that it is running in a virtual machine (eg, Qemu-kvm guest). If the interrupt registers are not mapped properly by the virtual machine monitor, an error message will be printed and the probing will be terminated. This will help the user identify the issue. On the other hand, if the driver is running in a host or has access to its upstream component in some other VM, it will do nothing. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Kaike Wan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit bf400235f392eabf60c865c95da823727cb00def Author: Kaike Wan Date: Fri Feb 26 13:33:18 2016 -0800 staging/rdma/hfi1: Avoid using upstream component if it is not accessible When the hfi1 device is assigned to a VM (eg KVM), the hfi1 driver has no access to the upstream component and therefore cannot use it to perform some operations, such as secondary bus reset. As a result, the hfi1 driver cannot perform the pcie Gen3 transition. Instead, those operation should be done in the host environment, preferrably done during the Option ROM initialization. Similarly, the hfi1 driver cannot support ASPM and tune the pcie capability under this circumstance. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Kaike Wan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/aspm.h | 19 +++++++++++++++++-- drivers/staging/rdma/hfi1/pcie.c | 22 +++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) commit aa0ad411e51763f95afdae11d6ee684915faecef Author: Jianxin Xiong Date: Fri Feb 26 13:33:13 2016 -0800 staging/rdma/hfi1: Fix header size calculation for RC/UC QPs with GRH enabled There is a header size counter in both the QP struture and the txreq structure. The counter in the txreq structure is not updated properly for RC and UC queue pairs with GRH enabled, and thus causing SDMA send to fail. This patch fixes the RC and UC path. Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Signed-off-by: Jianxin Xiong Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 8 ++++---- drivers/staging/rdma/hfi1/uc.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit ade302405f333af834c5a272f905000810adf474 Author: Jubin John Date: Fri Feb 26 13:33:08 2016 -0800 IB/rdmavt: Check lkey_table_size value before use The lkey_table_size driver specific parameter value is used before its value is sanity checked and restricted to RVT_MAX_LKEY_TABLE_BITS. This causes a vmalloc allocation failure for large values. Fix this by moving the value check before the first usage of the value. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 582e05c3deeaf56ed04df62ad9f1fa6e88199bd9 Author: Dean Luick Date: Thu Feb 18 11:13:01 2016 -0800 staging/rdma/hfi1: Fix counter read for cp A cp or cat of /sys/kernel/debug/hfi1/hfi1_0/port1counters produces the following message: hfi1 0000:81:00.0: hfi1_0: index not supported hfi1 0000:81:00.0: hfi1_0: read_cntrs does not support indexing Fix by removing the file position logic and the associated messages and make the file positioning the responsibility of the caller. The port counter read function argument is changed to the per port data structure since the counters are relative to the port and not the device. Reviewed-by: Sebastian Sanchez Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 30 +++++------------------------- drivers/staging/rdma/hfi1/chip.h | 6 ++---- drivers/staging/rdma/hfi1/debugfs.c | 11 ++++------- 3 files changed, 11 insertions(+), 36 deletions(-) commit 7b47622d784311bff8218d03754fbf20529c1a71 Author: Dean Luick Date: Thu Feb 18 11:12:51 2016 -0800 staging/rdma/hfi1: Guard i2c access against cp An attempt to cp or cat /sys/kernel/debug/hfi1/hfi1_0/i2c1 produces this message: hfi1 0000:81:00.0: hfi1_0: IB0:1 I2C failed even retrying Fix the issue by explicitly rejecting a simple cat/cp with an -EINVAL error return. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/debugfs.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 9debaaecb9070c05bbc3b5d2257d6aea416ccab6 Author: Mike Marciniszyn Date: Thu Feb 18 11:12:42 2016 -0800 IB/rdamvt: fix cross build with rdmavt The new check routine causes a larger than supported frame size on s390. Changing the check routine to noinline fixes the issue. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 354d9c952d9db01d561abd55fdfa09ccc67039f9 Author: Dean Luick Date: Thu Feb 18 11:12:34 2016 -0800 staging/rdma/hfi1: Disclose more information when i2c fails Improve logging messages when there are i2c failures. Clean i2c read error handling. Reviewed-by: Easwar Hariharan Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qsfp.c | 42 +++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit ed6f653fe430ed4912aebec10a1b9d57813fe44c Author: Dean Luick Date: Thu Feb 18 11:12:25 2016 -0800 staging/rdma/hfi1: Fix debugfs access race Debugfs access races with the driver being ready. Make sure the driver is ready before debugfs files appear and debufs files are gone before the driver starts tearing down. Reviewed-by: Mike Marciniszyn Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e8aa284ba0cd2a1b6bfb3181a5b3b7f0bdefbe1a Author: Easwar Hariharan Date: Thu Feb 18 11:12:16 2016 -0800 staging/rdma/hfi1: Cleanup comments and logs in PHY code This is a set of minor fixes including comment and log message cleanups and improvements to the PHY layer code. Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 11 +++++++---- drivers/staging/rdma/hfi1/qsfp.c | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) commit 4c9e7aacb6a6334168a81b83819fb5cb088d2fb3 Author: Dean Luick Date: Thu Feb 18 11:12:08 2016 -0800 staging/rdma/hfi1: Fix xmit discard error weight Count only the errors that apply to xmit discards. Update the comment to better explain the limitations of the count. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 6b5c5213e57453c228f7695d5d889aa4c84272c3 Author: Mike Marciniszyn Date: Thu Feb 18 11:11:59 2016 -0800 staging/rdma/hfi1: fix 0-day syntax error Setting CONFIG_HFI1_DEBUG_SDMA_ORDER causes a syntax error: sdma.c: In function ‘complete_tx’: sdma.c:370: error: ‘txp’ undeclared (first use in this function) sdma.c:370: error: (Each undeclared identifier is reported only once sdma.c:370: error: for each function it appears in.) Adjust code under ifdef to reference the tx properly. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/sdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 05d6ac1d8268915593480a34926f386970a9d720 Author: Jubin John Date: Sun Feb 14 20:22:17 2016 -0800 staging/rdma/hfi1: Fix header Fix the header by moving the copyright notice out of the license text and to the top of the header. Also, update the copyright date. Reviewed-by: Dennis Dalessandro Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/affinity.c | 5 +---- drivers/staging/rdma/hfi1/affinity.h | 5 +---- drivers/staging/rdma/hfi1/aspm.h | 5 +---- drivers/staging/rdma/hfi1/chip.c | 5 +---- drivers/staging/rdma/hfi1/chip.h | 5 +---- drivers/staging/rdma/hfi1/chip_registers.h | 5 +---- drivers/staging/rdma/hfi1/common.h | 5 +---- drivers/staging/rdma/hfi1/debugfs.c | 5 +---- drivers/staging/rdma/hfi1/debugfs.h | 5 +---- drivers/staging/rdma/hfi1/device.c | 5 +---- drivers/staging/rdma/hfi1/device.h | 5 +---- drivers/staging/rdma/hfi1/diag.c | 5 +---- drivers/staging/rdma/hfi1/dma.c | 5 +---- drivers/staging/rdma/hfi1/driver.c | 5 +---- drivers/staging/rdma/hfi1/efivar.c | 5 +---- drivers/staging/rdma/hfi1/efivar.h | 5 +---- drivers/staging/rdma/hfi1/eprom.c | 5 +---- drivers/staging/rdma/hfi1/eprom.h | 5 +---- drivers/staging/rdma/hfi1/file_ops.c | 5 +---- drivers/staging/rdma/hfi1/firmware.c | 5 +---- drivers/staging/rdma/hfi1/hfi.h | 5 +---- drivers/staging/rdma/hfi1/init.c | 5 +---- drivers/staging/rdma/hfi1/intr.c | 5 +---- drivers/staging/rdma/hfi1/iowait.h | 5 +---- drivers/staging/rdma/hfi1/mad.c | 5 +---- drivers/staging/rdma/hfi1/mad.h | 5 +---- drivers/staging/rdma/hfi1/opa_compat.h | 5 +---- drivers/staging/rdma/hfi1/pcie.c | 5 +---- drivers/staging/rdma/hfi1/pio.c | 5 +---- drivers/staging/rdma/hfi1/pio.h | 5 +---- drivers/staging/rdma/hfi1/pio_copy.c | 5 +---- drivers/staging/rdma/hfi1/platform.c | 5 +---- drivers/staging/rdma/hfi1/platform.h | 5 +---- drivers/staging/rdma/hfi1/qp.c | 5 +---- drivers/staging/rdma/hfi1/qp.h | 5 +---- drivers/staging/rdma/hfi1/qsfp.c | 5 +---- drivers/staging/rdma/hfi1/qsfp.h | 5 +---- drivers/staging/rdma/hfi1/rc.c | 5 +---- drivers/staging/rdma/hfi1/ruc.c | 5 +---- drivers/staging/rdma/hfi1/sdma.c | 5 +---- drivers/staging/rdma/hfi1/sdma.h | 5 +---- drivers/staging/rdma/hfi1/sysfs.c | 5 +---- drivers/staging/rdma/hfi1/trace.c | 5 +---- drivers/staging/rdma/hfi1/trace.h | 5 +---- drivers/staging/rdma/hfi1/twsi.c | 5 +---- drivers/staging/rdma/hfi1/twsi.h | 5 +---- drivers/staging/rdma/hfi1/uc.c | 5 +---- drivers/staging/rdma/hfi1/ud.c | 5 +---- drivers/staging/rdma/hfi1/user_exp_rcv.c | 5 +---- drivers/staging/rdma/hfi1/user_exp_rcv.h | 5 +---- drivers/staging/rdma/hfi1/user_pages.c | 5 +---- drivers/staging/rdma/hfi1/user_sdma.c | 5 +---- drivers/staging/rdma/hfi1/user_sdma.h | 5 +---- drivers/staging/rdma/hfi1/verbs.c | 5 +---- drivers/staging/rdma/hfi1/verbs.h | 5 +---- 55 files changed, 55 insertions(+), 220 deletions(-) commit edddfca00eecd0949a9adccf8dd490478f641cbc Author: Jubin John Date: Sun Feb 14 20:22:09 2016 -0800 staging/rdma/hfi1: Remove else after break Remove else after break to fix checkpatch warning: WARNING: else is not generally useful after a break or return Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e490974e675e8ddec795137c1db7f38e0308cbcd Author: Jubin John Date: Sun Feb 14 20:22:00 2016 -0800 staging/rdma/hfi1: Add braces on all arms of statement Add braces on all arms of statements to fix checkpatch check: CHECK: braces {} should be used on all arms of this statement Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 8 ++++---- drivers/staging/rdma/hfi1/driver.c | 16 ++++++++-------- drivers/staging/rdma/hfi1/file_ops.c | 9 ++++++--- drivers/staging/rdma/hfi1/init.c | 3 ++- drivers/staging/rdma/hfi1/mad.c | 23 ++++++++++++----------- drivers/staging/rdma/hfi1/pcie.c | 3 ++- drivers/staging/rdma/hfi1/qp.c | 13 ++++++++----- drivers/staging/rdma/hfi1/rc.c | 25 ++++++++++++++----------- drivers/staging/rdma/hfi1/sdma.c | 3 ++- drivers/staging/rdma/hfi1/twsi.c | 4 ++-- drivers/staging/rdma/hfi1/uc.c | 31 ++++++++++++++++--------------- drivers/staging/rdma/hfi1/ud.c | 23 ++++++++++++++--------- drivers/staging/rdma/hfi1/user_sdma.c | 6 ++++-- drivers/staging/rdma/hfi1/verbs.c | 11 ++++++----- 14 files changed, 100 insertions(+), 78 deletions(-) commit 17fb4f2923d7fc7ee778dedc0aa60ab6f402f56c Author: Jubin John Date: Sun Feb 14 20:21:52 2016 -0800 staging/rdma/hfi1: Fix code alignment Fix code alignment to fix checkpatch check: CHECK: Alignment should match open parenthesis Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 921 ++++++++++++------------ drivers/staging/rdma/hfi1/debugfs.c | 34 +- drivers/staging/rdma/hfi1/driver.c | 32 +- drivers/staging/rdma/hfi1/eprom.c | 39 +- drivers/staging/rdma/hfi1/file_ops.c | 8 +- drivers/staging/rdma/hfi1/firmware.c | 124 ++-- drivers/staging/rdma/hfi1/hfi.h | 5 +- drivers/staging/rdma/hfi1/init.c | 24 +- drivers/staging/rdma/hfi1/intr.c | 12 +- drivers/staging/rdma/hfi1/mad.c | 141 ++-- drivers/staging/rdma/hfi1/pcie.c | 99 ++- drivers/staging/rdma/hfi1/pio.c | 71 +- drivers/staging/rdma/hfi1/pio.h | 4 +- drivers/staging/rdma/hfi1/pio_copy.c | 14 +- drivers/staging/rdma/hfi1/qsfp.c | 2 +- drivers/staging/rdma/hfi1/rc.c | 4 +- drivers/staging/rdma/hfi1/ruc.c | 14 +- drivers/staging/rdma/hfi1/sdma.c | 178 +++-- drivers/staging/rdma/hfi1/sysfs.c | 36 +- drivers/staging/rdma/hfi1/trace.c | 47 +- drivers/staging/rdma/hfi1/trace.h | 1280 ++++++++++++++++----------------- drivers/staging/rdma/hfi1/twsi.c | 2 +- drivers/staging/rdma/hfi1/uc.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 7 +- drivers/staging/rdma/hfi1/user_sdma.c | 2 +- drivers/staging/rdma/hfi1/verbs.c | 3 +- 26 files changed, 1508 insertions(+), 1597 deletions(-) commit 4d114fdd90ab4152a1477593edd9375be71d282d Author: Jubin John Date: Sun Feb 14 20:21:43 2016 -0800 staging/rdma/hfi1: Fix block comments Fix block comments with proper formatting to fix checkpatch warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 87 +++++++++++++++++++++++------------ drivers/staging/rdma/hfi1/chip.h | 12 +++-- drivers/staging/rdma/hfi1/file_ops.c | 6 ++- drivers/staging/rdma/hfi1/firmware.c | 18 +++++--- drivers/staging/rdma/hfi1/hfi.h | 6 ++- drivers/staging/rdma/hfi1/init.c | 12 +++-- drivers/staging/rdma/hfi1/mad.c | 62 ++++++++++++++++--------- drivers/staging/rdma/hfi1/mad.h | 6 ++- drivers/staging/rdma/hfi1/pcie.c | 6 ++- drivers/staging/rdma/hfi1/pio.c | 12 +++-- drivers/staging/rdma/hfi1/pio_copy.c | 30 ++++++++---- drivers/staging/rdma/hfi1/platform.h | 8 ++-- drivers/staging/rdma/hfi1/sdma.c | 3 +- drivers/staging/rdma/hfi1/user_sdma.c | 42 +++++++++++------ 14 files changed, 203 insertions(+), 107 deletions(-) commit 6a14c5ea380c1260772c70b9fd0a1492131f6116 Author: Jubin John Date: Sun Feb 14 20:21:34 2016 -0800 staging/rdma/hfi1: Add comment for spinlock_t definition Add comments describing the spinlock for spinlock_t definitions to fix checkpatch check: CHECK: spinlock_t definition without comment Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 3 +++ drivers/staging/rdma/hfi1/qsfp.h | 1 + drivers/staging/rdma/hfi1/sdma.h | 1 + 3 files changed, 5 insertions(+) commit d17c0cada704d6d5a291425192fb5148fb99cca1 Author: Jubin John Date: Sun Feb 14 20:21:26 2016 -0800 staging/rdma/hfi1: Remove void function return statement Remove return statement at the end of a void function to fix checkpatch warning: WARNING: void function return statements are not generally useful Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/uc.c | 1 - 1 file changed, 1 deletion(-) commit fcdd76df519e7be5e1094a4bf995374398c44efc Author: Jubin John Date: Sun Feb 14 20:21:16 2016 -0800 staging/rdma/hfi1: Use pointer instead of struct name Use sizeof(*p) instead of sizeof(struct foo) to fix checkpatch check: CHECK: Prefer alloc(sizeof(*p)...) over alloc(sizeof(struct foo)...) Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3db68f4672be95d6f8b0482f1e14c4257b1ee45e Author: Jubin John Date: Sun Feb 14 20:21:07 2016 -0800 staging/rdma/hfi1: Remove CamelCase Remove CamelCase to fix checkpatch check: CHECK: Avoid CamelCase: Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16733b8822017b84d2abdb8ae2b6c7d554a4e0d0 Author: Jubin John Date: Sun Feb 14 20:20:58 2016 -0800 staging/rdma/hfi1: Fix misspellings Fix misspelled word based on checkpatch check: CHECK: 'ffoo' may be misspelled - perhaps 'foo'? Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 2 +- drivers/staging/rdma/hfi1/qsfp.c | 2 +- drivers/staging/rdma/hfi1/sdma.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f3ff8189419e34b61c0e1040174dbd6701bf3428 Author: Jubin John Date: Sun Feb 14 20:20:50 2016 -0800 staging/rdma/hfi1: Split multiple assignments Split multiple assignments into individual assignments to fix checkpatch check: CHECK: multiple assignments should be avoided Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 ++++-- drivers/staging/rdma/hfi1/mad.c | 8 ++++---- drivers/staging/rdma/hfi1/sdma.h | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) commit 3f34d9588ff3b8adc4b5828327554fce98a94204 Author: Jubin John Date: Sun Feb 14 20:20:42 2016 -0800 staging/rdma/hfi1: Use BIT_ULL macro Use BIT_ULL macro to fix checkpatch check: CHECK: Prefer using the BIT_ULL macro Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.h | 16 ++++++++-------- drivers/staging/rdma/hfi1/eprom.c | 2 +- drivers/staging/rdma/hfi1/sdma.h | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) commit 58721b8f8c71a643edf9d51be159c5db39d843c6 Author: Jubin John Date: Sun Feb 14 20:20:33 2016 -0800 staging/rdma/hfi1: Remove unnecessary parentheses Remove unnecessary parentheses around addressof single $Lvals to fix checkpatch check: CHECK: Unnecessary parentheses around $var Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f4d507cdccd708a873dc4d6268a09475779af82d Author: Jubin John Date: Sun Feb 14 20:20:25 2016 -0800 staging/rdma/hfi1: Add blank link after declarations Add blank line after declarations to fix checkpatch check: CHECK: Please use a blank line after function/struct/union/enum declarations Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 2 ++ drivers/staging/rdma/hfi1/debugfs.c | 1 + drivers/staging/rdma/hfi1/firmware.c | 2 ++ drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/pcie.c | 1 + drivers/staging/rdma/hfi1/pio.h | 1 + 6 files changed, 8 insertions(+) commit d0d236ea34e6ce2d9106a8f61f92b6af3995d6ad Author: Jubin John Date: Sun Feb 14 20:20:15 2016 -0800 staging/rdma/hfi1: Fix logical continuations Move logical continuations to previous line to fix checkpatch check: CHECK: Logical continuations should be on the previous line Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 55 +++++++++++++++++------------------- drivers/staging/rdma/hfi1/driver.c | 6 ++-- drivers/staging/rdma/hfi1/file_ops.c | 12 ++++---- drivers/staging/rdma/hfi1/firmware.c | 20 +++++-------- drivers/staging/rdma/hfi1/intr.c | 3 +- drivers/staging/rdma/hfi1/mad.c | 12 ++++---- drivers/staging/rdma/hfi1/sdma.c | 4 +-- 7 files changed, 51 insertions(+), 61 deletions(-) commit 5161fc3ef60260343c2ffc1b42c9a92ba954d846 Author: Jubin John Date: Sun Feb 14 20:20:06 2016 -0800 staging/rdma/hfi1: Remove blank line before close brace Remove extra blank line before close brace to fix checkpatch check: CHECK: Blank lines aren't necessary before a close brace '}' Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 1 - drivers/staging/rdma/hfi1/driver.c | 1 - drivers/staging/rdma/hfi1/intr.c | 1 - drivers/staging/rdma/hfi1/mad.c | 2 -- drivers/staging/rdma/hfi1/pcie.c | 1 - drivers/staging/rdma/hfi1/sysfs.c | 1 - drivers/staging/rdma/hfi1/uc.c | 1 - drivers/staging/rdma/hfi1/ud.c | 2 -- drivers/staging/rdma/hfi1/user_sdma.c | 2 -- 9 files changed, 12 deletions(-) commit 458e86ab471b44a28a736cb8b0d364f3ec0d3e3e Author: Jubin John Date: Sun Feb 14 20:19:58 2016 -0800 staging/rdma/hfi1: Remove blank line after an open brace Remove blank line after an open brace to fix checkpatch check: CHECK: Blank lines aren't necessary after an open brace '{' Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 5 ----- drivers/staging/rdma/hfi1/driver.c | 3 --- drivers/staging/rdma/hfi1/mad.c | 2 -- drivers/staging/rdma/hfi1/qp.c | 1 - drivers/staging/rdma/hfi1/qsfp.c | 2 -- drivers/staging/rdma/hfi1/sdma.c | 2 -- 6 files changed, 15 deletions(-) commit d125a6c66b972e8c6768707c2814107df5963f5f Author: Jubin John Date: Sun Feb 14 20:19:49 2016 -0800 staging/rdma/hfi1: Fix comparison to NULL Convert pointer comparisons to NULL to !pointer to fix checkpatch check: CHECK: Comparison to NULL could be written "!pointer" Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 +++--- drivers/staging/rdma/hfi1/debugfs.c | 2 +- drivers/staging/rdma/hfi1/driver.c | 6 +++--- drivers/staging/rdma/hfi1/init.c | 4 ++-- drivers/staging/rdma/hfi1/mad.c | 8 ++++---- drivers/staging/rdma/hfi1/pio.c | 2 +- drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/sysfs.c | 4 ++-- drivers/staging/rdma/hfi1/verbs.c | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) commit 50e5dcbed6b36212c40e8fee18a7f5c7bb0aca13 Author: Jubin John Date: Sun Feb 14 20:19:41 2016 -0800 staging/rdma/hfi1: Remove space after cast Remove the space after a cast to fix checkpatch check: CHECK: No space is necessary after a cast Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 ++--- drivers/staging/rdma/hfi1/debugfs.c | 4 +-- drivers/staging/rdma/hfi1/dma.c | 12 ++++----- drivers/staging/rdma/hfi1/driver.c | 6 ++--- drivers/staging/rdma/hfi1/firmware.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 4 +-- drivers/staging/rdma/hfi1/mad.c | 48 +++++++++++++++++------------------ drivers/staging/rdma/hfi1/pcie.c | 4 +-- drivers/staging/rdma/hfi1/pio.c | 2 +- drivers/staging/rdma/hfi1/rc.c | 14 +++++----- drivers/staging/rdma/hfi1/ruc.c | 8 +++--- drivers/staging/rdma/hfi1/sdma.c | 10 ++++---- drivers/staging/rdma/hfi1/trace.c | 2 +- drivers/staging/rdma/hfi1/user_sdma.c | 2 +- drivers/staging/rdma/hfi1/verbs.h | 4 +-- 15 files changed, 64 insertions(+), 64 deletions(-) commit 74182acd7f6b5782d72bf608db233348d2120af0 Author: Jubin John Date: Sun Feb 14 20:19:32 2016 -0800 staging/rdma/hfi1: Remove multiple blank lines Remove multiple blank lines to fix checkpatch check: CHECK: Please don't use multiple blank lines Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 ------ drivers/staging/rdma/hfi1/debugfs.c | 3 --- drivers/staging/rdma/hfi1/file_ops.c | 2 -- drivers/staging/rdma/hfi1/hfi.h | 2 -- drivers/staging/rdma/hfi1/init.c | 1 - drivers/staging/rdma/hfi1/intr.c | 1 - drivers/staging/rdma/hfi1/mad.c | 1 - drivers/staging/rdma/hfi1/mad.h | 1 - drivers/staging/rdma/hfi1/pcie.c | 1 - drivers/staging/rdma/hfi1/pio.c | 1 - drivers/staging/rdma/hfi1/pio.h | 2 -- drivers/staging/rdma/hfi1/sdma.c | 2 -- drivers/staging/rdma/hfi1/sdma.h | 4 ---- drivers/staging/rdma/hfi1/sysfs.c | 6 ------ drivers/staging/rdma/hfi1/trace.h | 4 ---- drivers/staging/rdma/hfi1/twsi.h | 1 - drivers/staging/rdma/hfi1/ud.c | 1 - drivers/staging/rdma/hfi1/verbs.c | 2 -- 18 files changed, 41 deletions(-) commit 8638b77f13d2b11a4e356916526d6303e1002fe9 Author: Jubin John Date: Sun Feb 14 20:19:24 2016 -0800 staging/rdma/hfi1: Add spaces around binary operators Add spaces around binary operators. Fixes checkpatch check: CHECK: spaces preferred around that 'x' where x is a binary operator Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 104 +++++++++++++++++----------------- drivers/staging/rdma/hfi1/debugfs.c | 2 +- drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/eprom.c | 10 ++-- drivers/staging/rdma/hfi1/firmware.c | 28 ++++----- drivers/staging/rdma/hfi1/hfi.h | 2 +- drivers/staging/rdma/hfi1/intr.c | 2 +- drivers/staging/rdma/hfi1/mad.c | 22 +++---- drivers/staging/rdma/hfi1/mad.h | 2 +- drivers/staging/rdma/hfi1/pcie.c | 2 +- drivers/staging/rdma/hfi1/pio.c | 4 +- drivers/staging/rdma/hfi1/pio_copy.c | 18 +++--- drivers/staging/rdma/hfi1/qsfp.c | 6 +- drivers/staging/rdma/hfi1/qsfp.h | 2 +- drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/sdma.c | 8 +-- drivers/staging/rdma/hfi1/sdma.h | 2 +- drivers/staging/rdma/hfi1/user_sdma.c | 2 +- drivers/staging/rdma/hfi1/verbs.c | 2 +- 19 files changed, 111 insertions(+), 111 deletions(-) commit 0358a440c2e7401238372316565b654fd95e5142 Author: Vennila Megavannan Date: Sun Feb 14 12:46:28 2016 -0800 staging/rdma/hfi1: add cq head and tail information to qpstats This enables debugging issues related to cq event signalling mechanism Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Vennila Megavannan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 77e7639fd782f5432c87ed7143b3e50be76c8500 Author: Jubin John Date: Sun Feb 14 12:46:19 2016 -0800 staging/rdma/hfi1: Add send context sw index Print the qp's send context sw index in the qpstats Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a4d3444ebfacceb3e1bf4e449a42f9b6345596c Author: Mike Marciniszyn Date: Sun Feb 14 12:46:01 2016 -0800 staging/rdma/hfi1: Determine actual operational VLs Use shared credits and dedicated credits for each VL to determine the actual number of operational VLs. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 37 +++++++++++++++++++++++++++++-------- drivers/staging/rdma/hfi1/diag.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 3 ++- 3 files changed, 32 insertions(+), 10 deletions(-) commit 35f6befc8441d20724a41bafc810b7c8f5a92986 Author: Jubin John Date: Sun Feb 14 12:46:10 2016 -0800 staging/rdma/hfi1: Add qp to send context mapping for PIO PIO send context mapping is changed from per-VL to QPN based. qp to send context mapping is done using a mapping infrastructure similar to the current vl to sdma engine mapping. Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 6 + drivers/staging/rdma/hfi1/init.c | 2 + drivers/staging/rdma/hfi1/pio.c | 241 +++++++++++++++++++++++++++++++++++++- drivers/staging/rdma/hfi1/pio.h | 106 +++++++++++++++++ drivers/staging/rdma/hfi1/qp.c | 24 ++++ drivers/staging/rdma/hfi1/qp.h | 1 + drivers/staging/rdma/hfi1/verbs.c | 12 -- drivers/staging/rdma/hfi1/verbs.h | 2 - 8 files changed, 375 insertions(+), 19 deletions(-) commit a545f5308b6cf476def8a9326f7e82f89623bb03 Author: Mike Marciniszyn Date: Sun Feb 14 12:45:53 2016 -0800 staging/rdma/hfi: fix CQ completion order issue The current implementation of the sdma_wait variable has a timing hole that can cause a completion Q entry to be returned from a pio send prior to an older sdma packets completion queue entry. The sdma_wait variable used to be decremented prior to calling the packet complete routine. The hole is between decrement and the verbs completion where send engine using pio could return a out of order completion in that window. This patch closes the hole by allowing an API option to specify an sdma_drained callback. The atomic dec is positioned after the complete callback to avoid the window as long as the pio path doesn't execute when there is a non-zero sdma count. Reviewed-by: Jubin John Signed-off-by: Dean Luick Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/iowait.h | 12 +++-- drivers/staging/rdma/hfi1/qp.c | 20 +++++++- drivers/staging/rdma/hfi1/sdma.c | 94 +++++++++++----------------------- drivers/staging/rdma/hfi1/sdma.h | 4 +- drivers/staging/rdma/hfi1/sdma_txreq.h | 2 +- drivers/staging/rdma/hfi1/user_sdma.c | 7 ++- drivers/staging/rdma/hfi1/verbs.c | 18 +------ 7 files changed, 65 insertions(+), 92 deletions(-) commit 91702b4a39fb566b78f2ef1cea8bf6ed3fe9f4a6 Author: Mike Marciniszyn Date: Sun Feb 14 12:45:44 2016 -0800 IB/qib, staging/rdma/hfi1, IB/rdmavt: progress selection changes The non-rdamvt versions of qib and hfi1 allow for a differing heuristic to override a schedule progress in favor of a direct call the the progress routine. This patch adds that for both drivers and rdmavt. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 7 +++++-- drivers/infiniband/sw/rdmavt/qp.c | 10 +++++++--- drivers/staging/rdma/hfi1/qp.c | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) commit 14553ca11039732bcba3c160a26d702dbe71dd49 Author: Mike Marciniszyn Date: Sun Feb 14 12:45:36 2016 -0800 staging/rdma/hfi1: Adaptive PIO for short messages The change requires a new pio_busy field in the iowait structure to track the number of outstanding pios. The new counter together with the sdma counter serve as the basis for a packet by packet decision as to which egress mechanism to use. Since packets given to different egress mechanisms are not ordered, this scheme will preserve the order. The iowait drain/wait mechanisms are extended for a pio case. An additional qp wait flag is added for the PIO drain wait case. Currently the only pio wait is for buffers, so the no_bufs_available() routine name is changed to pio_wait() and a third argument is passed with one of the two pio wait flags to generalize the routine. A module parameter is added to hold a configurable threshold. For now, the module parameter is zero. A heuristic routine is added to return the func pointer of the proper egress routine to use. The heuristic is as follows: - SMI always uses pio - GSI,UD qps <= threshold use pio - UD qps > threadhold use sdma o No coordination with sdma is required because order is not required and this qp pio count is not maintained for UD - RC/UC ONLY packets <= threshold chose as follows: o If sdmas pending, use SDMA o Otherwise use pio and enable the pio tracking count at the time the pio buffer is allocated - RC/UC ONLY packets > threshold use SDMA o If pio's are pending the pio_wait with the new wait flag is called to delay for pios to drain The threshold is potentially reduced by the QP's mtu. The sc_buffer_alloc() has two additional args (a callback, a void *) which are exploited by the RC/UC cases to pass a new complete routine and a qp *. When the shadow ring completes the credit associated with a packet, the new complete routine is called. The verbs_pio_complete() will then decrement the busy count and trigger any drain waiters in qp destroy or reset. Reviewed-by: Jubin John Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 10 +++ drivers/staging/rdma/hfi1/chip.h | 1 + drivers/staging/rdma/hfi1/hfi.h | 7 +- drivers/staging/rdma/hfi1/iowait.h | 89 +++++++++++++++++++++++ drivers/staging/rdma/hfi1/pio.c | 3 +- drivers/staging/rdma/hfi1/qp.c | 25 ++++++- drivers/staging/rdma/hfi1/rc.c | 17 ++++- drivers/staging/rdma/hfi1/sdma.c | 14 ++-- drivers/staging/rdma/hfi1/uc.c | 10 ++- drivers/staging/rdma/hfi1/ud.c | 4 +- drivers/staging/rdma/hfi1/verbs.c | 123 +++++++++++++++++++++++--------- drivers/staging/rdma/hfi1/verbs.h | 16 +++++ drivers/staging/rdma/hfi1/verbs_txreq.h | 5 ++ include/rdma/rdmavt_qp.h | 22 +++--- 14 files changed, 286 insertions(+), 60 deletions(-) commit 4f8cc5c04f9445c4b1ef82769b5c0a0f1f8713c9 Author: Mike Marciniszyn Date: Sun Feb 14 12:45:27 2016 -0800 staging/rdma/hfi1: use u8 for vl/sl The use should match the universal container size. Reviewed-by: Ira Weiny Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 711e104ddca7b609889e1edf0a8482673ea4a7cc Author: Mike Marciniszyn Date: Sun Feb 14 12:45:18 2016 -0800 staging/rdma/hfi1: fix panic in send engine The send engine wasn't correctly handling pre-built packets, and worse, the pointer to a packet state's txreq wasn't initialized correctly. To fix: - all waiters need to save any prebuilt packets (smda waits already did) - the progress routine needs to handle a QPs prebuilt packet and initialize the txreq pointer properly To keep SDMA working, the dma send code needs to see if a packet has been built already. If not the code will build it. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/iowait.h | 20 ++++++++ drivers/staging/rdma/hfi1/rc.c | 4 ++ drivers/staging/rdma/hfi1/ruc.c | 2 + drivers/staging/rdma/hfi1/sdma_txreq.h | 5 ++ drivers/staging/rdma/hfi1/uc.c | 2 + drivers/staging/rdma/hfi1/ud.c | 6 ++- drivers/staging/rdma/hfi1/verbs.c | 85 ++++++++++++++++----------------- drivers/staging/rdma/hfi1/verbs_txreq.h | 17 +++++++ 8 files changed, 95 insertions(+), 46 deletions(-) commit 1235bef8f04bf020b03f32e083e34bc91fc51343 Author: Mike Marciniszyn Date: Sun Feb 14 12:45:09 2016 -0800 staging/rdma/hfi1: avoid passing pmtu It is in the qp. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 721d04273a8265847612a420174bb6e9a13d8d4f Author: Jubin John Date: Sun Feb 14 12:45:00 2016 -0800 staging/rdma/hfi1: Add s_sendcontext priv field s_sendcontext will be used to map the QPs to the send contexts for PIO. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 13 +++++++++++-- drivers/staging/rdma/hfi1/ud.c | 1 + drivers/staging/rdma/hfi1/verbs.h | 9 +++++---- 3 files changed, 17 insertions(+), 6 deletions(-) commit c239a5b5d6617b8bdae401f86529cab76313f3e7 Author: Mike Marciniszyn Date: Sun Feb 14 12:44:52 2016 -0800 staging/rdma/hfi1: remove s_rdma_mr It can be conveyed in the verbs_txreq. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 12 ++++++------ drivers/staging/rdma/hfi1/verbs.c | 8 -------- 2 files changed, 6 insertions(+), 14 deletions(-) commit bb5df5f9eea6b9efb5911a5fef63b4614af01c89 Author: Dennis Dalessandro Date: Sun Feb 14 12:44:43 2016 -0800 staging/rdma/hfi1: Remove header memcpy from sdma send path. Instead of writing the header into a buffer then copying it into another buffer to be sent, remove that memcpy and instead build the header directly into the tx request that will be sent. Reviewed-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/diag.c | 20 +++++++---- drivers/staging/rdma/hfi1/rc.c | 42 +++++++++++++++------- drivers/staging/rdma/hfi1/ruc.c | 22 +++++++----- drivers/staging/rdma/hfi1/uc.c | 30 +++++++++++----- drivers/staging/rdma/hfi1/ud.c | 56 ++++++++++++++++++----------- drivers/staging/rdma/hfi1/verbs.c | 63 +++++++++++++++------------------ drivers/staging/rdma/hfi1/verbs.h | 18 ++++------ drivers/staging/rdma/hfi1/verbs_txreq.h | 1 - 8 files changed, 148 insertions(+), 104 deletions(-) commit 45842abbb292338d7d328c40bae411218242d2cd Author: Mike Marciniszyn Date: Sun Feb 14 12:44:34 2016 -0800 staging/rdma/hfi1: move txreq header code The patch separates the txreq defines into new files, one for verbs and one for sdma. The verbs_txreq implementation handles the setup and teardown of the txreq cache, so the register routine is changed to call the new init/exit routines. This patch allows for followup patches enhance the send engine. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 3 +- drivers/staging/rdma/hfi1/qp.c | 2 +- drivers/staging/rdma/hfi1/ruc.c | 2 +- drivers/staging/rdma/hfi1/sdma.h | 80 +---------------- drivers/staging/rdma/hfi1/sdma_txreq.h | 130 ++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/verbs.c | 111 ++---------------------- drivers/staging/rdma/hfi1/verbs_txreq.c | 149 ++++++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/verbs_txreq.h | 95 ++++++++++++++++++++ 8 files changed, 384 insertions(+), 188 deletions(-) commit d2421a82f6d8ad407d3f4acdbacedfb06d9f47f5 Author: Mike Marciniszyn Date: Sun Feb 14 12:44:26 2016 -0800 IB/rdmvt: close send engine struct holes pahole noted the wasted 4 bytes after s_lock and r_lock. Move s_flags and r_psn to fill the holes. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3585254d56b0c474a50f911295710e786b33d9ca Author: Mike Marciniszyn Date: Sun Feb 14 12:44:17 2016 -0800 staging/rdma/hfi1: add s_avail to qp_stats This diagnostic capability was missed in the dual lock series. Signed-off-by: Vennila Megavannan Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21cfca33587d45ccdc5aaaedf97a909ccc4a0a27 Author: Harish Chegondi Date: Sun Feb 14 12:11:28 2016 -0800 IB/qib: Destroy SMI AH before de-allocating the protection domain If SMI AH is not destroyed before de-allocating the PD, it would result in non-zero PD use count when de-allocating the PD, triggering a WARN_ON() at drivers/infiniband/core/verbs.c:284 ib_dealloc_pd+0x69/0xb0 [ib_core]() when unloading the qib driver on systems with dual-port card. This problem has always been there in qib and was detected only after the commit 7dd78647a2c2 ("IB/core: Make ib_dealloc_pd return void") introduced a WARN_ON in ib_dealloc_pd() that triggers if a PD's use count is non-zero before de-allocating the PD. Below is the call trace from the dmesg log. [ 7264.966129] Call Trace: [ 7264.969652] [] dump_stack+0x44/0x64 [ 7264.976181] [] warn_slowpath_common+0x86/0xc0 [ 7264.983656] [] warn_slowpath_null+0x1a/0x20 [ 7264.990961] [] ib_dealloc_pd+0x69/0xb0 [ib_core] [ 7264.998717] [] ib_mad_port_close+0xb8/0x120 [ib_mad] [ 7265.006866] [] ib_mad_remove_device+0x6f/0xc0 [ib_mad] [ 7265.015224] [] ib_unregister_device+0xa7/0x140 [ib_core] [ 7265.023738] [] rvt_unregister_device+0x29/0x80 [rdmavt] [ 7265.032181] [] qib_unregister_ib_device+0x22/0x210 [ib_qib] [ 7265.040993] [] qib_remove_one+0x1f/0x250 [ib_qib] [ 7265.048823] [] pci_device_remove+0x39/0xc0 [ 7265.055984] [] __device_release_driver+0x9a/0x140 [ 7265.063821] [] driver_detach+0xb8/0xc0 [ 7265.070579] [] bus_remove_driver+0x55/0xd0 [ 7265.077717] [] driver_unregister+0x2c/0x50 [ 7265.084849] [] pci_unregister_driver+0x2a/0x80 [ 7265.092366] [] qib_ib_cleanup+0x37/0x65 [ib_qib] [ 7265.100068] [] SyS_delete_module+0x190/0x220 [ 7265.107379] [] entry_SYSCALL_64_fastpath+0x12/0x71 Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 2 -- drivers/infiniband/hw/qib/qib_mad.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit 79a225be38932b17707009767e85d6edf450e7cc Author: Dennis Dalessandro Date: Sun Feb 14 12:11:20 2016 -0800 IB/rdmavt: Remove unnecessary exported functions Remove exported functions which are no longer required as the functionality has moved into rdmavt. This also requires re-ordering some of the functions since their prototype no longer appears in a header file. Rather than add forward declarations it is just cleaner to re-order some of the functions. Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mmap.c | 4 - drivers/infiniband/sw/rdmavt/mmap.h | 8 ++ drivers/infiniband/sw/rdmavt/qp.c | 252 +++++++++++++++++------------------- drivers/infiniband/sw/rdmavt/srq.c | 1 + drivers/infiniband/sw/rdmavt/vt.h | 1 + include/rdma/rdma_vt.h | 13 -- include/rdma/rdmavt_qp.h | 4 - 7 files changed, 128 insertions(+), 155 deletions(-) commit 0765b01b8e2da50ad56f6544f935f5eaef1389f2 Author: Dennis Dalessandro Date: Sun Feb 14 12:11:12 2016 -0800 IB/rdmavt: Remove signal_supported and comments Initially it was intended that rdmavt would support some signaling between the underlying driver and itself. However this turned out to be unnecessary for qib and hfi1. If we need to add something like this in later to support another driver we should do it then. As of now this essentially dead code so remove it. Reviewed-by: Ira Weiny Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdma_vt.h | 18 ------------------ 1 file changed, 18 deletions(-) commit ce73fe25a6bd4a4deabed57e2553100e10fb8362 Author: Dennis Dalessandro Date: Sun Feb 14 12:11:03 2016 -0800 IB/rdmavt: Remove RVT_FLAGs While hfi1 and qib were still supporting bits and pieces of core verbs components there needed to be a way to convey if rdmavt should handle allocation and initialize of resources like the queue pair table. Now that all of this is moved into rdmavt there is no need for these flags. They are no longer used in the drivers. Reviewed-by: Ira Weiny Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/cq.c | 5 ----- drivers/infiniband/sw/rdmavt/mr.c | 5 ----- drivers/infiniband/sw/rdmavt/qp.c | 8 -------- include/rdma/rdma_vt.h | 10 ---------- 4 files changed, 28 deletions(-) commit 4eadd8ff21bffcaf3338267dcca571accc612c8e Author: Dennis Dalessandro Date: Sun Feb 14 12:10:55 2016 -0800 IB/qib,rdmavt: Move smi_ah to qib Rdmavt adopted an smi_ah from qib which is not needed by hfi1. Move this back to qib and get it out of the common library. Reviewed-by: Ira Weiny Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 10 +++++----- drivers/infiniband/hw/qib/qib_verbs.h | 1 + include/rdma/rdma_vt.h | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) commit 611ac099289736176e16aedd75f980f21b00d974 Author: Dennis Dalessandro Date: Sun Feb 14 12:10:45 2016 -0800 IB/qib: Setup notify free/create mad agent callbacks for rdmavt Qib needs to be notified when mad agents are created and freed, there is some counter maintenance that needs to be performed. Add those callbacks at registration time with rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1348d706f254fe7030221251a5e1685ff3d9f86a Author: Dennis Dalessandro Date: Sun Feb 14 12:10:37 2016 -0800 IB/rdmavt: Add per verb driver callback checking For each verb validate that all requirements for driver callbacks are met. If a function is called without checking for a valid pointer, it is a required function. Also document what each callback function does. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 441 ++++++++++++++++++++++++++++++++------ include/rdma/rdma_vt.h | 123 +++++++++-- 2 files changed, 489 insertions(+), 75 deletions(-) commit 90793f7179478df19ac4b2244cfd9764b28e4b38 Author: Dennis Dalessandro Date: Sun Feb 14 12:10:29 2016 -0800 IB/rdmavt: Clean up comments and add more documentation Add, remove, and otherwise clean up existing comments that are leftover from the initial code postings of rdmavt. Many of the comments were added to provide an idea on the direction we were thinking of going. Now that the design is solidified make a pass over and clean everything up. Also add details where lacking. Ensure all non static functions have nano comments. Reviewed-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 27 ++++++++++++++++ drivers/infiniband/sw/rdmavt/cq.c | 30 +++++++++++------ drivers/infiniband/sw/rdmavt/mad.c | 30 +++++++++++------ drivers/infiniband/sw/rdmavt/mcast.c | 34 ++++++++++++++++++-- drivers/infiniband/sw/rdmavt/mmap.c | 28 ++++++++++++---- drivers/infiniband/sw/rdmavt/mr.c | 38 ++++++++++++++-------- drivers/infiniband/sw/rdmavt/pd.c | 16 ++++++++++ drivers/infiniband/sw/rdmavt/qp.c | 57 +++++++++++++++++++++++++++++---- drivers/infiniband/sw/rdmavt/srq.c | 21 +++++++++++- drivers/infiniband/sw/rdmavt/vt.c | 62 ++++++++++++++++++++++++++++-------- include/rdma/rdma_vt.h | 15 --------- 11 files changed, 280 insertions(+), 78 deletions(-) commit 0ec79e875ada58bd6598d8965f9079fe1a662950 Author: Kaike Wan Date: Sun Feb 14 12:10:20 2016 -0800 staging/rdma/hfi1: Put QPs into error state after SL->SC table changes If an SL->SC mapping table change occurs after an RC/UC QP is created, there is no mechanism to change the SC nor the VL for that QP. The fix is to place the QP into error state so that ULP can recreate the QP with the new SL->SC mapping. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 13 +++++++++-- drivers/staging/rdma/hfi1/qp.c | 52 +++++++++++++++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/qp.h | 1 + 3 files changed, 64 insertions(+), 2 deletions(-) commit e16689e49216d08336da2d96cbc8c4b6b914dc99 Author: Harish Chegondi Date: Sun Feb 14 12:10:12 2016 -0800 IB/rdmavt: Add trace and error print statements in post_one_wr These trace and error print statements would help in debugging issues which are caused due to messed up QP ring buffer pointers. Reviewed-by: Mike Marciniszyn Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 8 ++++- drivers/infiniband/sw/rdmavt/trace.h | 70 ++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) commit 46a80d62e6e0ccfc9d8a05c5b773405b84a4afd7 Author: Mike Marciniszyn Date: Sun Feb 14 12:10:04 2016 -0800 IB/qib, staging/rdma/hfi1: add s_hlock for use in post send This patch adds an additional lock to reduce contention on the s_lock. This lock is used in post_send() so that the post_send is not serialized with the send engine and other send related processing. To do this the s_next_psn is now maintained on post_send() while post_send() related fields are moved to a new cache line. There is an s_avail maintained for the post_send() to mitigate trading cache lines with the send engine. The lock is released/acquired around releasing the just built packet to the egress mechanism. Reviewed-by: Jubin John Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Harish Chegondi Signed-off-by: Mike Marciniszyn Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 36 +++++++++++++ drivers/infiniband/hw/qib/qib_rc.c | 44 ++++------------ drivers/infiniband/hw/qib/qib_ruc.c | 11 ++-- drivers/infiniband/hw/qib/qib_uc.c | 22 ++++---- drivers/infiniband/hw/qib/qib_ud.c | 22 ++++---- drivers/infiniband/hw/qib/qib_verbs.c | 37 +++++++++---- drivers/infiniband/hw/qib/qib_verbs.h | 6 +-- drivers/infiniband/sw/rdmavt/qp.c | 97 +++++++++++++++++++++++++++-------- drivers/staging/rdma/hfi1/qp.c | 79 +++++++++++++++++++++++++--- drivers/staging/rdma/hfi1/qp.h | 37 +------------ drivers/staging/rdma/hfi1/rc.c | 44 ++++------------ drivers/staging/rdma/hfi1/ruc.c | 40 ++++++++------- drivers/staging/rdma/hfi1/uc.c | 21 ++++---- drivers/staging/rdma/hfi1/ud.c | 22 ++++---- drivers/staging/rdma/hfi1/verbs.c | 3 +- drivers/staging/rdma/hfi1/verbs.h | 2 +- include/rdma/rdma_vt.h | 4 +- include/rdma/rdmavt_qp.h | 13 +++-- 18 files changed, 319 insertions(+), 221 deletions(-) commit 20f333b61300fa658952713ca9b8b4b72bbaed9f Author: Harish Chegondi Date: Sun Feb 14 12:09:55 2016 -0800 IB/qib: Rename several functions by adding a "qib_" prefix This would avoid conflict with the functions in hfi1 that have similar names when both qib and hfi1 drivers are configured to be built into the kernel. This issue came up in the 0-day build report. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 16 ++++++++-------- drivers/infiniband/hw/qib/qib_qp.c | 26 +++++++++++++------------- drivers/infiniband/hw/qib/qib_verbs.c | 26 +++++++++++++------------- drivers/infiniband/hw/qib/qib_verbs.h | 10 +++++----- 4 files changed, 39 insertions(+), 39 deletions(-) commit bfee5e32e701b98634b380a9eef8b5820feb7488 Author: Vennila Megavannan Date: Tue Feb 9 14:29:49 2016 -0800 IB/rdmavt, staging/rdma/hfi1: use qps to dynamically scale timeout value A busy_jiffies variable is maintained and updated when rc qps are created and deleted. busy_jiffies is a scaled value of the number of rc qps in the device. busy_jiffies is incremented every rc qp scaling interval. busy_jiffies is added to the rc timeout in add_retry_timer and mod_retry_timer. The rc qp scaling interval is selected based on extensive performance evaluation of targeted workloads. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 17 +++++++++++++++++ drivers/staging/rdma/hfi1/rc.c | 12 ++++++++++-- include/rdma/rdma_vt.h | 4 +++- include/rdma/rdmavt_qp.h | 2 ++ 4 files changed, 32 insertions(+), 3 deletions(-) commit 773d0451685b96f157ccd617a5e9cd9d3fa7d986 Author: Sebastian Sanchez Date: Tue Feb 9 14:29:40 2016 -0800 staging/rdma/hfi1: Turning off LED without checking if stepping is Ax It prevents the LED from staying on when the QSFP module is not present. Reviewed-by: Easwar Hariharan Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 4 ++-- drivers/staging/rdma/hfi1/pcie.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 34cee28f0bb067f4210271c4d7c4febe34bad2d3 Author: Mike Marciniszyn Date: Tue Feb 9 14:29:31 2016 -0800 staging/rdma/hfi1: actually use new RNR timer API in loopback path The patch series which added a new API for the RNR timer did not include an updated call in the loopback path. RC/UC RNR loopback would be broken without this. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/ruc.c | 8 +++----- drivers/staging/rdma/hfi1/verbs.h | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) commit 97167e8134150eb5104e19fd7208e3ac3525f48b Author: Easwar Hariharan Date: Tue Feb 9 14:29:22 2016 -0800 staging/rdma/hfi1: Tune for unknown channel if configuration file is absent Currently, the driver fails to tune the SerDes and therefore prevents link up if the configuration file is missing or fails parsing or validation. This patch adds a fallback option so that the 8051 is asked to tune for an unknown channel and possibly get the link up if tuning succeeds. It also adds a user-friendly message to update the configuration file if it is out-of-date. Reviewed-by: Mike Marciniszyn Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.h | 4 ++ drivers/staging/rdma/hfi1/firmware.c | 49 ++++++++++++++++-- drivers/staging/rdma/hfi1/platform.c | 97 +++++++++++++++++++----------------- drivers/staging/rdma/hfi1/qsfp.c | 1 - 4 files changed, 99 insertions(+), 52 deletions(-) commit c3838b396b425b4242bfe627bfabefc4c1af56f2 Author: Easwar Hariharan Date: Tue Feb 9 14:29:13 2016 -0800 staging/rdma/hfi1: Fetch platform configuration data from EFI variable The platform configuration data has been moved into the EFI variable store where it is populated by the HFI1 option ROM. This patch pulls the configuration data from the new location, retaining a fallback to request_firmware. Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 3 ++ drivers/staging/rdma/hfi1/chip.h | 2 ++ drivers/staging/rdma/hfi1/firmware.c | 69 ++++++++++++++++++++++++++++-------- drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/init.c | 1 + drivers/staging/rdma/hfi1/platform.c | 58 ++++++++++++++++++++++++++---- drivers/staging/rdma/hfi1/platform.h | 9 +++++ 7 files changed, 121 insertions(+), 22 deletions(-) commit 045277cf1548ab04a114bf560a01e38cf33b91b4 Author: Hari Prasath Gujulan Elango Date: Thu Feb 4 11:03:45 2016 -0800 IB/qib,staging/rdma/hfi1: use setup_timer api Replace the timer API's to initialize a timer & then assign the callback function by the setup_timer() API. Signed-off-by: Hari Prasath Gujulan Elango Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 4 +--- drivers/staging/rdma/hfi1/verbs.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 066fad289408e7d48ce00b54a292e7a90602cb30 Author: Mike Marciniszyn Date: Thu Feb 4 11:03:36 2016 -0800 IB/rdmavt: remove unused qp field The field is a vestige from ipath. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 1 - 1 file changed, 1 deletion(-) commit ee84541ad11e70d372670160e727680051801517 Author: Mike Marciniszyn Date: Thu Feb 4 11:03:28 2016 -0800 IB/qib: Insure last cursor is updated prior to complete This patch is a prerequisite for adding a separate lock for post send. The timing of updating s_last needs to be before returning any send completion to avoid a race between a poll cq seeing a completion and the post send checking for a full queue. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_rc.c | 20 ++++++++++++++++---- drivers/infiniband/hw/qib/qib_ruc.c | 12 +++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) commit 6c2ab0b857d1b674c5f710d2cbf06a0f3ac52313 Author: Mike Marciniszyn Date: Thu Feb 4 11:03:19 2016 -0800 staging/rdma/hfi1: Insure last cursor is updated prior to complete This patch is a prerequisite for adding a separate lock for post send. The timing of updating s_last needs to be before returning any send completion to avoid a race between a poll cq seeing a completion and the post send checking for a full queue. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 20 ++++++++++++++++---- drivers/staging/rdma/hfi1/ruc.c | 12 +++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) commit 20658661bc0712c51ad9798914f5eb3e28cb8121 Author: Mike Marciniszyn Date: Thu Feb 4 11:03:11 2016 -0800 staging/rdma/hfi1: add s_retry to diagnostics This is needed to debug ULP issues with getting retry attributes correctly specified. Reviewed-by: Jubin John Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0940e0f68e59fca500cbad6f5f58bddefdb6dc53 Author: Mike Marciniszyn Date: Thu Feb 4 11:03:02 2016 -0800 staging/rdma/hfi1: remove duplicate timeout print The qp->timeout field is duplicated in the seqfile print. Remove it. Reviewed-by: Jubin John Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 08279d5c9424afd710c90d0b6df95612d2bb5a3f Author: Mike Marciniszyn Date: Thu Feb 4 10:59:36 2016 -0800 staging/rdma/hfi1: use new RNR timer Use the new RNR timer for hfi1. For qib, this timer doesn't exist, so exploit driver callbacks to use the new timer as appropriate. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 1 + drivers/infiniband/sw/rdmavt/qp.c | 1 - drivers/staging/rdma/hfi1/qp.c | 3 +++ drivers/staging/rdma/hfi1/rc.c | 22 +++++++++++++--------- drivers/staging/rdma/hfi1/verbs.h | 2 ++ 5 files changed, 19 insertions(+), 10 deletions(-) commit 3c9d149bdc797a7dfb48bcf327f9ceeb6060a512 Author: Mike Marciniszyn Date: Thu Feb 4 10:59:27 2016 -0800 staging/rdma/hfi1: add unique rnr timer Add a new rnr timer to hfi1. This allows for future optimizations having the retry and rnr timers separate. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 2 +- drivers/staging/rdma/hfi1/rc.c | 2 +- drivers/staging/rdma/hfi1/verbs.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit 633d27399514e7726633c9029e3947f0526d2565 Author: Mike Marciniszyn Date: Thu Feb 4 10:59:18 2016 -0800 staging/rdma/hfi1: use mod_timer when appropriate Use new timer API to optimize maintenance of timers during ACK processing. When we are still expecting ACKs, mod the timer to avoid a heavyweight delete/add. Otherwise, insure do_rc_ack() maintains the timer as it had. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit e6f8c2b31f107f39e7301a02b5a6808d79c9f1f0 Author: Mike Marciniszyn Date: Thu Feb 4 10:59:09 2016 -0800 staging/rdma/hfi1: use new timer routines Use the new timer routines. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) commit 9171bfdd363304713a5a82ae03da6ec55a0cae39 Author: Mike Marciniszyn Date: Thu Feb 4 10:59:01 2016 -0800 staging/rdma/hfi1: centralize timer routines into rc Centralize disparate timer maintenance. This allow for central control and changes to the RC timer handling including future optimizations. Reviewed-by: Jubin John Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit cd93a9e8c5a58e451c834e48f1278383fbfa1072 Author: Sebastian Sanchez Date: Wed Feb 3 14:38:16 2016 -0800 staging/rdma/hfi1: Removing unused struct hfi1_verbs_counters It removes the unused struct hfi1_verbs_counters from verbs.h Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.h | 16 ---------------- 1 file changed, 16 deletions(-) commit b8d114ebb6fb6dfb61a6f7bd5b2bef529015b0f0 Author: Sebastian Sanchez Date: Wed Feb 3 14:38:07 2016 -0800 staging/rdma/hfi1: Adding support for hfi counters via sysfs It enables access to counters in /sys/class/infiniband/hfi1_0/ports/1/counters by providing infrastructure when PMA queries occur. Counters symbol_error and VL15_dropped are not supported in OPA, therefore, 0 will always be returned. In addition, two common routines (pma_get_opa_port_dctrs, pma_get_opa_port_ectrs) were created to query counters to avoid code duplication. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 306 +++++++++++++++++++++++++++++++++------- 1 file changed, 252 insertions(+), 54 deletions(-) commit 5950e9b184ae47c6e4ec9cfb0dc698194d524f80 Author: Sebastian Sanchez Date: Wed Feb 3 14:37:59 2016 -0800 staging/rdma/hfi1: Replacement of goto's for break/returns It replaces goto's for break and return statements in process_perf_opa(). Reviewed-by: Ira Weiny Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 56 ++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit eb2e557c3663bb43a49f223b49e5101bbfc1d546 Author: Sebastian Sanchez Date: Wed Feb 3 14:37:50 2016 -0800 staging/rdma/hfi1: Change for data type of port number This commit changes the data type for port_num in pma_get_opa_porterrors() from unsigned long to u8. Reviewed-by: Ira Weiny Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a402d6ab409e0e943150a803b94dee76c9de5c27 Author: Mitko Haralanov Date: Wed Feb 3 14:37:41 2016 -0800 staging/rdma/hfi1: Fix bug that could block the process on context exit A race was discovred in the user SDMA code, which could result in an process being stuck in the kernel call indefinitely in certain error conditions. If, during the processing of a user SDMA request, there was an error *and* all outstanding SDMA descriptor had been completed by the time the that error case was handled in the calling function, the state of the packet queue would not get correctly updated resulting in the process subsequently getting stuck, thinking that there are more descriptors to be completed. To handle this scenario, the driver now checks the submitted packet count vs. the completed. If all submitted packets have also been completed, the driver can safely free the request and signal user level. Otherwise, this will be handled by the completion callback. Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7580fc31dfbfcacab2a3243342d4b5de4b494cbf Author: Dean Luick Date: Wed Feb 3 14:37:32 2016 -0800 staging/rdma/hfi1: Remove unused variable nsbr Remove unused nsbr count from PCIe Gen3 code Reviewed-by: Stuart Summers Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/pcie.c | 7 ------- 1 file changed, 7 deletions(-) commit e154f12716ffbbd7bab52b48b8e78142a22a59c0 Author: Dean Luick Date: Wed Feb 3 14:37:24 2016 -0800 staging/rdma/hfi1: Make EPROM check per device Add a variable eprom_available to each device, replacing the global of the same name. This is to allow multiple HFI devices with different EPROM availability to operate correctly on the the same system. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/eprom.c | 16 +++++----------- drivers/staging/rdma/hfi1/hfi.h | 1 + 2 files changed, 6 insertions(+), 11 deletions(-) commit 3fafebb6f6c7084c899924b51c0716a778915c3b Author: Sadanand Warrier Date: Wed Feb 3 14:37:15 2016 -0800 staging/rdma/hfi1: Add credits for VL0 to VL7 in snoop mode Add a new option to the snoop ioctl which allows credits to be allocated across all VLs. Previously only VL0 and VL15 had credits allocated. The new option used in the ioctl HFI1_SNOOP_IOCSET_OPTS allows credits to be allocated so that VL15 will have at least 8.5KB credits and the other VLs will have the rest of the credits divided equally across themselves. The total number of credits are stored in the upper 16 bits of the integer passed and the cumulative value should ensure that VL0 has at least 8.5KB and each VL a minimum of 2KB + 128 bytes Reviewed-by: Dennis Dalessandro Reviewed-by: Dean Luick Signed-off-by: Sadanand Warrier Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 3 +- drivers/staging/rdma/hfi1/diag.c | 64 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/hfi.h | 1 + 3 files changed, 66 insertions(+), 2 deletions(-) commit 0840aea98cdf9024aff7f69e1167c4648665d48b Author: Mitko Haralanov Date: Wed Feb 3 14:37:06 2016 -0800 staging/rdma/hfi1: Improve performance of user SDMA To facilitate locked page counting, the user SDMA routines would maintain a list of io vectors, which were freed in the completion callback and then unpin the associated pages during the next call into the kernel. Since the size of this list was unbounded, doing this was bad for performance because the driver ended up spending too much time freeing the io vectors. This commit changes how the io vector freeing is done by moving the actual page unpinning in the callback and maintaining a count of unpinned pages. This count can then be used during the next call into the kernel to update the mm->pinned_vm variable (since that requires process context and the ability to sleep.) Reviewed-by: Mike Marciniszyn Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 55 ++++++++++++----------------------- drivers/staging/rdma/hfi1/user_sdma.h | 7 ++--- 2 files changed, 22 insertions(+), 40 deletions(-) commit e1bf0d5ecdc49cd4e2014da0d60efa74f5714fba Author: Easwar Hariharan Date: Wed Feb 3 14:36:58 2016 -0800 staging/rdma/hfi1, IB/core: Fix LinkDownReason define for consistency LinkDownReason LocalMediaNotInstalled lacked an underscore and was inconsistent with other defines in the same family. This patch fixes this. Reviewed-by: Ira Weiny Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 4 ++-- drivers/staging/rdma/hfi1/platform.c | 2 +- include/rdma/opa_port_info.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 45b59eefcca95a3dc75b68e063390f7a1aedd90b Author: Harish Chegondi Date: Wed Feb 3 14:36:49 2016 -0800 staging/rdma/hfi1: Remove modify_port and port_immutable functions Delete code from query_port which has been moved into rvt_query_port Create a call back function to shut down a port which may be called from rvt_modify_port Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 5 +++ drivers/staging/rdma/hfi1/mad.c | 5 ++- drivers/staging/rdma/hfi1/verbs.c | 71 ++++++++++----------------------------- drivers/staging/rdma/hfi1/verbs.h | 2 +- 4 files changed, 28 insertions(+), 55 deletions(-) commit 251314635ad5043e9438a18b2de17ddf86309641 Author: Dennis Dalessandro Date: Wed Feb 3 14:36:40 2016 -0800 staging/rdma/hfi1: Support query gid in rdmavt Query gid is in rdmavt, but still relies on the driver to maintain the guid table. Add the necessary driver call back and remove the existing verb handler. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit d05de3413da29d635ccaff528af6e37dd932b393 Author: Jubin John Date: Wed Feb 3 14:36:31 2016 -0800 staging/rdma/hfi1: Clean up init_cntrs() Clean up init_cntrs() by removing unnecessary memsets and debug statements Suggested-by: Dan Carpenter Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 2ef907b80d1cc289a4352287bbb9fc5a19eed212 Author: Dean Luick Date: Wed Feb 3 14:36:22 2016 -0800 staging/rdma/hfi1: Fix snoop packet length calculation The LRH has a 12 bit packet length field, not 11 bit. This caused a snoop packet length miscalculation leading to a crash when sending a large ping over IPoIB while running opapacketcapture. Reviewed-by: Mike Marciniszyn Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/diag.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit cfe3e656d8cd5ff03b8f0ce24f920f306313b013 Author: Dean Luick Date: Wed Feb 3 14:36:14 2016 -0800 staging/rdma/hfi1: Correct TWSI reset Change the TWSI reset function so it will stop the reset once the lines are in an expected state. Reviewed-by: Easwar Hariharan Reviewed-by: Dean Luick Signed-off-by: Pablo Cacho Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qsfp.c | 10 +++---- drivers/staging/rdma/hfi1/twsi.c | 64 ++++++++++++++++++---------------------- drivers/staging/rdma/hfi1/twsi.h | 7 +++-- 3 files changed, 36 insertions(+), 45 deletions(-) commit 0096765be01926e7efcc22032032347448743de5 Author: Dean Luick Date: Wed Feb 3 14:36:06 2016 -0800 staging/rdma/hfi1: Remove PCIe AER diagnostic message There are several reasons why PCIE AER cannot be enabled. Do not report the failure to enable as an error. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/pcie.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 91ab4ed334d0ea2f6c720ecb6204c3de350aaa08 Author: Easwar Hariharan Date: Wed Feb 3 14:35:57 2016 -0800 staging/rdma/hfi1: Implement LED beaconing for maintenance This patch implements LED beaconing for maintenance. A MAD packet with the LEDInfo attribute set to 1 will enable LED beaconing with a duty cycle of 2s on and 1.5s off. A MAD packet with the LEDInfo attribute set to 0 will disable beaconing and return the LED to normal operation. Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 81 ++++++++++++++++++-------------------- drivers/staging/rdma/hfi1/hfi.h | 29 ++++++++------ drivers/staging/rdma/hfi1/init.c | 6 ++- drivers/staging/rdma/hfi1/mad.c | 9 +++-- 4 files changed, 64 insertions(+), 61 deletions(-) commit 7b0b01aa8f48cd237322cbffa05662a9c6b156f8 Author: Dean Luick Date: Wed Feb 3 14:35:49 2016 -0800 staging/rdma/hfi1: Split last 8 bytes of copy to user buffer Copy the last 8 bytes of user mode RC WRITE_ONLY and WRITE_LAST opcodes separately from the rest of the data. It is a de-facto standard for some MPI implementations to use a poll on the last few bytes of a verbs message to indicate that the message has been received rather than follow the required function method. The driver uses the kernel memcpy routine, which becomes "rep movsb" on modern machines. This copy, while very fast, does not guarantee in-order copy completion and the result is an occasional perceived corrupted packet. Avoid the issue by splitting the last 8 bytes to copy from the verbs opcodes where it matters and performing an in-order byte copy. Reviewed-by: Mike Marciniszyn Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/rc.c | 17 +++++++++++------ drivers/staging/rdma/hfi1/ruc.c | 8 ++++++-- drivers/staging/rdma/hfi1/uc.c | 10 +++++----- drivers/staging/rdma/hfi1/ud.c | 9 +++++---- drivers/staging/rdma/hfi1/verbs.c | 31 +++++++++++++++++++++++++++++-- drivers/staging/rdma/hfi1/verbs.h | 2 +- 6 files changed, 57 insertions(+), 20 deletions(-) commit 53f449e4bf04ac5dce6385a1546ab6108666def2 Author: Dean Luick Date: Wed Feb 3 14:35:40 2016 -0800 staging/rdma/hfi1: Fix fabric serdes reset by re-downloading firmware A host fabric serdes reset is required to go back to polling. However, access to the fabric serdes may have been invalidated by the sibling HFI when it downloads its fabric serdes firmware. Work around this by re-downloading and re-validating the serdes firmware at reset time on Bx hardware. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/firmware.c | 57 ++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 13 deletions(-) commit f45c8dc8543783701fbad39a995e7a074a233b9d Author: Dean Luick Date: Wed Feb 3 14:35:31 2016 -0800 staging/rdma/hfi1: Report physical state changes per device instead of globally Make physical state change reporting be per-device, not global to reduce excessive reports of "physical state changed" Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 6 +++--- drivers/staging/rdma/hfi1/hfi.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit c7cbf2fabbe6e7cbf4f82b6f79bc8e499761c4d2 Author: Mitko Haralanov Date: Wed Feb 3 14:35:23 2016 -0800 staging/rdma/hfi1: Properly determine error status of SDMA slots To ensure correct operation between the driver and PSM with respect to managing the SDMA request ring, it is important that the status for a particular request slot is set at the correct time. Otherwise, PSM can get out of sync with the driver, which could lead to hangs or errors on new requests. Properly determining of when to set the error status of a SDMA slot depends on knowing exactly when the last txreq for that request has been completed. This in turn requires that the driver knows exactly how many requests have been generated and how many of those requests have been successfully submitted to the SDMA queue. The previous implementation of the mid-layer SDMA API did not provide a way for the caller of sdma_send_txlist() to know how many of the txreqs in the input list have actually been submitted without traversing the list and counting. Since sdma_send_txlist() already traverses the list in order to process it, requiring such traversal in the caller is completely unnecessary. Therefore, it is much easier to enhance sdma_send_txlist() to return the number of successfully submitted txreqs. This, in turn, allows the caller to accurately determine the progress of the SDMA request and, therefore, correctly set the error status at the right time. Reviewed-by: Mike Marciniszyn Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/sdma.c | 6 +++--- drivers/staging/rdma/hfi1/user_sdma.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) commit ecd42f8df2b9a0a77f2638c7780cda96de2b489b Author: Dean Luick Date: Wed Feb 3 14:35:14 2016 -0800 staging/rdma/hfi1: correctly check for post-interrupt packets At the end of the packet processing interrupt and thread handler, the RcvAvail interrupt is finally cleared down. There is a window between the last packet check (via DMA to memory) and interrupt clear-down. The code to recheck for a packet once the RcvAVail interrupt is enabled must ultimately use a CSR read of RcvHdrTail rather than depend on DMA'ed memory. This change adds a CSR read of RcvHdrTail if the memory check does not show a packet preset. The memory check is retained as a quick test before doing the more expensive, but always correct, CSR read. In the ASIC, the CSR read used to force the RcvAvail clear-down write to complete may bypass queued DMA writes to memory. The only correct way to decide if a packet has arrived without an interrupt to push DMA to memory ahead of itself is to read the tail directly after RcvAvail has been cleared down. It is not sufficient to just read the tail and skip pushing the clear-down. Both must be done. The tail read will not push clear-down write due to it being in a different area of the chip. At this point, it is OK to have packet data still being DMA'ed to memory. This is the end of packet processing for previous packets. If the driver detects a new packet has arrived before interrputs were re-enabled, it will force a new interrupt and the interrupt will push the packet DMAs to memory, where the driver will then react to the interrupt and do normal packet processing. Reviewed-by: Mike Marciniszyn Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 0f2d87d2827eb4f3c1319e69b67ba30d61cabe83 Author: Mitko Haralanov Date: Wed Feb 3 14:35:06 2016 -0800 staging/rdma/hfi1: Improve performance of SDMA transfers Commit a0d406934a46 ("staging/rdma/hfi1: Add page lock limit check for SDMA requests") added a mechanism to delay the clean-up of user SDMA requests in order to facilitate proper locked page counting. This delayed processing was done using a kernel workqueue, which meant that a kernel thread would have to spin up and take CPU cycles to do the clean-up. This proved detrimental to performance because now there are two execution threads (the kernel workqueue and the user process) needing cycles on the same CPU. Performance-wise, it is much better to do as much of the clean-up as can be done in interrupt context (during the callback) and do the remaining work in-line during subsequent calls of the user process into the driver. The changes required to implement the above also significantly simplify the entire SDMA completion processing code and eliminate a memory corruption causing the following observed crash: [ 2881.703362] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2881.703389] IP: [] user_sdma_send_pkts+0xcd4/0x18e0 [hfi1] [ 2881.703422] PGD 7d4d25067 PUD 77d96d067 PMD 0 [ 2881.703427] Oops: 0000 [#1] SMP [ 2881.703431] Modules linked in: [ 2881.703504] CPU: 28 PID: 6668 Comm: mpi_stress Tainted: G OENX 3.12.28-4-default #1 [ 2881.703508] Hardware name: Intel Corporation S2600KP/S2600KP, BIOS SE5C610.86B.11.01.0044.090 [ 2881.703512] task: ffff88077da8e0c0 ti: ffff880856772000 task.ti: ffff880856772000 [ 2881.703515] RIP: 0010:[] [] user_sdma_send_pkts+0xcd4/0x [ 2881.703529] RSP: 0018:ffff880856773c48 EFLAGS: 00010287 [ 2881.703531] RAX: 0000000000000000 RBX: 0000000000001000 RCX: 0000000000002000 [ 2881.703534] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000002000 [ 2881.703537] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [ 2881.703540] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 2881.703543] R13: 0000000000000000 R14: ffff88071e782e68 R15: ffff8810532955c0 [ 2881.703546] FS: 00007f9c4375e700(0000) GS:ffff88107eec0000(0000) knlGS:0000000000000000 [ 2881.703549] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2881.703551] CR2: 0000000000000000 CR3: 00000007d4cba000 CR4: 00000000003407e0 [ 2881.703554] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2881.703556] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2881.703558] Stack: [ 2881.703559] ffffffff00002000 ffff881000001800 ffffffff00000000 00000000000080d0 [ 2881.703570] 0000000000000000 0000200000000000 0000000000000000 ffff88071e782db8 [ 2881.703580] ffff8807d4d08d80 ffff881053295600 0000000000000008 ffff88071e782fc8 [ 2881.703589] Call Trace: [ 2881.703691] [] hfi1_user_sdma_process_request+0x84a/0xab0 [hfi1] [ 2881.703777] [] hfi1_aio_write+0xd2/0x110 [hfi1] [ 2881.703828] [] do_sync_readv_writev+0x48/0x80 [ 2881.703837] [] do_readv_writev+0xbb/0x230 [ 2881.703843] [] SyS_writev+0x48/0xc0 This commit also addresses issues related to notification of user processes of SDMA request slot availability. The slot should be cleaned up first before the user processes is notified of its availability. Reviewed-by: Arthur Kepner Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/user_sdma.c | 293 +++++++++++++++------------------- drivers/staging/rdma/hfi1/user_sdma.h | 3 +- 2 files changed, 128 insertions(+), 168 deletions(-) commit d24bc6481e376da3b7f226b57b39b0ae4088b8d9 Author: Dean Luick Date: Wed Feb 3 14:34:58 2016 -0800 staging/rdma/hfi1: Use device file minor to identify EPROM When writing to the EPROM, the driver will always use the "first" device. This is incorrect for multiple cards. Use the device file minor to determine the device to use. Reject the generic device file. Reviewed-by: Mitko Haralanov Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/eprom.c | 15 ++++++++++----- drivers/staging/rdma/hfi1/eprom.h | 2 +- drivers/staging/rdma/hfi1/file_ops.c | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) commit 82ab09e131ffb0497c9631e2c53b44fbf9ad5e1c Author: Easwar Hariharan Date: Wed Feb 3 14:34:49 2016 -0800 staging/rdma/hfi1: Reduce syslog message severity and provide speed information The syslog message causes unnecessary alarm for the single and dual port x8 cards by reporting at an error level. This patch reduces the severity to informational only and adds speed information. Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/pcie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a92ba6d628d362811c8112280826de0e8b178e67 Author: Mitko Haralanov Date: Wed Feb 3 14:34:41 2016 -0800 staging/rdma/hfi1: Improve performance of TID cache look up When TID caching was enabled, the way the driver found RB nodes when PSM was unprogramming TID entries was by traversing the RB tree, looking for a match on the RcvArray entry index. The performance of this algorithm was not only poor but also inconsistent depending on how many RB nodes would have to be traversed before a match was found. The lower performance was especially evident in cases where there was a cache miss with the cache full, requiring the unprogramming of several TID entries. This commit changes how RB nodes are looked up when being free'd by PSM to a index-based lookup into a flat array on the index of the RcvArray entry. This turns the entire look-up process into an O(1) algorithm. Special care needs to be taken for situations when TID caching is disabled. In those cases, there is no need to insert the RB nodes into an actual RB tree. Since the entire RcvArray management mechanism is managed by an index-based algorithm, the RB nodes can be saved into the flat array, making both "insertion" and "removal" faster. Reviewed-by: Arthur Kepner Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 6 +- drivers/staging/rdma/hfi1/user_exp_rcv.c | 149 ++++++++++++++++--------------- 2 files changed, 83 insertions(+), 72 deletions(-) commit e002dcc0abd318b0c5d7b2d05ba41ef4d00abe73 Author: Sebastian Sanchez Date: Wed Feb 3 14:34:32 2016 -0800 staging/rdma/hfi1: Fix for module parameter rcvhdrcnt when it's 2097152 The driver crashes when loaded with parameter rcvhdrcnt=2097152. The root cause was that rcvhdrcnt was initially a 32 bit variable and its value was assigned to a 16 bit variable, truncating the upper 16 bits. This patch prevents the user from passing a value for rcvhdrcnt greater than 16352 (Maximum number for rcvhdrcnt). Reviewed-by: Dean Luick Reviewed-by: Mitko Haralanov Signed-off-by: Sebastian Sanchez Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 23cd4716b7e2792f1fdc31b83feb9e9a9812c25f Author: Vennila Megavannan Date: Wed Feb 3 14:34:23 2016 -0800 staging/rdma/hfi1: Allow a fair scheduling of QPs This patch fixes the fairness issues in QP scheduling - the timeout for cond_resched is changed to a ratio of qp->timeout_jiffies - workqueue_congested is used to determine if qp needs to reschedule itself Reviewed-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/ruc.c | 52 ++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 14 deletions(-) commit f1bf29634057f56507945589aa40c96c649073ee Author: Dean Luick Date: Wed Feb 3 14:34:15 2016 -0800 staging/rdma/hfi1: Fix for generic I2C interface The original I2C interface was geared for QSFP accesses. Modify the interface to behave more like a generic I2C controller such that reads and writes can accept multi-byte offsets. Removed reads following writes and moved reset to top level. Reviewed-by: Easwar Hariharan Reviewed-by: Dean Luick Signed-off-by: Pablo Cacho Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/debugfs.c | 6 +- drivers/staging/rdma/hfi1/qsfp.c | 88 ++++++++++++++--------- drivers/staging/rdma/hfi1/qsfp.h | 4 ++ drivers/staging/rdma/hfi1/twsi.c | 134 ++++++++++++++++-------------------- 4 files changed, 122 insertions(+), 110 deletions(-) commit 89abfc8d64dd1ad32e6d96404eb0a1ea6cbb4ca4 Author: Vennila Megavannan Date: Wed Feb 3 14:34:07 2016 -0800 staging/rdma/hfi1: Change send_schedule counter to a per cpu counter A patch to fix fairness issues in QP scheduling requires n_send_schedule counter to be converted to a per cpu counter to reduce cache misses. Reviewed-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 3 ++- drivers/staging/rdma/hfi1/hfi.h | 4 +++- drivers/staging/rdma/hfi1/init.c | 9 +++++++++ drivers/staging/rdma/hfi1/ruc.c | 2 +- drivers/staging/rdma/hfi1/verbs.h | 1 - 5 files changed, 15 insertions(+), 4 deletions(-) commit 377f111ee81bcef1a788a396f6d813a6b966acbb Author: Mitko Haralanov Date: Wed Feb 3 14:33:58 2016 -0800 staging/rdma/hfi1: Verbs Mem affinity support Change verbs memory allocations to the device numa node. This keeps memory close to the device for optimal performance. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 3 ++- drivers/staging/rdma/hfi1/qp.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit cc57236f5515cd343fa47e9664090b54bdb410a3 Author: Mitko Haralanov Date: Wed Feb 3 14:33:49 2016 -0800 staging/rdma/hfi1: Allocate send ctxt on device NUMA node Allocate the user mode send context memory on the numa node which the device is attached to for better performance. Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 957558c9668f06b04530b7ddbfd2dbea86630496 Author: Mitko Haralanov Date: Wed Feb 3 14:33:40 2016 -0800 staging/rdma/hfi1: Consolidate CPU/IRQ affinity support This patch unifies the affinity support for CPU and IRQ allocations into a single code base. The goal is to allow the driver to make intelligent placement decision based on an overall view of processes and IRQs across as much of the driver as possible. Pulling all the scattered affinity code into a single code base lays the ground work for accomplishing the above goal. For example, previous implementations made user process placement decision solely based on other user processes. This algorithm is limited as it did not take into account IRQ placement and could result in overloading certain CPUs. A single code base also provides a much easier way to maintain and debug any performance issues related to affinity. Reviewed-by: Mike Marciniszyn Reviewed-by: Dean Luick Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 3 +- drivers/staging/rdma/hfi1/affinity.c | 433 +++++++++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/affinity.h | 94 ++++++++ drivers/staging/rdma/hfi1/chip.c | 115 ++-------- drivers/staging/rdma/hfi1/file_ops.c | 27 ++- drivers/staging/rdma/hfi1/hfi.h | 8 +- drivers/staging/rdma/hfi1/init.c | 11 +- 7 files changed, 578 insertions(+), 113 deletions(-) commit 2780739262e32b9c283b6b04f7899f9803993ebc Author: Mitko Haralanov Date: Wed Feb 3 14:33:31 2016 -0800 staging/rdma/hfi1: Remove unnecessary duplicated variable struct hfi1_devdata contained 2 variables which represented the numa node the device is attached to. Remove the duplicated one. Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/hfi.h | 1 - drivers/staging/rdma/hfi1/init.c | 5 ----- drivers/staging/rdma/hfi1/qp.h | 2 +- drivers/staging/rdma/hfi1/verbs.c | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) commit d413c1a65292189eb729738c549732951a2e50ab Author: Mitko Haralanov Date: Wed Feb 3 14:33:22 2016 -0800 staging/rdma/hfi1: Remove unused code This comment and code was unused. Just remove it. Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 7 ------- 1 file changed, 7 deletions(-) commit 31e7af1c5bcd9617c68f1bbd78a85e896caf87e4 Author: Ira Weiny Date: Wed Feb 3 14:33:14 2016 -0800 staging/rdma/hfi1: Fix SL->SC checks SLs which are mapped to SC15 are invalid and should fail the operation. For RC/UC QP types, verify the AH information at modify_qp time and fail the modify_qp if the SL is invalid. For other QP types check the SL during post_send via the new rdmavt callback. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 20 ++++++++++++++++++++ drivers/staging/rdma/hfi1/verbs.c | 1 + drivers/staging/rdma/hfi1/verbs.h | 2 ++ 3 files changed, 23 insertions(+) commit affa48de8417ccdde467b075577f6e5154ff9943 Author: Ashutosh Dixit Date: Wed Feb 3 14:33:06 2016 -0800 staging/rdma/hfi1: Add support for enabling/disabling PCIe ASPM hfi1 HW has a high PCIe ASPM L1 exit latency and also advertises an acceptable latency less than actual ASPM latencies. Additional mechanisms than those provided by BIOS/OS are therefore required to enable/disable ASPM for hfi1 to provide acceptable power/performance trade offs. This patch adds this support. By means of a module parameter ASPM can be either (a) always enabled (power save mode) (b) always disabled (performance mode) (c) enabled/disabled dynamically. The dynamic mode implements two heuristics to alleviate possible problems with high ASPM L1 exit latency. ASPM is normally enabled but is disabled if (a) there are any active user space PSM contexts, or (b) for verbs, ASPM is disabled as interrupt activity for a context starts to increase. A few more points about the verbs implementation. In order to reduce lock/cache contention between multiple verbs contexts, some processing is done at the context layer before contending for device layer locks. ASPM is disabled when two interrupts for a context happen within 1 millisec. A timer is scheduled which will re-enable ASPM after 1 second should the interrupt activity cease. Normally, every interrupt, or interrupt-pair should push the timer out further. However, since this might increase the processing load per interrupt, pushing the timer out is postponed for half a second. If after half a second we get two interrupts within 1 millisec the timer is pushed out by another second. Finally, the kernel ASPM API is not used in this patch. This is because this patch does several non-standard things as SW workarounds for HW issues. As mentioned above, it enables ASPM even when advertised actual latencies are greater than acceptable latencies. Also, whereas the kernel API only allows drivers to disable ASPM from driver probe, this patch enables/disables ASPM directly from interrupt context. Due to these reasons the kernel ASPM API was not used. Reviewed-by: Mike Marciniszyn Reviewed-by: Dean Luick Reviewed-by: Ira Weiny Signed-off-by: Ashutosh Dixit Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/aspm.h | 297 +++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/chip.c | 4 + drivers/staging/rdma/hfi1/chip_registers.h | 3 + drivers/staging/rdma/hfi1/file_ops.c | 11 +- drivers/staging/rdma/hfi1/hfi.h | 24 +++ drivers/staging/rdma/hfi1/init.c | 7 + drivers/staging/rdma/hfi1/pcie.c | 16 +- 7 files changed, 355 insertions(+), 7 deletions(-) commit 6c9e50f894458810591f7883bdd6f0f8474b06a0 Author: Vennila Megavannan Date: Wed Feb 3 14:32:57 2016 -0800 staging/rdma/hfi1: Method to toggle "fast ECN" detection Add a per port sysfs paramter to toggle cc_prescan/Fast ECN Detection and remove the Kconfig option which was previously used to control this. While am updating the sysfs documentation, fix the name of CCMgtA. Reviewed-by: Arthur Kepner Reviewed-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford Documentation/infiniband/sysfs.txt | 3 +- drivers/staging/rdma/hfi1/Kconfig | 10 ------ drivers/staging/rdma/hfi1/driver.c | 24 +++++++------- drivers/staging/rdma/hfi1/hfi.h | 2 ++ drivers/staging/rdma/hfi1/sysfs.c | 66 +++++++++++++++++++++++++++++++++++--- 5 files changed, 77 insertions(+), 28 deletions(-) commit 566c157cbd2113a18bfc40170de16227357434d7 Author: Mitko Haralanov Date: Wed Feb 3 14:32:49 2016 -0800 staging/rdma/hfi1: Correctly set RcvCtxtCtrl register The RcvCtxtCtrl register was being incorrectly set upon context initialization and clean up resulting, in many cases, of contexts using settings from previous contexts' initialization. This resulted in bad and unexpected behavior. This was especially important for the TailUpd bit, which requires special handling and if set incorrectly could lead to severely degraded performance. This patch fixes the handling of the RcvCtxtCtrl register, ensuring that each context gets initialized with settings applicable only for that context. It also ensures the proper setting for the TailUpd bit by setting it to either 0 or 1 (as needed by the context's configuration) explicitly. Reviewed-by: Ira Weiny Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 18 ++++++++++++++---- drivers/staging/rdma/hfi1/file_ops.c | 9 +++++++++ drivers/staging/rdma/hfi1/init.c | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) commit 11d2b114cdebd9b520de573d74c70fb04c2771cc Author: Sebastian Sanchez Date: Wed Feb 3 14:32:40 2016 -0800 staging/rdma/hfi1: Fix for 32-bit counter overflow in driver and hfi1stats When 32-bit hardware counters overflow, hfi1stats misinterprets the counters as being 64 bits causing the deltas for the counters to be a huge number. This patch makes hfi1stats aware that a counter is 32 bits by making the driver write ,32 to debugfs. Reviewed-by: Dean Luick Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 98 ++++++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 25 deletions(-) commit a59329d5e8977fb4b6d7535bdf14b0fe7ece5559 Author: Dean Luick Date: Wed Feb 3 14:32:31 2016 -0800 staging/rdma/hfi1: Skip lcb init for simulation The simulator does not correctly handle LCB cclk loopback. Skip that step for simulation - it is not needed. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 4 ++++ 1 file changed, 4 insertions(+) commit dcc68e528238c9e1173a8e98de29f0149122ac4c Author: Dean Luick Date: Wed Feb 3 14:32:23 2016 -0800 staging/rdma/hfi1: No firmware retry for simulation Simulation has no firmware, so it will never move firmware acquire to the FINAL state. Avoid that by skiping the TRY state and moving directly to FINAL. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/firmware.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 715c430ca5b21c22648665045fc3718b4547d5c8 Author: Easwar Hariharan Date: Wed Feb 3 14:32:14 2016 -0800 staging/rdma/hfi1: Don't attempt to qualify or tune loopback plugs Loopback plugs used for testing hardware don't need to be qualified to bring the link up unlike production cables. This patch adds an exception for loopback plugs to the QSFP and SerDes tuning algortihm. Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe072e205a685cfba285259d779dd3bda5e250f2 Author: Dean Luick Date: Wed Feb 3 14:32:06 2016 -0800 staging/rdma/hfi1: Make firmware failure messages warnings Make firmware validation failure and missing firmware messages a warning since alternates can be tried. Add an error message when all attempts fail. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/firmware.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 845f876d0819e2b941b1dbe92e0d219df8010035 Author: Dean Luick Date: Wed Feb 3 14:31:57 2016 -0800 staging/rdma/hfi1: Only warn when board description is not found Change-Id: Icc4ad27c4c67e51df8c8a203c4f16973793678ec Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69a00b8e0508c8b98fba3b57a7c6c45b724553c3 Author: Mike Marciniszyn Date: Wed Feb 3 14:31:49 2016 -0800 staging/rdma/hfi1: Fix per-VL transmit discard counts Implement per-VL transmit counters. Not all errors can be attributed to a particular VL, so make a best attempt. o Extend the egress error bits used to count toward transmit discard. o When an egress error or send error occur, try to map back to a VL. o Implement a SDMA engine to VL (back) map. o Add per-VL port transmit counters Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 138 ++++++++++++++++++++++++++++++++------- drivers/staging/rdma/hfi1/hfi.h | 3 +- drivers/staging/rdma/hfi1/sdma.c | 6 ++ drivers/staging/rdma/hfi1/sdma.h | 2 + 4 files changed, 123 insertions(+), 26 deletions(-) commit 6b14e0ea48890e633ac69caa3ae13beccdd497be Author: Dean Luick Date: Wed Feb 3 14:31:40 2016 -0800 staging/rdma/hfi1: Fix missing firmware NULL dereference The gen3 bump code must mark a firmware download failure as fatal. Otherwise a later load attempt will fail with a NULL dereference. Also: o Only do a firmware back-off for RTL. There are no alternates for FPGA or simulation. o Rearrange OS firmware request order to match what is actually loaded. This results in more coherent informational messages in the case of missing firmware. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/firmware.c | 22 +++++++++++----------- drivers/staging/rdma/hfi1/pcie.c | 5 ++++- 2 files changed, 15 insertions(+), 12 deletions(-) commit cbac386a120a7e8a26c013f496717b11cacbd99c Author: Easwar Hariharan Date: Wed Feb 3 14:31:31 2016 -0800 staging/rdma/hfi1: Support external device configuration requests from 8051 This patch implements support for turning on and off the clock data recovery mechanisms implemented in QSFP cable on request by the DC 8051 on a per-lane basis. Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 52 +++++++++++++++++++++++++++++++++++----- drivers/staging/rdma/hfi1/chip.h | 1 + drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/init.c | 1 + 4 files changed, 49 insertions(+), 6 deletions(-) commit 1d01cf33e38a6aff87c25575286385daac11b8ca Author: Easwar Hariharan Date: Wed Feb 3 14:31:22 2016 -0800 staging/rdma/hfi1: Get port type from configuration file The current code employs a heuristic to guess the port type. The canonical location to identify the port type of the designed platform is from the platform configuration data. This patch uses the previously fetched port type from the platform configuration and removes the now obsolete heuristic routine and its associated defines. Reviewed-by: Arthur Kepner Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 12 +----------- drivers/staging/rdma/hfi1/opa_compat.h | 15 --------------- 2 files changed, 1 insertion(+), 26 deletions(-) commit 8ebd4cf1852afb56773ce8818da22157bfffa900 Author: Easwar Hariharan Date: Wed Feb 3 14:31:14 2016 -0800 staging/rdma/hfi1: Add active and optical cable support This patch qualifies and tunes active and optical cables for optimal bit error rate and signal integrity settings. These settings are fetched from the platform configuration data. Based on attributes of the QSFP cable as read from the SFF-8636 compliant memory map, we select the appropriate settings from the platform configuration data (examples: TX/RX equalization, enabling cable high power, enabling TX/RX clock data recovery mechanisms, and RX amplitude control) and apply them to the SERDES and QSFP cable. The platform configuration data also contains system parameters such as maximum power dissipation supported, and the cables are qualified based on these parameters. As part of qualifying the cables, the correct OfflineDisabledReasons are set for the appropriate scenarios. Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Reviewed-by: Brent R Rothermel Signed-off-by: Easwar Hariharan Signed-off-by: Jubin John Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/chip.c | 296 +++++----- drivers/staging/rdma/hfi1/chip.h | 8 +- drivers/staging/rdma/hfi1/hfi.h | 5 +- drivers/staging/rdma/hfi1/init.c | 10 +- drivers/staging/rdma/hfi1/platform.c | 838 ++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/platform.h | 298 ++++++++++ drivers/staging/rdma/hfi1/platform_config.h | 286 ---------- drivers/staging/rdma/hfi1/qsfp.h | 3 +- 9 files changed, 1302 insertions(+), 444 deletions(-) commit c7cb7635d91d9126431159ee7f90b7137c908e89 Author: Mike Marciniszyn Date: Wed Feb 3 14:31:05 2016 -0800 staging/rdma/hfi1: Fix QSFP memory read/write across 128 byte boundary The QSFP memory cache reads both lower and upper page 0H in one shot, which leads to the address counter wrapping around to the beginning of lower page 00H at byte 128, as defined by SFF-8636. This patch fixes this by modifying the underlying QSFP read and writes to avoid this wrap around. Reviewed-by: Dean Luick Reviewed-by: Ira Weiny Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qsfp.c | 44 ++++++++++++++++++++++++++-------------- drivers/staging/rdma/hfi1/qsfp.h | 28 +++++++++++++++++-------- 2 files changed, 49 insertions(+), 23 deletions(-) commit 76ef8c0798d3377fd58a1ef083d65b4528682db4 Author: Easwar Hariharan Date: Wed Feb 3 14:30:57 2016 -0800 staging/rdma/hfi1: cleanup messages on qsfp_read() failure The ":" in "%s:" adds no value. Reviewed-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qsfp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a9c05e350c17db98d82e8784ed0c05a78bd0169f Author: Bryan Morgan Date: Wed Feb 3 14:30:49 2016 -0800 staging/rdma/hfi1: HFI reports wrong offline disabled reason when cable removed Removing QSFP cable should report 'No Local Media' instead of 'Transient' as reported by 'opaportinfo'. Workaround is to change the state to OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED in cable handler. With cable still removed, 'opaportinfo bounce' should not cause a state change to Polling, as reported by 'opaportinfo'. Resolution is to prevent physical state change from Offline->Polling. Use a macro to mask lower nibble of OPA_LINKDOWN_REASON* as needed for offline_disabled_reason. Reviewed-by: Mike Marciniszyn Reviewed-by: Easwar Hariharan Reviewed-by: Dean Luick Reported-by: Todd Rimmer Signed-off-by: Bryan Morgan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 18 +++++++++++++++--- drivers/staging/rdma/hfi1/hfi.h | 2 ++ drivers/staging/rdma/hfi1/intr.c | 3 ++- drivers/staging/rdma/hfi1/mad.c | 24 +++++++++++++++--------- 4 files changed, 34 insertions(+), 13 deletions(-) commit 9cd70e1bbf9393633904b1cb71925c40e1839d68 Author: Jubin John Date: Wed Feb 3 14:30:40 2016 -0800 staging/rdma/hfi1: Remove srq functionality srq functionality is now in rdmavt. Remove it from the hfi1 driver. Reviewed-by: Dennis Dalessandro Reviewed-by: Harish Chegondi Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/srq.c | 397 ------------------------------------- drivers/staging/rdma/hfi1/verbs.c | 6 - drivers/staging/rdma/hfi1/verbs.h | 17 -- 4 files changed, 1 insertion(+), 421 deletions(-) commit 07336db4003fd911681e37b0523529fbd04fa604 Author: Harish Chegondi Date: Tue Jan 19 14:44:17 2016 -0800 staging/rdma/hfi1: Remove hfi1_query_qp function Rely on rvt_query_qp function defined in rdmavt Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 50 --------------------------------------- drivers/staging/rdma/hfi1/qp.h | 3 --- drivers/staging/rdma/hfi1/verbs.c | 1 - 3 files changed, 54 deletions(-) commit 9c4a311e6ca03db4e16c4c06bb37a1189ba0bc03 Author: Dennis Dalessandro Date: Tue Jan 19 14:44:11 2016 -0800 staging/rdma/hfi1: Remove create and free mad agents Get rid of create and free mad agent from the driver and use rdmavt version. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 76 ++++----------------------------------- drivers/staging/rdma/hfi1/verbs.c | 14 ++------ drivers/staging/rdma/hfi1/verbs.h | 4 --- 3 files changed, 8 insertions(+), 86 deletions(-) commit 7af6d00654a16ca805f50e05eebb545ef9dbb016 Author: Dennis Dalessandro Date: Tue Jan 19 14:44:06 2016 -0800 staging/rdma/hfi1: Use rdmavt device allocation function No longer do drivers need to call into the IB core to allocate the verbs device. Use the functionality provided by rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/init.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4331629f57c4def899e560a7e3cb87fda577fb4b Author: Dennis Dalessandro Date: Tue Jan 19 14:44:01 2016 -0800 staging/rdma/hfi1: Clean up register device Now that rdmavt has solidified in its design we can clean up the driver specific register device functions. This handles hfi1. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 69 ++------------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) commit 1897ce219143cae13a87e0544b3b467ad3932964 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:55 2016 -0800 staging/rdma/hfi1: Remove post_recv and use rdmavt version This patch removes the simple post recv function in favor of using rdmavt. The packet receive processing still lives in the driver though. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 63 +-------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) commit 75261cc6ab663e0d44f6f5a02a46d3e197cbe639 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:50 2016 -0800 staging/rdma/hfi1: Remove destroy qp verb This removes the destroy qp verbs in favor of using rdmavt. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 53 --------------------------------------- drivers/staging/rdma/hfi1/qp.h | 11 -------- drivers/staging/rdma/hfi1/verbs.c | 2 +- 3 files changed, 1 insertion(+), 65 deletions(-) commit ec4274f1aeb5e5012c1e46ba11ceef7767af8b3d Author: Dennis Dalessandro Date: Tue Jan 19 14:43:44 2016 -0800 staging/rdma/hfi1: Remove modify queue pair from hfi1 In addition to removing the modify queue pair verb from hfi1 we also remove ancillary functions which existed only for modify queue pair and are also already present in hfi1. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 7 - drivers/staging/rdma/hfi1/common.h | 1 - drivers/staging/rdma/hfi1/driver.c | 19 +- drivers/staging/rdma/hfi1/qp.c | 631 +++++++------------------------------ drivers/staging/rdma/hfi1/qp.h | 65 +--- drivers/staging/rdma/hfi1/rc.c | 24 +- drivers/staging/rdma/hfi1/ruc.c | 17 +- drivers/staging/rdma/hfi1/srq.c | 4 +- drivers/staging/rdma/hfi1/trace.c | 2 +- drivers/staging/rdma/hfi1/trace.h | 35 +- drivers/staging/rdma/hfi1/uc.c | 16 +- drivers/staging/rdma/hfi1/ud.c | 15 +- drivers/staging/rdma/hfi1/verbs.c | 24 +- drivers/staging/rdma/hfi1/verbs.h | 31 +- 14 files changed, 205 insertions(+), 686 deletions(-) commit 0facc5a1635252a45ab2fdb119309a3c24e9be82 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:39 2016 -0800 staging/rdma/hfi1: Remove multicast verbs functions Multicast is now supported by rdmavt. Remove the verbs multicast functions and use that. Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/qp.c | 2 - drivers/staging/rdma/hfi1/verbs.c | 13 +- drivers/staging/rdma/hfi1/verbs.h | 29 --- drivers/staging/rdma/hfi1/verbs_mcast.c | 385 -------------------------------- 5 files changed, 7 insertions(+), 424 deletions(-) commit 83693bd146063e6843efafbedf302014511fee25 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:33 2016 -0800 staging/rdma/hfi1: Use rdmavt version of post_send This patch removes the post_send and post_one_send from the hfi1 driver. The "posting" of sends will be done by rdmavt which will walk a WQE and queue work. This patch will still provide the capability to schedule that work as well as kick the progress. These are provided to the rdmavt layer. Reviewed-by: Jubin John Signed-off-by: Dean Luick Signed-off-by: Harish Chegondi Signed-off-by: Edward Mascarenhas Signed-off-by: Mike Marciniszyn Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 8 +- drivers/staging/rdma/hfi1/qp.c | 14 +-- drivers/staging/rdma/hfi1/rc.c | 40 +++---- drivers/staging/rdma/hfi1/ruc.c | 28 +++-- drivers/staging/rdma/hfi1/uc.c | 12 +- drivers/staging/rdma/hfi1/ud.c | 10 +- drivers/staging/rdma/hfi1/verbs.c | 201 ++------------------------------ drivers/staging/rdma/hfi1/verbs.h | 35 +----- drivers/staging/rdma/hfi1/verbs_mcast.c | 4 +- 9 files changed, 74 insertions(+), 278 deletions(-) commit 6366dfa6185ebb3709a2a05b64760d7c3abdfd95 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:28 2016 -0800 staging/rdma/hfi1: Clean up return handling Return directly from rvt_resize_cq rather than use a goto/label. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/cq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit abd712daeeb4461aee5ca5a2bfe2717dc22577ea Author: Dennis Dalessandro Date: Tue Jan 19 14:43:22 2016 -0800 staging/rdma/hfi1: Remove CQ data structures and functions from hfi1 The completion queue is not a complex data structure and it can be removed at the same time as its functions. Unlike the more complicated queue pair which was done in multiple patches. This single patch removes all traces of hfi1 specific completeion queues from the hfi1 driver. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/cq.c | 558 ------------------------------------- drivers/staging/rdma/hfi1/hfi.h | 2 - drivers/staging/rdma/hfi1/init.c | 2 - drivers/staging/rdma/hfi1/qp.c | 4 +- drivers/staging/rdma/hfi1/rc.c | 8 +- drivers/staging/rdma/hfi1/ruc.c | 10 +- drivers/staging/rdma/hfi1/uc.c | 6 +- drivers/staging/rdma/hfi1/ud.c | 10 +- drivers/staging/rdma/hfi1/verbs.c | 21 +- drivers/staging/rdma/hfi1/verbs.h | 65 +---- 11 files changed, 34 insertions(+), 654 deletions(-) commit 94d5171cf2d10174e0ee9c3df463607cb0f4dd53 Author: Harish Chegondi Date: Tue Jan 19 14:43:17 2016 -0800 staging/rdma/hfi1: Remove query_device function Removed hfi1 query_device function to use rdmavt rvt_query_device function The rvt dev info device attributes still need to be filled in by the driver Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 101 ++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 54 deletions(-) commit a2c2d608957c1b6f444e092fa7f49c1f1ac7fa0a Author: Dennis Dalessandro Date: Tue Jan 19 14:43:12 2016 -0800 staging/rdma/hfi1: Remove create_qp functionality Rely on rdmavt to provide queue pair creation. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 634 +++++--------------------------------- drivers/staging/rdma/hfi1/qp.h | 23 +- drivers/staging/rdma/hfi1/verbs.c | 31 +- 3 files changed, 102 insertions(+), 586 deletions(-) commit 1c4b7d971d6679277844cefc0f5c191c800bf955 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:06 2016 -0800 staging/rdma/hfi1: Remove qpdev and qpn table from hfi1 Another change on the way to removing queue pair functionality from hfi1. This patch removes the private queue pair structure and the table which holds the queue pair numbers in favor of using what is provided by rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 147 +++++++++++++++++++------------------- drivers/staging/rdma/hfi1/qp.h | 38 ++-------- drivers/staging/rdma/hfi1/verbs.h | 3 - 3 files changed, 78 insertions(+), 110 deletions(-) commit 54d10c1eb1dc381e62361213bbd100a433b733c9 Author: Dennis Dalessandro Date: Tue Jan 19 14:43:01 2016 -0800 staging/rdma/hfi1: Use rdmavt send flags and recv flags Use the definitions of the s_flags and r_flags which are now in rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 8 +- drivers/staging/rdma/hfi1/pio.c | 2 +- drivers/staging/rdma/hfi1/qp.c | 58 +++++++------- drivers/staging/rdma/hfi1/qp.h | 2 +- drivers/staging/rdma/hfi1/rc.c | 152 ++++++++++++++++++------------------- drivers/staging/rdma/hfi1/ruc.c | 30 ++++---- drivers/staging/rdma/hfi1/uc.c | 14 ++-- drivers/staging/rdma/hfi1/ud.c | 22 +++--- drivers/staging/rdma/hfi1/verbs.c | 28 +++---- drivers/staging/rdma/hfi1/verbs.h | 85 +-------------------- 10 files changed, 162 insertions(+), 239 deletions(-) commit 90963ad735efd191d9e31c0720238406afd89e19 Author: Harish Chegondi Date: Tue Jan 19 14:42:55 2016 -0800 staging/rdma/hfi1: Remove user context allocation and de-alloction functions IB user context alloc and dealloc functions have been added to rdmavt. This patch removes them from hfi1. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 44 ++------------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) commit d604e1d2cd0e5225e1b6132f27734137b8e0d63e Author: Dennis Dalessandro Date: Tue Jan 19 14:42:50 2016 -0800 staging/rdma/hfi1: Use rdmavt pkey verbs function No need to keep providing the query pkey function. This is now being done in rdmavt. Remove support from hfi1. The allocation and maintenance of the list still resides in the driver. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 92c24be1e8a1a9110428130271c7dc670fb1e0a2 Author: Dennis Dalessandro Date: Tue Jan 19 14:42:44 2016 -0800 staging/rdma/hfi1: Remove mmap from hfi1 Mmap data structure has already been moved to rdmavt and hfi1 supports it. Now that the mmap functionality has also been moved to rdmavt its time for hfi1 to use that as well. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/cq.c | 18 ++-- drivers/staging/rdma/hfi1/mmap.c | 192 ------------------------------------- drivers/staging/rdma/hfi1/qp.c | 12 +-- drivers/staging/rdma/hfi1/srq.c | 20 ++-- drivers/staging/rdma/hfi1/verbs.c | 6 +- drivers/staging/rdma/hfi1/verbs.h | 17 ---- 7 files changed, 27 insertions(+), 240 deletions(-) commit 4eb068824abb0fb335f87f268681a55a147a176f Author: Dennis Dalessandro Date: Tue Jan 19 14:42:39 2016 -0800 staging/rdma/hfi1: Remove ibport and use rdmavt version Remove most of the ibport members from hfi1 and use the rdmavt version. Also register the port with rdmavt. Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 34 +++---- drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 8 +- drivers/staging/rdma/hfi1/mad.c | 151 ++++++++++++++++---------------- drivers/staging/rdma/hfi1/qp.c | 23 ++--- drivers/staging/rdma/hfi1/qp.h | 2 +- drivers/staging/rdma/hfi1/rc.c | 32 +++---- drivers/staging/rdma/hfi1/ruc.c | 14 +-- drivers/staging/rdma/hfi1/uc.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 16 ++-- drivers/staging/rdma/hfi1/verbs.c | 61 +++++++------ drivers/staging/rdma/hfi1/verbs.h | 51 +---------- drivers/staging/rdma/hfi1/verbs_mcast.c | 28 +++--- 13 files changed, 197 insertions(+), 227 deletions(-) commit 39db3e66fa5f7d489f3eb9b0359d6d7e7bf0cd45 Author: Dennis Dalessandro Date: Tue Jan 19 14:42:33 2016 -0800 staging/rdma/hfi1: Remove srq from hfi1 SRQ data structure has been moved to rdmavt. Make use of it. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/qp.c | 2 +- drivers/staging/rdma/hfi1/ruc.c | 4 ++-- drivers/staging/rdma/hfi1/srq.c | 10 +++++----- drivers/staging/rdma/hfi1/verbs.h | 13 ------------- 4 files changed, 8 insertions(+), 21 deletions(-) commit 895420ddc8b35099ddd25132f5707306e70f0d6a Author: Dennis Dalessandro Date: Tue Jan 19 14:42:28 2016 -0800 staging/rdma/hfi1: Remove hfi1 MR and hfi1 specific qp type This patch does the actual removal of the queue pair from the hfi1 driver along with a number of dependent data structures. These were moved to rvt. It also removes the MR functions to use those in rdmavt. These two pieces can not reasonably be split apart becuase they depend on each other. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/cq.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 8 +- drivers/staging/rdma/hfi1/driver.c | 10 +- drivers/staging/rdma/hfi1/hfi.h | 16 +- drivers/staging/rdma/hfi1/keys.c | 356 ------------------------ drivers/staging/rdma/hfi1/mmap.c | 24 +- drivers/staging/rdma/hfi1/mr.c | 473 -------------------------------- drivers/staging/rdma/hfi1/pio.c | 4 +- drivers/staging/rdma/hfi1/qp.c | 88 +++--- drivers/staging/rdma/hfi1/qp.h | 33 ++- drivers/staging/rdma/hfi1/rc.c | 116 ++++---- drivers/staging/rdma/hfi1/ruc.c | 75 +++-- drivers/staging/rdma/hfi1/sdma.h | 6 +- drivers/staging/rdma/hfi1/srq.c | 28 +- drivers/staging/rdma/hfi1/trace.h | 22 +- drivers/staging/rdma/hfi1/uc.c | 10 +- drivers/staging/rdma/hfi1/ud.c | 18 +- drivers/staging/rdma/hfi1/verbs.c | 141 ++++------ drivers/staging/rdma/hfi1/verbs.h | 366 ++++-------------------- drivers/staging/rdma/hfi1/verbs_mcast.c | 8 +- 21 files changed, 337 insertions(+), 1469 deletions(-) commit 8f1764fa2ba5a39c651316998f40631e8492081d Author: Dennis Dalessandro Date: Tue Jan 19 14:42:22 2016 -0800 staging/rdma/hfi1: Implement hfi1 support for AH notification For OPA devices additional work is required to create an AH. This patch adds support to set the VL correctly. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 15723f06fb9d80cbfd895c32c6023881c7d0e0b4 Author: Dennis Dalessandro Date: Tue Jan 19 14:42:17 2016 -0800 staging/rdma/hfi1: Use address handle in rdmavt and remove from hfi1 Original patch from Kamal Heib , split apart from original and modified to accomodate recent changes in rdmavt. Remove AH from hfi1 and use rdmavt version. Signed-off-by: Kamal Heib Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/common.h | 2 - drivers/staging/rdma/hfi1/mad.c | 2 +- drivers/staging/rdma/hfi1/qp.c | 6 +- drivers/staging/rdma/hfi1/ruc.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 4 +- drivers/staging/rdma/hfi1/verbs.c | 131 +++---------------------------------- drivers/staging/rdma/hfi1/verbs.h | 20 +----- 7 files changed, 18 insertions(+), 149 deletions(-) commit 8859b4a6d08bcbd804459274c6f4134aaf6ace8a Author: Dennis Dalessandro Date: Tue Jan 19 14:42:11 2016 -0800 staging/rdma/hfi1: Use correct rdmavt header files after move. Rdmavt split the header files to be based on ibta object. This patch makes changes in hfi1 to account for the move. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 3 ++- drivers/staging/rdma/hfi1/mad.c | 4 ++-- drivers/staging/rdma/hfi1/qp.c | 5 +++-- drivers/staging/rdma/hfi1/ud.c | 14 +++++++------- drivers/staging/rdma/hfi1/verbs.c | 4 ++-- 5 files changed, 16 insertions(+), 14 deletions(-) commit 49dbb6cf1739e1eefa7ed3849430144bb817fdc6 Author: Dennis Dalessandro Date: Tue Jan 19 14:42:06 2016 -0800 staging/rdma/hfi1: Add device specific info prints Implement get_card_name and get_pci_dev helper functions for rdmavt for hfi1. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/driver.c | 16 ++++++++++++++++ drivers/staging/rdma/hfi1/hfi.h | 2 ++ drivers/staging/rdma/hfi1/verbs.c | 2 ++ 3 files changed, 20 insertions(+) commit 4c6829c5c7d6186b76cf0817f9aa8e63831a6a27 Author: Dennis Dalessandro Date: Tue Jan 19 14:42:00 2016 -0800 staging/rdma/hfi1: Remove driver specific members from hfi1 qp type In preparation for moving the queue pair data structure to rdmavt the members of the driver specific queue pairs which are not common need to be pushed off to a private driver structure. This structure will be available in the queue pair once moved to rdmavt as a void pointer. This patch while not adding a lot of value in and of itself is a prerequisite to move the queue pair out of the drivers and into rdmavt. The driver specific, private queue pair data structure should condense as more of the send side code moves to rdmavt. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/diag.c | 3 +- drivers/staging/rdma/hfi1/pio.c | 6 ++- drivers/staging/rdma/hfi1/qp.c | 78 +++++++++++++++++++++++++-------------- drivers/staging/rdma/hfi1/qp.h | 15 +++++--- drivers/staging/rdma/hfi1/rc.c | 17 ++++++--- drivers/staging/rdma/hfi1/ruc.c | 48 ++++++++++++------------ drivers/staging/rdma/hfi1/uc.c | 7 ++-- drivers/staging/rdma/hfi1/ud.c | 37 ++++++++++--------- drivers/staging/rdma/hfi1/verbs.c | 57 +++++++++++++++++----------- drivers/staging/rdma/hfi1/verbs.h | 30 +++++++++++---- 10 files changed, 182 insertions(+), 116 deletions(-) commit cd4ceee341ca9d8b176762d3ad783e46538589a7 Author: Dennis Dalessandro Date: Tue Jan 19 14:41:55 2016 -0800 staging/rdma/hfi1: Remove MR data structures from hfi1 Remove MR data structures from hfi1 and use the version in rdmavt Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/keys.c | 30 +++++++++---------- drivers/staging/rdma/hfi1/mr.c | 20 ++++++------- drivers/staging/rdma/hfi1/ruc.c | 4 +-- drivers/staging/rdma/hfi1/sdma.h | 2 +- drivers/staging/rdma/hfi1/ud.c | 2 +- drivers/staging/rdma/hfi1/verbs.c | 16 +++++----- drivers/staging/rdma/hfi1/verbs.h | 63 +++++++-------------------------------- 7 files changed, 47 insertions(+), 90 deletions(-) commit 4f87ccfca0c29bb0fb9d2e6037656e871714f9e7 Author: Dennis Dalessandro Date: Tue Jan 19 14:41:50 2016 -0800 staging/rdma/hfi1: Use rdmavt protection domain Remove protection domain from hfi1 and use rdmavt's version. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/keys.c | 4 +-- drivers/staging/rdma/hfi1/mr.c | 2 +- drivers/staging/rdma/hfi1/ruc.c | 4 +-- drivers/staging/rdma/hfi1/verbs.c | 67 ++++----------------------------------- drivers/staging/rdma/hfi1/verbs.h | 15 +-------- 5 files changed, 12 insertions(+), 80 deletions(-) commit f326674ae374e08b34d8b02b2357bad4ef07317c Author: Ira Weiny Date: Tue Jan 19 14:41:44 2016 -0800 staging/rdma/hfi1: Consolidate dma ops for hfi1 Remove the dma.c file from hfi1 in favor of using that which is present in rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/verbs.c | 2 +- drivers/staging/rdma/hfi1/verbs.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) commit 583be13cde4f90aeac5d3c7ba555fb4909553c16 Author: Dennis Dalessandro Date: Tue Jan 19 14:41:39 2016 -0800 staging/rdma/hfi1: Add basic rdmavt capability flags for hfi1 Most functionality is still being done in the driver, set flags so that rdmavt will let hfi1 continue to handle mr, qp, and cq init. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/verbs.c | 3 +++ 1 file changed, 3 insertions(+) commit ec3f2c12a1e6bea48fd58f2dfa97d7373263b39a Author: Dennis Dalessandro Date: Tue Jan 19 14:41:33 2016 -0800 staging/rdma/hfi1: Begin to use rdmavt for verbs This patch begins to make use of rdmavt by registering with it and providing access to the header files. This is just the beginning of rdmavt support in hfi1. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/Kconfig | 2 +- drivers/staging/rdma/hfi1/chip.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 3 +-- drivers/staging/rdma/hfi1/init.c | 5 +++-- drivers/staging/rdma/hfi1/intr.c | 2 +- drivers/staging/rdma/hfi1/mad.c | 5 +++-- drivers/staging/rdma/hfi1/qp.c | 4 ++-- drivers/staging/rdma/hfi1/sysfs.c | 18 +++++++++--------- drivers/staging/rdma/hfi1/verbs.c | 15 ++++++++++----- drivers/staging/rdma/hfi1/verbs.h | 8 ++++++-- 11 files changed, 38 insertions(+), 28 deletions(-) commit 530a5d8ebd0d80c52aa7cbdb2127ff45b0db97ae Author: Harish Chegondi Date: Wed Feb 3 14:20:52 2016 -0800 IB/qib: Remove modify_port and port_immutable functions Delete code from query_port which has been moved into rvt_query_port Create a call back function to shut down a port which may be called from rvt_modify_port Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_mad.c | 5 ++- drivers/infiniband/hw/qib/qib_verbs.c | 63 +++++++++-------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 2 +- 3 files changed, 21 insertions(+), 49 deletions(-) commit 2366754632d3e52a97bf607a22bcca592a46f3f9 Author: Dennis Dalessandro Date: Wed Feb 3 14:20:44 2016 -0800 IB/qib: Support query gid in rdmavt Query gid is in rdmavt, but still relies on the driver to maintain the guid table. Add the necessary driver call back and remove the existing verb handler. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 8e4c066634aa35e7da08981439f4f1b6693fd9fb Author: Harish Chegondi Date: Wed Feb 3 14:20:35 2016 -0800 IB/qib: Remove destroy queue pair code Destroy QP functionality in rdmavt will be used instead. Remove the remove_qp function being called exclusively by destroy qp code. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 105 ---------------------------------- drivers/infiniband/hw/qib/qib_verbs.c | 1 - drivers/infiniband/hw/qib/qib_verbs.h | 2 - 3 files changed, 108 deletions(-) commit 70696ea75b0b9d2cb220a09ea19d72a49f501d8e Author: Harish Chegondi Date: Wed Feb 3 14:20:27 2016 -0800 IB/qib: Remove modify queue pair code Modify queue pair functionality in rdmavt will be used instead. Remove ancillary functions which are being used by modify QP code. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 10 + drivers/infiniband/hw/qib/qib_common.h | 1 - drivers/infiniband/hw/qib/qib_driver.c | 2 +- drivers/infiniband/hw/qib/qib_qp.c | 515 +++++---------------------------- drivers/infiniband/hw/qib/qib_rc.c | 10 +- drivers/infiniband/hw/qib/qib_ruc.c | 6 +- drivers/infiniband/hw/qib/qib_sdma.c | 2 +- drivers/infiniband/hw/qib/qib_uc.c | 10 +- drivers/infiniband/hw/qib/qib_ud.c | 6 +- drivers/infiniband/hw/qib/qib_verbs.c | 16 +- drivers/infiniband/hw/qib/qib_verbs.h | 28 +- 11 files changed, 113 insertions(+), 493 deletions(-) commit 1cefc2cd20f1d2b4e84bba14d5a5bf5d44936dc6 Author: Harish Chegondi Date: Wed Feb 3 14:20:19 2016 -0800 IB/qib: Remove qib_lookup_qpn and use rvt_lookup_qpn instead Add calls to rcu_read_lock()/rcu_read_unlock() as rvt_lookup_qpn callers must hold the rcu_read_lock before calling and keep the lock until the returned qp is no longer in use. Remove lookaside qp and some qp refcount atomics in the sdma send code that is redundant with the s_dma_busy refcount, which will also stall the state processing to the reset state. Change the qpn hash function to hash_32 which is hash function used in rvt_lookup_qpn. qpn_hash function would be eliminated in later patches. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 3 --- drivers/infiniband/hw/qib/qib_driver.c | 25 +++++++------------- drivers/infiniband/hw/qib/qib_qp.c | 42 +++------------------------------- drivers/infiniband/hw/qib/qib_ruc.c | 11 ++++++--- drivers/infiniband/hw/qib/qib_ud.c | 11 +++++---- drivers/infiniband/hw/qib/qib_verbs.c | 27 +++++++--------------- drivers/infiniband/hw/qib/qib_verbs.h | 2 -- 7 files changed, 34 insertions(+), 87 deletions(-) commit 9e804b1f2d9790ba69d7e27a44500bd4448215dc Author: Dennis Dalessandro Date: Wed Feb 3 14:20:10 2016 -0800 IB/qib: Clean up register_ib_device Remove some of the unnecessary code from qib_register_ib_device. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 68 ----------------------------------- 1 file changed, 68 deletions(-) commit fd0bf5bedfbd898bddc9ea8e646b4cb3779ec9ab Author: Jubin John Date: Wed Feb 3 14:20:02 2016 -0800 IB/qib: Remove srq functionality srq functionality is now in rdmavt. Remove it from the qib driver. Reviewed-by: Dennis Dalessandro Reviewed-by: Harish Chegondi Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 2 +- drivers/infiniband/hw/qib/qib_srq.c | 380 ---------------------------------- drivers/infiniband/hw/qib/qib_verbs.c | 6 - drivers/infiniband/hw/qib/qib_verbs.h | 17 -- 4 files changed, 1 insertion(+), 404 deletions(-) commit b7b3cf44647cab47f6b7d8f10bfdc92cafbb952f Author: Ira Weiny Date: Wed Feb 3 14:15:28 2016 -0800 IB/rdmavt: Properly pass gfp to hw driver function alloc_qpn must use GFP and the hardware drivers should use it as well. Reviewed-by: Mike Marciniszyn Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 61a650c14d728354b2d493bed3f1b0531f033dac Author: Harish Chegondi Date: Wed Feb 3 14:15:20 2016 -0800 IB/rdmavt: Add support for query_port, modify_port and get_port_immutable rvt_query_port calls into the driver through a call back function query_port_state to populate the rest of ib_port_attr elements. rvt_modify_port calls into the driver if needed through a call back function shut_down_port() Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 77 ++++++++++++++++++++++++++++----------- include/rdma/rdma_vt.h | 6 +++ 2 files changed, 61 insertions(+), 22 deletions(-) commit 1f024992ef05d1eb9b3a0becd1611ecfa21854a6 Author: Dennis Dalessandro Date: Wed Feb 3 14:15:11 2016 -0800 IB/rdmavt: Add query gid support. Addin query gid support. Rdmavt still relies on the driver to maintain the gid table. Rdmavt simply calls into the driver to retrive the guid for a particular port. Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 17 ++++++++++++++--- include/rdma/rdma_vt.h | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) commit f1badc716349cc2ac6e55ad50dcff598ef97bad5 Author: Dennis Dalessandro Date: Wed Feb 3 14:15:02 2016 -0800 IB/rdmavt: Clean up distinction between port number and index IB core uses 1 relative indexing for ports. All of our data structures use 0 based indexing. Add an inline function that we can use whenever we need to validate a legal value and try to convert a port number to a port index at the entrance into rdmavt. Try to follow the policy that when we are talking about a port from IB core point of view we refer to it as a port number. When port is an index into our arrays refer to it as a port index. Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mad.c | 8 ++++++-- drivers/infiniband/sw/rdmavt/mad.h | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 17 +++++++++++------ drivers/infiniband/sw/rdmavt/vt.c | 36 ++++++++++++++++++++++-------------- drivers/infiniband/sw/rdmavt/vt.h | 12 ++++++++++++ include/rdma/rdma_vt.h | 4 ++-- 6 files changed, 54 insertions(+), 25 deletions(-) commit d1b697b678cd591e12c493a9b91343107816cceb Author: Mitko Haralanov Date: Wed Feb 3 14:14:54 2016 -0800 IB/rdmavt: Add Mem affinity support Change verbs memory allocations to the device numa node. This keeps memory close to the device for optimal performance. Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mmap.c | 2 +- drivers/infiniband/sw/rdmavt/mr.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 21 ++++++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) commit 60c30f572595e46c819503b5a8c3a8e2f922de7a Author: Ira Weiny Date: Wed Feb 3 14:14:45 2016 -0800 IB/rdmavt: Add hardware driver send work request check Some hardware drivers requires additional checks on send WRs. Create an optional call back to allow hardware drivers to reject a send WR. Reviewed-by: Dennis Dalessandro Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 ++++ include/rdma/rdma_vt.h | 2 ++ 2 files changed, 6 insertions(+) commit b8f881b913f34f712185b2ff7a41645dcad9a868 Author: Jubin John Date: Wed Feb 3 14:14:36 2016 -0800 IB/rdmavt: Add srq functionality to rdmavt Fill in srq function stubs with code derived from hfi1 and qib. Move necessary functions and data structure members as well. Reviewed-by: Dennis Dalessandro Reviewed-by: Harish Chegondi Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 37 +++++- drivers/infiniband/sw/rdmavt/srq.c | 257 ++++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/srq.h | 1 + drivers/infiniband/sw/rdmavt/vt.c | 1 + include/rdma/rdma_vt.h | 3 + 5 files changed, 293 insertions(+), 6 deletions(-) commit 034a3e7079aabc028783755d0ea1406fe9453d52 Author: Harish Chegondi Date: Fri Jan 22 13:08:01 2016 -0800 IB/qib: Remove qib_query_qp function Rely on rvt_query_qp function defined in rdmavt Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 50 ----------------------------------- drivers/infiniband/hw/qib/qib_verbs.c | 3 ++- drivers/infiniband/hw/qib/qib_verbs.h | 3 --- 3 files changed, 2 insertions(+), 54 deletions(-) commit 18f6c582b366d3ec76317458f498e24a4379c299 Author: Harish Chegondi Date: Fri Jan 22 13:07:55 2016 -0800 IB/qib: Remove qib multicast verbs functions Multicast is now supported by rdmavt. Remove the verbs multicast functions and use that. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 2 +- drivers/infiniband/hw/qib/qib_qp.c | 2 - drivers/infiniband/hw/qib/qib_verbs.c | 13 +- drivers/infiniband/hw/qib/qib_verbs.h | 29 --- drivers/infiniband/hw/qib/qib_verbs_mcast.c | 363 ---------------------------- 5 files changed, 7 insertions(+), 402 deletions(-) commit a7d34a47f212ae6bd7f4748aebcc4f1192a048d1 Author: Harish Chegondi Date: Fri Jan 22 13:07:49 2016 -0800 IB/qib: Remove qib_post_receive and use rdmavt version This patch removes the simple post recv function in favor of using rdmavt. The packet receive processing still lives in the driver though. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 64 +---------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) commit db3ef0eb84947e341b923c435ace2520d097d014 Author: Harish Chegondi Date: Fri Jan 22 13:07:42 2016 -0800 IB/qib: Use rdmavt version of post_send This patch removes the post_send and post_one_send from the qib driver. The "posting" of sends will be done by rdmavt which will walk a WQE and queue work. This patch will still provide the capability to schedule that work as well as kick the progress. These are provided to the rdmavt layer. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_driver.c | 8 +- drivers/infiniband/hw/qib/qib_qp.c | 12 +- drivers/infiniband/hw/qib/qib_rc.c | 46 +++--- drivers/infiniband/hw/qib/qib_ruc.c | 33 +++-- drivers/infiniband/hw/qib/qib_sdma.c | 4 +- drivers/infiniband/hw/qib/qib_uc.c | 12 +- drivers/infiniband/hw/qib/qib_ud.c | 10 +- drivers/infiniband/hw/qib/qib_verbs.c | 208 ++-------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 35 +---- drivers/infiniband/hw/qib/qib_verbs_mcast.c | 4 +- 10 files changed, 81 insertions(+), 291 deletions(-) commit 4bb88e5f84326ff6343bc64a33040850f45b44d8 Author: Harish Chegondi Date: Fri Jan 22 13:07:36 2016 -0800 IB/qib: Remove completion queue data structures and functions from qib Use the completion queue functionality provided by rdmavt. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 2 +- drivers/infiniband/hw/qib/qib.h | 2 - drivers/infiniband/hw/qib/qib_cq.c | 545 ---------------------------------- drivers/infiniband/hw/qib/qib_init.c | 3 - drivers/infiniband/hw/qib/qib_qp.c | 4 +- drivers/infiniband/hw/qib/qib_rc.c | 6 +- drivers/infiniband/hw/qib/qib_ruc.c | 8 +- drivers/infiniband/hw/qib/qib_uc.c | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 4 +- drivers/infiniband/hw/qib/qib_verbs.c | 17 +- drivers/infiniband/hw/qib/qib_verbs.h | 62 +--- 11 files changed, 24 insertions(+), 631 deletions(-) commit 5196aa96e18a7b3ccbf5ec4705fe7981aee03771 Author: Dennis Dalessandro Date: Fri Jan 22 13:07:30 2016 -0800 IB/qib: Remove create and free mad agents Get rid of create and free mad agent from the driver and use rdmavt version. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 10 ++-- drivers/infiniband/hw/qib/qib_mad.c | 99 +++++++++------------------------ drivers/infiniband/hw/qib/qib_verbs.c | 14 +---- drivers/infiniband/hw/qib/qib_verbs.h | 6 +- 4 files changed, 34 insertions(+), 95 deletions(-) commit 5df1673f1de2b6dad614c929ef47ccebba3bd970 Author: Dennis Dalessandro Date: Fri Jan 22 13:07:23 2016 -0800 IB/qib: Use rdmavt device allocation function No longer do drivers need to call into the IB core to allocate the verbs device. Use the functionality provided by rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 74d2d50067c09c2e9686ef742c1ae08f9c8c3ddf Author: Harish Chegondi Date: Fri Jan 22 13:05:04 2016 -0800 IB/rdmavt: Add support for rvt_query_qp Drivers using rdmavt can rely on rvt_query_qp instead of defining their own query_qp functions. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 47 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit fe31419501ba133a967da7b7da0d32945ef21840 Author: Dennis Dalessandro Date: Fri Jan 22 13:04:58 2016 -0800 IB/rdmavt: Fix copyright date Update all files added by rdmavt which do not yet have 2016 as the copyright year. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 2 +- drivers/infiniband/sw/rdmavt/ah.h | 2 +- drivers/infiniband/sw/rdmavt/cq.c | 2 +- drivers/infiniband/sw/rdmavt/cq.h | 2 +- drivers/infiniband/sw/rdmavt/dma.c | 2 +- drivers/infiniband/sw/rdmavt/dma.h | 2 +- drivers/infiniband/sw/rdmavt/mad.c | 2 +- drivers/infiniband/sw/rdmavt/mad.h | 2 +- drivers/infiniband/sw/rdmavt/mcast.c | 2 +- drivers/infiniband/sw/rdmavt/mcast.h | 2 +- drivers/infiniband/sw/rdmavt/mmap.c | 2 +- drivers/infiniband/sw/rdmavt/mmap.h | 2 +- drivers/infiniband/sw/rdmavt/mr.c | 2 +- drivers/infiniband/sw/rdmavt/mr.h | 2 +- drivers/infiniband/sw/rdmavt/pd.c | 2 +- drivers/infiniband/sw/rdmavt/pd.h | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/rdmavt/qp.h | 2 +- drivers/infiniband/sw/rdmavt/srq.c | 2 +- drivers/infiniband/sw/rdmavt/srq.h | 2 +- drivers/infiniband/sw/rdmavt/trace.c | 2 +- drivers/infiniband/sw/rdmavt/trace.h | 2 +- drivers/infiniband/sw/rdmavt/vt.c | 2 +- drivers/infiniband/sw/rdmavt/vt.h | 2 +- include/rdma/rdma_vt.h | 2 +- include/rdma/rdmavt_mr.h | 2 +- include/rdma/rdmavt_qp.h | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) commit 3711baf27d78475436b063f33399908ba208a8f2 Author: Dennis Dalessandro Date: Fri Jan 22 13:04:51 2016 -0800 IB/rdmavt: Add mad agents to rdmavt This patch adds mad agent create and free to rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mad.c | 72 ++++++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/mad.h | 3 +- drivers/infiniband/sw/rdmavt/vt.c | 4 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + include/rdma/rdma_vt.h | 6 +++- 5 files changed, 84 insertions(+), 2 deletions(-) commit ff6acd69518e0a84bd9c9b7f1bd4313f7076db97 Author: Dennis Dalessandro Date: Fri Jan 22 13:04:45 2016 -0800 IB/rdmavt: Add device structure allocation This patch adds rdmavt device structure allocation in rdamvt. The ib_device alloc is now done in rdmavt instead of the driver. Drivers need to tell rdmavt the number of ports when calling. A side of effect of this patch is fixing a bug with port initialization where the device structure port array was allocated over top of an existing one. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 30 ++++++++++++++++++------------ include/rdma/rdma_vt.h | 1 + 2 files changed, 19 insertions(+), 12 deletions(-) commit e85ec33d820e1f3f763a46f9fd41230ca0ce40c6 Author: Ira Weiny Date: Fri Jan 22 13:04:38 2016 -0800 IB/rdmavt: add modify queue pair driver helpers Low level drivers need to be able to check incoming attributes as well as be able to adjust their private data on queue pair modification. Add 2 driver callbacks, check_modify_qp and modify_qp, to facilitate this. Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 7 +++++++ include/rdma/rdma_vt.h | 7 +++++++ 2 files changed, 14 insertions(+) commit 2b047ea7a3ceef0322e666782e0a82e98424f6f1 Author: Ira Weiny Date: Fri Jan 22 13:04:32 2016 -0800 IB/rdmavt: Remove unused variable from Queue Pair s_sde should be in the low level driver QP private data. Remove the definition from rvt_qp. Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 1 - 1 file changed, 1 deletion(-) commit 182285d0fcaba7b284b4feb71ebad5e7aaea0f4b Author: Dennis Dalessandro Date: Fri Jan 22 13:01:01 2016 -0800 IB/rdmavt: Add misc dev register functionality There are a number of minor things that should be set by rdmavt rather than by the drivers. Now that rdmavt has solidified in its design we can go ahead and clean up this stuff. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 4e74080b248701c0c2d1af2764bf02f9c531020a Author: Dennis Dalessandro Date: Fri Jan 22 13:00:55 2016 -0800 IB/rdmavt: Add multicast functions This patch adds in the multicast add and remove functions as well as the ancillary infrastructure needed. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mcast.c | 335 ++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/mcast.h | 2 + drivers/infiniband/sw/rdmavt/qp.c | 2 + drivers/infiniband/sw/rdmavt/vt.c | 1 + include/rdma/rdma_vt.h | 8 + include/rdma/rdmavt_qp.h | 22 ++- 6 files changed, 367 insertions(+), 3 deletions(-) commit 120bdafaece72056e48d97809c5abe172824a7f6 Author: Dennis Dalessandro Date: Fri Jan 22 13:00:48 2016 -0800 IB/rdmavt: Add post receive to rdmavt This patch adds the simple post receive verbs call to rdmavt. The actual interrupt handling and packet processing is still done in the low level driver. Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 47 +++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) commit 5a17ad11da322e3040b570e69a14a41a37060e5f Author: Dennis Dalessandro Date: Fri Jan 22 13:00:42 2016 -0800 IB/rdmavt: Add destroy qp verb This patch adds in support the qp destroy verb call. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 3b0b3fb3c1bbf50a2f88ea7345448a41dcba3c57 Author: Dennis Dalessandro Date: Fri Jan 22 13:00:35 2016 -0800 IB/rdmavt: Add modify qp Add modify qp and supporting functions. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 503 ++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/trace.h | 31 +++ include/rdma/rdma_vt.h | 42 +++ include/rdma/rdmavt_mr.h | 9 + include/rdma/rdmavt_qp.h | 20 ++ 5 files changed, 596 insertions(+), 9 deletions(-) commit 81ba39a82e8a9ed4eba3e967a09e60a9d00d8de4 Author: Dennis Dalessandro Date: Fri Jan 22 13:00:28 2016 -0800 IB/rdmavt: Add support for tracing events This patch adds support of tracing events using the kernels built-in event tracing infrastructure. This can be extended to provide a wide range of trace and debug capabilities which have a negligible impact on performance when enabled. These should be preferred over the use of the rvt_pr* functions. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 5 +- drivers/infiniband/sw/rdmavt/trace.c | 49 ++++++++++++++++++++ drivers/infiniband/sw/rdmavt/trace.h | 86 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 5 +- 4 files changed, 143 insertions(+), 2 deletions(-) commit bfbac097b6e8023e10fdadab2527d0a1a3160d7e Author: Dennis Dalessandro Date: Fri Jan 22 13:00:22 2016 -0800 IB/rdmavt: Add post send to rdmavt Add in a post_send and post_one_send to rdmavt. The ULP will provide a WQE to rdmavt which will then walk and queue each element. Rdmavt will then queue the work to be done in the driver or kick the driver's progress routine. There needs to be a follow on patch which adds in another lock for the head of the queue so that it can be added to and read from in parallel. This will touch protocol handlers and require other changes in the drivers. This will be done separately. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 183 +++++++++++++++++++++++++++++++++++--- include/rdma/rdma_vt.h | 7 ++ include/rdma/rdmavt_qp.h | 26 ++++++ 3 files changed, 204 insertions(+), 12 deletions(-) commit 6f6387ae75c1499b315ddcd3c74402d44423e1cc Author: Dennis Dalessandro Date: Fri Jan 22 13:00:15 2016 -0800 IB/rdmavt: Add completion queue functions Brings in completion queue functionality. A kthread worker is added to the rvt_dev_info to serve as a worker for completion queues. Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/cq.c | 445 +++++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/cq.h | 4 +- drivers/infiniband/sw/rdmavt/vt.c | 11 +- include/rdma/rdma_vt.h | 9 + include/rdma/rdmavt_cq.h | 99 +++++++++ 5 files changed, 561 insertions(+), 7 deletions(-) commit 47c7ea6d8e70510c3b3e311cfc20943cd3fe786a Author: Harish Chegondi Date: Fri Jan 22 12:56:52 2016 -0800 IB/qib: Remove create qp and create qp table functionality Rely on rdmavt functions for creation of qp and qp table. Function to allocate a qpn is still being provided by qib as the algorithm to allocate a qpn in qib is different from that of the algorithm in rdmavt. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 3 +- drivers/infiniband/hw/qib/qib_qp.c | 361 +++------------------------------- drivers/infiniband/hw/qib/qib_verbs.c | 48 ++--- drivers/infiniband/hw/qib/qib_verbs.h | 19 +- 4 files changed, 57 insertions(+), 374 deletions(-) commit 01ba79d4dddcf4ca3669f8dc4658322342793fee Author: Harish Chegondi Date: Fri Jan 22 12:56:46 2016 -0800 IB/qib: Use rdmavt send and receive flags Use the definitions of the s_flags and r_flags which are now in rdmavt. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_driver.c | 10 +-- drivers/infiniband/hw/qib/qib_qp.c | 44 +++++----- drivers/infiniband/hw/qib/qib_rc.c | 152 ++++++++++++++++----------------- drivers/infiniband/hw/qib/qib_ruc.c | 18 ++-- drivers/infiniband/hw/qib/qib_sdma.c | 4 +- drivers/infiniband/hw/qib/qib_uc.c | 16 ++-- drivers/infiniband/hw/qib/qib_ud.c | 22 ++--- drivers/infiniband/hw/qib/qib_verbs.c | 34 ++++---- drivers/infiniband/hw/qib/qib_verbs.h | 78 +---------------- 9 files changed, 153 insertions(+), 225 deletions(-) commit 0aeddea29c78299e4b022aa0bb978ed87e33f678 Author: Harish Chegondi Date: Fri Jan 22 12:56:40 2016 -0800 IB/qib: Remove qib_query_device function Removed qib_query_device function to use rdmavt rvt_query_device function The device attributes still need to be filled in by the driver. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 102 +++++++++++++++++----------------- 1 file changed, 50 insertions(+), 52 deletions(-) commit 1da0f7e2041ec54657eea25ed84612819c7a2cba Author: Harish Chegondi Date: Fri Jan 22 12:56:33 2016 -0800 IB/qib: Delete QIB user context allocation and de-alloction functions IB user context alloc and dealloc functions have been added to rdmavt. Delete the QIB user context alloc/dealloc functions and use the ones in rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 44 ++--------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) commit 898fa52b4ac3bb3ba306e1aa94bc7fbc79bfd2bd Author: Harish Chegondi Date: Fri Jan 22 12:56:27 2016 -0800 IB/qib: Remove qpn, qp tables and related variables from qib This patch removes the private queue pair structure and the table which holds the queue pair numbers in favor of using what is provided by rdmavt. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 120 ++++++++++++++++++---------------- drivers/infiniband/hw/qib/qib_verbs.c | 29 ++++---- drivers/infiniband/hw/qib/qib_verbs.h | 33 +--------- 3 files changed, 84 insertions(+), 98 deletions(-) commit 76fec3e08c1205c4b57bd934727cbbf7223b8dac Author: Harish Chegondi Date: Fri Jan 22 12:56:21 2016 -0800 IB/qib: Use rdmavt pkey verbs function Remove qib query pkey function which is no longer needed as this is now being done in rdmavt. The allocation and maintenance of the list still resides in the driver. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit cd18201f5ec8b04a8eb9ef3f3b559cba55955598 Author: Harish Chegondi Date: Fri Jan 22 12:56:14 2016 -0800 IB/qib: Remove mmap from qib Since mmap functionality has been moved into rdmavt, its time for qib to use that. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 2 +- drivers/infiniband/hw/qib/qib_cq.c | 18 ++-- drivers/infiniband/hw/qib/qib_mmap.c | 174 ---------------------------------- drivers/infiniband/hw/qib/qib_qp.c | 24 ++--- drivers/infiniband/hw/qib/qib_sdma.c | 4 +- drivers/infiniband/hw/qib/qib_srq.c | 18 ++-- drivers/infiniband/hw/qib/qib_verbs.c | 44 ++++----- drivers/infiniband/hw/qib/qib_verbs.h | 15 --- 8 files changed, 53 insertions(+), 246 deletions(-) commit 5418a5abc96f908d31bfecee143fbf330ded60c1 Author: Harish Chegondi Date: Fri Jan 22 12:56:08 2016 -0800 IB/qib: Implement qib support for AH notification Additional work is required to create an AH. This patch adds support to set the VL correctly. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f24a6d4887668cc2925b1e908c72b96a2604a814 Author: Harish Chegondi Date: Fri Jan 22 12:56:02 2016 -0800 IB/qib: Remove ibport and use rdmavt version Remove several ibport members from qib and use the rdmavt version. rc_acks, rc_qacks, and rc_delayed_comp are defined as per CPU variables in rdmavt. Add support for these rdmavt per CPU variables which were not per cpu variables in qib ibport structure. Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_driver.c | 4 +- drivers/infiniband/hw/qib/qib_iba6120.c | 8 +- drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- drivers/infiniband/hw/qib/qib_init.c | 10 ++ drivers/infiniband/hw/qib/qib_mad.c | 240 ++++++++++++++-------------- drivers/infiniband/hw/qib/qib_qp.c | 22 +-- drivers/infiniband/hw/qib/qib_rc.c | 30 ++-- drivers/infiniband/hw/qib/qib_ruc.c | 14 +- drivers/infiniband/hw/qib/qib_sdma.c | 2 +- drivers/infiniband/hw/qib/qib_sysfs.c | 65 +++++++- drivers/infiniband/hw/qib/qib_uc.c | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 14 +- drivers/infiniband/hw/qib/qib_verbs.c | 52 +++--- drivers/infiniband/hw/qib/qib_verbs.h | 46 +----- drivers/infiniband/hw/qib/qib_verbs_mcast.c | 28 ++-- 15 files changed, 281 insertions(+), 258 deletions(-) commit d2b8d4da1ca5052b72e043d2ce68157abf3f2d24 Author: Mike Marciniszyn Date: Fri Jan 22 12:50:43 2016 -0800 IB/rdmavt: Support creating qps with GFP_NOIO flag The current code is problematic when the QP creation and ipoib is used to support NFS and NFS desires to do IO for paging purposes. In that case, the GFP_KERNEL allocation within create_qp causes a deadlock in tight memory situations. This fix adds support to create queue pair with GFP_NOIO flag for connected mode only to cleanly fail the create queue pair in those situations. This was previously fixed in qib but needed to get ported to hfi1. This patch handles that for both hardwares in the new rdmavt common layer. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 56 ++++++++++++++++++++++++++++++--------- include/rdma/rdma_vt.h | 5 ++-- 2 files changed, 46 insertions(+), 15 deletions(-) commit feaeb6e26fd15f6531e28f2900e0b59705bfc3d4 Author: Harish Chegondi Date: Fri Jan 22 12:50:36 2016 -0800 IB/rdmavt: Add support for rvt_query_device function With this commit, the drivers using rdmavt need not define query_device function. But they should fill in the IB device attributes structure rvt_dev_info.dparms.props Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 9 +++++++-- include/rdma/rdma_vt.h | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) commit fef2efd6b4951148cc8dd1df7b3e1ff2f13dd6df Author: Harish Chegondi Date: Fri Jan 22 12:50:30 2016 -0800 IB/rdmavt: Allow reserving just one qpn qib needs to reserve only one qpn for non-verbs stuff. Also fixed the for loop to reserve the end qpn. Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a9cf6f27e36ece71cc8a192a4ca39b62a460807 Author: Dennis Dalessandro Date: Fri Jan 22 12:50:24 2016 -0800 IB/rdmavt: Export reset_qp in rdmavt Until all queue pair functionality is moved to rdmavt we need to provide access to the reset function. This is only temporary and will be reverted back to a static, non exported function in the end. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 7 ++++--- include/rdma/rdma_vt.h | 3 +++ include/rdma/rdmavt_qp.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) commit 515667f8f8b48bdbcad61c5681291cb970e36ac3 Author: Dennis Dalessandro Date: Fri Jan 22 12:50:17 2016 -0800 IB/rdmavt: Add create queue pair functionality Add create queue pair verbs call as well as supporting functions. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 425 ++++++++++++++++++++++++++++++++++++-- drivers/infiniband/sw/rdmavt/vt.c | 1 + include/rdma/rdma_vt.h | 10 +- 3 files changed, 413 insertions(+), 23 deletions(-) commit 050eb7fbe0ff2bcd95833ff180337116d5907483 Author: Dennis Dalessandro Date: Fri Jan 22 12:50:11 2016 -0800 IB/rdmavt: Add R and S flags for queue pairs Use the flags originally provided for hfi1 in the rdmavt driver. These will be made available to drivers in the qp header file. Reviewed-by: Harish Chegondi Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 6c43cf4b4851704de28cbd5fdfc55275744153fa Author: Harish Chegondi Date: Fri Jan 22 12:50:05 2016 -0800 IB/rdmavt: Add IB user context allocation and de-alloction functions Adding IB user context alloc and dealloc functions to rdmavt so that the drivers that use rdmavt can use these functions instead of defining their own functions. Reviewed-by: Ira Weiny Signed-off-by: Harish Chegondi Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 894c727b6af8cfd29fcb2b9db4520533d9e8d6a5 Author: Dennis Dalessandro Date: Fri Jan 22 12:46:17 2016 -0800 IB/qib: Remove srq from qib Remove srq from qib now that it has been moved into rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 2 +- drivers/infiniband/hw/qib/qib_ruc.c | 4 ++-- drivers/infiniband/hw/qib/qib_srq.c | 10 +++++----- drivers/infiniband/hw/qib/qib_verbs.h | 13 ------------- 4 files changed, 8 insertions(+), 21 deletions(-) commit 96ab1ac13f444e72d353fdd94b2cfacaaaef9de9 Author: Dennis Dalessandro Date: Fri Jan 22 12:46:07 2016 -0800 IB/qib: Use address handle in rdmavt and remove from qib Original patch from Kamal Heib , split apart from original. Remove AH from qib and use rdmavt version. Reviewed-by: Ira Weiny Signed-off-by: Kamal Heib Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba7322.c | 2 +- drivers/infiniband/hw/qib/qib_mad.c | 2 +- drivers/infiniband/hw/qib/qib_qp.c | 7 +- drivers/infiniband/hw/qib/qib_ruc.c | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 4 +- drivers/infiniband/hw/qib/qib_verbs.c | 126 +++----------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 20 +---- 7 files changed, 20 insertions(+), 143 deletions(-) commit 7c2e11fe2dbe69ba78c7a363f83474ad2c11ede7 Author: Dennis Dalessandro Date: Fri Jan 22 12:45:59 2016 -0800 IB/qib: Remove qp and mr functionality from qib Remove qp and mr support from qib and use rdmavt. These two changes cannot be reasonably be split apart into separate patches because they depend on each other in mulitple places. This paves the way to remove even more functions in subsequent patches. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 4 +- drivers/infiniband/hw/qib/qib.h | 14 +- drivers/infiniband/hw/qib/qib_cq.c | 2 +- drivers/infiniband/hw/qib/qib_driver.c | 4 +- drivers/infiniband/hw/qib/qib_keys.c | 184 +---------- drivers/infiniband/hw/qib/qib_mmap.c | 18 +- drivers/infiniband/hw/qib/qib_mr.c | 490 ---------------------------- drivers/infiniband/hw/qib/qib_qp.c | 74 ++--- drivers/infiniband/hw/qib/qib_rc.c | 98 +++--- drivers/infiniband/hw/qib/qib_ruc.c | 58 ++-- drivers/infiniband/hw/qib/qib_sdma.c | 8 +- drivers/infiniband/hw/qib/qib_srq.c | 28 +- drivers/infiniband/hw/qib/qib_uc.c | 8 +- drivers/infiniband/hw/qib/qib_ud.c | 16 +- drivers/infiniband/hw/qib/qib_verbs.c | 176 ++++------ drivers/infiniband/hw/qib/qib_verbs.h | 432 +++--------------------- drivers/infiniband/hw/qib/qib_verbs_mcast.c | 8 +- 17 files changed, 308 insertions(+), 1314 deletions(-) commit 6a9df403c9d3e37b79d6dac83922d2b4647f4dc8 Author: Dennis Dalessandro Date: Fri Jan 22 12:45:20 2016 -0800 IB/qib: Add device specific info prints Implement get_card_name and get_pci_dev helper functions for rdmavt for qib. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 2 ++ drivers/infiniband/hw/qib/qib_driver.c | 16 ++++++++++++++++ drivers/infiniband/hw/qib/qib_verbs.c | 2 ++ 3 files changed, 20 insertions(+) commit ffc269075bce7dd895d1fc8eca6367573df0ddbc Author: Dennis Dalessandro Date: Fri Jan 22 12:45:11 2016 -0800 IB/qib: Remove driver specific members from qib qp type In preparation for moving the queue pair data structure to rdmavt the members of the driver specific queue pairs which are not common need to be pushed off to a private driver structure. This structure will be available in the queue pair once moved to rdmavt as a void pointer. This patch while not adding a lot of value in and of itself is a prerequisite to move the queue pair out of the drivers and into rdmavt. The driver specific, private queue pair data structure should condense as more of the send side code moves to rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 76 +++++++++++++++++++++-------------- drivers/infiniband/hw/qib/qib_rc.c | 7 ++-- drivers/infiniband/hw/qib/qib_ruc.c | 18 +++++---- drivers/infiniband/hw/qib/qib_sdma.c | 17 +++++--- drivers/infiniband/hw/qib/qib_uc.c | 7 ++-- drivers/infiniband/hw/qib/qib_ud.c | 22 +++++----- drivers/infiniband/hw/qib/qib_verbs.c | 61 ++++++++++++++++++---------- drivers/infiniband/hw/qib/qib_verbs.h | 26 ++++++++---- 8 files changed, 145 insertions(+), 89 deletions(-) commit 869a2a964afdf540246f656e018986b96edf5e57 Author: Dennis Dalessandro Date: Fri Jan 22 12:45:02 2016 -0800 IB/qib: Use rdmavt lid defines in qib Original patch for AH changes from Kamal Heib , split apart from original. This patch also removes the qib specific multicast lid base and permissive lid defines since they are no longer needed. Use common LID defines in qib driver. Reviewed-by: Ira Weiny Signed-off-by: Kamal Heib Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_common.h | 2 -- drivers/infiniband/hw/qib/qib_qp.c | 1 + drivers/infiniband/hw/qib/qib_verbs.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) commit 9ff198f5f2c251fc33dab45a7fc1b79c138d51b5 Author: Dennis Dalessandro Date: Fri Jan 22 12:44:53 2016 -0800 IB/qib: Remove most uses of QIB_PERMISSIVE_LID and QIB_MULTICAST_LID_BASE This patch removes most of the uses of QIB_PERMISSIBVE_LID and QIB_MULTICAST_LID_BASE in favor of the recently added IB_* versions. There are still minor uses in AH functions as well as the QIB_* defines but those will be removed in a follow on patch. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_driver.c | 2 +- drivers/infiniband/hw/qib/qib_mad.c | 4 ++-- drivers/infiniband/hw/qib/qib_qp.c | 5 +++-- drivers/infiniband/hw/qib/qib_ud.c | 11 ++++++----- drivers/infiniband/hw/qib/qib_verbs.c | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) commit f44728d69a8ac8552fe3f0c8aa898014fa6f3b9c Author: Dennis Dalessandro Date: Fri Jan 22 12:44:44 2016 -0800 IB/qib: Use rdmavt protection domain Remove protection domain datastructure from qib and use rdmavts version. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_keys.c | 6 ++-- drivers/infiniband/hw/qib/qib_mr.c | 2 +- drivers/infiniband/hw/qib/qib_ruc.c | 4 +-- drivers/infiniband/hw/qib/qib_verbs.c | 66 +++-------------------------------- drivers/infiniband/hw/qib/qib_verbs.h | 13 +------ 5 files changed, 12 insertions(+), 79 deletions(-) commit eb636ac0e49ec560a608336aa6e02b7eca482112 Author: Dennis Dalessandro Date: Fri Jan 22 12:44:36 2016 -0800 IB/qib: Remove dma.c and use rdmavt version of dma functions This patch removes the qib_dma.c file and uses the version which has been added to rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Makefile | 2 +- drivers/infiniband/hw/qib/qib_verbs.c | 3 ++- drivers/infiniband/hw/qib/qib_verbs.h | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) commit 2dc05ab57f9fc28e9aa3f9eba1cd0b430a832d2c Author: Dennis Dalessandro Date: Fri Jan 22 12:44:29 2016 -0800 IB/qib: Begin to use rdmavt for verbs This patch begins to make use of rdmavt by registering with it and providing access to the header files. This is just the beginning of rdmavt support in qib. Most functionality is still being done in the driver, set flags so that rdmavt will let qib continue to handle mr, qp, and cq init. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/Kconfig | 2 +- drivers/infiniband/hw/qib/qib.h | 1 + drivers/infiniband/hw/qib/qib_init.c | 5 +++-- drivers/infiniband/hw/qib/qib_intr.c | 2 +- drivers/infiniband/hw/qib/qib_mad.c | 5 +++-- drivers/infiniband/hw/qib/qib_sysfs.c | 20 ++++++++++---------- drivers/infiniband/hw/qib/qib_verbs.c | 19 ++++++++++++++----- drivers/infiniband/hw/qib/qib_verbs.h | 8 ++++++-- 8 files changed, 39 insertions(+), 23 deletions(-) commit 38ce2c6f3ae8dda0ee42dc8474759ff949994bea Author: Dennis Dalessandro Date: Wed Jan 6 10:05:12 2016 -0800 IB/rdmavt: Add pkey support Add pkey table in rdi per port data structure. Also bring in related pkey functions. Drivers will still be responsible for allocating and maintaining the pkey table. However they need to tell rdmavt where to find the pkey table. We can not move the pkey table up into rdmavt because drivers need to manipulate this long before registering with it. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 46 +++++++++++++++++++++++++-------------- include/rdma/rdma_vt.h | 38 ++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 20 deletions(-) commit 822514d75a9647662fff39d728c1f4636b75d904 Author: Dennis Dalessandro Date: Wed Jan 6 10:04:57 2016 -0800 IB/rdmavt: Add mmap related functions The mmap data structure was moved in a previous commit. This patch now pulls in the related functions. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mmap.c | 140 +++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/mmap.h | 2 +- drivers/infiniband/sw/rdmavt/vt.c | 1 + include/rdma/rdma_vt.h | 15 ++++ 4 files changed, 156 insertions(+), 2 deletions(-) commit 0acb0cc7ecc1e4860b056368566c0c2c254ae281 Author: Dennis Dalessandro Date: Wed Jan 6 10:04:46 2016 -0800 IB/rdmavt: Initialize and teardown of qpn table Add table init as well as teardown for handling qpn maps. Drivers can still provide this functionality by setting the QP_INIT_DRIVER bit. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 197 ++++++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/qp.h | 2 + drivers/infiniband/sw/rdmavt/vt.c | 35 ++++--- include/rdma/rdma_vt.h | 9 ++ include/rdma/rdmavt_qp.h | 33 +++++++ 5 files changed, 263 insertions(+), 13 deletions(-) commit b4e64397dabc946b83ffb1defa1215ede84c3b97 Author: Dennis Dalessandro Date: Wed Jan 6 10:04:31 2016 -0800 IB/rdmavt: Break rdma_vt main include header file up Until all functionality is moved over to rdmavt drivers still need to access a number of fields in data structures that are predominantly meant to be used by rdmavt. Once these rdmavt_.h header files are no longer being touched by drivers their content should be moved to rdmavt/.h. While here move a couple #defines over to more general IB verbs header files because they fit better. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 4 +- include/rdma/ib_verbs.h | 1 + include/rdma/rdma_vt.h | 309 +------------------------------------- include/rdma/rdmavt_mr.h | 130 ++++++++++++++++ include/rdma/rdmavt_qp.h | 262 ++++++++++++++++++++++++++++++++ 5 files changed, 398 insertions(+), 308 deletions(-) commit b036db83c0ec8d1e81df19410a494be4cfe0b186 Author: Dennis Dalessandro Date: Wed Jan 6 10:04:23 2016 -0800 IB/rdmavt: Add driver notification for new AH Drivers may need to do some work once an address handle has been created. Add a driver function for this purpose. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 7 +++++-- include/rdma/rdma_vt.h | 41 ++++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 18 deletions(-) commit f3d01bbcdc47a728336008a9254732c1652aeddd Author: Dennis Dalessandro Date: Wed Jan 6 10:04:13 2016 -0800 IB/rdmavt: Add an ibport data structure to rdmavt Converge the ibport data structures of qib and hfi1 into a common ib port structure. Also provides a place to keep track of these ports in case rdmavt needs it. Along with this goes an attach and detach function for drivers to use to notify rdmavt of the ports. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 24 ++++++++++++++ include/rdma/rdma_vt.h | 66 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 1 deletion(-) commit 70a1a351626073123ab79de24119977c4a297fdf Author: Dennis Dalessandro Date: Wed Jan 6 10:04:06 2016 -0800 IB/rdmavt: Move SRQ data structure into rdmavt Patch moves the srq data structure into rdmavt in preparation for removal from qib and hfi1 which will follow in subsequent patches. Reviewed-by: Ira Weiny Reviewed-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdma_vt.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 119a8e708d16d38eedfa3d920b89b709dda41a8f Author: Kamal Heib Date: Wed Jan 6 10:03:59 2016 -0800 IB/rdmavt: Add AH to rdmavt Original patch is from Kamal Heib . It has been split into three separate patches. This one for rdmavt, a follow on for qib, and one for hfi1. Create datastructure for address handle and implement the create/destroy/modify/query of address handle for rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Kamal Heib Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 98 +++++++++++++++++++++++++++++++++++++-- drivers/infiniband/sw/rdmavt/vt.c | 5 +- include/rdma/rdma_vt.h | 17 +++++++ 3 files changed, 115 insertions(+), 5 deletions(-) commit f2f342115ef2b0755abd73573831351e371f6242 Author: Kamal Heib Date: Wed Jan 6 10:03:47 2016 -0800 IB/rdmavt: Add common LID defines to rdmavt Original patch is from Kamal Heib . It has been split into separate patches. This patch adds RVT_PERMISSIVE_LID and RVT_MULTICAST_LID_BASE to rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Kamal Heib Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdma_vt.h | 3 +++ 1 file changed, 3 insertions(+) commit 36055a0652b6acb0e54ca0ad5ead2ac51e90f9ab Author: Dennis Dalessandro Date: Wed Jan 6 10:03:39 2016 -0800 IB/rdmavt: Do not use rvt prints which rely on driver too early Trying to print debug and error messages with the rdmavt helpers will not work out so well if the drivers have not provided the get_card and get pci functions. Use the normal pr_error instead until we can check this. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b1e2099adc8e66f78fee2dd2f10cb8a11362083 Author: Dennis Dalessandro Date: Wed Jan 6 10:03:31 2016 -0800 IB/rdmavt: Move memory registration into rdmavt Use the memory registration routines in hfi1 and move them to rdmavt. A follow on patch will address removing the duplicated code in the hfi1 and qib drivers. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mr.c | 683 +++++++++++++++++++++++++++++++++++++- drivers/infiniband/sw/rdmavt/mr.h | 23 ++ drivers/infiniband/sw/rdmavt/vt.c | 24 +- include/rdma/rdma_vt.h | 19 +- 4 files changed, 734 insertions(+), 15 deletions(-) commit 0b8a8aae02abfbd724186cffe400fbdbf0cb41d6 Author: Dennis Dalessandro Date: Wed Jan 6 10:03:07 2016 -0800 IB/rdmavt: Add the start of capability flags Drivers will need a set of flags to dictate behavior to rdmavt. This patch adds a placeholder and a spot for it to live, as well as a few flags that will be used. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdma_vt.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b534875d5ab348fb9193692589e2ee82ae768e3a Author: Dennis Dalessandro Date: Wed Jan 6 10:02:59 2016 -0800 IB/rdmavt: Add device specific info prints Follow hfi1's example for printing information about the driver and incorporate into rdmavt. This requires two new functions to be provided by the driver, one to get_card_name and one to get_pci_dev. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 13 ++++++++++--- drivers/infiniband/sw/rdmavt/vt.h | 28 ++++++++++++++++++++++++++++ include/rdma/rdma_vt.h | 3 +++ 3 files changed, 41 insertions(+), 3 deletions(-) commit aec5778775ac03ee6cfd6480adbbf6b05513d77b Author: Dennis Dalessandro Date: Wed Jan 6 10:02:52 2016 -0800 IB/rdmavt: Move driver helper functions to a common structure Drivers are going to need to provide multiple functions for rdmavt to call in to. We already have one, so go ahead and push this into a data structure designated for driver supplied functions. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 6 +++++- include/rdma/rdma_vt.h | 22 +++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) commit ca889e8ad3af9f1dfeb827356bc9839fb20f32be Author: Dennis Dalessandro Date: Wed Jan 6 10:02:41 2016 -0800 IB/rdmavt: Add queue pair data structure to rdmavt Add queue pair data structure as well as supporting structures to rdmavt. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.h | 5 - include/rdma/rdma_vt.h | 233 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+), 5 deletions(-) commit b92a7568037e2a28f61c3f79c2320431bb24dfab Author: Dennis Dalessandro Date: Wed Jan 6 10:01:42 2016 -0800 IB/rdmavt: Move MR datastructures into rvt This patch adds the MR datastructures based on hfi1 into rvt. For now the data structures are defined in include/rdma/rdma_vt.h but once all MR functionality has been moved from the drivers into rvt these should move to rdmavt/mr.h Reviewed-by: Ira Weiny Reviewed-by: Dean Luick Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdma_vt.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 8cf4020b2ad0d19f74fed043b882da1b79f52566 Author: Dennis Dalessandro Date: Wed Jan 6 10:01:17 2016 -0800 IB/rdmavt: Add post send and recv stubs This adds the post sned and recv function stubs. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 62 +++++++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/qp.h | 7 ++++- drivers/infiniband/sw/rdmavt/vt.c | 3 ++ 3 files changed, 71 insertions(+), 1 deletion(-) commit cf16335a0ccf5adda3d4bad932a7e012891709c5 Author: Dennis Dalessandro Date: Wed Jan 6 10:00:42 2016 -0800 IB/rdmavt: Add completion queue function stubs Create stubs for completion queue creation, polling, resizing, calling for notification, and destroying. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/cq.c | 113 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/cq.h | 62 +++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 7 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 184 insertions(+), 1 deletion(-) commit e6a8818a354db4d5a13b42d9fbc0f11ed74058e8 Author: Dennis Dalessandro Date: Wed Jan 6 09:59:38 2016 -0800 IB/rdmavt: Add get port immutable stub This adds the get port immutable verbs call. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit dc21752e2c930ae32f11affb2e1d7a6f8a44a16a Author: Dennis Dalessandro Date: Wed Jan 6 09:59:04 2016 -0800 IB/rdmavt: Add mmap stub Adds the stub for the mmap verbs call. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/mmap.c | 60 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/mmap.h | 55 ++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 1 + drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 118 insertions(+), 1 deletion(-) commit 3dd1faf89b418f036ff664edbf04d4e266e2ceaa Author: Dennis Dalessandro Date: Wed Jan 6 09:58:37 2016 -0800 IB/rdmavt: Add process MAD stub This adds the stub for process mad. More study is needed to determine the final MAD interaction between the driver and rvt. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/mad.c | 85 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/mad.h | 59 ++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 1 deletion(-) commit 9fa2517116b1841e6a6402fe5d2d51acc31164d2 Author: Dennis Dalessandro Date: Wed Jan 6 09:58:23 2016 -0800 IB/rdmavt: Add multicast stubs Adds the function stubs for attach and detach multicast. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/mcast.c | 58 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/mcast.h | 56 +++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 4 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 120 insertions(+), 1 deletion(-) commit aad9158bda02875cceb2408d7cc2675de2e2829a Author: Dennis Dalessandro Date: Wed Jan 6 09:57:58 2016 -0800 IB/rdmavt: Add SRQ stubs Adds the stubs for create, modify, query, and destory for shared request queues. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/srq.c | 86 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/srq.h | 61 +++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 6 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 155 insertions(+), 1 deletion(-) commit 2a055eb7aa2ad168ec7c616a183e385266b6bf76 Author: Dennis Dalessandro Date: Wed Jan 6 09:57:21 2016 -0800 IB/rdmavt: Add memory region stubs Adds the function stubs for allocating, and registering memory regions, as well as deregistering them. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/mr.c | 165 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/mr.h | 69 ++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 10 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 246 insertions(+), 1 deletion(-) commit 4c1e497286debf733521b24c20f350a69a77b3c8 Author: Dennis Dalessandro Date: Wed Jan 6 09:56:41 2016 -0800 IB/rdmavt: Add address handle stubs Adds the stubs for create, destroy, modify, and query of the address handle. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 3 +- drivers/infiniband/sw/rdmavt/ah.c | 76 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/ah.h | 59 +++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 6 +++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 143 insertions(+), 2 deletions(-) commit b518d3e69e7df49bf0bc4efe447338917ef41843 Author: Dennis Dalessandro Date: Wed Jan 6 09:56:15 2016 -0800 IB/rdmavt: Add queue pair function stubs Adds the stubs for create, modify, destroy and query functions for queue pairs. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 120 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/qp.h | 67 +++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 6 ++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 195 insertions(+), 1 deletion(-) commit c4ed7d8bb08061218a3bff5ad80a9537cea232f2 Author: Dennis Dalessandro Date: Wed Jan 6 09:55:39 2016 -0800 IB/rdmavt: Alloc and dealloc ucontexts Add the stubs to allocate and deallocate user contexts. This will be handled completely by rvt. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2d092e11744695c30b76fac070c80bb7e1ac9325 Author: Dennis Dalessandro Date: Wed Jan 6 09:54:50 2016 -0800 IB/rdmavt: Add query gid stub The handler for query gid operates along the same lines as the query pkey handler. The driver will take care to keep the guid table updated. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 30588643f95e1bb1239e2568de7a653722832a5e Author: Dennis Dalessandro Date: Wed Jan 6 09:54:16 2016 -0800 IB/rdmavt: Add pkey query stub The pkey table will reside in the rvt structure but it will be modified only when the driver requests then rvt will simply read the value to return in the query. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 21 +++++++++++++++++++++ include/rdma/rdma_vt.h | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 765525c11ef48e63717891a6636f610620ab4e7c Author: Dennis Dalessandro Date: Wed Jan 6 09:54:07 2016 -0800 IB/rdmavt: Add query and modify port stubs This patch adds the query and modify port stubs. The query will mostly entail the driver returning everything in the ib_port_attr which will get handed back to the verbs layer. The modify will need some API helpers in the driver. The send_trap and post_mad_send are still issues to address. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 19ef1edd7f75f805dc8fa60e0c61773f9cb6d50b Author: Dennis Dalessandro Date: Wed Jan 6 09:53:05 2016 -0800 IB/rdmavt: Add query and modify device stubs Adds the stubs which will handle the query and modify device functions. At this time the only intention is to support changing the node desc and the guid via these calls. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 4997870a0935b923d2ba67293fca0b8c05f74c1e Author: Dennis Dalessandro Date: Wed Jan 6 09:52:40 2016 -0800 IB/rdmavt: Macroize override checks during driver registration Add a macro to cut down on writing the same lines over and over again for what will be a large number of functions that will be supported. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit b1070a7a4d304e680eb6c1158d76645cf5a923f1 Author: Dennis Dalessandro Date: Wed Jan 6 09:52:19 2016 -0800 IB/rdmavt: Add ib core device attributes to rvt driver params list Instead of trying to handle each parameter separately, add ib_device_attr to rvt_driver_params. This means drivers will fill this in and pass to the rvt registration function. Reviewed-by: Mike Marciniszyn Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/pd.c | 2 +- include/rdma/rdma_vt.h | 57 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 3 deletions(-) commit 8afd32eb58b6885fc3e268c69b1b1b627aa2afaf Author: Dennis Dalessandro Date: Wed Jan 6 09:51:48 2016 -0800 IB/rdmavt: Add protection domain to rdmavt. Add datastructure for and allocation/deallocation of protection domains for RDMAVT. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 3 +- drivers/infiniband/sw/rdmavt/pd.c | 103 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/pd.h | 58 +++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 12 ++++ drivers/infiniband/sw/rdmavt/vt.h | 1 + include/rdma/rdma_vt.h | 34 +++++++++-- 6 files changed, 206 insertions(+), 5 deletions(-) commit c1b332bc16a6e9d42b4ab0b5282e3937f776bf71 Author: Dennis Dalessandro Date: Wed Jan 6 09:51:18 2016 -0800 IB/rdmavt: Consolidate dma ops in rdmavt. This patch adds dma functions to rdmavt. The source is hfi1's version of dma.c which will be removed by a subsequent hfi1 patch. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/Makefile | 2 +- drivers/infiniband/sw/rdmavt/dma.c | 184 ++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/dma.h | 53 ++++++++++ drivers/infiniband/sw/rdmavt/vt.c | 10 ++ drivers/infiniband/sw/rdmavt/vt.h | 1 + 5 files changed, 249 insertions(+), 1 deletion(-) commit 0194621b225348428c212f330c26d194fc77bd15 Author: Dennis Dalessandro Date: Wed Jan 6 09:50:24 2016 -0800 IB/rdmavt: Create module framework and handle driver registration This patch introduces the basics for a new module called rdma_vt. This new driver is a software implementation of the InfiniBand verbs and aims to replace the multiple implementations that exist and duplicate each others' code. While the call to actually register the device with the IB core happens in rdma_vt, most of the work is still done in the drivers themselves. This will be changing in a follow on patch this is just laying the groundwork for this infrastructure. Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford MAINTAINERS | 6 +++ drivers/infiniband/Kconfig | 2 + drivers/infiniband/Makefile | 1 + drivers/infiniband/sw/Makefile | 1 + drivers/infiniband/sw/rdmavt/Kconfig | 6 +++ drivers/infiniband/sw/rdmavt/Makefile | 10 +++++ drivers/infiniband/sw/rdmavt/vt.c | 83 +++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/rdmavt/vt.h | 53 ++++++++++++++++++++++ include/rdma/rdma_vt.h | 70 +++++++++++++++++++++++++++++ 9 files changed, 232 insertions(+) commit fb9036dd8cd85533456aec43d7892b707561eba8 Author: Jim Snow Date: Mon Jan 11 18:32:21 2016 -0500 staging/hfi1: check for ARMED->ACTIVE change in recv int The link state will transition from ARMED to ACTIVE when a non-SC15 packet arrives, but the driver might not notice the change. With this fix, if the slowpath receive interrupt handler sees a non-SC15 packet while in the ARMED state, we queue work to call linkstate_active_work from process context to promote it to ACTIVE. Reviewed-by: Dean Luick Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jim Snow Signed-off-by: Brendan Cunningham Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 5 +-- drivers/staging/rdma/hfi1/chip.h | 2 ++ drivers/staging/rdma/hfi1/driver.c | 72 ++++++++++++++++++++++++++++++++++++++ drivers/staging/rdma/hfi1/hfi.h | 11 ++++++ drivers/staging/rdma/hfi1/init.c | 1 + 5 files changed, 89 insertions(+), 2 deletions(-) commit f4ddedf4263bb94c81b2647ec5cf5ee79c6c20b0 Author: Ira Weiny Date: Mon Jan 11 18:31:44 2016 -0500 staging/hfi1: Fix Xmit Wait calculation Total XMIT wait needs to sum the xmit wait values of all the VLs not just those requested in the query. Also, make the algorithm used for both PortStatus and PortDataCounters the same. Reviewed-by: Arthur Kepner Reviewed-by: Breyer, Scott J Signed-off-by: Ira Weiny Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/mad.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 624be1dbdb7c69c0218e78a3afec98a09a08e747 Author: Edward Mascarenhas Date: Mon Jan 11 18:31:43 2016 -0500 staging/hfi1: Clean up comments Clean up comments by deleting numbering and terms internal to Intel. The information on the actual bugs is not deleted. Reviewed-by: Mike Marciniszyn Signed-off-by: Edward Mascarenhas Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 1 - drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 4 ++-- drivers/staging/rdma/hfi1/pcie.c | 2 +- drivers/staging/rdma/hfi1/ud.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) commit c024c554aeaf6197a1869fdc79c190139182203a Author: Dean Luick Date: Mon Jan 11 18:30:57 2016 -0500 staging/hfi1: Remove unneeded variable index The variable "index" increments the same as dd->ndevcntrs. Just use the later. Remove uneeded usage of "index" in the fill loop - it is not used there or later in the function. Reviewed-by: Dennis Dalessandro Signed-off-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit a699c6c27fbce4942bc902f42b69e03c5ce03fa9 Author: Vennila Megavannan Date: Mon Jan 11 18:30:56 2016 -0500 staging/hfi1: add per SDMA engine stats to hfistats Added the following per sdma engine stats: - SendDmaDescFetchedCnt - software maintained count of SDMA interrupts (SDmaInt, SDmaIdleInt, SDmaProgressInt) - software maintained counts of SDMA error cases Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Vennila Megavannan Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/staging/rdma/hfi1/chip.c | 110 ++++++++++++++++++++++++++++- drivers/staging/rdma/hfi1/chip.h | 5 ++ drivers/staging/rdma/hfi1/chip_registers.h | 1 + drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/sdma.c | 30 ++++---- drivers/staging/rdma/hfi1/sdma.h | 7 ++ 6 files changed, 139 insertions(+), 15 deletions(-) commit 688875826f0dfbe34d9eda4c47b707d08130fe7b Author: Hannes Reinecke Date: Thu Mar 10 11:25:26 2016 +0100 scsi_sysfs: Fix typo in is_bin_visible() The test for the existence vpd_pg83 is inverted. Fixes: 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback") Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reported-by: Ewan Milne Reviewed-by: Laurence Oberman loberman@redhat.com> Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3084558658c2f9a48d7c460d57aeb30964c06b7e Author: Sumit Saxena Date: Thu Mar 10 02:14:37 2016 -0800 megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure There are few MFI adapters which do not support MR_DCMD_PD_LIST_QUERY so if MFI adapters fail this DCMD, it should not be considered as FATAL and driver should not issue kill adapter and set per controller's instance variable- pd_list_not_supported so that same variable can be used inside functions- slave_alloc and slave_configure to allow firmware scan. Killing adapter because of DCMD failure when this DCMD is not supported causes driver's probe getting failed. This issue got introduced by commit 6d40afbc7d13 ("megaraid_sas: MFI IO timeout handling"). Killing adapter in case of this DCMD failure should be limited to Fusion adapters only. Per controller's instance variable allow_fw_scan is removed as pd_list_not_supported better reflect the purpose. Fixes: 6d40afbc7d13359b30a5cd783e3db6ebefa5f40a Signed-off-by: Sumit Saxena Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinicke Reviewed-by: Ewan Milne Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit e52d83986c5a0b843e45aa89b84d224ba7b9b8ca Author: Andreas Färber Date: Thu Mar 10 17:19:28 2016 -0800 MAINTAINERS: add devicetree bindings to Input Drivers section To avoid changes to input bindings not reaching linux-input reviewers add an appropriate file pattern to the MAINTAINERS entry. Reported-by: Heiko Stübner Signed-off-by: Andreas Färber Reviewed-by: Heiko Stuebner Signed-off-by: Dmitry Torokhov MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d8c0282f4da6d5335fee56141ca92284026f4818 Merge: 58bffb5 8c50b72 Author: Michael Ellerman Date: Fri Mar 11 11:20:15 2016 +1100 Merge branch 'topic/mprofile-kernel' into next Merge the ftrace changes to support -mprofile-kernel on ppc64le. This is a prerequisite for live patching, the support for which will be merged via the livepatch tree based on this topic branch. commit 0308813724606549436d30efd877a80c8e00790e Author: Jason Wang Date: Fri Mar 4 06:24:53 2016 -0500 vhost_net: basic polling support This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/net.c | 78 +++++++++++++++++++++++++++++++++++++++++++--- drivers/vhost/vhost.c | 14 +++++++++ drivers/vhost/vhost.h | 1 + include/uapi/linux/vhost.h | 6 ++++ 4 files changed, 94 insertions(+), 5 deletions(-) commit d4a60603fa0b42012decfa058dfa44cffde7a10c Author: Jason Wang Date: Fri Mar 4 06:24:52 2016 -0500 vhost: introduce vhost_vq_avail_empty() This patch introduces a helper which will return true if we're sure that the available ring is empty for a specific vq. When we're not sure, e.g vq access failure, return false instead. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 14 ++++++++++++++ drivers/vhost/vhost.h | 1 + 2 files changed, 15 insertions(+) commit 526d3e7ff515582eaf7cf5d9da2a11bf681204e6 Author: Jason Wang Date: Fri Mar 4 06:24:51 2016 -0500 vhost: introduce vhost_has_work() This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 7 +++++++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) commit 48147b9768b83265bf2e1211bcadeca035011380 Author: Andrew Duggan Date: Thu Mar 10 15:59:52 2016 -0800 Input: synaptics-rmi4 - add device tree support to the SPI transport driver Add devicetree binding for SPI devices. Signed-off-by: Andrew Duggan Acked-by: Rob Herring Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/rmi4/rmi_spi.txt | 57 ++++++++++++++++++++++ Documentation/devicetree/bindings/spi/spi-bus.txt | 2 + drivers/input/rmi4/rmi_spi.c | 44 ++++++++++++++++- 3 files changed, 102 insertions(+), 1 deletion(-) commit 8d99758dee31ff4a72bfc35d3a7a51fe66b7bb91 Author: Andrew Duggan Date: Thu Mar 10 15:58:12 2016 -0800 Input: synaptics-rmi4 - add SPI transport driver Add the transport driver for devices using RMI4 over SPI. Signed-off-by: Andrew Duggan Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 9 + drivers/input/rmi4/Makefile | 1 + drivers/input/rmi4/rmi_spi.c | 547 +++++++++++++++++++++++++++++++++++++++++++ include/linux/rmi.h | 51 ++++ 4 files changed, 608 insertions(+) commit 562b42d3ee305472e1b2ea31574c59925e95fd7e Author: Andrew Duggan Date: Thu Mar 10 15:56:58 2016 -0800 Input: synaptics-rmi4 - add support for F30 RMI4 F30 supports input from clickpad buttons and controls LEDs located on the touchpad PCB. This patch adds support of the clickpad buttons and defers supporting LEDs for the future. Signed-off-by: Andrew Duggan Signed-off-by: Benjamin Tissoires Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 9 + drivers/input/rmi4/Makefile | 1 + drivers/input/rmi4/rmi_bus.c | 3 + drivers/input/rmi4/rmi_driver.h | 1 + drivers/input/rmi4/rmi_f30.c | 407 ++++++++++++++++++++++++++++++++++++++++ include/linux/rmi.h | 16 ++ 6 files changed, 437 insertions(+) commit b43d2c1e9353814ce1716fff03d9223f40fa73b5 Author: Andrew Duggan Date: Thu Mar 10 15:55:29 2016 -0800 Input: synaptics-rmi4 - add support for F12 Function 12 implements 2D touch position sensor for newer Synaptics touch devices. It replaces F11 and no device will contain both functions. Signed-off-by: Andrew Duggan Signed-off-by: Christopher Heiny Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 11 + drivers/input/rmi4/Makefile | 1 + drivers/input/rmi4/rmi_bus.c | 3 + drivers/input/rmi4/rmi_driver.h | 1 + drivers/input/rmi4/rmi_f12.c | 457 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 473 insertions(+) commit aaa27982b3bcc3cce6a1d835673adccd75903a2e Author: Andrew Duggan Date: Thu Mar 10 15:48:32 2016 -0800 Input: synaptics-rmi4 - add device tree support for 2d sensors and F11 2D sensors have several parameter which can be set in the platform data. This patch adds support for getting those values from devicetree. Signed-off-by: Andrew Duggan Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov .../bindings/input/rmi4/rmi_2d_sensor.txt | 56 +++++++++++ .../bindings/input/touchscreen/touchscreen.txt | 2 + drivers/input/rmi4/rmi_2d_sensor.c | 108 +++++++++++++++++++++ drivers/input/rmi4/rmi_2d_sensor.h | 3 + drivers/input/rmi4/rmi_f11.c | 7 +- 5 files changed, 175 insertions(+), 1 deletion(-) commit ff8f83708b3e36c050dc3fd7e2f04ea7f1752599 Author: Andrew Duggan Date: Thu Mar 10 15:47:28 2016 -0800 Input: synaptics-rmi4 - add support for 2D sensors and F11 RMI4 currently defines two functions for reporting data for 2D sensors (F11 and F12). This patch adds the common functionality which is shared by devices with 2D reporting along with implementing functionality for F11. Signed-off-by: Andrew Duggan Signed-off-by: Christopher Heiny Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 15 + drivers/input/rmi4/Makefile | 5 + drivers/input/rmi4/rmi_2d_sensor.c | 221 ++++++ drivers/input/rmi4/rmi_2d_sensor.h | 84 +++ drivers/input/rmi4/rmi_bus.c | 3 + drivers/input/rmi4/rmi_driver.h | 2 +- drivers/input/rmi4/rmi_f11.c | 1312 ++++++++++++++++++++++++++++++++++++ include/linux/rmi.h | 83 +++ 8 files changed, 1724 insertions(+), 1 deletion(-) commit d8a8b3edfd922e3886684a3434bd2b752167ff29 Author: Andrew Duggan Date: Thu Mar 10 15:46:32 2016 -0800 Input: synaptics-rmi4 - add device tree support for RMI4 I2C devices Add devicetree binding for I2C devices and add bindings for optional parameters in the function drivers. Parameters for function drivers are defined in child nodes for each of the functions. Signed-off-by: Andrew Duggan Acked-by: Rob Herring Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/rmi4/rmi_f01.txt | 39 ++++++++++++++++ .../devicetree/bindings/input/rmi4/rmi_i2c.txt | 53 ++++++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/input/rmi4/rmi_bus.c | 35 ++++++++++++++ drivers/input/rmi4/rmi_bus.h | 4 -- drivers/input/rmi4/rmi_driver.c | 28 ++++++++++++ drivers/input/rmi4/rmi_f01.c | 50 ++++++++++++++++++++ drivers/input/rmi4/rmi_i2c.c | 12 ++++- 8 files changed, 217 insertions(+), 5 deletions(-) commit fdf51604f104f95bbb828019e6b8f17e7a0f834a Author: Andrew Duggan Date: Thu Mar 10 15:44:27 2016 -0800 Input: synaptics-rmi4 - add I2C transport driver Add the transport driver for devices using RMI4 over I2C. Signed-off-by: Andrew Duggan Signed-off-by: Christopher Heiny Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/rmi4/Kconfig | 9 + drivers/input/rmi4/Makefile | 3 + drivers/input/rmi4/rmi_i2c.c | 387 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 399 insertions(+) commit 2b6a321da9a2d8725a1d3dbb0b2e96a7618ebe56 Author: Andrew Duggan Date: Thu Mar 10 15:35:49 2016 -0800 Input: synaptics-rmi4 - add support for Synaptics RMI4 devices Synaptics uses the Register Mapped Interface (RMI) protocol as a communications interface for their devices. This driver adds the core functionality needed to interface with RMI4 devices. RMI devices can be connected to the host via several transport protocols and can supports a wide variety of functionality defined by RMI functions. Support for transport protocols and RMI functions are implemented in individual drivers. The RMI4 core driver uses a bus architecture to facilitate the various combinations of transport and function drivers needed by a particular device. Signed-off-by: Andrew Duggan Signed-off-by: Christopher Heiny Tested-by: Benjamin Tissoires Tested-by: Linus Walleij Tested-by: Bjorn Andersson Signed-off-by: Dmitry Torokhov drivers/input/Kconfig | 2 + drivers/input/Makefile | 2 + drivers/input/rmi4/Kconfig | 10 + drivers/input/rmi4/Makefile | 2 + drivers/input/rmi4/rmi_bus.c | 375 ++++++++++++++ drivers/input/rmi4/rmi_bus.h | 186 +++++++ drivers/input/rmi4/rmi_driver.c | 1027 +++++++++++++++++++++++++++++++++++++++ drivers/input/rmi4/rmi_driver.h | 103 ++++ drivers/input/rmi4/rmi_f01.c | 574 ++++++++++++++++++++++ include/linux/rmi.h | 209 ++++++++ include/uapi/linux/input.h | 1 + 11 files changed, 2491 insertions(+) commit fd0e21c31e1e6383af978239d07ced6e4e5d82c3 Author: Petr Mladek Date: Mon Jan 25 17:38:06 2016 +0100 virtio_balloon: Allow to resize and update the balloon stats in parallel The virtio balloon statistics are not updated when the balloon is being resized. But it seems that both tasks could be done in parallel. stats_handle_request() updates the statistics in the balloon structure and then communicates with the host. update_balloon_stats() calls all_vm_events() that just reads some per-CPU variables. The values might change during and after the call but it is expected and happens even without this patch. update_balloon_stats() also calls si_meminfo(). It is a bit more complex function. It too just reads some variables and looks lock-less safe. In each case, it seems to be called lock-less on several similar locations, e.g. from post_status() in dm_thread_func(), or from vmballoon_send_get_target(). The communication with the host is done via a separate virtqueue, see vb->stats_vq vs. vb->inflate_vq and vb->deflate_vq. Therefore it could be used in parallel with fill_balloon() and leak_balloon(). This patch splits the existing work into two pieces. One is for updating the balloon stats. The other is for resizing of the balloon. It seems that they can be proceed in parallel without any extra locking. Signed-off-by: Petr Mladek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit fad7b7b27b6a168ca8ebc84482043886f837b89d Author: Petr Mladek Date: Mon Jan 25 17:38:05 2016 +0100 virtio_balloon: Use a workqueue instead of "vballoon" kthread This patch moves the deferred work from the "vballoon" kthread into a system freezable workqueue. We do not need to maintain and run a dedicated kthread. Also the event driven workqueues API makes the logic much easier. Especially, we do not longer need an own wait queue, wait function, and freeze point. The conversion is pretty straightforward. One cycle of the main loop is put into a work. The work is queued instead of waking the kthread. fill_balloon() and leak_balloon() have a limit for the amount of modified pages. The work re-queues itself when necessary. For this, we make fill_balloon() to return the number of really modified pages. Note that leak_balloon() already did this. virtballoon_restore() queues the work only when really needed. The only complication is that we need to prevent queuing the work when the balloon is being removed. It was easier before because the kthread simply removed itself from the wait queue. We need an extra boolean and spin lock now. My initial idea was to use a dedicated workqueue. Michael S. Tsirkin suggested using a system one. Tejun Heo confirmed that the system workqueue has a pretty high concurrency level (256) by default. Therefore we need not be afraid of too long blocking. Signed-off-by: Petr Mladek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 108 +++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 57 deletions(-) commit 3a03d126ece4388d05937090a87bade560117751 Author: Josh Hunt Date: Tue Mar 8 10:52:12 2016 -0500 ACPI / APEI: ERST: Fixed leaked resources in erst_init erst_init currently leaks resources allocated from its call to apei_resources_init(). The data allocated there gets copied into apei_resources_all and can be freed when we're done with it. Signed-off-by: Josh Hunt Reviewed-by: Chen, Gong Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/erst.c | 3 +++ 1 file changed, 3 insertions(+) commit e56c92565dfe2c8de203f42f7d5237d14784b93d Author: Josh Hunt Date: Tue Mar 8 10:52:11 2016 -0500 ACPI / APEI: Fix leaked resources We leak the NVS and arch resources (if used), in apei_resources_request. They are allocated to make sure we exclude them from the APEI resources, but they are never freed at the end of the function. Free them now. Signed-off-by: Josh Hunt Reviewed-by: Chen, Gong Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/apei-base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4fec7ad5f637159525265a45f66482cf8817b45f Author: Rafael J. Wysocki Date: Thu Mar 10 23:45:19 2016 +0100 intel_pstate: Do not skip samples partially If the current value of MPERF or the current value of TSC is the same as the previous one, respectively, intel_pstate_sample() bails out early and skips the sample. However, intel_pstate_adjust_busy_pstate() is still called in that case which is not correct, so modify intel_pstate_sample() to return a bool value indicating whether or not the sample has been taken and use it to decide whether or not to call intel_pstate_adjust_busy_pstate(). While at it, remove redundant parentheses from the MPERF/TSC check in intel_pstate_sample(). Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada drivers/cpufreq/intel_pstate.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8fa520af50817d5f30d293f507c937f561b3e6b9 Author: Philippe Longepe Date: Sun Mar 6 08:34:06 2016 +0100 intel_pstate: Remove freq calculation from intel_pstate_calc_busy() Use a helper function to compute the average pstate and call it only where it is needed (only when tracing or in intel_pstate_get). Signed-off-by: Philippe Longepe Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7349ec0470b62820ae226e30770b9d84a53ced9d Author: Philippe Longepe Date: Sun Mar 6 08:34:05 2016 +0100 intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance() The cpu_load algorithm doesn't need to invoke intel_pstate_calc_busy(), so move that call from intel_pstate_sample() to get_target_pstate_use_performance(). Signed-off-by: Philippe Longepe Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a158bed5dc92bd83338225135d448958e0b3745d Author: Philippe Longepe Date: Sun Mar 6 08:34:04 2016 +0100 intel_pstate: Optimize calculation for max/min_perf_adj mul_fp(int_tofp(A), B) expands to: ((A << FRAC_BITS) * B) >> FRAC_BITS, so the same result can be obtained via simple multiplication A * B. Apply this observation to max_perf * limits->max_perf and max_perf * limits->min_perf in intel_pstate_get_min_max()." Signed-off-by: Philippe Longepe Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b54a0dfd56d5c314302987e0ff173b3f1bfcb555 Author: Philippe Longepe Date: Tue Mar 8 10:31:14 2016 +0100 intel_pstate: Remove extra conversions in pid calculation pid->setpoint and pid->deadband can be initialized in fixed point, so we can avoid the int_tofp in pid_calc. Signed-off-by: Philippe Longepe Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 843f0f2e8f5213a3559b6a21c0e9fc35dcb08f60 Author: Mike Snitzer Date: Thu Mar 10 13:40:26 2016 -0500 dm cache: bump the target version Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d14fcf3dd79c0b8a8d0ba469c44a6b04f3a1403b Author: Joe Thornber Date: Thu Mar 10 16:20:58 2016 +0000 dm cache: make sure every metadata function checks fail_io Otherwise operations may be attempted that will only ever go on to crash (since the metadata device is either missing or unreliable if 'fail_io' is set). Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org drivers/md/dm-cache-metadata.c | 98 +++++++++++++++++++++++++----------------- drivers/md/dm-cache-metadata.h | 4 +- drivers/md/dm-cache-target.c | 12 +++++- 3 files changed, 71 insertions(+), 43 deletions(-) commit 3f0680402c2d0da58a8b06f7e55d387591b55e61 Author: Mike Snitzer Date: Fri Mar 4 14:37:16 2016 -0500 dm: add missing newline between DM_DEBUG_BLOCK_STACK_TRACING and DM_BUFIO Signed-off-by: Mike Snitzer drivers/md/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7dd85bb0e98836bd61a619b59dcfc0f2ad3f5172 Author: Mike Snitzer Date: Thu Mar 3 08:11:30 2016 -0500 dm cache policy smq: clarify that mq registration failure was for 'mq' Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c80914e81ec5b08fec0bae531e3445268c8820f4 Author: Mike Snitzer Date: Wed Mar 2 12:33:03 2016 -0500 dm: return error if bio_integrity_clone() fails in clone_bio() clone_bio() now checks if bio_integrity_clone() returned an error rather than just drop it on the floor. Signed-off-by: Mike Snitzer drivers/md/dm.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 2eae9e4489b4cf83213fa3bd508b5afca3f01780 Author: Joe Thornber Date: Tue Mar 1 10:58:44 2016 +0000 dm thin metadata: don't issue prefetches if a transaction abort has failed If a transaction abort has failed then we can no longer use the metadata device. Typically this happens if the superblock is unreadable. This fix addresses a crash seen during metadata device failure testing. Fixes: 8a01a6af75 ("dm thin: prefetch missing metadata pages") Cc: stable@vger.kernel.org # 3.19+ Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4df2bf466a9c9c92f40d27c4aa9120f4e8227bfc Author: DingXiang Date: Tue Feb 2 12:29:18 2016 +0800 dm snapshot: disallow the COW and origin devices from being identical Otherwise loading a "snapshot" table using the same device for the origin and COW devices, e.g.: echo "0 20971520 snapshot 253:3 253:3 P 8" | dmsetup create snap will trigger: BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 [ 1958.979934] IP: [] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot] [ 1958.989655] PGD 0 [ 1958.991903] Oops: 0000 [#1] SMP ... [ 1959.059647] CPU: 9 PID: 3556 Comm: dmsetup Tainted: G IO 4.5.0-rc5.snitm+ #150 ... [ 1959.083517] task: ffff8800b9660c80 ti: ffff88032a954000 task.ti: ffff88032a954000 [ 1959.091865] RIP: 0010:[] [] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot] [ 1959.104295] RSP: 0018:ffff88032a957b30 EFLAGS: 00010246 [ 1959.110219] RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000001 [ 1959.118180] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff880329334a00 [ 1959.126141] RBP: ffff88032a957b50 R08: 0000000000000000 R09: 0000000000000001 [ 1959.134102] R10: 000000000000000a R11: f000000000000000 R12: ffff880330884d80 [ 1959.142061] R13: 0000000000000008 R14: ffffc90001c13088 R15: ffff880330884d80 [ 1959.150021] FS: 00007f8926ba3840(0000) GS:ffff880333440000(0000) knlGS:0000000000000000 [ 1959.159047] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1959.165456] CR2: 0000000000000098 CR3: 000000032f48b000 CR4: 00000000000006e0 [ 1959.173415] Stack: [ 1959.175656] ffffc90001c13040 ffff880329334a00 ffff880330884ed0 ffff88032a957bdc [ 1959.183946] ffff88032a957bb8 ffffffffa040f225 ffff880329334a30 ffff880300000000 [ 1959.192233] ffffffffa04133e0 ffff880329334b30 0000000830884d58 00000000569c58cf [ 1959.200521] Call Trace: [ 1959.203248] [] dm_exception_store_create+0x1d5/0x240 [dm_snapshot] [ 1959.211986] [] snapshot_ctr+0x140/0x630 [dm_snapshot] [ 1959.219469] [] ? dm_split_args+0x64/0x150 [dm_mod] [ 1959.226656] [] dm_table_add_target+0x177/0x440 [dm_mod] [ 1959.234328] [] table_load+0x143/0x370 [dm_mod] [ 1959.241129] [] ? retrieve_status+0x1b0/0x1b0 [dm_mod] [ 1959.248607] [] ctl_ioctl+0x255/0x4d0 [dm_mod] [ 1959.255307] [] ? memzero_explicit+0x12/0x20 [ 1959.261816] [] dm_ctl_ioctl+0x13/0x20 [dm_mod] [ 1959.268615] [] do_vfs_ioctl+0xa6/0x5c0 [ 1959.274637] [] ? __audit_syscall_entry+0xaf/0x100 [ 1959.281726] [] ? do_audit_syscall_entry+0x66/0x70 [ 1959.288814] [] SyS_ioctl+0x79/0x90 [ 1959.294450] [] entry_SYSCALL_64_fastpath+0x12/0x71 ... [ 1959.323277] RIP [] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot] [ 1959.333090] RSP [ 1959.336978] CR2: 0000000000000098 [ 1959.344121] ---[ end trace b049991ccad1169e ]--- Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1195899 Cc: stable@vger.kernel.org Signed-off-by: Ding Xiang Signed-off-by: Mike Snitzer drivers/md/dm-snap.c | 9 +++++++++ drivers/md/dm-table.c | 36 ++++++++++++++++++++++++------------ include/linux/device-mapper.h | 2 ++ 3 files changed, 35 insertions(+), 12 deletions(-) commit 9ed84698fdda63de93c68150c4f63673cc3d7b54 Author: Joe Thornber Date: Wed Feb 10 10:18:10 2016 +0000 dm cache: make the 'mq' policy an alias for 'smq' smq seems to be performing better than the old mq policy in all situations, as well as using a quarter of the memory. Make 'mq' an alias for 'smq' when choosing a cache policy. The tunables that were present for the old mq are faked, and have no effect. mq should be considered deprecated now. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer Documentation/device-mapper/cache-policies.txt | 39 +- drivers/md/Kconfig | 10 - drivers/md/Makefile | 2 - drivers/md/dm-cache-policy-mq.c | 1473 ------------------------ drivers/md/dm-cache-policy-smq.c | 92 +- 5 files changed, 87 insertions(+), 1529 deletions(-) commit e233d800a9648f2c0802aa23250d9c8af57bab43 Author: Bob Liu Date: Wed Feb 24 16:15:38 2016 +0800 dm: drop unnecessary assignment of md->queue md->queue and q are the same thing in dm_old_init_request_queue() and dm_mq_init_request_queue(). Also drop the temporary 'struct request_queue *q' in dm_old_init_request_queue(). Signed-off-by: Bob Liu Signed-off-by: Mike Snitzer drivers/md/dm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 032482fda4d19e0de10e0e99420a616c1e3e7820 Author: Mike Snitzer Date: Mon Feb 22 15:27:50 2016 -0500 dm: reorder 'struct mapped_device' members to fix alignment and holes Saves 16 bytes by eliminating 4 4byte holes but more importantly: numerous members that crossed cachelines were fixed. Signed-off-by: Mike Snitzer drivers/md/dm.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 1d3aa6f683b1c1a813a63339d7309cff58ba4531 Author: Mike Snitzer Date: Mon Feb 22 14:14:24 2016 -0500 dm: remove dummy definition of 'struct dm_table' Change the map pointer in 'struct mapped_device' from 'struct dm_table __rcu *' to 'void __rcu *' to avoid the need for the dummy definition. Signed-off-by: Mike Snitzer drivers/md/dm.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 115485e83f497fdf9b4bf779038cfe4e141292a9 Author: Mike Snitzer Date: Mon Feb 22 12:16:21 2016 -0500 dm: add 'dm_numa_node' module parameter Allows user to control which NUMA node the memory for DM device structures (e.g. mapped_device, request_queue, gendisk, blk_mq_tag_set) is allocated from. Defaults to NUMA_NO_NODE (-1). Allowable range is from -1 until the last online NUMA node id. Signed-off-by: Mike Snitzer drivers/md/dm.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) commit 29f929b52d72078299495710066a88816a78c59c Author: Mike Snitzer Date: Thu Jan 21 14:04:04 2016 -0500 dm thin metadata: remove needless newline from subtree_dec() DMERR message Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec31f3f78a0478dd486535377283151f83e0543d Author: Mike Snitzer Date: Sat Feb 20 12:49:43 2016 -0500 dm mpath: cleanup reinstate_path() et al based on code review fail_path() will print a "Failing path ..." message but reinstate_path() doesn't print a "Reinstating path ...". Add that message to reinstate_path() to add symmetry and aid system debugging. Remove reinstate_path()'s check for the path_selector providing .reinstate_path hook. All path selectors provide this and any future ones must too. activate_path() calls pg_init_done() with SCSI_DH_DEV_OFFLINED but pg_init_done() doesn't expicitly handle it in its swicth statement. Add SCSI_DH_DEV_OFFLINED to the default case. Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e8ab563f4b2e51849a16d962c6235b81e429c0d7 Merge: 10f7903 12185a9 Author: David S. Miller Date: Thu Mar 10 16:24:03 2016 -0500 Merge branch 'flower-offload' Amir Vadai says: ==================== cls_flower hardware offload support Please see changes from V2 at the bottom. This patchset introduces cls_flower hardware offload support over ConnectX-4 driver, more hardware vendors are welcome to use it too. This patchset is based on John's infrastructure for tc offloading [2] to add hardware offload support to the flower filter. It also extends the support to an additional tc action - skbedit mark operation. NIC driver that was used is ConnectX-4. Feature is off by default and could be turned on using ethtool. Some commands to use this code: export TC=../iproute2/tc/tc export ETH=ens9 ethtool -K ens9 hw-tc-offload on $TC qdisc add dev $ETH ingress $TC filter add dev $ETH protocol ip prio 20 parent ffff: \ flower ip_proto 1 \ dst_mac 7c:fe:90:69:81:62 \ src_mac 7c:fe:90:69:81:56 \ dst_ip 11.11.11.11 \ src_ip 11.11.11.12 \ indev $ETH \ action drop $TC filter add dev $ETH protocol ip prio 30 parent ffff: \ flower ip_proto 6 \ indev $ETH \ action skbedit mark 0x1234 $TC filter add dev $ETH protocol ip prio 10 parent ffff: \ handle 0x1234 fw action pass The code was tested and applied on top of commit 3ebeac1 ("Merge branch 'cxgb4-next'") Changes from V2: - patch 1/10 ("net/flower: Introduce hardware offload support") - Remove unused variable [Dave] - Don't fail command when HW can't offload filter [John] - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") - Mention in changelog that struct tc_action is now exposed out of the ifdef. - patch 4/10 ("net/act_skbedit: Utility functions for mark action") - Document clearly that is_tcf_skbedit_mark() is returning true if and only if the only action is mark [Dave] - patch 8/10 ("net/mlx5e: Introduce tc offload support") - make mlx5e_tc_add_flow() static Changes from V1: - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") - fixed return value of tc_no_actions Changes from V0: - Use tc_no_actions and tc_for_each_action instead of ifdef CONFIG_NET_CLS_ACT - Replace ENOTSUPP (and some EINVAL) with EOPNOTSUPP - Name the flower command enum - fl_hw_destroy_filter() to return void - nobody uses the return value - mlx5e_tc_init() and mlx5e_tc_cleanup() to be called from the right places. - When adding HW rule fails - fail the command - Rules are added to be processed both by HW and SW unless SKIP_HW is given - Adding patch 6/10 ("net/mlx5e: Relax ndo_setup_tc handle restriction") Main changes from the RFC [1]: - API - Using ndo_setup_tc() instead of switchdev - act_skbedit, act_gact - Actions are not serialized to NIC driver, instead using access functions. - cls_flower - prevent double classification by software by not adding successfuly offloaded filters to the hashtable - Fixed some bugs in original RFC with rule delete - mlx5 - Adding flow table to kernel namespace instead of a new namespace - s/offload/tc/ in many places - no need for a special kconfig since switchdev is not used ==================== Signed-off-by: David S. Miller commit 12185a9fafa9cf39b73588c92aa49300ff3bf191 Author: Amir Vadai Date: Tue Mar 8 12:42:38 2016 +0200 net/mlx5e: Support offload cls_flower with skbedit mark action Introduce offloading of skbedit mark action. For example, to mark with 0x1234, all TCP (ip_proto 6) packets arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 6 \ indev ens9 \ action skbedit mark 0x1234 Signed-off-by: Amir Vadai Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 2 ++ 3 files changed, 6 insertions(+) commit e3a2b7ed018e885721a1b664ed7bf0f3fe29c81c Author: Amir Vadai Date: Tue Mar 8 12:42:37 2016 +0200 net/mlx5e: Support offload cls_flower with drop action Parse tc_cls_flower_offload into device specific commands and program the hardware to classify and act accordingly. For example, to drop ICMP (ip_proto 1) packets from specific smac, dmac, src_ip, src_ip, arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 1 \ dst_mac 7c:fe:90:69:81:62 src_mac 7c:fe:90:69:81:56 \ dst_ip 11.11.11.11 src_ip 11.11.11.12 indev ens9 \ action drop Signed-off-by: Amir Vadai Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 297 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 5 + 3 files changed, 309 insertions(+) commit e8f887ac6a45ecb7f881f278a3fed1fbf002ef0b Author: Amir Vadai Date: Tue Mar 8 12:42:36 2016 +0200 net/mlx5e: Introduce tc offload support Extend ndo_setup_tc() to support ingress tc offloading. Will be used by later patches to offload tc flower filter. Feature is off by default and could be enabled by issuing: # ethtool -K eth0 hw-tc-offload on Offloads flow table is dynamically created when first filter is added. Rules are saved in a hash table that is maintained by the consumer (for example - the flower offload in the next patch). When last filter is removed and no filters exist in the hash table, the offload flow table is destroyed. Signed-off-by: Amir Vadai Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 38 ++++++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 131 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 44 ++++++++ 5 files changed, 222 insertions(+), 2 deletions(-) commit b6172aac71e9fba0981e013839ced5fcd97746fb Author: Amir Vadai Date: Tue Mar 8 12:42:35 2016 +0200 net/mlx5e: Add a new priority for kernel flow tables Move the vlan and main flow tables to use priority 1. This will allow the upcoming TC offload logic to use a higher priority (0) for the offload steering table. Signed-off-by: Amir Vadai Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 67ba422e95edfbd42f1d9782868880b364eea173 Author: Amir Vadai Date: Tue Mar 8 12:42:34 2016 +0200 net/mlx5e: Relax ndo_setup_tc handle restriction Restricting handle to TC_H_ROOT breaks the old instantiation of mqprio to setup a hardware qdisc. This patch relaxes the test, to only check the type. Fixes: 08fb1da ("net/mlx5e: Support DCBNL IEEE ETS") Signed-off-by: Amir Vadai Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60ab4584f5bf4e496baec7b090a4b382d03b2100 Author: Amir Vadai Date: Tue Mar 8 12:42:33 2016 +0200 net/mlx5_core: Set flow steering dest only for forward rules We need to handle flow table entry destinations only if the action associated with the rule is forwarding (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST). Fixes: 26a8145390b3 ('net/mlx5_core: Introduce flow steering firmware commands') Signed-off-by: Amir Vadai Signed-off-by: Maor Gottlieb Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 29 +++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 18 +++++++++----- 2 files changed, 28 insertions(+), 19 deletions(-) commit 519afb1813eab066a0c9995a08861fd0af75d5ae Author: Amir Vadai Date: Tue Mar 8 12:42:32 2016 +0200 net/act_skbedit: Utility functions for mark action Enable device drivers to query the action, if and only if is a mark action and what value to use for marking. Acked-by: Jiri Pirko Signed-off-by: Amir Vadai Signed-off-by: David S. Miller include/net/tc_act/tc_skbedit.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 00175aec941e9c306d8a5ce930b2d91f7c04468c Author: Amir Vadai Date: Tue Mar 8 12:42:31 2016 +0200 net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef Introduce the macros tc_no_actions and tc_for_each_action to make code clearer. Extracted struct tc_action out of the ifdef to make calls to is_tcf_gact_shot() and similar functions valid, even when it is a nop. Acked-by: Jiri Pirko Acked-by: John Fastabend Suggested-by: Jiri Pirko Signed-off-by: Amir Vadai Signed-off-by: David S. Miller include/net/act_api.h | 21 ++++++++++++++++----- include/net/tc_act/tc_gact.h | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) commit 8de2d793daf784f8f109565bcc023a6d198bad85 Author: Amir Vadai Date: Tue Mar 8 12:42:30 2016 +0200 net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public Will be used in a following patch to query if a key is being used, and what it's value in the target object. Acked-by: John Fastabend Acked-by: Jiri Pirko Signed-off-by: Amir Vadai Signed-off-by: David S. Miller include/net/flow_dissector.h | 13 +++++++++++++ net/core/flow_dissector.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 5b33f48842fa1e13e9c0ea8cc59c1d0df19042db Author: Amir Vadai Date: Tue Mar 8 12:42:29 2016 +0200 net/flower: Introduce hardware offload support This patch is based on a patch made by John Fastabend. It adds support for offloading cls_flower. when NETIF_F_HW_TC is on: flags = 0 => Rule will be processed twice - by hardware, and if still relevant, by software. flags = SKIP_HW => Rull will be processed by software only If hardware fail/not capabale to apply the rule, operation will NOT fail. Filter will be processed by SW only. Acked-by: Jiri Pirko Suggested-by: John Fastabend Signed-off-by: Amir Vadai Signed-off-by: David S. Miller include/linux/netdevice.h | 2 ++ include/net/pkt_cls.h | 14 ++++++++++ include/uapi/linux/pkt_cls.h | 2 ++ net/sched/cls_flower.c | 64 +++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 81 insertions(+), 1 deletion(-) commit 10f79037b4ac32e8929d73f31f908cfa061e29aa Merge: 0476189 0c272fc Author: David S. Miller Date: Thu Mar 10 16:22:13 2016 -0500 Merge branch 'mediatek-eth' John Crispin says: ==================== net-next: mediatek: add ethernet driver This series adds support for the Mediatek ethernet core found on current ARM based SoCs. The driver works on MT2701 and MT7623 SoCs Instead of trying to upstream everything at once I decided to concentrate on the important parts required to make current generation silicon work. The V3 series only includes the code required to make dual MAC setups work and only supports the newer QDMA engine. Changes in V5 * reduce the mdio timeut to HZ * add a call to usleep_range() which schedules in the background. Changes in V4 * remove ugly _FE macro, use offsetof() instead Changes in V3 * only include code for MT2701/7623 support * drop support for PDMA and older MIPS based SoCs * drop switch support Changes in V2 * change the namespace of the functions from fe_* to mtk_* * add support for the latest generation of ARM SoCs * add dual MAC support * remove the swconfig specific bits * remove most of the magic values and replace them with defines * add verbose descriptions to the patches ==================== Signed-off-by: David S. Miller commit 0c272fc9b0d6e559835ebfe6bdf3b8c12a570d17 Author: John Crispin Date: Tue Mar 8 11:29:57 2016 +0100 net-next: mediatek: add an entry to MAINTAINERS Add myself and Felix as the Maintainers for the MediaTek ethernet driver. Signed-off-by: Felix Fietkau Signed-off-by: John Crispin Signed-off-by: David S. Miller MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 009fb0978ca4b5362cf875869c42893cc43b71a1 Author: John Crispin Date: Tue Mar 8 11:29:56 2016 +0100 net-next: mediatek: add Kconfig and Makefile This patch adds the Makefile and Kconfig required to make the driver build. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/mediatek/Kconfig | 17 +++++++++++++++++ drivers/net/ethernet/mediatek/Makefile | 5 +++++ 4 files changed, 24 insertions(+) commit 656e705243fd0c2864b89634ea16ed444ef64dc6 Author: John Crispin Date: Tue Mar 8 11:29:55 2016 +0100 net-next: mediatek: add support for MT7623 ethernet Add ethernet support for MediaTek SoCs from the MT7623 family. These have dual GMAC. Depending on the exact version, there might be a built-in Gigabit switch (MT7530). The core does not have the typical DMA ring setup. Instead there is a linked list that we add descriptors to. There is only one linked list that both MACs use together. There is a special field inside the TX descriptors called the VQID. This allows us to assign packets to different internal queues. By using a separate id for each MAC we are able to get deterministic results for BQL. Additionally we need to provide the core with a block of scratch memory that is the same size as the RX ring and data buffer. This is really needed to make the HW datapath work. Although the driver does not support this yet, we still need to assign the memory and tell the core about it for RX to work. Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1807 +++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 421 +++++++ 2 files changed, 2228 insertions(+) commit 58ff9865b75dab73ccfae89bc8313ca2497b4c8f Author: John Crispin Date: Tue Mar 8 11:29:54 2016 +0100 net-next: mediatek: document MediaTek SoC ethernet binding This adds the binding documentation for the MediaTek Ethernet controller. Signed-off-by: John Crispin Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller .../devicetree/bindings/net/mediatek-net.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 04761890a7cec6a1ff9aafd909004da4fe8059db Author: Neil Armstrong Date: Tue Mar 8 10:36:20 2016 +0100 net: dsa: Fix cleanup resources upon module removal The initial commit badly merged into the dsa_resume method instead of the dsa_remove_dst method. As consequence, the dst->master_netdev->dsa_ptr is not set to NULL on removal and re-bind of the dsa device fails with error -17. Fixes: b0dc635d923c ("net: dsa: cleanup resources upon module removal ") Signed-off-by: Neil Armstrong Acked-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 88f09bd5b9875a0fbf2075221590d9c4418cdbbc Author: Manish Chopra Date: Tue Mar 8 04:09:44 2016 -0500 qede: Fix net-next "make ARCH=x86_64" 'commit 55482edc25f0606851de42e73618f813f310d009 ("qede: Add slowpath/fastpath support and enable hardware GRO")' introduces below error when compiling net-next with "make ARCH=x86_64" drivers/built-in.o: In function `qede_rx_int': qede_main.c:(.text+0x6101a0): undefined reference to `tcp_gro_complete' Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e49038d6ee4c4dcd1e5cd6c8f4addaf9768e21e4 Merge: b795a21 819bfe7 Author: David S. Miller Date: Thu Mar 10 16:15:54 2016 -0500 Merge branch 'qlcnic-next' Rajesh Borundia says: ==================== qlcnic fixes This series adds following fixes. o While processing mailbox if driver gets a spurious mailbox interrupt it leads into premature completion of a next mailbox request. Added a guard against this by checking current state of mailbox and ignored spurious interrupt. Added a stats counter to record this condition. v2: o Added patch that removes usage of atomic_t as we are not implemeting atomicity by using atomic_t value. ==================== Signed-off-by: David S. Miller commit 819bfe764dceec2f6b4551768453f374b4c60443 Author: Rajesh Borundia Date: Tue Mar 8 02:39:58 2016 -0500 qlcnic: Fix mailbox completion handling during spurious interrupt o While the driver is in the middle of a MB completion processing and it receives a spurious MB interrupt, it is mistaken as a good MB completion interrupt leading to premature completion of the next MB request. Fix the driver to guard against this by checking the current state of MB processing and ignore the spurious interrupt. Also added a stats counter to record this condition. Signed-off-by: Rajesh Borundia Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 15 +++++++++++---- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) commit 5bf93251cee1fb66141d1d2eaff86e04a9397bdf Author: Rajesh Borundia Date: Tue Mar 8 02:39:57 2016 -0500 qlcnic: Remove unnecessary usage of atomic_t o atomic_t usage is incorrect as we are not implementing any atomicity. Signed-off-by: Rajesh Borundia Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) commit b795a213a40f55f52468940f49a11dabb772291d Merge: 5220ef1 a8d16d0 Author: David S. Miller Date: Thu Mar 10 16:12:25 2016 -0500 Merge branch 'cxgb4-next' Hariprasad Shenai says: ==================== cxgb4vf: Interrupt and queue configuration changes This series fixes some issues and some changes in the queue and interrupt configuration for cxgb4vf driver. We need to enable interrupts before we register our network device, so that we don't loose link up interrupts. Allocate rx queues based on interrupt type. Set number of tx/rx queues in probe function only. Also adds check for some invalid configurations. This patch series has been created against net-next tree and includes patches on cxgb4vf driver. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ==================== Signed-off-by: David S. Miller commit a8d16d08065f8d3f2fca4a4c377fc4bfc5bdfccd Author: Hariprasad Shenai Date: Tue Mar 8 10:50:20 2016 +0530 cxgb4vf: Set number of queues in pci probe only Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 28f71c6df4c5399e4f30ce37c1fff0f6af3d364d Author: Hariprasad Shenai Date: Tue Mar 8 10:50:19 2016 +0530 cxgb4vf: Add a couple more checks for invalid provisioning configurations Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 495c22bbb2b03548f6aa870faa7f6b601cb41c85 Author: Hariprasad Shenai Date: Tue Mar 8 10:50:18 2016 +0530 cxgb4vf: Configure queue based on resource and interrupt type The Queue Set Configuration code was always reserving room for a Forwarded interrupt Queue even in the cases where we weren't using it. Figure out how many Ports and Queue Sets we can support. This depends on knowing our Virtual Function Resources and may be called a second time if we fall back from MSI-X to MSI Interrupt Mode. This change fixes that problem. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 165 ++++++++++++--------- 1 file changed, 94 insertions(+), 71 deletions(-) commit 84f670189b8c0dfd3dbaf12da8c946225f4011d3 Author: Hariprasad Shenai Date: Tue Mar 8 10:50:17 2016 +0530 cxgb4vf: Enable interrupts before we register our network devices This avoids a race condition where a system that has network devices set up to be automatically configured and we get the first Port Link Status message from the firmware on the Asynchronous Firmware Event Queue before we've enabled interrupts. If that happens, we end up losing the interrupt and never realizing that the links has actually come up. Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) commit 5220ef1e39577fbe20989e97eac708d8896966f3 Author: Vivien Didelot Date: Mon Mar 7 18:24:52 2016 -0500 net: dsa: mv88e6xxx: avoid writing the same mode There is no need to change the 802.1Q port mode for the same value. Thus avoid such message: [ 401.954836] dsa dsa@0 lan0: 802.1Q Mode: Disabled (was Disabled) Signed-off-by: Vivien Didelot Tested-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 5da96031834a65e064b97c8d9f7df958c818a4cc Author: Vivien Didelot Date: Mon Mar 7 18:24:39 2016 -0500 net: dsa: mv88e6xxx: read then write PVID The port register 0x07 contains more options than just the default VID, even though they are not used yet. So prefer a read then write operation over a direct write. This also allows to keep track of the change through dynamic debug. Signed-off-by: Vivien Didelot Tested-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 2d9deae4aedee2be2205e22440ac357c37013658 Author: Vivien Didelot Date: Mon Mar 7 18:24:17 2016 -0500 net: dsa: mv88e6xxx: rework port state setter Apply a few non-functional changes on the port state setter: * add a dynamic debug message with state names to track changes * explicit states checking instead of assuming their numeric values * lock mutex only once when changing several port states * use bitmap macros to declare and access port_state_update_mask Signed-off-by: Vivien Didelot Tested-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 54 +++++++++++++++++++++++++++------------------ drivers/net/dsa/mv88e6xxx.h | 2 +- 2 files changed, 34 insertions(+), 22 deletions(-) commit 2a5a259f9757250dc786e2091759155a868179ae Merge: f720d0c d0ba913 Author: David S. Miller Date: Thu Mar 10 16:06:49 2016 -0500 Merge branch 'sh_eth-fixes' Sergei Shtylyov says: ==================== sh_eth: fix couple of bugs in sh_eth_ring_format() Here's a set of 2 patches against DaveM's 'net.git' repo fixing two bugs in sh_eth_.ring_format()... [1/2] sh_eth: fix NULL pointer dereference in sh_eth_ring_format() [2/2] sh_eth: advance 'rxdesc' later in sh_eth_ring_format() ==================== Signed-off-by: David S. Miller commit d0ba913488dc8c55d1880f5ed34f096dc45fb05d Author: Sergei Shtylyov Date: Tue Mar 8 01:37:09 2016 +0300 sh_eth: advance 'rxdesc' later in sh_eth_ring_format() Iff dma_map_single() fails, 'rxdesc' should point to the last filled RX descriptor, so that it can be marked as the last one, however the driver would have already advanced it by that time. In order to fix that, only fill an RX descriptor once all the data for it is ready. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 Author: Sergei Shtylyov Date: Tue Mar 8 01:36:28 2016 +0300 sh_eth: fix NULL pointer dereference in sh_eth_ring_format() In a low memory situation, if netdev_alloc_skb() fails on a first RX ring loop iteration in sh_eth_ring_format(), 'rxdesc' is still NULL. Avoid kernel oops by adding the 'rxdesc' check after the loop. Reported-by: Wolfram Sang Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2c2c5c5cd213aea38c850bb6edc9b7f77f29802f Author: Jon Derrick Date: Wed Feb 24 10:06:37 2016 -0700 x86/PCI: VMD: Attach VMD resources to parent domain's resource tree Attach the new VMD domain's resources to the VMD device's resources. This allows /proc/iomem to display a more complete picture. Before: c0000000-c1ffffff : 0000:5d:05.5 c2000000-c3ffffff : 0000:5d:05.5 c2010000-c2013fff : nvme c4000000-c40fffff : 0000:5d:05.5 After: c0000000-c1ffffff : 0000:5d:05.5 c2000000-c3ffffff : 0000:5d:05.5 c2000000-c3ffffff : VMD MEMBAR1 c2000000-c22fffff : PCI Bus 10000:01 c2000000-c200ffff : 10000:01:00.0 c2010000-c2013fff : 10000:01:00.0 c2010000-c2013fff : nvme c2300000-c24fffff : PCI Bus 10000:01 c4000000-c40fffff : 0000:5d:05.5 c4002000-c40fffff : VMD MEMBAR2 Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch arch/x86/pci/vmd.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d068c350c0486ba9011abb6f91cdc0c12b522155 Author: Keith Busch Date: Wed Mar 2 15:31:04 2016 -0700 x86/PCI: VMD: Set bus resource start to 0 The bus always starts at 0. Due to alignment and down-casting, this happened to work before, but looked alarmingly incorrect in kernel logs. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas arch/x86/pci/vmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83cc54a608b66d3fffa7355503263d20f491bb44 Author: Keith Busch Date: Wed Mar 2 15:31:03 2016 -0700 x86/PCI: VMD: Document code for maintainability Comment the less obvious portion of the code for setting up memory windows, and the platform dependency for initializing the h/w with appropriate resources. Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas arch/x86/pci/vmd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 5adecf817dd630529d6565a242141db2df3239f7 Author: Alex Williamson Date: Mon Feb 22 13:05:48 2016 -0700 PCI: Wait for up to 1000ms after FLR reset Some devices take longer than the spec indicates to return from FLR reset, a notable case of this is Intel integrated graphics (IGD), which can often take an additional 300ms powering down an attached LCD panel as part of the FLR. Allow devices up to 1000ms, testing every 100ms whether the second dword of config space is read as -1. Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit c1678ffcdea25afe4fbbebfab13d65a7db5458fb Author: Joao Pinto Date: Thu Mar 10 14:44:13 2016 -0600 ARC: Add PCI support Add PCI support to ARC and update drivers/pci Makefile enabling the ARC arch to use the generic PCI setup functions. [bhelgaas: fold in Joao's pci-dma-compat.h & pci-bridge.h build fix (I should have caught this myself, sorry] Signed-off-by: Joao Pinto Signed-off-by: Bjorn Helgaas Acked-by: Vineet Gupta arch/arc/Kconfig | 26 ++++++++++++++++++++++++++ arch/arc/include/asm/dma.h | 5 +++++ arch/arc/include/asm/io.h | 9 +++++++++ arch/arc/include/asm/pci.h | 28 ++++++++++++++++++++++++++++ arch/arc/kernel/Makefile | 1 + arch/arc/kernel/pcibios.c | 22 ++++++++++++++++++++++ arch/arc/plat-axs10x/Kconfig | 1 + drivers/pci/Makefile | 1 + 8 files changed, 93 insertions(+) commit e4e666ba74d4f6eff04d3c567b9f2d50a46837e4 Author: Xiangliang Yu Date: Thu Mar 10 19:34:52 2016 +0800 i2c: designware: Add device HID for future AMD I2C controller Add device HID AMDI0010 to match the AMD ACPI Vendor ID (AMDI) that was registered in http://www.uefi.org/acpi_id_list, and the I2C controller on future AMD paltform will use the HID instead of AMD0010. Signed-off-by: Xiangliang Yu Acked-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 1 + drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 2 files changed, 2 insertions(+) commit 0d67e0fa1664ad6aaba0552e170608bafb4b6196 Author: Heikki Krogerus Date: Thu Mar 10 13:03:18 2016 +0200 device property: fix for a case of use-after-free In device_remove_property_set(), the secondary fwnode needs to be cleared before the pset is freed. This fixes a use-after-free when a property set is providing the primary fwnode. As a result of the fix, the primary fwnode may end up containing ERR_PTR(-ENODEV), so also adding checks for it to the property handling code. Reported-by: John Youn Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 5508df89756f8378024828e185724a9bd2348985 Author: Lv Zheng Date: Thu Mar 10 10:54:29 2016 +0800 ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support It is reported that the following commit triggers regressions: Linux commit: efaed9be998b5ae0afb7458e057e5f4402b43fa0 ACPICA commit: 31178590dde82368fdb0f6b0e466b6c0add96c57 Subject: ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages This is because that the ECDT support is not corrected in Linux, and Linux requires to execute _REG for ECDT (though this sounds so wrong), we need to ensure acpi_gbl_namespace_initialized is set before ECDT probing in order for _REG to be executed. Since we have to move "acpi_gbl_namespace_initialized = TRUE" to the initialization step happening before ECDT probing, acpi_load_tables() is the best candidate for now. Thus this patch fixes the regression by doing so. But if the ECDT support is fixed, Linux will not execute _REG for ECDT, and ECDT probing will happen before acpi_load_tables(). At that time, we still want to ensure acpi_gbl_namespace_initialized is set after executing acpi_ns_initialize_objects() (under the condition of acpi_gbl_group_module_level_code = FALSE), this patch also moves acpi_ns_initialize_objects() to acpi_load_tables() accordingly. Since acpi_ns_initialize_objects() doesn't seem to be skippable, this patch also removes ACPI_NO_OBJECT_INIT for the one invoked in acpi_load_tables(). And since the default region handlers should always be installed before loading the tables, this patch also removes useless acpi_gbl_group_module_level_code check accordingly. Reported by Chris Bainbridge, Fixed by Lv Zheng. Fixes: efaed9be998b (ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages) Reported-and-tested-by: Chris Bainbridge Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsinit.c | 2 ++ drivers/acpi/acpica/tbxfload.c | 26 ++++++++++++++++++------- drivers/acpi/acpica/utxfinit.c | 43 +++++++++++------------------------------- 3 files changed, 32 insertions(+), 39 deletions(-) commit 7c20078a8197389eead62399419fdc4f8ac4a8a3 Author: Babu Moger Date: Mon Feb 15 09:42:02 2016 +0100 PCI: Prevent VPD access for buggy devices On some devices, reading or writing VPD causes a system panic. This can be easily reproduced by running "lspci -vvv" or "cat /sys/bus/devices/XX../vpd". Blacklist these devices so we don't access VPD data at all. [bhelgaas: changelog, comment, drop pci/access.c changes] Link: https://bugzilla.kernel.org/show_bug.cgi?id=110681 Tested-by: Shane Seymour Tested-by: Babu Moger Signed-off-by: Babu Moger Signed-off-by: Hannes Reinecke Signed-off-by: Bjorn Helgaas Cc: Alexander Duyck drivers/pci/quirks.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit c521b014cd51da94ae16c3decf1c407c3e0518f6 Author: Bjorn Helgaas Date: Mon Feb 22 14:58:18 2016 -0600 PCI: Sleep rather than busy-wait for VPD access completion Use usleep_range() instead of udelay() while waiting for a VPD access to complete. This is not a performance path, so no need to hog the CPU. Rationale for usleep_range() parameters: We clear PCI_VPD_ADDR_F for a read (or set it for a write), then wait for the device to change it. For a device that updates PCI_VPD_ADDR between our config write and subsequent config read, we won't sleep at all and can get the device's maximum rate. Sleeping a minimum of 10 usec per 4-byte access limits throughput to about 400Kbytes/second. VPD is small (32K bytes at most), and most devices use only a fraction of that. We back off exponentially up to 1024 usec per iteration. If we reach 1024, we've already waited up to 1008 usec (16 + 32 + ... + 512), so if we miss an update and wait an extra 1024 usec, we can still get about 1/2 of the device's maximum rate. Tested-by: Shane Seymour Tested-by: Babu Moger Signed-off-by: Bjorn Helgaas Reviewed-by: Hannes Reinecke drivers/pci/access.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 2a58c527bb566b7abad96289fa5b973040c33c82 Author: Thomas Gleixner Date: Thu Mar 10 20:42:08 2016 +0100 cpu/hotplug: Fix smpboot thread ordering Commit 931ef163309e moved the smpboot thread park/unpark invocation to the state machine. The move of the unpark invocation was premature as it depends on work in progress patches. As a result cpu down can fail, because rcu synchronization in takedown_cpu() eventually requires a functional softirq thread. I never encountered the problem in testing, but 0day testing managed to provide a reliable reproducer. Remove the smpboot_threads_park() call from the state machine for now and put it back into the original place after the rcu synchronization. I'm embarrassed as I knew about the dependency and still managed to get it wrong. Hotplug induced brain melt seems to be the only sensible explanation for that. Fixes: 931ef163309e "cpu/hotplug: Unpark smpboot threads from the state machine" Reported-by: Fengguang Wu Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra kernel/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0ab1ace856205d10cbc1924b2d931c01ffd216a6 Author: Takashi Iwai Date: Thu Mar 10 20:56:20 2016 +0100 ALSA: pcm: Avoid "BUG:" string for warnings again The commit [d507941beb1e: ALSA: pcm: Correct PCM BUG error message] made the warning prefix back to "BUG:" due to its previous wrong prefix. But a kernel message containing "BUG:" seems taken as an Oops message wrongly by some brain-dead daemons, and it annoys users in the end. Instead of teaching daemons, change the string again to a more reasonable one. Fixes: 507941beb1e ('ALSA: pcm: Correct PCM BUG error message') Cc: # v3.19+ Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 206cab651d07563d766c7f4cb73f858c5df3dec5 Author: Andi Kleen Date: Thu Mar 3 15:57:37 2016 -0800 perf stat: Add --metric-only support for -A Add metric only support for -A too. This requires a new print function that prints the metrics in the right order. v2: Fix manpage v3: Simplify nrcpus computation Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/1457049458-28956-7-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 2 +- tools/perf/builtin-stat.c | 45 ++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 9 deletions(-) commit 54b5091606c18f68a7fc8b4ab03ac4592c7d2922 Author: Andi Kleen Date: Thu Mar 3 15:57:36 2016 -0800 perf stat: Implement --metric-only mode Add a new mode to only print metrics. Sometimes we don't care about the raw values, just want the computed metrics. This allows more compact printing, so with -I each sample is only a single line. This also allows easier plotting and processing with other tools. The main target is with using --topdown, but it also works with -T and standard perf stat. A few metrics are not supported. To avoiding having to hardcode all the metrics in the code it uses a two pass approach: first compute dummy metrics and only print the headers in the print_metric callback. Then use the callback to print the actual values. There are some additional changes in the stat printout code to handle all metrics being on a single line. One issue is that the column code doesn't know in advance what events are not supported by the CPU, and it would be hard to find out as this could change based on dynamic conditions. That causes empty columns in some cases. The output can be fairly wide, often you may need more than 80 columns. Example: % perf stat -a -I 1000 --metric-only 1.001452803 frontend cycles idle insn per cycle stalled cycles per insn branch-misses of all branches 1.001452803 158.91% 0.66 2.39 2.92% 2.002192321 180.63% 0.76 2.08 2.96% 3.003088282 150.59% 0.62 2.57 2.84% 4.004369835 196.20% 0.98 1.62 3.79% 5.005227314 231.98% 0.84 1.90 4.71% v2: Lots of updates. v3: Use slightly narrower columns v4: Add comment Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/1457049458-28956-6-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 4 + tools/perf/builtin-stat.c | 211 +++++++++++++++++++++++++++++++-- 2 files changed, 205 insertions(+), 10 deletions(-) commit 6b45f7b2a37b0e00693985fd0abfc8e0319f91ce Author: Andi Kleen Date: Thu Mar 3 15:57:35 2016 -0800 perf stat: Document CSV format in manpage With all the recently added fields in the perf stat CSV output we should finally document them in the man page. Do this here. v2: Fix fields in documentation (Jiri) v3: fix order of fields again (Jiri) v4: Change order again. v5: Document more fields (Jiri) v6: Move time stamp first v7: More fixes (Jiri) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/1457049458-28956-5-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 599a2f38a989a79df99838f22cb607f5e2b5b56c Author: Namhyung Kim Date: Wed Mar 9 23:20:53 2016 +0900 perf hists browser: Check sort keys before hot key actions The context menu in TUI hists browser checks corresponding sort keys when creating the menu item. But hotkey actions lacks these checks so it can filter using incorrect info. For example, default sort key of 'perf top' doesn't contain 'comm' or 'pid' sort key so each hist entry's thread info is not reliable. Thus it should prohibit using thread filter on 't' key. Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1457533253-21419-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6962ccb37b50366014074aec6fd14497cf719642 Author: Namhyung Kim Date: Thu Mar 10 00:14:50 2016 +0900 perf hists browser: Allow thread filtering for comm sort key The commit 2eafd410e669 ("perf hists browser: Only 'Zoom into thread' only when sort order has 'pid'") disabled thread filtering in hist browser for the default sort key. However the he->thread is still valid even if 'pid' sort key is not given. Only thing it should not use is the pid (or tid) of the thread. So allow to filter by thread when 'comm' sort key is given and show pid only if 'pid' sort key is given. Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1457536490-24084-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 078b8d4a406fa8ce4a3c9d5145c27be1ed2b1dfd Author: Namhyung Kim Date: Wed Mar 9 23:20:51 2016 +0900 perf tools: Add sort__has_comm variable The sort__has_comm variable is to check whether the comm sort key is given. This is necessary to support thread filtering in the TUI hists browser later. Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1457533253-21419-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 3 +++ tools/perf/util/sort.h | 1 + 2 files changed, 4 insertions(+) commit f7fb538afea55383a9383dac5c56887c601af5f4 Author: Namhyung Kim Date: Wed Mar 9 22:47:02 2016 +0900 perf tools: Recalc total periods using top-level entries in hierarchy When hierarchy mode is enabled, each entry in a hierarchy level shares the period. IOW an upper level entry's period is the sum of lower level entries. Thus perf uses only one of them to calculate the total period of hists. It was lowest-level (leaf) entries but it has a problem when it comes to filters. If a filter is applied, entries in the same level will be filtered or not. But upper level entries still have period of their sum including filtered one. So total sum of upper level entries will not be same as sum of lower level entries. This resulted in entries having more than 100% of overhead and it can be produced using perf top with filter(s). Reported-and-Tested-by: Jiri Olsa Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-8-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) commit 86e3ee5224c17b7967aac39aa15539393c144de7 Author: Namhyung Kim Date: Wed Mar 9 22:47:01 2016 +0900 perf tools: Remove nr_sort_keys field The nr_sort_keys field is to carry the number of sort entries in a hpp_list or hists to determine the depth of indentation of a hist entry. As it's only used in hierarchy mode and now we have used nr_hpp_node for this reason, there's no need to keep it anymore. Let's get rid of it. Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/hist.c | 3 --- tools/perf/util/hist.h | 2 -- tools/perf/util/sort.c | 26 -------------------------- 3 files changed, 31 deletions(-) commit 325a62834e81452d2a6e253444022cf493bbabfc Author: Namhyung Kim Date: Wed Mar 9 22:47:00 2016 +0900 perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry() The hist_browser__fprintf_hierarchy_entry() if to dump current output into a file so it needs to be sync-ed with the corresponding function hist_browser__show_hierarchy_entry(). So use hists->nr_hpp_node to indent width and use first fmt_node to print overhead columns instead of checking whether it's a sort entry (or dynamic entry). Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-6-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit a5acbfbd70bc6a0cd4c8ca8f4f5e52ac3ee7dca4 Merge: edd4a89 adaf9fc Author: Rafael J. Wysocki Date: Thu Mar 10 20:46:03 2016 +0100 Merge branch 'pm-cpufreq-governor' into pm-cpufreq commit a515d8ff7085d5e9fde867f2048b8da36b95dc51 Author: Namhyung Kim Date: Wed Mar 9 22:46:59 2016 +0900 perf tools: Remove hist_entry->fmt field It's not used anymore and the output format is accessed by the hpp_list pointer instead when hierarchy is enabled. Let's get rid of it. Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-5-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.h | 1 - 1 file changed, 1 deletion(-) commit aec13a7ec78d9322a348fb26940097b0bdfef1bd Author: Namhyung Kim Date: Wed Mar 9 22:46:58 2016 +0900 perf tools: Fix command line filters in hierarchy mode When a command-line filter is applied in hierarchy mode, output is broken especially when filtering on lower level. The higher level entries doesn't show up so it's hard to see the results. Also it needs to handle multi sort keys in a single hierarchy level. Before: $ perf report --hierarchy -s 'cpu,{dso,comm}' --comms swapper --stdio ... # Overhead CPU / Shared Object+Command # ........... ........................... # 13.79% [kernel.vmlinux] swapper 31.71% 000 13.80% [kernel.vmlinux] swapper 0.43% [e1000e] swapper 11.89% [kernel.vmlinux] swapper 9.18% [kernel.vmlinux] swapper After: # Overhead CPU / Shared Object+Command # ........... ............................... # 33.09% 003 13.79% [kernel.vmlinux] swapper 31.71% 000 13.80% [kernel.vmlinux] swapper 0.43% [e1000e] swapper 21.90% 002 11.89% [kernel.vmlinux] swapper 13.30% 001 9.18% [kernel.vmlinux] swapper Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 3 deletions(-) commit 4945cf2aa1ed61994c158f22f26ea6101059a8d4 Author: Namhyung Kim Date: Wed Mar 9 22:46:57 2016 +0900 perf tools: Add more sort entry check functions Those functions are for checkinf if a given perf_hpp_fmt is a filter-related sort entry. With hierarchy mode, it needs to check filters on the hist entries with its own hpp format list. Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.h | 4 ++++ tools/perf/util/sort.c | 50 +++++++++++++++++++------------------------------- 2 files changed, 23 insertions(+), 31 deletions(-) commit f4954cfb1cda4cf0abf36d23213c702e94666c3f Author: Namhyung Kim Date: Wed Mar 9 22:46:56 2016 +0900 perf tools: Fix hist_entry__filter() for hierarchy When hierarchy mode is enabled each output format is in a separate hpp list. So when applying a filter it should check all formats in the list. Currently it only checks a single ->fmt field which was not set properly. Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit adaf9fcd136970e480d7ca834c0cf25ce922ea74 Author: Rafael J. Wysocki Date: Thu Mar 10 20:44:47 2016 +0100 cpufreq: Move scheduler-related code to the sched directory Create cpufreq.c under kernel/sched/ and move the cpufreq code related to the scheduler to that file and to sched.h. Redefine cpufreq_update_util() as a static inline function to avoid function calls at its call sites in the scheduler code (as suggested by Peter Zijlstra). Also move the definition of struct update_util_data and declaration of cpufreq_set_update_util_data() from include/linux/cpufreq.h to include/linux/sched.h. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) drivers/cpufreq/cpufreq.c | 53 -------------------------------------- drivers/cpufreq/cpufreq_governor.c | 1 + include/linux/cpufreq.h | 34 ------------------------ include/linux/sched.h | 9 +++++++ kernel/sched/Makefile | 1 + kernel/sched/cpufreq.c | 37 ++++++++++++++++++++++++++ kernel/sched/sched.h | 49 ++++++++++++++++++++++++++++++++++- 7 files changed, 96 insertions(+), 88 deletions(-) commit f720d0caa0af2c33ad15310974c7320345ab4468 Author: Arnd Bergmann Date: Thu Mar 10 19:31:12 2016 +0100 kcm: mark helper functions inline The stub helper functions for the newly added kcm_proc_init/exit interfaces are defined as 'static' in a header file, which leads to build warnings for each file that includes them without calling them: include/net/kcm.h:183:12: error: 'kcm_proc_init' defined but not used [-Werror=unused-function] include/net/kcm.h:184:13: error: 'kcm_proc_exit' defined but not used [-Werror=unused-function] This marks the two functions as 'static inline' instead, which avoids the warnings and is obviously what was meant here. Signed-off-by: Arnd Bergmann Fixes: cd6e111bf5be ("kcm: Add statistics and proc interfaces") Signed-off-by: David S. Miller include/net/kcm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e12b202f8fb9b62a3997cad8e93401f85293390c Author: Jiri Olsa Date: Thu Mar 10 17:41:13 2016 +0100 perf jitdump: Build only on supported archs Build jitdump only on architectures defined in util/genelf.h file, to avoid breaking the build on such arches. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Borislav Petkov Cc: Colin Ian King Cc: David Ahern Cc: Davidlohr Bueso Cc: He Kuang Cc: Mel Gorman Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/20160310164113.GA11357@krava.redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/Makefile | 1 + tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/powerpc/Makefile | 1 + tools/perf/arch/x86/Makefile | 1 + tools/perf/builtin-inject.c | 12 +++++++----- tools/perf/config/Makefile | 7 +++++++ tools/perf/util/Build | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) commit 9eb42dee2b11635174c74a7996934b6ca18f2179 Author: Steven Rostedt Date: Fri Feb 26 18:13:28 2016 -0500 tools lib traceevent: Add '~' operation within arg_num_eval() When evaluating values for print flags, if the value included a '~' operator, the parsing would fail. This broke kmalloc's parsing of: __print_flags(REC->gfp_flags, "|", {(unsigned long)((((((( gfp_t)(0x400000u|0x2000000u)) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u)) | (( gfp_t)0x02u)) | (( gfp_t)0x08u)) | (( gfp_t)0x4000u) | (( gfp_t)0x10000u) | (( gfp_t)0x1000u) | (( gfp_t)0x200u)) & ~(( gfp_t)0x2000000u)) ^ | here Signed-off-by: Steven Rostedt Reported-by: Arnaldo Carvalho de Melo Tested-by: David Ahern Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20160226181328.22f47129@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c76b78d8ec05a247975542061df3f1321783f98d Author: Archit Taneja Date: Wed Feb 3 14:29:50 2016 +0530 mtd: nand: Qualcomm NAND controller driver The Qualcomm NAND controller is found in SoCs like IPQ806x, MSM7xx, MDM9x15 series. It exists as a sub block inside the IPs EBI2 (External Bus Interface 2) and QPIC (Qualcomm Parallel Interface Controller). These IPs provide a broader interface for external slow peripheral devices such as LCD and NAND/NOR flash memory or SRAM like interfaces. We add support for the NAND controller found within EBI2. For the SoCs of our interest, we only use the NAND controller within EBI2. Therefore, it's safe for us to assume that the NAND controller is a standalone block within the SoC. The controller supports 512B, 2kB, 4kB and 8kB page 8-bit and 16-bit NAND flash devices. It contains a HW ECC block that supports BCH ECC (4, 8 and 16 bit correction/step) and RS ECC(4 bit correction/step) that covers main and spare data. The controller contains an internal 512 byte page buffer to which we read/write via DMA. The EBI2 type NAND controller uses ADM DMA for register read/write and data transfers. The controller performs page reads and writes at a codeword/step level of 512 bytes. It can support up to 2 external chips of different configurations. The driver prepares register read and write configuration descriptors for each codeword, followed by data descriptors to read or write data from the controller's internal buffer. It uses a single ADM DMA channel that we get via dmaengine API. The controller requires 2 ADM CRCIs for command and data flow control. These are passed via DT. The ecc layout used by the controller is syndrome like, but we can't use the standard syndrome ecc ops because of several reasons. First, the amount of data bytes covered by ecc isn't same in each step. Second, writing to free oob space requires us writing to the entire step in which the oob lies. This forces us to create our own ecc ops. One more difference is how the controller accesses the bad block marker. The controller ignores reading the marker when ECC is enabled. ECC needs to be explicity disabled to read or write to the bad block marker. The nand_bbt helpers library hence can't access BBMs for the controller. For now, we skip the creation of BBT and populate chip->block_bad and chip->block_markbad helpers instead. Reviewed-by: Andy Gross Signed-off-by: Stephen Boyd Signed-off-by: Archit Taneja Reviewed-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/Kconfig | 7 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/qcom_nandc.c | 2223 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2231 insertions(+) commit 438524c60fa21afb7920b6b16c39c9bf139b56a8 Author: Archit Taneja Date: Wed Feb 3 14:29:51 2016 +0530 dt/bindings: qcom_nandc: Add DT bindings Add DT bindings document for the Qualcomm NAND controller driver. Reviewed-by: Boris Brezillon Acked-by: Rob Herring Signed-off-by: Archit Taneja Signed-off-by: Brian Norris .../devicetree/bindings/mtd/qcom_nandc.txt | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 9f3e04297b08212ef43fce4f167e01f40a98d243 Author: Archit Taneja Date: Wed Feb 3 14:29:49 2016 +0530 mtd: nand: don't select chip in nand_chip's block_bad op One of the arguments passed to struct nand_chip's block_bad op is 'getchip', which, if true, is supposed to get and select the nand device, and later unselect and release the device. This op is intended to be replaceable by drivers. The drivers shouldn't be responsible for selecting/unselecting chip. Like other ops, the chip should already be selected before the block_bad op is called. Remove the getchip argument from the block_bad op and nand_block_checkbad. Move the chip selection to nand_block_isbad, since it is the only caller to nand_block_checkbad which requires chip selection. Modify nand_block_bad (the default function for the op) such that it doesn't select the chip. Remove the getchip argument from the bad_block funcs in cafe_nand, diskonchip and docg4 drivers. Reviewed-by: Boris Brezillon Signed-off-by: Archit Taneja Signed-off-by: Brian Norris drivers/mtd/nand/cafe_nand.c | 2 +- drivers/mtd/nand/diskonchip.c | 2 +- drivers/mtd/nand/docg4.c | 2 +- drivers/mtd/nand/nand_base.c | 41 +++++++++++++++++++---------------------- include/linux/mtd/nand.h | 2 +- 5 files changed, 23 insertions(+), 26 deletions(-) commit 9c176cec42e4b0deeed901fc363bf4235c5ca96a Author: Johan Hedberg Date: Wed Mar 9 17:52:24 2016 +0200 Bluetooth: Increment management interface revision Increment the mgmt revision due to the recently added limited privacy mode. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82a37adeedd38880940e2772ec1ae27a09353e5a Author: Johan Hedberg Date: Wed Mar 9 17:30:34 2016 +0200 Bluetooth: Add support for limited privacy mode Introduce a limited privacy mode indicated by value 0x02 to the mgmt Set Privacy command. With value 0x02 the kernel will use privacy mode with a resolvable private address. In case the controller is bondable and discoverable the identity address will be used. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_conn.c | 13 ++++++++++-- net/bluetooth/hci_request.c | 51 +++++++++++++++++++++++++++++++++++++++------ net/bluetooth/hci_request.h | 2 +- net/bluetooth/mgmt.c | 20 ++++++++++++++++-- 5 files changed, 76 insertions(+), 11 deletions(-) commit d43efbd0d545f476be0bbef30cbe18234f8a9631 Author: Johan Hedberg Date: Wed Mar 9 17:30:33 2016 +0200 Bluetooth: Fix adding discoverable to adv instance flags When lookup up the advertising instance flags for the default advertising instance (0) the discoverable flag should be filled in based on the HCI_DISCOVERABLE flag. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_request.c | 3 +++ 1 file changed, 3 insertions(+) commit eec7a01dc8366f7e43fc0417f4aee70eaeaca9a9 Author: Johan Hedberg Date: Wed Mar 9 17:30:32 2016 +0200 Bluetooth: Move memset closer to where it's needed Minor fix to not do the memset until the variable it clears is actually used. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_conn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a01242dc7fc4d5fe3f722afbf35b33aa414cd2f Author: Wei-Ning Huang Date: Tue Mar 8 11:40:06 2016 +0800 Bluetooth: btmrvl_sdio: fix firmware activation failure In some case, the btmrvl_sdio firmware would fail to active within the polling time. Increase the polling interval to 100 msec to fix the issue. Signed-off-by: Wei-Ning Huang Signed-off-by: Wei-Ning Huang Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24c4a81d765738655f94d242eb821cb26e6c143a Author: Alexander Aring Date: Mon Mar 7 20:07:31 2016 +0100 6lowpan: iphc: fix SAM/DAM bit comment This patch fixes the comments for SAM/DAM value. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann net/6lowpan/iphc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6aaf37b41a37b184e509aa3ec29d96b7712dfd43 Author: Alexander Aring Date: Fri Mar 4 10:10:21 2016 +0100 6lowpan: debugfs: add missing static This patch solves the sparse warning: net/6lowpan/debugfs.c:164:30: warning: symbol 'lowpan_ctx_pfx_fops' was not declared. Should it be static? net/6lowpan/debugfs.c:241:30: warning: symbol 'lowpan_context_fops' was not declared. Should it be static? Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann net/6lowpan/debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f16089209e1029d45ae78dd238b6ab9b2c9a886c Author: Alexander Aring Date: Fri Mar 4 10:10:20 2016 +0100 mac802154: use put and get unaligned functions This patch removes the swap pointer and memmove functionality. Instead we use the well known put/get unaligned access with specific byte order handling. Signed-off-by: Alexander Aring Suggested-by: Marc Kleine-Budde Signed-off-by: Marcel Holtmann include/net/mac802154.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 75c6aca4765dbe3d0c1507ab5052f2e373dc2331 Author: Dmitry Tunin Date: Fri Mar 4 01:32:19 2016 +0300 Bluetooth: btusb: Add a new AR3012 ID 13d3:3472 T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 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=3472 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb BugLink: https://bugs.launchpad.net/bugs/1552925 Signed-off-by: Dmitry Tunin Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org drivers/bluetooth/ath3k.c | 2 ++ drivers/bluetooth/btusb.c | 1 + 2 files changed, 3 insertions(+) commit c5fd9cbb9dc40e0d273d6731030e65096adceeda Author: Jérôme de Bretagne Date: Thu Mar 3 01:46:28 2016 +0100 Bluetooth: hci_bcm: Add BCM2E55 ACPI ID used in Lenovo ThinkPad Tablet 8 Lenovo ThinkPad Tablet 8 with BCM43241 rev B5 chipset uses the BCM2E55 ACPI ID for Bluetooth. Add it to the list of supported devices. Signed-off-by: Jérôme de Bretagne Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 1 + 1 file changed, 1 insertion(+) commit 764fd639d794a1c0b0d203b19d1bef0451c23fb1 Author: Wiebe, Wladislav (Nokia - DE/Ulm) Date: Fri Nov 13 12:10:05 2015 +0000 pstore: Add support for 64 Bit address space Some architectures have their reserved RAM in 64 Bit address space. Therefore convert mem_address module parameter to ullong. Signed-off-by: Wladislav Wiebe Acked-by: Kees Cook Signed-off-by: Tony Luck fs/pstore/ram.c | 4 ++-- include/linux/pstore_ram.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 798fee48035f0c5fc6787767ff9e27de7e1a4fbb Merge: cdc4e47 e481ab2 Author: David S. Miller Date: Thu Mar 10 12:41:33 2016 -0500 Merge tag 'linux-can-next-for-4.6-20160310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2016-03-10 this is a pull request of 5 patch for net-next/master. Marek Vasut contributes 4 patches for the ifi CAN driver, which makes it work on real hardware. There is one patch by Ramesh Shanmugasundaram for the rcar_can driver that adds support for the 3rd generation IP core. ==================== Signed-off-by: David S. Miller commit 10ee73865e9e4705ba8b3f4d6149e8e68d902bb7 Author: Jianyu Zhan Date: Thu Mar 10 20:19:58 2016 +0800 x86/entry/traps: Show unhandled signal for i386 in do_trap() Commit abd4f7505baf ("x86: i386-show-unhandled-signals-v3") did turn on the showing-unhandled-signal behaviour for i386 for some exception handlers, but for no reason do_trap() is left out (my naive guess is because turning it on for do_trap() would be too noisy since do_trap() is shared by several exceptions). And since the same commit make "show_unhandled_signals" a debug tunable(in /proc/sys/debug/exception-trace), and x86 by default turning it on. So it would be strange for i386 users who turing it on manually and expect seeing the unhandled signal output in log, but nothing. This patch turns it on for i386 in do_trap() as well. Signed-off-by: Jianyu Zhan Reviewed-by: Jan Beulich Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@suse.de Cc: dave.hansen@linux.intel.com Cc: heukelum@fastmail.fm Cc: jbeulich@novell.com Cc: jdike@addtoit.com Cc: joe@perches.com Cc: luto@kernel.org Link: http://lkml.kernel.org/r/1457612398-4568-1-git-send-email-nasa4836@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 2 -- 1 file changed, 2 deletions(-) commit eb1af3b71f9d83e45f2fd2fd649356e98e1c582c Author: Luck, Tony Date: Wed Mar 9 16:40:48 2016 -0800 EDAC/sb_edac: Fix computation of channel address Large memory Haswell-EX systems with multiple DIMMs per channel were sometimes reporting the wrong DIMM. Found three problems: 1) Debug printouts for socket and channel interleave were not interpreting the register fields correctly. The socket interleave field is a 2^X value (0=1, 1=2, 2=4, 3=8). The channel interleave is X+1 (0=1, 1=2, 2=3. 3=4). 2) Actual use of the socket interleave value didn't interpret as 2^X 3) Conversion of address to channel address was complicated, and wrong. Signed-off-by: Tony Luck Acked-by: Aristeu Rozanski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Mauro Carvalho Chehab Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar drivers/edac/sb_edac.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit c14022bfd2eb2d2ece74a405dfbdb02a829c07bc Author: Daniel Bristot de Oliveira Date: Thu Mar 10 14:17:58 2016 -0300 HID: usbhid: enable NO_INIT_REPORTS quirk for Semico USB Keykoard2 The device which identifies itself as a "USB Keykoard" (no typo) with VID:PID 1a2c:0027 does not seem to be handling the reports initialization very well. This results in a "usb_submit_urb(ctrl) failed: -1" message from the kernel when connected, and a delay before its initialization. It can also cause the hang the system. This patch adds the quirk for this device, which causes the delay to disappear. It is named as "USB Keykoard2" because the "USB Keykoard" already exists. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 840f5b0572ea9ddaca2bf5540a171013e92c97bd Author: Shuah Khan Date: Wed Mar 9 19:15:38 2016 -0700 media: au0828 disable tuner to demod link in au0828_media_device_register() Disable tuner to demod link in au0828_media_device_register(). This step should be done after dvb graph is created. [mchehab@osg.samsung.com: Solve conflictst to apply it upstream] Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 26 ++++++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-mc.c | 18 ------------------ 2 files changed, 26 insertions(+), 18 deletions(-) commit 778f2a3c1644bf446c4069477fbdf99b7a40a55a Author: Mauro Carvalho Chehab Date: Sun Mar 6 10:15:24 2016 -0300 [media] touptek: cast char types on %x printk This fixes those two smatch warnings: drivers/media/usb/gspca/touptek.c:206 val_reply() warn: argument 3 to %02x specifier has type 'char' drivers/media/usb/gspca/touptek.c:222 reg_w() warn: argument 4 to %02x specifier has type 'char' Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/touptek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad7220479244e92d7eba2ecc4b3f3e08312fc68f Author: Mauro Carvalho Chehab Date: Sun Mar 6 10:12:32 2016 -0300 [media] touptek: don't DMA at the stack As warned by smatch: drivers/media/usb/gspca/touptek.c:220 reg_w() error: doing dma on the stack (buff) drivers/media/usb/gspca/touptek.c:458 configure() error: doing dma on the stack (buff) This can fail, as the stack may not be in a memory that would allod DMA. So, use the usb_buf instead. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/touptek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eef8fc374c131647ea9eea3301f06f4eee7f51ae Author: Mauro Carvalho Chehab Date: Sun Mar 6 10:00:09 2016 -0300 [media] mceusb: use %*ph for small buffer dumps It makes the printk cleaner. As a side efect, it also fixes those smatch warnings: drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 6 to %02x specifier has type 'char' drivers/media/rc/mceusb.c:590 mceusb_dev_printdata() warn: argument 7 to %02x specifier has type 'char' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 793882bfc31595dad0b54b9da8f43c5434151e03 Merge: 3b8377d d8aacd8 Author: Pablo Neira Ayuso Date: Thu Mar 10 17:32:58 2016 +0100 Merge branch 'master' of git://blackhole.kfki.hu/nf Jozsef Kadlecsik says: ==================== Please apply the next patch against the nf tree: - Deniz Eren reported that parallel flush/dump of list:set type of sets can lead to kernel crash. The bug was due to non-RCU compatible flushing, listing in the set type, fixed by me. - Julia Lawall pointed out that IPSET_ATTR_ETHER netlink attribute length was not checked explicitly. The patch adds the missing checkings. ==================== Signed-off-by: Pablo Neira Ayuso commit 5f66872cbd9c2d8e5230da571aed52d9333a04ae Author: Andrew Shadura Date: Thu Oct 29 16:09:49 2015 +0100 HID: penmount: report only one button for PenMount 6000 USB touchscreen controller PenMount 6000 USB resistive touchscreen controller reports it has three buttons, while in reality it doesn't have any and doesn't support active styli, and only generates touch events. In penmount_input_mapping(), map only the first button (with code 0), ignore the rest. Signed-off-by: Andrew Shadura Tested-by: Christian Gmeiner drivers/hid/hid-penmount.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 079c2652e5af648db6bf4f54bcafdafcc57a0d2c Author: Robert Baldyga Date: Thu Mar 10 15:22:43 2016 +0100 MAINTAINERS: nfc: s3fwrn5: Add second maintainer Add Krzysztof Opasiak as maintainer of S3FWRN5 driver. Signed-off-by: Robert Baldyga Acked-by: Krzysztof Opasiak Signed-off-by: Samuel Ortiz MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f958ee745f70b60d0e41927cab2c073104bc70c2 Merge: 5a5fbdc c54f0d6 Author: Paolo Bonzini Date: Thu Mar 10 17:06:07 2016 +0100 Merge tag 'kvm-s390-next-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixes and features for kvm/next (4.6) part 2 - add watchdog diagnose to trace event decoder - better handle the cpu timer when not inside the guest - only provide STFLE if the CPU model has STFLE - reduce DMA page usage commit 00b7c4ff7d482d287a591f047e0963d494569b46 Author: Christian König Date: Tue Mar 8 14:11:00 2016 +0100 drm/amdgpu: split pipeline sync out of SDMA vm_flush() as well Code it similar to how we did it for the gfx and compute engines. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 27 +++++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 23 +++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 23 +++++++++++++++++------ 3 files changed, 53 insertions(+), 20 deletions(-) commit edf8fcdc6b254236be005851af35ea5e826e7e09 Author: Vladimir Zapolskiy Date: Wed Mar 9 03:21:40 2016 +0200 irqchip/mxs: Fix error check of of_io_request_and_map() The of_io_request_and_map() returns a valid pointer in iomem region or ERR_PTR(), check for NULL always fails and may cause a NULL pointer dereference on error path. Fixes: 25e34b44313b ("irqchip/mxs: Prepare driver for hardware with different offsets") Signed-off-by: Vladimir Zapolskiy Cc: Jason Cooper Cc: Marc Zyngier Cc: Oleksij Rempel Cc: Sascha Hauer Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1457486500-10237-1-git-send-email-vz@mleia.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfe199afefe6201e998ddc07102fc1fdb55f196c Author: Vladimir Zapolskiy Date: Wed Mar 9 03:21:29 2016 +0200 irqchip/sunxi-nmi: Fix error check of of_io_request_and_map() The of_io_request_and_map() returns a valid pointer in iomem region or ERR_PTR(), check for NULL always fails and may cause a NULL pointer dereference on error path. Fixes: 0e841b04c829 ("irqchip/sunxi-nmi: Switch to of_io_request_and_map() from of_iomap()") Signed-off-by: Vladimir Zapolskiy Cc: Jason Cooper Cc: Marc Zyngier Cc: Chen-Yu Tsai Cc: Maxime Ripard Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1457486489-10189-1-git-send-email-vz@mleia.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-sunxi-nmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52b2a05fa7c8cfceebb59117a95decd68cf7e465 Author: Quan Nguyen Date: Thu Mar 3 21:56:52 2016 +0700 genirq: Export IRQ functions for module use Export irq_chip_*_parent(), irq_domain_create_hierarchy(), irq_domain_set_hwirq_and_chip(), irq_domain_reset_irq_data(), irq_domain_alloc/free_irqs_parent() So gpio drivers can be built as modules. First user: gpio-xgene-sb Signed-off-by: Quan Nguyen Acked-by: Linus Walleij Cc: Phong Vo Cc: Marc Zyngier Cc: patches@apm.com Cc: Loc Ho Cc: Keyur Chudgar Cc: Jiang Liu Link: https://lists.01.org/pipermail/kbuild-all/2016-February/017914.html Link: http://lkml.kernel.org/r/1457017012-10628-1-git-send-email-qnguyen@apm.com Signed-off-by: Thomas Gleixner kernel/irq/chip.c | 4 ++++ kernel/irq/irqdomain.c | 5 +++++ 2 files changed, 9 insertions(+) commit 1a414f48d7ccb197b61c18888b72327c98171844 Author: Takashi Iwai Date: Thu Mar 10 15:49:35 2016 +0100 ALSA: hda - Add a sanity check of pin / port mapping on i915 HDMI/DP There is an implicit rule to map between pin NID and port number on Intel HDMI/DP codec: the mapping is fixed only for NID 0x05, 0x06 and 0x07. For avoiding the possible memory corruption, add a sanity check for the NID value and splat WARN_ON() for invalid accesses. Signed-off-by: Takashi Iwai sound/hda/hdac_i915.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 8cc1a8ab477e974a3516e73276ef4b6e546c4c65 Author: Takashi Sakamoto Date: Thu Mar 10 21:44:28 2016 +0900 ALSA: dice: use structure to represent register parameters instead of array with basic type element In dice interface, two blocks of register are accessible via IEEE 1394 asynchronous transaction to represent the number of supported isochronous streams and the number of quadlets for stream information. Current ALSA dice driver uses array with 'unsigned int' element for temporary cache of these information. But using structure is preferable for begin easily comprehensible. This commit applies a local structure for this aim. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 110 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 56 deletions(-) commit 35d1901134e97cf95c0ab6ef70f5aead6cb34e9e Author: Maor Gottlieb Date: Mon Mar 7 18:51:47 2016 +0200 IB/mlx5: Add support for don't trap rules Each bypass flow steering priority will be split into two priorities: 1. Priority for don't trap rules. 2. Priority for normal rules. When user creates a flow using IB_FLOW_ATTR_FLAGS_DONT_TRAP flag, the driver creates two flow rules, one used for receiving the traffic and the other one for forwarding the packet to continue matching in lower or equal priorities. Signed-off-by: Maor Gottlieb Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 54 ++++++++++++++++++++++++++++++++---- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- include/linux/mlx5/device.h | 7 ++++- 3 files changed, 55 insertions(+), 8 deletions(-) commit b3638e1a76648dbd482cc5a8f27eb6948cc3bc86 Author: Maor Gottlieb Date: Mon Mar 7 18:51:46 2016 +0200 net/mlx5_core: Introduce forward to next priority action Add support to create flow rule that forward packets to the first flow table in the next priority (next priority could be the first priority in the next namespace or the next priority in the same namespace). This feature could be used for DONT_TRAP rules or rules that only want to mark the packet with flow tag. In order to do it optimally, each flow table has list of all rules that point to this flow table, when a flow table is destroyed/created, we update the list head correspondingly. This kind of rule is created when destination is NULL and action is MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO. Signed-off-by: Maor Gottlieb Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 185 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 9 ++ include/linux/mlx5/fs.h | 4 + include/linux/mlx5/mlx5_ifc.h | 3 +- 4 files changed, 188 insertions(+), 13 deletions(-) commit 153fefbf34e5079c2dd69490f5f23373758d2e9c Author: Maor Gottlieb Date: Mon Mar 7 18:51:45 2016 +0200 net/mlx5_core: Create anchor of last flow table Create an empty flow table in the end of NIC rx namesapce. Adding this flow table simplify the implementation of "forward to next prio" rules. Signed-off-by: Maor Gottlieb Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 40 ++++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 6 ++++ include/linux/mlx5/fs.h | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) commit e370e4769463a65dcf8806fa26d2874e0542ac41 Author: Martin Schwidefsky Date: Thu Mar 10 09:52:55 2016 +0100 s390: fix floating pointer register corruption (again) There is a tricky interaction between the machine check handler and the critical sections of load_fpu_regs and save_fpu_regs functions. If the machine check interrupts one of the two functions the critical section cleanup will complete the function before the machine check handler s390_do_machine_check is called. Trouble is that the machine check handler needs to validate the floating point registers *before* and not *after* the completion of load_fpu_regs/save_fpu_regs. The simplest solution is to rewind the PSW to the start of the load_fpu_regs/save_fpu_regs and retry the function after the return from the machine check handler. Tested-by: Christian Borntraeger Cc: # 4.3+ Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 106 +---------------------------------------------- 1 file changed, 2 insertions(+), 104 deletions(-) commit 8f100bb1ff27873dd71f636da670e503b9ade3c6 Author: Heiko Carstens Date: Thu Mar 10 10:32:21 2016 +0100 s390/cpumf: add missing lpp magic initialization Add the missing lpp magic initialization for cpu 0. Without this all samples on cpu 0 do not have the most significant bit set in the program parameter field, which we use to distinguish between guest and host samples if the pid is also 0. We did initialize the lpp magic in the absolute zero lowcore but forgot that when switching to the allocated lowcore on cpu 0 only. Reported-by: Shu Juan Zhang Acked-by: Christian Borntraeger Cc: stable@vger.kernel.org # v4.4+ Fixes: e22cf8ca6f75 ("s390/cpumf: rework program parameter setting to detect guest samples") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) commit ccfe1e85322090649d2fae599e55300c1512bf15 Author: Jes Sorensen Date: Mon Feb 29 17:05:51 2016 -0500 rtl8xxxu: Temporarily disable 8192eu device init To reduce the patch volume, temporariliy disable 8192eu device init. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7d4ccb8bae85550035328bddd20197614dfe415a Author: Jes Sorensen Date: Mon Feb 29 17:05:50 2016 -0500 rtl8xxxu: Use correct 8051 reset function for 8723b parts 8723b needs more action, so implement support for device specific reset functions. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 40 ++++++++++++++++++++++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 39 insertions(+), 2 deletions(-) commit 145428ec7c6794c3ac78ddce2b073076c9c870d2 Author: Jes Sorensen Date: Mon Feb 29 17:05:49 2016 -0500 rtl8xxxu: Print a warning if flushing the FIFO fails Only print a warning if the FIFO flush fails, as opposed to printing the status unconditionally. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 430b454c5a3951ffaf117d4e613e9cea03f86a90 Author: Jes Sorensen Date: Mon Feb 29 17:05:48 2016 -0500 rtl8xxxu: Flush FIFO before powering down devices This should help when reloading the driver for 8723bu devices Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 34 ++++++++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 ++ 2 files changed, 36 insertions(+) commit fe37d5f644e5fb7179ff6464482eca9a4ebf555c Author: Jes Sorensen Date: Mon Feb 29 17:05:47 2016 -0500 rtl8xxxu: Implement device specific power_off function Implment 8723bu specific device power down, and make power_off() a fileops function. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 98 +++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 + 3 files changed, 99 insertions(+), 2 deletions(-) commit fc89a41fa686b41b5339b3eaaa9851fa4c5551a9 Author: Jes Sorensen Date: Mon Feb 29 17:05:46 2016 -0500 rtl8xxxu: Implement 8723bu specific disable_rf() function Powering up the 8723bu RF should probably be matched by the ability to power it down again. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 17 ++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) commit 37f44dc79a385fed307cdaad6003fd3c0ca99c07 Author: Jes Sorensen Date: Mon Feb 29 17:05:45 2016 -0500 rtl8xxxu: Use define for REG_PWR_DATA bits Use the bit define rather than hard code the value for REG_PWR_DATA bits. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0290e7d0fd1e91d86289abbdd2d785c945e6bb2e Author: Jes Sorensen Date: Mon Feb 29 17:05:44 2016 -0500 rtl8xxxu: convert rtl8723bu_init_bt() into rtl8723b_enable_rf() rtl8723bu_init_bt() is effectively the function enabling RF, so name it appropriately. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 11 +---------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) commit 6979494adf57afff0b6a5ad7ba77bdaef63274ad Author: Jes Sorensen Date: Mon Feb 29 17:05:43 2016 -0500 rtl8xxxu: Remove unncessary semicolon This removes an superfluous semicolon. Reported-by: Fengguang Wu Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87957081b749f3445fc6f10fae57280d45d6c6d5 Author: Jes Sorensen Date: Mon Feb 29 17:05:42 2016 -0500 rtl8xxxu: Pass RX rate to rx_parse_phystats and enable phystats for rtl8723bu rtl8xxxu_rx_parse_phystats() only needs the RX rate to determine whether to handle the stats as CCK or not. Parsing in the rate rather than the rx descriptor elimantes the need to handle multiple rx descriptor formats in the function. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 55a18dd18052eaef908efbb27d5c6d7e0569048f Author: Jes Sorensen Date: Mon Feb 29 17:05:41 2016 -0500 rtl8xxxu: Process C2H RA_REPORT events for 8723bu Handle RA_REPORTS events for 8723bu to not have them show up as unhandled. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 ++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 11 +++++++++++ 2 files changed, 17 insertions(+) commit 739dc9f2f5c01dafc7336ffebd9d36bba4f9174e Author: Jes Sorensen Date: Mon Feb 29 17:05:40 2016 -0500 rtl8xxxu: Dump contents of unhandled C2H events Dump the contents of unhandled C2H events. We should be handling all expected events, so this is debugging help in case an unexpected event happens. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7d794eaa857e9475e8b02f5a53100cad569194e3 Author: Jes Sorensen Date: Mon Feb 29 17:05:39 2016 -0500 rtl8xxxu: Report media status using the correct H2C command for 8723bu Implement support for nextgen devices reporting connectition to the firmware. The H2C API for reporting connection to the firmware is different between the two device generations. Use the fileops structure to determine which one to call. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 46 ++++++++++++++++++++---- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 +++++ 2 files changed, 47 insertions(+), 7 deletions(-) commit f653e69009c633d099b34f7473b037c570c256f8 Author: Jes Sorensen Date: Mon Feb 29 17:05:38 2016 -0500 rtl8xxxu: Implement basic 8723b specific update_rate_mask() function Support for setting bandwidth and VHT parameters is still missing Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 38 ++++++++++++++++++++++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 16 +++++++++- 2 files changed, 50 insertions(+), 4 deletions(-) commit 80b30b2af59af9400568af05b8b409e5a20da930 Author: Jes Sorensen Date: Mon Feb 29 17:05:37 2016 -0500 rtl8xxxu: Define 8723b H2C ramask command structure Define H2C command structure for setting the rate mask. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit e975b87cafd24d943f395823b1a000d1389f48ef Author: Jes Sorensen Date: Mon Feb 29 17:05:36 2016 -0500 rtl8xxxu: Do not parse RX descriptor info for C2H packets C2H events are delivered as RX packets on 8723bu/8192eu. When receiving a C2H event, do not parse the rest of the RX descriptor as the info isn't valid. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 4c683607145d22c872d6b473c5f5465f8459c5de Author: Jes Sorensen Date: Mon Feb 29 17:05:35 2016 -0500 rtl8xxxu: Improve handling of txdesc32 vs txdesc40 handling Further correct the handling of 40 byte TX descriptors. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 123 ++++++++++++++++------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 7 +- 2 files changed, 92 insertions(+), 38 deletions(-) commit 2c6670b2a8e6dcd17bedd4dfbac663b2aa3d6949 Author: Jes Sorensen Date: Mon Feb 29 17:05:34 2016 -0500 rtl8xxxu: TX RTS rate is word 4 for 8723a Correct the setting of TX RTS for 8723a generation chips. In addition update documentation to match that this is part of data word 4, note data word 5. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 3 ++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 2098bfb5f3277b12dc2f9dc61efd57161c000f77 Author: Jes Sorensen Date: Mon Feb 29 17:05:33 2016 -0500 rtl8723au: Update TX descriptor words 4 and 5 definitions TX data words 4 and 5 differ significantly between 32 byte and 40 byte descriptors. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 11 ++++---- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 32 ++++++++++++++++-------- 2 files changed, 28 insertions(+), 15 deletions(-) commit cc2646d4bed4f85bbb72871717f86b625677a874 Author: Jes Sorensen Date: Mon Feb 29 17:05:32 2016 -0500 rtl8xxxu: Set sequence number correctly for 40 byte TX descriptors SEQ changed location in the 40 byte TX descriptor. Set it correctly. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 24 ++++++++++++++++-------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) commit a40ace4f01c77362553455a819eba407f7fccc76 Author: Jes Sorensen Date: Mon Feb 29 17:05:31 2016 -0500 rtl8xxxu: Set the correct TX descriptor bits for agg and break on 8723b Fixup victim of the relocated bits for AGG_ENABLE/AGG_BREAK in the 40 byte TX descriptor Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit ce2d1dbbb4b7b72cfe64d07fbd282f472ea51bbd Author: Jes Sorensen Date: Mon Feb 29 17:05:30 2016 -0500 rtl8xxxu: Add more 40 byte TX desc bit definitions Add additional bit definitions for 40 byte TX descriptors, and rename bits for 32 byte descriptors that are located differently in the 40 byte descriptor format. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 7 +++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 27 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) commit 0249258db457b1279f40c7adf46bfb2eea817884 Author: Jes Sorensen Date: Mon Feb 29 17:05:29 2016 -0500 rtl8xxxu: Add additional tx descriptor bits for data word 0 This adds documentation for some additional bits in TX descriptor word 0. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++++ 1 file changed, 4 insertions(+) commit 5e00d5034abf816aa1ca5033ed7c0d6ff04cba87 Author: Jes Sorensen Date: Mon Feb 29 17:05:28 2016 -0500 rtl8xxxu: Do not unconditionally print debug info in rtl8723bu_handle_c2h() Reduce the log level in rtl8723bu_handle_c2h() Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 179e1742569620aed495f5d106d019b2dd6057d1 Author: Jes Sorensen Date: Mon Feb 29 17:05:27 2016 -0500 rtl8xxxu: Handle 40 byte TX descriptors for rtl8723bu Note the descriptor checksum is still only calculated over the initial 32 bytes of the descriptor, ignoring the last 8 bytes of the descriptor. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 35 ++++++++++++++++-------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 3 +- 2 files changed, 25 insertions(+), 13 deletions(-) commit 80491a1f3c878be44efa9d25fda1bb7b3388ca79 Author: Jes Sorensen Date: Mon Feb 29 17:05:26 2016 -0500 rtl8xxxu: Add definition for 8723bu tx descriptor Newer generation chips use a 40 byte TX descriptor, compared to the 32 byte descriptor used on older chips. This adds the definition for the 40 byte descriptor. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 72143b9e947c593555fa2a869a4bc08b9745b105 Author: Jes Sorensen Date: Mon Feb 29 17:05:25 2016 -0500 rtl8xxxu: Set the correct thermal meter register for 8723bu Older chips use RF register 0x24 to set the thermal meter. Newer chips use register 0x42. This change makes sure to set the correct thermal meter register depending on the chip. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1d3cc44dddf8501934172ea141397647f01bb0c6 Author: Jes Sorensen Date: Mon Feb 29 17:05:24 2016 -0500 rtl8xxxu: Set 8723bu MCS TX power This adds the missing support for setting MCS TX power rates on 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 54bed43f3a67351b1ad75ddcad82587d9e5471e0 Author: Jes Sorensen Date: Mon Feb 29 17:05:23 2016 -0500 rtl8xxxu: Set 8723bu TX power for CCK and OFDM rates This implements support for setting TX power for CCK and OFDM rates on 8723bu. MCS rates is still pending. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 3be269990814e7f052e134cfc1d538b7010c0600 Author: Jes Sorensen Date: Mon Feb 29 17:05:22 2016 -0500 rtl8xxxu: Parse efuse power indices for 8723bu This should (hopefully) parse the power indices correctly for the 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 43 ++++++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 43 +++++++++++++++--------- 2 files changed, 71 insertions(+), 15 deletions(-) commit 21db9973303caebcbe2fde6dcc668c1aac2ed55f Author: Jes Sorensen Date: Mon Feb 29 17:05:21 2016 -0500 rtl8xxxu: Bump TX power arrays to handle larger channel groups Newer generation chips have more channels groups. In order to carry the larger arrays in common structures, bump the array sizes to match. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 25 +++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 3e84f9386162878deb146a7e4f05710693f1a9c7 Author: Jes Sorensen Date: Mon Feb 29 17:05:20 2016 -0500 rtl8xxxu: Use size of source pointer when copying efuse data Some newer chips have more channel groups in their efuse parameter tables, so use the size of the source, rather than the destination when copying them out. This avoids copying garbage when increasing the common array sizes. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) commit e796dab4b987503913418260bce782d230df60db Author: Jes Sorensen Date: Mon Feb 29 17:05:19 2016 -0500 rtl8xxxu: Introduce set_tx_power() fileop and a new 8723b dummy derivative The 8723b series is significantly different from the older generation in this sense. So far the 8723b version doesn't do anything useful. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 34 ++++++++++++++++++++++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) commit 4a0d7db53124dc81b03926bcec864a0575d94f8e Author: Jes Sorensen Date: Mon Feb 29 17:05:18 2016 -0500 rtl8xxxu: Correct struct rtl8723bu_efuse to list power bases correctly Correct TX power definitions in rtl8723bu_efuse Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 10 ---------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 23 ++++++++++++++++++----- 2 files changed, 18 insertions(+), 15 deletions(-) commit db08de9443be5d4eef724621d3d51cab4daf25d3 Author: Jes Sorensen Date: Mon Feb 29 17:05:17 2016 -0500 rtl8xxxu: Do not use hard-wired RF enable settings for 8723bu These settings simply block the 8723bu, for now leave an empty function. With this change we can finally communicate with aliens using the 8723bu! Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 10 +++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit a3a5dac6b1bf69b1d90f3293abfb4392ec2fc68f Author: Jes Sorensen Date: Mon Feb 29 17:05:16 2016 -0500 rtl8xxxu: Setup coex table correctly (hopefully) Use the same values as the vendor driver when setting up the BTCOEX table for 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 59b743979c178b780bc57f179493fdbf3ad4f0b7 Author: Jes Sorensen Date: Mon Feb 29 17:05:15 2016 -0500 rtl8xxxu: Use REG_RFE_CTRL_ANTA_SRC rather than hard coded value Another case where we should use the register name rather than the hard coded value when accessing it. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 120e627f658b3fe2be2f3699527dd687168b3693 Author: Jes Sorensen Date: Mon Feb 29 17:05:14 2016 -0500 rtl8xxxu: Use name for REG_RFE_BUFFER rather than hard coded value Register 0x0944 is REG_RFE_BUFFER. Use the name rather than hard coded value when accessing it. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 499cfc02a08a27ba29d22938ddbe5140806316c5 Author: Jes Sorensen Date: Mon Feb 29 17:05:13 2016 -0500 rtl8xxxu: 8723bu: REG_BT_COEX_TABLE4 is only 8 bits The BT_COEX_TABLE register list contains 3 32 bit registers and one 8 bit register. Hence, use rtl8xxxu_write8() when writing the 8 bit register. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc1c89b3407fe0b3ebc8fa651332a62ed773872d Author: Jes Sorensen Date: Mon Feb 29 17:05:12 2016 -0500 rtl8xxxu: Set WLAN_ACT_CONTROL per vendor driver setting The initial code set the wrong setting in WLAN_ACT_CONTROL for the 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 541bca7f5d8ffbd4dba8b432f3a5162cb7ba41a6 Author: Jes Sorensen Date: Mon Feb 29 17:05:11 2016 -0500 rtl8xxxu: RF_T_METER is different on the newer chips Provide RF_T_METER register location for nextgen chips. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9c79bf95d08a920b1c1219a2a9d5fce2f6172bbe Author: Jes Sorensen Date: Mon Feb 29 17:05:10 2016 -0500 rtl8xxxu: Implement init_statistics for 8723bu Vendor driver implements this for 8723b and 8821 series Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 27 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 7 ++++++ 3 files changed, 35 insertions(+) commit f2a4163a22c66d178084ff722c490f5ecf91a088 Author: Jes Sorensen Date: Mon Feb 29 17:05:09 2016 -0500 rtl8xxxu: Add missing blank space in front of bracket Keep the automated tools happy Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e88ca447a8a17e122ba58d79c725c63b3efcd70 Author: Jes Sorensen Date: Mon Feb 29 17:05:08 2016 -0500 rtl8xxxu: Setup RX aggregation This initializes RX DMA aggregation on 8723bu. We should do this for all parts eventually, and also init TX aggregation. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 23 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 + 3 files changed, 25 insertions(+) commit 2f109c8e51d6302a18687c9381a62401d6b69f24 Author: Jes Sorensen Date: Mon Feb 29 17:05:07 2016 -0500 rtl8xxxu: Group chip quirks together Group chip quirks together instead of having them scattered all over in the init code. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 28 +++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 7e9567ff98a6b7312a6eb1fe0f9c0f81b42147eb Author: Jes Sorensen Date: Mon Feb 29 17:05:06 2016 -0500 rtl8xxxu: Add REG_DWBCN1_CTRL_8723B define List yet another new register found on the 8723b. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 ++ 1 file changed, 2 insertions(+) commit 5ac61789e864ca7fbfe4425afe53837f535363cc Author: Jes Sorensen Date: Mon Feb 29 17:05:05 2016 -0500 rtl8xxxu: 8723bu lock phy after RF init Set PHY lock after running the RF init sequence on 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1ea8e846c9eab861db1108302a391182c3fce528 Author: Jes Sorensen Date: Mon Feb 29 17:05:04 2016 -0500 rtl8xxxu: Call device specific _config_channel() Having a version for the newer chips without calling it doesn't do much good..... Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c36906044104813304a9c40252f9b2a573ccd187 Author: Jes Sorensen Date: Mon Feb 29 17:05:03 2016 -0500 rtl8xxxu: Initialize burst parameters for 8723bu Implement burst parameter sequence for 8723bu parts. Eventually this should be moved into device specific sections. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 33 ++++++++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 5 +++- 2 files changed, 37 insertions(+), 1 deletion(-) commit fadfa041546924c28ca2a3bf1ed8fd25686e8cf5 Author: Jes Sorensen Date: Mon Feb 29 17:05:02 2016 -0500 rtl8xxxu: Set RX boundary for 8723bu Set the correct TRXFF boundary for 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b87212ceceef655dae563efd2df13cb59dbd1711 Author: Jes Sorensen Date: Mon Feb 29 17:05:01 2016 -0500 rtl8xxxu: Do not set FPGA0_TX_INFO for 8723bu and use a larger PBP page size The vendor driver does not set FPGA0_TX_INFO here. In additiona the 8723bu can handler a larger PBP page size. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1f1b20f11ab4ce38a338b278bb6b538bbfdc831a Author: Jes Sorensen Date: Mon Feb 29 17:05:00 2016 -0500 rtl8xxxu: Do queue init in same order as 8723bu vendor driver Reorganize the init sequence in order to be able to compare to the 8723bu vendor driver's init sequence. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 68 +++++++++++++----------- 1 file changed, 37 insertions(+), 31 deletions(-) commit f30ed675545dd4b9f32d3d674054b6024b413f1d Author: Jes Sorensen Date: Mon Feb 29 17:04:59 2016 -0500 rtl8xxxu: 80M spur hack is for 8723au only Only apply the 80M spur hack for 8723au parts. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 3a4be6a092c89ad7a94b147c3529d6626e5a59ff Author: Jes Sorensen Date: Mon Feb 29 17:04:58 2016 -0500 rtl8xxxu: Init H2C command register for 8723bu In addition make register read/write flow match closer to vendor driver flow. This is mainly to be able to compare the register write log with the vendor driver, and can be optimized later once 8723bu support is working. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 360157eb25d4088c28ff114a613d2c95b61e93f4 Author: Jes Sorensen Date: Mon Feb 29 17:04:57 2016 -0500 rtl8xxxu: Another 8723bu magic register set during init No indication of what register 0xa3 does anywhere in the vendor source. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 +++++ 1 file changed, 5 insertions(+) commit a0e262bcbe71892c88abb12b6d409553863efacc Author: Jes Sorensen Date: Mon Feb 29 17:04:56 2016 -0500 rtl8xxxu: Another 8723bu patch for rtl8xxxu_init_phy_bb() This function is going to need to be split up into chip specific variants. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 4ef22eb933c21f307413f9fc402f83e7384cf726 Author: Jes Sorensen Date: Mon Feb 29 17:04:55 2016 -0500 rtl8xxxu: Handle XTAL_K value in efuse specific location Retrieve the XTAL_K value in the parse_efuse() functions as it's location various on a per device basis. For parts that do not provide an XTAL_K value, skip setting it. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 15 ++++++++++++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) commit 8baf670b8928893bacf95a67c86ec2d6c42263f2 Author: Jes Sorensen Date: Mon Feb 29 17:04:54 2016 -0500 rtl8xxxu: Additional fixes for 8723bu Additional tweaks to further map the init sequence for the 8723bu to that of the vendor driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 25 +++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 79fb5fe9edb78bd28969dd0f6bacc8c12550c4cc Author: Jes Sorensen Date: Mon Feb 29 17:04:53 2016 -0500 rtl8xxxu: Setup LLT before downloading firmware This matches the order of the 8723bu vendor driver Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 29 ++++++++++++++++-------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 42836db1f609b66fdb1b307243fa01451748ab68 Author: Jes Sorensen Date: Mon Feb 29 17:04:52 2016 -0500 rtl8xxxu: Implement 8723bu power on sequence This implements the 8723bu specific power on sequence as it is different from that of the 8723au chips. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 183 ++++++++++++++++++++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 11 ++ 2 files changed, 189 insertions(+), 5 deletions(-) commit 04313eb4f2225cb5dba2fffdb0f5f1abd71e611d Author: Jes Sorensen Date: Mon Feb 29 17:04:51 2016 -0500 rtl8xxxu: Do not set REG_AFE_XTAL_CTRL on 8723bu The 8723bu does not like REG_AFE_XTAL_CTRL being set, so skip this for now, to match the vendor driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 6b9eae0129f43b8e691cec91a99601b0829fb841 Author: Jes Sorensen Date: Mon Feb 29 17:04:50 2016 -0500 rtl8xxxu: Issue BT_INFO command Issue a BT_INFO command to verify the status of BT/WiFi settings. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 18 +++++++++++------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++++ 2 files changed, 15 insertions(+), 7 deletions(-) commit 394f1bd314cd08915fee9d5b36a2105dc1a543b7 Author: Jes Sorensen Date: Mon Feb 29 17:04:49 2016 -0500 rtl8xxxu: Handle BT register writes and MP_OPER events 8723bu BT registers are written via the mailbox interface. Add support for writing these and corresponding C2H event responses. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 34 +++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 59 +++++++++++++++++++++++- 2 files changed, 89 insertions(+), 4 deletions(-) commit b2b43b7837ba2e097bb019ee488ca5f4e0056fa4 Author: Jes Sorensen Date: Mon Feb 29 17:04:48 2016 -0500 rtl8xxxu: Initial functionality to handle C2H events for 8723bu The 64 bit mailbox commands also provide a different method for mailbox command responses (C2H events). Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 34 ++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 54 ++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) commit b18cdfdb67b258c01947e611b6bbb745188eb131 Author: Jes Sorensen Date: Mon Feb 29 17:04:47 2016 -0500 rtl8xxxu: Handle 8723bu style rx descriptors This adds code to parse the new RX descriptor format used by the 8723bu/8192eu parts. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 125 +++++++++++++++++------ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++ 2 files changed, 103 insertions(+), 30 deletions(-) commit a6c80d211cdf0748a8ae4fd1ab41cf43d3ecbd71 Author: Jes Sorensen Date: Mon Feb 29 17:04:46 2016 -0500 rtl8xxxu: Add rtl8723bu (nextgen) rx descriptor definition The nextgen chips use a slightly different RX descriptor format. This adds support for the new format. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 125 +++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit a228a5db4d19b05da7315320e0b4a87ed7c472aa Author: Jes Sorensen Date: Mon Feb 29 17:04:45 2016 -0500 rtl8xxxu: Set the right type for ps tdma on 8723bu Use the correct type when setting PS TDMA for 8723bu. This matches the vendor driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7297f49c3761826242cd8a742f0f78a139d6653a Author: Jes Sorensen Date: Mon Feb 29 17:04:44 2016 -0500 rtl8xxxu: Do not ignore wlan activity on 8723bu The 8723bu is a WiFi/BT combo part. When initializing it for WiFi, make sure to tell it not to ignore WiFi activity. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 +++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++++ 2 files changed, 9 insertions(+) commit 3ca7b32c9d6da17a2660bc40b24f5dc0cb433cc9 Author: Jes Sorensen Date: Mon Feb 29 17:04:43 2016 -0500 rtl8xxxu: Improve 8723bu init code Implement additional init sequence code for the 8723bu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 45 ++++++++++++++++++---- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++ .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 5 ++- 3 files changed, 49 insertions(+), 9 deletions(-) commit 368633ce6853bb2ba678c7cb5bfeb103e7bc56ba Author: Jes Sorensen Date: Mon Feb 29 17:04:42 2016 -0500 rtl8xxxu: Remove unused variable Remove an unused variable to make the compiler happy. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f37e9228aecaa9c92ee0433cd45ca0c545b90ce4 Author: Jes Sorensen Date: Mon Feb 29 17:04:41 2016 -0500 rtl8xxxu: Initial rtl8723bu_init_bt() code This should initialize the antennas on the 8723bu, but so far I am still not receiving anything :( More work is needed. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 87 +++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 15 +++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 2 + 3 files changed, 98 insertions(+), 6 deletions(-) commit c3f9506f2374772e579e1c19b86d79f1da71dea2 Author: Jes Sorensen Date: Mon Feb 29 17:04:40 2016 -0500 rtl8xxxu: Initial implementation of rtl8723bu_config_channel() This is a first stab of implementing rtl8723bu_config_channel(). For now this will only do 20MHz channels. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 134 +++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 14 +++ 3 files changed, 149 insertions(+) commit e6f9a9c3b5235f31434a9de9034ea5eda1532113 Author: Jakub Sitnicki Date: Mon Feb 29 17:04:39 2016 -0500 rtl8xxxu: rtl8192eu: Map out EFUSE TX power area TX power values are laid out differently in EFUSE found in RTL8192EU & RTL8188EU devices. TX power indices and differences for each RF path are not interleaved (A, B, A, B), as in other chips, but follow one another (A, B, C, D). Signed-off-by: Jakub Sitnicki Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 10 ---------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 22 +++++++++++++++++----- 2 files changed, 17 insertions(+), 15 deletions(-) commit 60c76cbadb61084139d710ca710959274efdde5b Author: Jes Sorensen Date: Mon Feb 29 17:04:38 2016 -0500 rtl8xxxu: Remove backing up certain registers, which was never used This was inspired by the vendor driver, but in the end never used for anything. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 14 -------------- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 3 --- 2 files changed, 17 deletions(-) commit fa0f2d481d178fa2bf44f9488a695ab56d4e78f6 Author: Jes Sorensen Date: Mon Feb 29 17:04:37 2016 -0500 rtl8xxxu: Do LC calibration before IQK calibration This matches the flow of the vendor driver for newer hardware, and doesn't seem to cause issues for the older parts. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d698dec06f828480a95a0c7a91c13bc4ad374e4 Author: Jes Sorensen Date: Mon Feb 29 17:04:36 2016 -0500 rtl8xxxu: Handle S0S1 register in lc_calibrate() Newer chips (8723bu/8192eu) has S0S1 settings which needs to be dealt with during LC calibration. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 7 +++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 8 insertions(+) commit e1547c535ede26c84b72d51e031dd57551037bec Author: Jes Sorensen Date: Mon Feb 29 17:04:35 2016 -0500 rtl8xxxu: First stab at adding IQK calibration for 8723bu parts The 8723bu also has it's own IQK calibration process. This is similar in flow, but still different enough to warrent it's own implementation, at least for now. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 811 ++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 17 + 3 files changed, 827 insertions(+), 2 deletions(-) commit c6594ffd46a4b26d2a2d59c54da399ec563b6b2f Author: Jes Sorensen Date: Mon Feb 29 17:04:34 2016 -0500 rtl8xxxu: Add a couple of new register definitions This adds some additional register definitions for 8723bu, as well as a bit define for USB RXDMA aggregation in REG_RXDMA_AGG_PG_TH. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 8634af5e6a8dea0f7110f32c00ceffee71be8a80 Author: Jes Sorensen Date: Mon Feb 29 17:04:33 2016 -0500 rtl8xxxu: Make rtl8xxxu_add_path_on() use device specific init values rtl8192cu/rtl8188cu/rtl8723au use the same values, but 8723bu and 8192eu have their own. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 24 +++++++++++++++++++++--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++++ 2 files changed, 25 insertions(+), 3 deletions(-) commit 7ff8c1ae610159fcb6e7188224520cf0f8b7a336 Author: Jes Sorensen Date: Mon Feb 29 17:04:32 2016 -0500 rtl8xxxu: Use correct formatting type to print sizeof() Usual gcc i386 issue reported by kbuildbot Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaa4d14c97c1990327fd4e9fc49beca0ce7baa14 Author: Jes Sorensen Date: Mon Feb 29 17:04:31 2016 -0500 rtl8xxxu: Do not overwrite rtl8xxxu_debug for untested chips Fix a silly bug where the debug level was overwritten rather than amended for untested chips. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7a5a190df232b833b7867ef1679dff561b73c84 Author: Jes Sorensen Date: Mon Feb 29 17:04:30 2016 -0500 rtl8xxxu: Do BT_WLAN_CALIBRATION before doing IQK calibration Newer generation chips require the firmware be notified before we start the IQK calibration. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 20 +++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) commit 8da91571bb401a3b9ffa36d7c6ca9c2476777e4d Author: Jes Sorensen Date: Mon Feb 29 17:04:29 2016 -0500 rtl8xxxu: rtl8xxxu_h2c_cmd(): Add size argument The firmware command API differs slightly between new and old devices. The new generation requires the size since there is no extension bit encoded into the command number. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 13 +++++++------ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) commit b8ba8602b81a019c67bc1f34b6b68e8965086532 Author: Jes Sorensen Date: Mon Feb 29 17:04:28 2016 -0500 rtl8xxxu: rtl8723bu_parse_efuse(): Use a pointer to the struct rtl8723bu_efuse Likewise for 8723bu, use a pointer to the efuse. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit b7dda34d1ecda7e3243137a6ffcb7e9173e5d651 Author: Jes Sorensen Date: Mon Feb 29 17:04:27 2016 -0500 rtl8xxxu: rtl8192eu_parse_efuse(): Use a pointer to the struct rtl8192eu_efuse Make the code easier to read and less error prone by using a pointer to the efuse. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 26 +++++++++--------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 4959444165523e68118035bebb727b9431746765 Author: Jakub Sitnicki Date: Mon Feb 29 17:04:26 2016 -0500 rtl8xxxu: rtl8192cu: Introduce a pointer to efuse Signed-off-by: Jakub Sitnicki Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) commit d38f1c3715d6de00d3b7a09254f9a0930d611bed Author: Jakub Sitnicki Date: Mon Feb 29 17:04:25 2016 -0500 rtl8xxxu: rtl8723au: Introduce a pointer to efuse Signed-off-by: Jakub Sitnicki Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) commit 32a39dd4b574abd32304857e8a5b24de113b81ee Author: Jakub Sitnicki Date: Mon Feb 29 17:04:24 2016 -0500 rtl8xxxu: Skip disabled efuse words early Avoid a negative conditional and an extra level of indentation in the bigger part of the loop body. Signed-off-by: Jakub Sitnicki Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 28 +++++++++++------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit f6c47702ede3edc1dbf73355c134d7e33d9c86ca Author: Jakub Sitnicki Date: Mon Feb 29 17:04:23 2016 -0500 rtl8xxxu: Don't check for illegal offset when reading from efuse It is enough to check for either illegal offset or illegal map address because map address is a value derived from an offset: map_addr = offset * 8 EFUSE_MAP_LEN = EFUSE_MAX_SECTION_8723A * 8 Leave just the check for an illegal map address because its upper bound (EFUSE_MAP_LEN) is used also in a couple other places. Signed-off-by: Jakub Sitnicki Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 63 +++++++++++------------- 1 file changed, 28 insertions(+), 35 deletions(-) commit d940c247adbd44c885777099e3e6c64b7ca2d078 Author: Jes Sorensen Date: Mon Feb 29 17:04:22 2016 -0500 rtl8xxxu: Add definitions for new generation h2c commands The larger mailboxes also use a different set of mailbox commands. This provides a list of the 64 bit commands. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 87 ++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-) commit 6431ea00dfc5a7a3cdca1320034f20b69846a432 Author: Jes Sorensen Date: Mon Feb 29 17:04:21 2016 -0500 rtl8xxxu: Group USB fixups together for all chips In addition do not apply fixups for 8188/8191/8192 A-cut UMC parts. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 57 +++++++++++++----------- 1 file changed, 32 insertions(+), 25 deletions(-) commit 14d8856082c5fdb320b108af690c79d4d560d9b2 Author: Jes Sorensen Date: Mon Feb 29 17:04:20 2016 -0500 rtl8xxxu: Add some missing register definitions for 8723bu This introduces additional register definitions for newer generation chips. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ed35d09469e55b3324ef85b33e0355bd86cdd066 Author: Jes Sorensen Date: Mon Feb 29 17:04:19 2016 -0500 rtl8xxxu: Handle 32 bit mailbox extension regs found on 8723bu/8192eu/8812 Gen1 chips use a 16 bit mailbox extension register, for upto 48 bit mailbox commands. The newer generation chips use a 32 bit mailbox extension register instead, for upto 64 bit mailbox commands. Handle writing the larger mailboxes. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 29 +++++++++++++++++++----- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++++- 2 files changed, 30 insertions(+), 7 deletions(-) commit b9f498e11fe9ae508c716d5cb4e468cf176018f2 Author: Jes Sorensen Date: Mon Feb 29 17:04:18 2016 -0500 rtl8xxxu: Add 8723by AGC table The different RF module seems to require a different AGC table as well Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 75 +++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) commit b7dd8ff916574f77d40914321c08b7d78f101530 Author: Jes Sorensen Date: Mon Feb 29 17:04:17 2016 -0500 rtl8xxxu: Add rtl8723b_mac_init_table Newer chips seem to have some different mac registers, requiring a different init table. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 37 +++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit f0d9f5e90717a5e1ab014d63590d10c806ab15b0 Author: Jes Sorensen Date: Mon Feb 29 17:04:16 2016 -0500 rtl8xxxu: Add rtl8723bu_phy_init_antenna_selection() So far this is just for 8723BU. It includes writing to a number of registers I have seen no description for so far. 0x0064 0x0930 0x0944 Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 36 ++++++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 37 insertions(+) commit 22a31d455ce20737e647f8c9cc37ac9080deee96 Author: Jes Sorensen Date: Mon Feb 29 17:04:15 2016 -0500 rtl8xxxu: Add rtl8723bu_radioa_1t_init_table Add 8723bu 1T radio init table. The vendor driver indicates that some registers need special treatment for TFBGA90, TFBGA80, and TFBGA79 packaging. However the vendor driver never actually checks the package type, so just stick to default values here. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 78 ++++++++++++++++++++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 6 +- 2 files changed, 82 insertions(+), 2 deletions(-) commit 36c32588c83df156e80e485e48a827cd57589620 Author: Jes Sorensen Date: Mon Feb 29 17:04:14 2016 -0500 rtl8xxxu: Add rtl8723b_phy_1t_init_table This adds the 8723bu PHY 1T init table. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 103 +++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 0e28b9753a9cf462a535c56e2d31ee17521a4b73 Author: Jes Sorensen Date: Mon Feb 29 17:04:13 2016 -0500 rtl8xxxu: Only setup USB interrupts for parts which support it Only 1st generation chips do provide USB interrupts, so do not try to setup interrupts for newer chips (8192eu and 8723bu). Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 18 +++++++++++++----- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) commit adfc01243f0fc891c630f27ef45320fea71bb98e Author: Jes Sorensen Date: Mon Feb 29 17:04:12 2016 -0500 rtl8xxxu: Use 1024 byte writes for writing 8723bu firmware The 8723bu, like the 8192eu, can also handle 1024 byte block writes. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c836d6014e5057fc5845829ae762190008bded4 Author: Jes Sorensen Date: Mon Feb 29 17:04:11 2016 -0500 rtl8xxxu: Add rtl8723bu_parse_efuse() and 8723bu efuse definition Implement first stab at parsing the 8723bu's efuse. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 47 +++++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 42 +++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) commit 35a741febfae3cfc2a27d3b4935e255585ecfd81 Author: Jes Sorensen Date: Mon Feb 29 17:04:10 2016 -0500 rtl8xxxu: Initial rtl8723bu chip identification This provides initial detection of 8723bu devices, and selects the correct firmware image to load. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 40 ++++++++++++++++++++++-- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +- 2 files changed, 38 insertions(+), 4 deletions(-) commit 99ad16cbea15a6e61acca5662eff8d195cc6fbf6 Author: Jes Sorensen Date: Mon Feb 29 17:04:09 2016 -0500 rtl8xxxu: Init REG_HIMR[01] for 8192eu parts The newer generation chips have different interrupt registers. Initialize this correct registers on 8192eu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 3 +++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 4 ++++ 2 files changed, 7 insertions(+) commit b63d0aaca62be6eed15d3829174307ac2d608623 Author: Jes Sorensen Date: Mon Feb 29 17:04:08 2016 -0500 rtl8xxxu: Kludge to drop incorrect USB OUT EP for 8192EU The 8192eu (and some other parts) will report an incorrect USB OUT EP. This tells the chip to drop it - as per the vendor driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 ++++++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 + 2 files changed, 7 insertions(+) commit 4de24819192eb507525fa24182c86c2073accd12 Author: Jes Sorensen Date: Mon Feb 29 17:04:07 2016 -0500 rtl8xxxu: Fix incorrect test for auto LLT failure The logic for testing auto load failure in rtl8xxxu_auto_llt_table() was inverted. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a47b9d477c792f8c0c9b6419a25528566260916a Author: Jes Sorensen Date: Mon Feb 29 17:04:06 2016 -0500 rtl8xxxu: Init the LLT after we start the firmware To match the flow of the vendor driver, move the LLT init to after the firmware is started. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 07bb46be5306d27c8d8ce7b287688554b9ca1569 Author: Jes Sorensen Date: Mon Feb 29 17:04:05 2016 -0500 rtl8xxxu: Init page boundaries before starting the firmware This reorganizes the device initialization to init page boundaries before starting the firmware. This matches the flow in the 8192eu vendor driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) commit 74b99bed874f5a17336515b63f776a8cbbbceb93 Author: Jes Sorensen Date: Mon Feb 29 17:04:04 2016 -0500 rtl8xxxu: Add rtl8xxxu_auto_llt_table() Newer chips can auto load the LLT table, it is no longer necessary to build it manually in the driver. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 33 +++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 3 ++ 3 files changed, 36 insertions(+), 1 deletion(-) commit c05a9dbfb2b1f30b13126b0901fe4f1bdaf37406 Author: Jes Sorensen Date: Mon Feb 29 17:04:03 2016 -0500 rtl8xxxu: Implment rtl8192eu_power_on() This implements the rtl8192eu power on sequence, and splits it off from the rtl8192cu/rtl8723au power on sequence. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 133 ++++++++++++++++++++- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 6 + 2 files changed, 133 insertions(+), 6 deletions(-) commit b001e086c4c8a5e60a2a28d40ded47ab124458f6 Author: Jes Sorensen Date: Mon Feb 29 17:04:02 2016 -0500 rtl8xxxu: Add rtl8192eu_nic.bin to the MODULE_FIRMWARE list Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 1 + 1 file changed, 1 insertion(+) commit 4a82ffe3f8040c5b3dd50888e00077d1cc8cbf29 Author: Jes Sorensen Date: Mon Feb 29 17:04:01 2016 -0500 rtl8xxxu: Use 1024 byte block loads for 8192eu firmware The rtl8192eu can handle 1024 byte block writes, unlike it's predecessors (8192cu/8188cu). Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e5d435a619fadb475f3a260eda2252acd1662f0 Author: Jes Sorensen Date: Mon Feb 29 17:04:00 2016 -0500 rtl8xxxu: Identify chip vendors correctly This identifies the chip vendors correctly and also picks the correct firmware for rtl8192eu. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 73 +++++++++++++++++----- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 4 ++ 3 files changed, 64 insertions(+), 15 deletions(-) commit 3307d84024d2ed9c8aee0a4bfa694319613734bf Author: Jes Sorensen Date: Mon Feb 29 17:03:59 2016 -0500 rtl8xxxu: Add initial code to parse rtl8192eu efuse This is the start of 8192eu support. For now just detect the device and parse the efuse. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 80 +++++++++++++++++++++++- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 50 ++++++++++++++- 2 files changed, 124 insertions(+), 6 deletions(-) commit 8cf77e176f921d20a1e61d288eaee74a2d1d2ae1 Author: Eliad Peller Date: Mon Mar 7 00:28:09 2016 +0200 wlcore/wl18xx: add radar_debug_mode handling Add debugfs key (under CFG80211_CERTIFICATION_ONUS configuration) to set/clear radar_debug_mode. In this mode, the driver simply ignores radar events (but prints them). The fw is notified about this mode through a special generic_cfg_feature command. This mode is relevant only for ap mode. look for it when initializing ap vif. Signed-off-by: Eliad Peller Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl18xx/debugfs.c | 66 ++++++++++++++++++++++++++++++++ drivers/net/wireless/ti/wl18xx/event.c | 3 +- drivers/net/wireless/ti/wlcore/init.c | 5 +++ drivers/net/wireless/ti/wlcore/wlcore.h | 1 + 4 files changed, 74 insertions(+), 1 deletion(-) commit 87cba1696045cbf963d09c82ceca98db92b7ace9 Author: Eliad Peller Date: Mon Mar 7 00:28:08 2016 +0200 wlcore: don't WARN_ON in case of existing ROC When working with AP + P2P, it's possible to get into a state when the AP is in ROC (due to assiciating station) while trying to ROC on the P2P interface. Replace the WARN_ON with wl1271_error to avoid warnings in this case. Signed-off-by: Eliad Peller Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 54f008497b9f09f0880dd84ce5608be4ad7cff13 Author: Amitkumar Karwar Date: Wed Mar 9 04:21:11 2016 -0800 mwifiex: Empty Tx queue during suspend In cfg80211 suspend handler, stop the netif queue and wait until all the Tx queues become empty. Start the queues in resume handler. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 28 ++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 107b87133361aa5502d7d3c82cdfff77bf8ebe18 Author: Hui Wang Date: Wed Mar 9 15:25:26 2016 +0800 brcmfmac: Remove waitqueue_active check We met a problem of pm_suspend when repeated closing/opening the lid on a Lenovo laptop (1/20 reproduce rate), below is the log: [ 199.735876] PM: Entering mem sleep [ 199.750516] e1000e: EEE TX LPI TIMER: 00000011 [ 199.856638] Trying to free nonexistent resource <000000000000d000-000000000000d0ff> [ 201.753566] brcmfmac: brcmf_pcie_suspend: Timeout on response for entering D3 substate [ 201.753581] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1f0 [brcmfmac] returns -5 [ 201.753585] dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5 [ 201.753589] PM: Device 0000:04:00.0 failed to suspend async: error -5 Through debugging, we found when problem happens, it is not the device fails to enter D3, but the signal D3_ACK comes too early to pass the waitqueue_active() check. Just like this: brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D3_INFORM); // signal is triggered here wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed, BRCMF_PCIE_MBDATA_TIMEOUT); So far I think it is safe to remove waitqueue_active check since there is only one place to trigger this signal (sending BRCMF_H2D_HOST_D3_INFORM). And it is not a problem calling wake_up event earlier than calling wait_event. Cc: Brett Rudley Cc: Hante Meuleman Cc: Franky (Zhenhui) Lin Cc: Pieter-Paul Giesberts Cc: Arend van Spriel Signed-off-by: Hui Wang Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3691ac4a9c957c2896f8ebfb8a92081301f1682e Author: Dan Carpenter Date: Tue Mar 8 15:04:08 2016 +0300 libertas: fix an error code in probe We accidentally return success instead of a negative error code. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ab882a8aa896bc148f282df1372e8638cace49a Merge: 836856e 5ed47226 Author: Kalle Valo Date: Thu Mar 10 14:53:35 2016 +0200 Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * update GSCAN capabilities (Ayala) * fix AES-CMAC in AP mode (Johannes) * adapt prints to new firmware API * rx path improvements (Sara and Gregory) * fixes for the thermal / cooling device code (Chaya Rachel) * fixes for GO uAPSD handling * more code for the 9000 device family (Sara) * infrastructure work for firmware notification (Chaya Rachel) * improve association reliablity (Sara) * runtime PM fixes * fixes for ROC (HS2.0) commit 562c5b4d898613bec97f482098e7507f52c914cb Author: Lionel Landwerlin Date: Thu Mar 10 12:04:21 2016 +0000 drm: fix blob pointer check Check properly that the allocated blob's pointer is valid. Signed-off-by: Lionel Landwerlin Reported-by: Dan Carpenter Cc: Daniel Stone Cc: Daniel Vetter Cc: Matt Roper Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Stone Fixes: 5488dc16fde7 ("drm: introduce pipe color correction properties") Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1457611461-9116-1-git-send-email-lionel.g.landwerlin@intel.com drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58bffb5bbb238d56e8818acb463cce990021fa32 Author: Madhavan Srinivasan Date: Fri Mar 4 10:31:49 2016 +0530 powerpc/perf: Fix misleading comment in pmao_restore_workaround() The current comment in pmao_restore_workaround() regarding hard_irq_disable() is wrong. It should say to hard *disable* interrupts instead of *enable*. Fix it. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f69dc701aac170421117adf7e04d8ec7031a05f Author: Sukadev Bhattiprolu Date: Tue Feb 16 22:21:25 2016 -0500 powerpc/perf/24x7: Eliminate domain suffix in event names The Physical Core events of the 24x7 PMU can be monitored across various domains (physical core, vcpu home core, vcpu home node etc). For each of these core events, we currently create multiple events in sysfs, one for each domain the event can be monitored in. These events are distinguished by their suffixes like __PHYS_CORE, __VCPU_HOME_CORE etc. Rather than creating multiple such entries, we could let the user specify make 'domain' index a required parameter and let the user specify a value for it (like they currently specify the core index). $ cat /sys/bus/event_source/devices/hv_24x7/events/HPM_CCYC domain=?,offset=0x98,core=?,lpar=0x0 $ perf stat -C 0 -e hv_24x7/HPM_CCYC,domain=2,core=1/ true (the 'domain=?' and 'core=?' in sysfs tell perf tool to enforce them as required parameters). This simplifies the interface and allows users to identify events by the name specified in the catalog (User can determine the domain index by referring to '/sys/bus/event_source/devices/hv_24x7/interface/domains'). Eliminating the event suffix eliminates several functions and simplifies code. Note that Physical Chip events can only be monitored in the chip domain so those events have the domain set to 1 (rather than =?) and users don't need to specify the domain index for the Chip events. $ cat /sys/bus/event_source/devices/hv_24x7/events/PM_XLINK_CYCLES domain=1,offset=0x230,chip=?,lpar=0x0 $ perf stat -C 0 -e hv_24x7/PM_XLINK_CYCLES,chip=1/ true Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 149 ++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 83 deletions(-) commit d34171e88aeed4a99c00c7f2af3d5c553e7a4972 Author: Sukadev Bhattiprolu Date: Tue Feb 16 20:07:51 2016 -0500 powerpc/perf/hv-24x7: Display domain indices in sysfs To help users determine domains, display the domain indices used by the kernel in sysfs. $ cat /sys/bus/event_source/devices/hv_24x7/interface/domains 1: Physical Chip 2: Physical Core 3: VCPU Home Core 4: VCPU Home Chip 5: VCPU Home Node 6: VCPU Remote Node Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 41 +++++++++++++++++++++++++++++++++++++++++ arch/powerpc/perf/hv-24x7.h | 1 + 2 files changed, 42 insertions(+) commit 2b206ee6b0df03a89783c6a9ada363122f918800 Author: Sukadev Bhattiprolu Date: Mon Jan 25 23:05:36 2016 -0500 powerpc/perf/hv-24x7: Display change in counter values For 24x7 counters, perf displays the raw value of the 24x7 counter, which is a monotonically increasing value. perf stat -C 0 -e \ 'hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/' \ sleep 1 Performance counter stats for 'CPU(s) 0': 9,105,403,170 hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/ 0.000425751 seconds time elapsed In the typical usage of 'perf stat' this counter value is not as useful as the _change_ in the counter value over the duration of the application. Have h_24x7_event_init() set the event's prev_count to the raw value of the 24x7 counter at the time of initialization. When the application terminates, hv_24x7_event_read() will compute the change in value and report to the perf tool. Similarly, for the transaction interface, clear the event count to 0 at the beginning of the transaction. perf stat -C 0 -e \ 'hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/' \ sleep 1 Performance counter stats for 'CPU(s) 0': 245,758 hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/ 1.006366383 seconds time elapsed Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e5a5886d7ae32b7afebfffecca340e466e4be2d1 Author: Sukadev Bhattiprolu Date: Sat Jan 23 03:58:12 2016 -0500 powerpc/perf/hv-24x7: Fix usage with chip events. 24x7 counters can belong to different domains (core, chip, virtual CPU etc). For events in the 'chip' domain, sysfs entry currently looks like: $ cd /sys/bus/event_source/devices/hv_24x7/events $ cat PM_XLINK_CYCLES__PHYS_CHIP domain=0x1,offset=0x230,core=?,lpar=0x0 where the required parameter, 'core=?' is specified with perf as: perf stat -C 0 -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,core=1/ \ /bin/true This is inconsistent in that 'core' is a required parameter for a chip event. Instead, have the the sysfs entry display 'chip=?' for chip events: $ cd /sys/bus/event_source/devices/hv_24x7/events $ cat PM_XLINK_CYCLES__PHYS_CHIP domain=0x1,offset=0x230,chip=?,lpar=0x0 We also need to add a 'chip' entry in the sysfs format directory: $ ls /sys/bus/event_source/devices/hv_24x7/format chip core domain lpar offset vcpu ^^^^ (new) so the perf tool can automatically check usage and format the chip parameter correctly: $ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/ \ /bin/true Required parameter 'chip' not specified invalid or unsupported event: 'hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/' $ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/ \ /bin/true hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/: 0 6628908 6628908 Performance counter stats for 'CPU(s) 0': 0 hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/ 0.006606970 seconds time elapsed Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit e0728b50d480da6be228dd160a43b37e4c0b1636 Author: Sukadev Bhattiprolu Date: Mon Jan 11 14:55:26 2016 -0800 powerpc/perf: Export Power8 generic and cache events to sysfs Power8 supports a large number of events in each susbystem so when a user runs: perf stat -e branch-instructions sleep 1 perf stat -e L1-dcache-loads sleep 1 it is not clear as to which PMU events were monitored. Export the generic hardware and cache perf events for Power8 to sysfs, so users can precisely determine the PMU event monitored by the generic event. Eg: cat /sys/bus/event_source/devices/cpu/events/branch-instructions event=0x10068 $ cat /sys/bus/event_source/devices/cpu/events/L1-dcache-loads event=0x100ee Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/perf_event_server.h | 8 ++ arch/powerpc/perf/power8-events-list.h | 51 +++++++++++++ arch/powerpc/perf/power8-pmu.c | 110 ++++++++++++++++++--------- 3 files changed, 131 insertions(+), 38 deletions(-) commit d4969e2459c6e852a6862256cf8e869aaa3e8adf Author: Sukadev Bhattiprolu Date: Mon Jan 11 14:55:25 2016 -0800 powerpc/perf: Remove PME_ prefix for power7 events We used the PME_ prefix earlier to avoid some macro/variable name collisions. We have since changed the way we define/use the event macros so we no longer need the prefix. By dropping the prefix, we keep the the event macros consistent with their official names. Reported-by: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/perf_event_server.h | 2 +- arch/powerpc/perf/power7-pmu.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 4f8e4f3537cafc4de128e6bfdf83baa78bc60eb1 Author: Takashi Iwai Date: Thu Mar 10 12:02:49 2016 +0100 ALSA: hda - Don't handle ELD notify from invalid port The current Intel HDMI codec driver supports only three fixed ports from port B to port D. However, i915 driver may assign a DP on other ports, e.g. port A, when no eDP is used. This incompatibility is caught later at pin_nid_to_pin_index() and results in a warning message like "HDMI: pin nid 4 not registered" at each time. This patch filters out such invalid events beforehand, so that the kernel won't be too grumbling. Reported-by: Stefan Assmann Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 56dc66ff1c6d71f9a38c4a7c000b72b921fe4c89 Author: Takashi Iwai Date: Thu Mar 10 11:33:43 2016 +0100 ALSA: hda - Apply reboot D3 fix for CX20724 codec, too Just like CX20722, CX7024 codec also requires the power down at reboot in order to reduce the noise at reboot/shutdown. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=113511 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9999c8c01f34c918a57d6e5ba2f5d8b79aa04801 Author: Andy Lutomirski Date: Wed Mar 9 13:24:33 2016 -0800 x86/entry: Call enter_from_user_mode() with IRQs off Now that slow-path syscalls always enter C before enabling interrupts, it's straightforward to call enter_from_user_mode() before enabling interrupts rather than doing it as part of entry tracing. With this change, we should finally be able to retire exception_enter(). This will also enable optimizations based on knowing that we never change context tracking state with interrupts on. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Frédéric Weisbecker Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/bc376ecf87921a495e874ff98139b1ca2f5c5dd7.1457558566.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 33 +++++++++++---------------------- arch/x86/include/asm/thread_info.h | 5 ++++- 2 files changed, 15 insertions(+), 23 deletions(-) commit a798f091113ef4999277dbe0483d37d04fa35b2e Author: Andy Lutomirski Date: Wed Mar 9 13:24:32 2016 -0800 x86/entry/32: Change INT80 to be an interrupt gate We want all of the syscall entries to run with interrupts off so that we can efficiently run context tracking before enabling interrupts. This will regress int $0x80 performance on 32-bit kernels by a couple of cycles. This shouldn't matter much -- int $0x80 is not a fast path. This effectively reverts: 657c1eea0019 ("x86/entry/32: Fix entry_INT80_32() to expect interrupts to be on") ... and fixes the same issue differently. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Frédéric Weisbecker Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/59b4f90c9ebfccd8c937305dbbbca680bc74b905.1457558566.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 15 +++------------ arch/x86/entry/entry_32.S | 8 ++++---- arch/x86/entry/entry_64_compat.S | 2 +- arch/x86/kernel/traps.c | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) commit e481ab23c57b37c989fa27e0a6b3e941a908775a Author: Ramesh Shanmugasundaram Date: Mon Feb 29 12:37:25 2016 +0000 can: rcar_can: Add r8a7795 support Added r8a7795 SoC support. Signed-off-by: Ramesh Shanmugasundaram Acked-by: Rob Herring Signed-off-by: Marc Kleine-Budde Documentation/devicetree/bindings/net/can/rcar_can.txt | 11 +++++++++++ drivers/net/can/Kconfig | 2 +- drivers/net/can/rcar_can.c | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) commit 38460a2178d225b39ade5ac66586c3733391cf86 Author: Davidlohr Bueso Date: Wed Mar 9 17:55:36 2016 -0800 locking/csd_lock: Use smp_cond_acquire() in csd_lock_wait() We can micro-optimize this call and mildly relax the barrier requirements by relying on ctrl + rmb, keeping the acquire semantics. In addition, this is pretty much the now standard for busy-waiting under such restraints. Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1457574936-19065-3-git-send-email-dbueso@suse.de Signed-off-by: Ingo Molnar kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 90d1098478fb08a1ef166fe91622d8046869e17b Author: Davidlohr Bueso Date: Wed Mar 9 17:55:35 2016 -0800 locking/csd_lock: Explicitly inline csd_lock*() helpers While the compiler tends to already to it for us (except for csd_unlock), make it explicit. These helpers mainly deal with the ->flags, are short-lived and can be called, for example, from smp_call_function_many(). Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1457574936-19065-2-git-send-email-dbueso@suse.de Signed-off-by: Ingo Molnar kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6cbe9e4a228ce00b9fa10d56da6cb7985d7b10e9 Merge: 29b75eb 8e0f93c Author: Ingo Molnar Date: Thu Mar 10 10:28:27 2016 +0100 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 6cc6426605b7edabde41c72add723979d1d509e7 Author: Marek Vasut Date: Thu Mar 3 20:45:58 2016 +0100 can: ifi: Add obscure bit swap for EFF frame IDs In case of CAN2.0 EFF frame, the controller handles frame IDs in a rather bizzare way. The ID is split into an extended part, IDX[28:11] and standard part, ID[10:0]. In the TX path, the core first sends the top 11 bits of the IDX, followed by ID and finally the rest of IDX. In the RX path, the core stores the ID the LSbit part of IDX field, followed by the LSbit parts of real IDX. The MSbit parts of IDX are stored in ID field of the register. This patch implements the necessary bit shuffling to mitigate this obscure behavior. In case two of these controllers are connected together, the RX and TX bit swapping nullifies itself and the issue does not manifest. The issue only manifests when talking to another different CAN controller. Signed-off-by: Marek Vasut Cc: Marc Kleine-Budde Cc: Mark Rutland Cc: Oliver Hartkopp Cc: Wolfgang Grandegger Reviewed-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 223654355c4eb35f890233e6a52b0f8d79bc3b44 Author: Marek Vasut Date: Thu Mar 3 20:45:57 2016 +0100 can: ifi: Fix RX and TX ID mask The RX and TX ID mask for CAN2.0 is 11 bits wide. This patch fixes the incorrect mask, which caused the CAN IDs to miss the MSBit both on receive and transmit. Signed-off-by: Marek Vasut Cc: Marc Kleine-Budde Cc: Mark Rutland Cc: Oliver Hartkopp Cc: Wolfgang Grandegger Reviewed-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f1deaee0c3ab1950987d7207d613df0417bd251c Author: Marek Vasut Date: Thu Mar 3 20:45:56 2016 +0100 can: ifi: Fix TX DLC configuration The TX DLC, the transmission length information, was not written into the transmit configuration register. When using the CAN core with different CAN controller, the receiving CAN controller will receive only the ID part of the CAN frame, but no data at all. This patch adds the TX DLC into the register to fix this issue. Signed-off-by: Marek Vasut Cc: Marc Kleine-Budde Cc: Mark Rutland Cc: Oliver Hartkopp Cc: Wolfgang Grandegger Reviewed-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 99312c377f82f91e7754aefe42f64b619b295fd6 Author: Marek Vasut Date: Thu Mar 3 20:45:55 2016 +0100 can: ifi: Fix clock generator configuration The clock generation does not match reality when using the CAN IP core outside of the FPGA design. This patch fixes the computation of values which are programmed into the clock generator registers. First, there are some off-by-one errors which manifest themselves only when communicating with different controller, so those are fixed. Second, the bits in the clock generator registers have different meaning depending on whether the core is in ISO CANFD mode or any of the other modes (BOSCH CANFD or CAN2.0). Detect the ISO CANFD mode and fix handling of this special case of clock configuration. Finally, the CAN clock speed is in CANCLOCK register, not SYSCLOCK register, so fix this as well. Signed-off-by: Marek Vasut Cc: Marc Kleine-Budde Cc: Mark Rutland Cc: Oliver Hartkopp Cc: Wolfgang Grandegger Reviewed-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/ifi_canfd/ifi_canfd.c | 44 ++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 01714a6f5fa59a313d8f44dcf017911dfcb25831 Author: Doug Anderson Date: Tue Mar 8 15:03:23 2016 -0800 HID: i2c-hid: Fix suspend/resume when already runtime suspended On ACPI-based systems ACPI power domain code runtime resumes device before calling suspend method, which ensures that i2c-hid suspend code starts with device not in low-power state and with interrupts enabled. On other systems, especially if device is not a part of any power domain, we may end up calling driver's system-level suspend routine while the device is runtime-suspended (with controller in presumably low power state and interrupts disabled). This will result in interrupts being essentially disabled twice, and we will only re-enable them after both system resume and runtime resume methods complete. Unfortunately i2c_hid_resume() calls i2c_hid_hwreset() and that only works properly if interrupts are enabled. Also if device is runtime-suspended driver's suspend code may fail if it tries to issue I/O requests. Let's fix it by runtime-resuming the device if we need to run HID driver's suspend code and also disabling interrupts only if device is not already runtime-suspended. Also on resume we mark the device as running at full power (since that is what resetting will do to it). Reviewed-by: Benson Leung Tested-by: Mika Westerberg Acked-by: Benjamin Tissoires Signed-off-by: Doug Anderson Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit 1dcdde98bcbd5a9f0ce94bc2080ec31e71a8d811 Author: Benson Leung Date: Tue Mar 8 11:25:39 2016 -0800 HID: i2c-hid: Add hid-over-i2c name to i2c id table When using the device tree binding OF compatible = "hid-over-i2c" the i2c id table also needs to have that name in order to auto load this driver, since i2c core reports module alias as i2c: where is compatible string of OF binding stripped of manufacturer's prefix. Tested-by: Andrew Duggan Acked-by: Benjamin Tissoires Signed-off-by: Benson Leung Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 1 + 1 file changed, 1 insertion(+) commit fae98164463948eb31d638fe207c25a3d2b9312f Author: Linus Walleij Date: Thu Mar 10 15:48:06 2016 +0700 gpio: uapi: use 0xB4 as ioctl() major The previous 'o' is in conflict and not very orderly assigned. We want to select an ioctl() major that does not conflict with the existining ones. Add the new reserved major (0xB4) to Documentation/ioctl/ioctl-number.txt Fixes: 3c702e9987e2 ("gpio: add a userspace chardev ABI for GPIOs") Suggested-by: Arnd Bergmann Signed-off-by: Linus Walleij Documentation/ioctl/ioctl-number.txt | 1 + include/uapi/linux/gpio.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit fda57b2267e12de014069b1596a5438cf76fc7c6 Author: Andy Lutomirski Date: Wed Mar 9 19:00:35 2016 -0800 x86/entry: Improve system call entry comments Ingo suggested that the comments should explain when the various entries are used. This adds these explanations and improves other parts of the comments. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/9524ecef7a295347294300045d08354d6a57c6e7.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 61 +++++++++++++++++++++++++++- arch/x86/entry/entry_64.S | 10 +++++ arch/x86/entry/entry_64_compat.S | 85 +++++++++++++++++++++++++++------------- 3 files changed, 128 insertions(+), 28 deletions(-) commit 392a62549fbb80da48811d04391615a25c39d091 Author: Andy Lutomirski Date: Wed Mar 9 19:00:34 2016 -0800 x86/entry: Remove TIF_SINGLESTEP entry work Now that SYSENTER with TF set puts X86_EFLAGS_TF directly into regs->flags, we don't need a TIF_SINGLESTEP fixup in the syscall entry code. Remove it. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/2d15f24da52dafc9d2f0b8d76f55544f4779c517.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 10 ---------- arch/x86/include/asm/thread_info.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) commit 2a41aa4feb25af3ead60b740c43df80c576efea2 Author: Andy Lutomirski Date: Wed Mar 9 19:00:33 2016 -0800 x86/entry/32: Add and check a stack canary for the SYSENTER stack The first instruction of the SYSENTER entry runs on its own tiny stack. That stack can be used if a #DB or NMI is delivered before the SYSENTER prologue switches to a real stack. We have code in place to prevent us from overflowing the tiny stack. For added paranoia, add a canary to the stack and check it in do_debug() -- that way, if something goes wrong with the #DB logic, we'll eventually notice. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/6ff9a806f39098b166dc2c41c1db744df5272f29.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 3 ++- arch/x86/kernel/process.c | 3 +++ arch/x86/kernel/traps.c | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit 7536656f08d0c1a3b4c487d00785c5186ec6f533 Author: Andy Lutomirski Date: Wed Mar 9 19:00:32 2016 -0800 x86/entry/32: Simplify and fix up the SYSENTER stack #DB/NMI fixup Right after SYSENTER, we can get a #DB or NMI. On x86_32, there's no IST, so the exception handler is invoked on the temporary SYSENTER stack. Because the SYSENTER stack is very small, we have a fixup to switch off the stack quickly when this happens. The old fixup had several issues: 1. It checked the interrupt frame's CS and EIP. This wasn't obviously correct on Xen or if vm86 mode was in use [1]. 2. In the NMI handler, it did some frightening digging into the stack frame. I'm not convinced this digging was correct. 3. The fixup didn't switch stacks and then switch back. Instead, it synthesized a brand new stack frame that would redirect the IRET back to the SYSENTER code. That frame was highly questionable. For one thing, if NMI nested inside #DB, we would effectively abort the #DB prologue, which was probably safe but was frightening. For another, the code used PUSHFL to write the FLAGS portion of the frame, which was simply bogus -- by the time PUSHFL was called, at least TF, NT, VM, and all of the arithmetic flags were clobbered. Simplify this considerably. Instead of looking at the saved frame to see where we came from, check the hardware ESP register against the SYSENTER stack directly. Malicious user code cannot spoof the kernel ESP register, and by moving the check after SAVE_ALL, we can use normal PER_CPU accesses to find all the relevant addresses. With this patch applied, the improved syscall_nt_32 test finally passes on 32-bit kernels. [1] It isn't obviously correct, but it is nonetheless safe from vm86 shenanigans as far as I can tell. A user can't point EIP at entry_SYSENTER_32 while in vm86 mode because entry_SYSENTER_32, like all kernel addresses, is greater than 0xffff and would thus violate the CS segment limit. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/b2cdbc037031c07ecf2c40a96069318aec0e7971.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 114 ++++++++++++++++++--------------------- arch/x86/kernel/asm-offsets_32.c | 5 ++ 2 files changed, 56 insertions(+), 63 deletions(-) commit 6dcc94149d605908a7c0c4cf2085340637aac86d Author: Andy Lutomirski Date: Wed Mar 9 19:00:31 2016 -0800 x86/entry: Only allocate space for tss_struct::SYSENTER_stack if needed The SYSENTER stack is only used on 32-bit kernels. Remove it on 64-bit kernels. ( We may end up using it down the road on 64-bit kernels. If so, we'll re-enable it for CONFIG_IA32_EMULATION. ) Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/9dbd18429f9ff61a76b6eda97a9ea20510b9f6ba.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) commit f2b375756c839ff655a3e0b45e339f8fbf973093 Author: Andy Lutomirski Date: Wed Mar 9 19:00:30 2016 -0800 x86/entry: Vastly simplify SYSENTER TF (single-step) handling Due to a blatant design error, SYSENTER doesn't clear TF (single-step). As a result, if a user does SYSENTER with TF set, we will single-step through the kernel until something clears TF. There is absolutely nothing we can do to prevent this short of turning off SYSENTER [1]. Simplify the handling considerably with two changes: 1. We already sanitize EFLAGS in SYSENTER to clear NT and AC. We can add TF to that list of flags to sanitize with no overhead whatsoever. 2. Teach do_debug() to ignore single-step traps in the SYSENTER prologue. That's all we need to do. Don't get too excited -- our handling is still buggy on 32-bit kernels. There's nothing wrong with the SYSENTER code itself, but the #DB prologue has a clever fixup for traps on the very first instruction of entry_SYSENTER_32, and the fixup doesn't work quite correctly. The next two patches will fix that. [1] We could probably prevent it by forcing BTF on at all times and making sure we clear TF before any branches in the SYSENTER code. Needless to say, this is a bad idea. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/a30d2ea06fe4b621fe6a9ef911b02c0f38feb6f2.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 42 ++++++++++++++++++++++---------- arch/x86/entry/entry_64_compat.S | 9 ++++++- arch/x86/include/asm/proto.h | 15 ++++++++++-- arch/x86/kernel/traps.c | 52 +++++++++++++++++++++++++++++++++------- 4 files changed, 94 insertions(+), 24 deletions(-) commit 8bb5643686d2898bec181c407651cf84e77d413f Author: Andy Lutomirski Date: Wed Mar 9 19:00:29 2016 -0800 x86/entry/traps: Clear DR6 early in do_debug() and improve the comment Leaving any bits set in DR6 on return from a debug exception is asking for trouble. Prevent it by writing zero right away and clarify the comment. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/3857676e1be8fb27db4b89bbb1e2052b7f435ff4.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 81edd9f69a6fd214fdbe66b43de6aa1610c84c63 Author: Andy Lutomirski Date: Wed Mar 9 19:00:28 2016 -0800 x86/entry/traps: Clear TIF_BLOCKSTEP on all debug exceptions The SDM says that debug exceptions clear BTF, and we need to keep TIF_BLOCKSTEP in sync with BTF. Clear it unconditionally and improve the comment. I suspect that the fact that kmemcheck could cause TIF_BLOCKSTEP not to be cleared was just an oversight. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/fa86e55d196e6dde5b38839595bde2a292c52fdc.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit c2c9b52fab0d0cf993476ed4c34f24da5a1205ae Author: Andy Lutomirski Date: Wed Mar 9 19:00:27 2016 -0800 x86/entry/32: Restore FLAGS on SYSEXIT We weren't restoring FLAGS at all on SYSEXIT. Apparently no one cared. With this patch applied, native kernels should always honor task_pt_regs()->flags, which opens the door for some sys_iopl() cleanups. I'll do those as a separate series, though, since getting it right will involve tweaking some paravirt ops. ( The short version is that, before this patch, sys_iopl(), invoked via SYSENTER, wasn't guaranteed to ever transfer the updated regs->flags, so sys_iopl() had to change the hardware flags register as well. ) Reported-by: Brian Gerst Signed-off-by: Andy Lutomirski Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3f98b207472dc9784838eb5ca2b89dcc845ce269.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 67f590e8d4d718d9bd377b39223f7f69678d6a10 Author: Andy Lutomirski Date: Wed Mar 9 19:00:26 2016 -0800 x86/entry/32: Filter NT and speed up AC filtering in SYSENTER This makes the 32-bit code work just like the 64-bit code. It should speed up syscalls on 32-bit kernels on Skylake by something like 20 cycles (by analogy to the 64-bit compat case). It also cleans up NT just like we do for the 64-bit case. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/07daef3d44bd1ed62a2c866e143e8df64edb40ee.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit e786041153df6343169373177248abfab5c5ac1b Author: Andy Lutomirski Date: Wed Mar 9 19:00:25 2016 -0800 x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test CLAC is slow, and the SYSENTER code already has an unlikely path that runs if unusual flags are set. Drop the CLAC and instead rely on the unlikely path to clear AC. This seems to save ~24 cycles on my Skylake laptop. (Hey, Intel, make this faster please!) Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/90d6db2189f9add83bc7bddd75a0c19ebbd676b2.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64_compat.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a318beea224d255c38652f88a7ae0d30ac4c23c3 Author: Andy Lutomirski Date: Wed Mar 9 19:00:24 2016 -0800 selftests/x86: In syscall_nt, test NT|TF as well Setting TF prevents fastpath returns in most cases, which causes the test to fail on 32-bit kernels because 32-bit kernels do not, in fact, handle NT correctly on SYSENTER entries. The next patch will fix 32-bit kernels. Signed-off-by: Andy Lutomirski Cc: Andrew Cooper 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 Link: http://lkml.kernel.org/r/bd4bb48af6b10c0dc84aec6dbcf487ed25683495.1457578375.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/syscall_nt.c | 57 +++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 8 deletions(-) commit 108b5c8bba6be101100596bf37a165214e1c8458 Author: Shawn Lin Date: Thu Mar 10 14:52:27 2016 +0800 spi: rockchip: covert rsd_nsecs to u32 type rsd_nsecs is defined as u8 memeber of struct rockchip_spi, but using of_property_read_u32. That means we take risk of truncation by type conversion if we pass on big value from dt. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec5c5d8ac028cfec4c7c976d93bed1734f1a670a Author: Shawn Lin Date: Thu Mar 10 14:51:48 2016 +0800 spi: rockchip: header file cleanup Remove some of unused header files and reoder it into alphabetical order. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 69ae9895d3fed49ee830c491b3d51c72966a8a4c Author: Bjorn Andersson Date: Sat Feb 13 17:35:19 2016 -0800 MAINTAINERS: Add co-maintainer for remoteproc subsystems Add myself as co-maintainer for the remote processor related subsystems, as agreed with Ohad. Acked-by: Ohad Ben-Cohen Signed-off-by: Bjorn Andersson MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit a8ed9b8695065d37d45efc446efbde5654f9f7c2 Author: Geliang Tang Date: Thu Mar 10 00:18:57 2016 -0500 ext4: drop unneeded BUFFER_TRACE in ext4_delete_inline_entry() BUFFER_TRACE info "call ext4_handle_dirty_metadata" doesn't match the code, so drop it. Signed-off-by: Geliang Tang Signed-off-by: Theodore Ts'o fs/ext4/inline.c | 1 - 1 file changed, 1 deletion(-) commit b8a07463c8c5fd7c609590c7cd9eda897a1b6cd6 Author: Adam Buchbinder Date: Wed Mar 9 23:49:05 2016 -0500 ext4: fix misspellings in comments. Signed-off-by: Adam Buchbinder Signed-off-by: Theodore Ts'o fs/ext4/ext4_extents.h | 2 +- fs/ext4/extents.c | 2 +- fs/ext4/ialloc.c | 2 +- fs/ext4/mballoc.c | 2 +- fs/ext4/migrate.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit c0a2ad9b50dd80eeccd73d9ff962234590d5ec93 Author: OGAWA Hirofumi Date: Wed Mar 9 23:47:25 2016 -0500 jbd2: fix FS corruption possibility in jbd2_journal_destroy() on umount path On umount path, jbd2_journal_destroy() writes latest transaction ID (->j_tail_sequence) to be used at next mount. The bug is that ->j_tail_sequence is not holding latest transaction ID in some cases. So, at next mount, there is chance to conflict with remaining (not overwritten yet) transactions. mount (id=10) write transaction (id=11) write transaction (id=12) umount (id=10) <= the bug doesn't write latest ID mount (id=10) write transaction (id=11) crash mount [recovery process] transaction (id=11) transaction (id=12) <= valid transaction ID, but old commit must not replay Like above, this bug become the cause of recovery failure, or FS corruption. So why ->j_tail_sequence doesn't point latest ID? Because if checkpoint transactions was reclaimed by memory pressure (i.e. bdev_try_to_free_page()), then ->j_tail_sequence is not updated. (And another case is, __jbd2_journal_clean_checkpoint_list() is called with empty transaction.) So in above cases, ->j_tail_sequence is not pointing latest transaction ID at umount path. Plus, REQ_FLUSH for checkpoint is not done too. So, to fix this problem with minimum changes, this patch updates ->j_tail_sequence, and issue REQ_FLUSH. (With more complex changes, some optimizations would be possible to avoid unnecessary REQ_FLUSH for example though.) BTW, journal->j_tail_sequence = ++journal->j_transaction_sequence; Increment of ->j_transaction_sequence seems to be unnecessary, but ext3 does this. Signed-off-by: OGAWA Hirofumi Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/jbd2/journal.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit cdc4e47da8f4c32eeb6b2061a8a834f4362a12b7 Author: Alexei Starovoitov Date: Wed Mar 9 20:02:33 2016 -0800 bpf: avoid copying junk bytes in bpf_get_current_comm() Lots of places in the kernel use memcpy(buf, comm, TASK_COMM_LEN); but the result is typically passed to print("%s", buf) and extra bytes after zero don't cause any harm. In bpf the result of bpf_get_current_comm() is used as the part of map key and was causing spurious hash map mismatches. Use strlcpy() to guarantee zero-terminated string. bpf verifier checks that output buffer is zero-initialized, so even for short task names the output buffer don't have junk bytes. Note it's not a security concern, since kprobe+bpf is root only. Fixes: ffeedafbf023 ("bpf: introduce current->pid, tgid, uid, gid, comm accessors") Reported-by: Tobias Waldekranz Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8cdc05173f05d212627b7aba7ec47fa334a79f2 Author: Alexei Starovoitov Date: Wed Mar 9 18:56:49 2016 -0800 bpf: bpf_stackmap_copy depends on CONFIG_PERF_EVENTS 0-day bot reported build error: kernel/built-in.o: In function `map_lookup_elem': >> kernel/bpf/.tmp_syscall.o:(.text+0x329b3c): undefined reference to `bpf_stackmap_copy' when CONFIG_BPF_SYSCALL is set and CONFIG_PERF_EVENTS is not. Add weak definition to resolve it. This code path in map_lookup_elem() is never taken when CONFIG_PERF_EVENTS is not set. Fixes: 557c0c6e7df8 ("bpf: convert stackmap to pre-allocation") Reported-by: Fengguang Wu Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2d90c160e5f1d784e180f1e1458d56eee4d7f4f4 Author: Jan Kara Date: Wed Mar 9 23:11:13 2016 -0500 ext4: more efficient SEEK_DATA implementation Using SEEK_DATA in a huge sparse file can easily lead to sotflockups as ext4_seek_data() iterates hole block-by-block. Fix the problem by using returned hole size from ext4_map_blocks() and thus skip the hole in one go. Update also SEEK_HOLE implementation to follow the same pattern as SEEK_DATA to make future maintenance easier. Furthermore we add cond_resched() to both ext4_seek_data() and ext4_seek_hole() to avoid softlockups in case evil user creates huge fragmented file and we have to go through lots of extents. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 ++ fs/ext4/file.c | 97 +++++++++++++++++++++------------------------------------ fs/ext4/inode.c | 67 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 61 deletions(-) commit e3fb8eb14eafd2847c04cf48b52a705c36f4db98 Author: Jan Kara Date: Wed Mar 9 23:03:27 2016 -0500 ext4: cleanup handling of bh->b_state in DAX mmap ext4_dax_mmap_get_block() updates bh->b_state directly instead of using ext4_update_bh_state(). This is mostly a cosmetic issue since DAX code always passes on-stack buffer_head but clean this up to make code more uniform. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit facab4d9711e7aa3532cb82643803e8f1b9518e8 Author: Jan Kara Date: Wed Mar 9 22:54:00 2016 -0500 ext4: return hole from ext4_map_blocks() Currently, ext4_map_blocks() just returns 0 when it finds a hole and allocation is not requested. However we have all the information available to tell how large the hole actually is and there are callers of ext4_map_blocks() which would save some block-by-block hole iteration if they knew this information. So fill in struct ext4_map_blocks even for holes with the information we have. We keep returning 0 for holes to maintain backward compatibility of the function. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 11 +++++++++-- fs/ext4/indirect.c | 19 +++++++++++++++++-- fs/ext4/inode.c | 15 ++++++++++----- 3 files changed, 36 insertions(+), 9 deletions(-) commit 140a52508a68387e22486659ff9eaa89a24f6e40 Author: Jan Kara Date: Wed Mar 9 22:46:57 2016 -0500 ext4: factor out determining of hole size ext4_ext_put_gap_in_cache() determines hole size in the extent tree, then trims this with possible delayed allocated blocks, and inserts the result into the extent status tree. Factor out determination of the size of the hole in the extent tree as we will need this information in ext4_ext_map_blocks() as well. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 80 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 33 deletions(-) commit 391005e8e3cd5bb641dff5abb1ad37254602cd7e Author: Subhransu S. Prusty Date: Thu Mar 10 09:04:07 2016 +0530 ASoC: hdac_hdmi: Fix infoframe programming Audio infoframe used incorrect buffer, so fix it. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 82b3aea65f9fee161d8e07602e5a8c7b0b103fa3 Author: Shubhrajyoti Datta Date: Wed Mar 9 14:17:20 2016 +0530 spi: xilinx: Add devicetree binding for spi-xilinx Add a binding document for the spi/spi-xilinx Signed-off-by: Shubhrajyoti Datta Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-xilinx.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 87d8a74b56746d4b6125602365b10995116afd00 Author: Jan Kara Date: Wed Mar 9 22:26:55 2016 -0500 ext4: fix setting of referenced bit in ext4_es_lookup_extent() We were setting referenced bit on the extent structure we return from ext4_es_lookup_extent() which is just a private structure on stack. Thus setting had no effect. Set the bit in the structure in the status tree instead. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/extents_status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b8377dca1fd1974d245b2a04a708fc434761c65 Merge: 9531ab6 9ed988c Author: David S. Miller Date: Wed Mar 9 22:13:01 2016 -0500 Merge branch 'variable-length-ll-headers' Willem de Bruijn says: ==================== net: validate variable length ll headers Allow device-specific validation of link layer headers. Existing checks drop all packets shorter than hard_header_len. For variable length protocols, such packets can be valid. patch 1 adds header_ops.validate and dev_validate_header patch 2 implements the protocol specific callback for AX25 patch 3 replaces ll_header_truncated with dev_validate_header ==================== Signed-off-by: David S. Miller commit 9ed988cd591500c040b2a6257bc68543e08ceeef Author: Willem de Bruijn Date: Wed Mar 9 21:58:34 2016 -0500 packet: validate variable length ll headers Replace link layer header validation check ll_header_truncate with more generic dev_validate_header. Validation based on hard_header_len incorrectly drops valid packets in variable length protocols, such as AX25. dev_validate_header calls header_ops.validate for such protocols to ensure correctness below hard_header_len. See also http://comments.gmane.org/gmane.linux.network/401064 Fixes 9c7077622dd9 ("packet: make packet_snd fail on len smaller than l2 header") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit ea47781c26510e5d97f80f9aceafe9065bd5e3aa Author: Willem de Bruijn Date: Wed Mar 9 21:58:33 2016 -0500 ax25: add link layer header validation function As variable length protocol, AX25 fails link layer header validation tests based on a minimum length. header_ops.validate allows protocols to validate headers that are shorter than hard_header_len. Implement this callback for AX25. See also http://comments.gmane.org/gmane.linux.network/401064 Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/ax25/ax25_ip.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2793a23aacbd754dbbb5cb75093deb7e4103bace Author: Willem de Bruijn Date: Wed Mar 9 21:58:32 2016 -0500 net: validate variable length ll headers Netdevice parameter hard_header_len is variously interpreted both as an upper and lower bound on link layer header length. The field is used as upper bound when reserving room at allocation, as lower bound when validating user input in PF_PACKET. Clarify the definition to be maximum header length. For validation of untrusted headers, add an optional validate member to header_ops. Allow bypassing of validation by passing CAP_SYS_RAWIO, for instance for deliberate testing of corrupt input. In this case, pad trailing bytes, as some device drivers expect completely initialized headers. See also http://comments.gmane.org/gmane.linux.network/401064 Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/linux/netdevice.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit cc998d8bc74341f6bbbcd63ab4449a6acfc45ee9 Merge: d2d13ed 81f70ba Author: Linus Walleij Date: Thu Mar 10 09:29:25 2016 +0700 Merge tag 'v4.5-rc5' into devel Linux 4.5-rc5 commit 7f8b8f3fba55b345f9b6e3f55906bef6e29e354b Author: Lars-Peter Clausen Date: Fri Mar 4 11:15:07 2016 +0100 mpt3sas: 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: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen Acked-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 1 - 1 file changed, 1 deletion(-) commit 5ecee0a3ee8d74b6950cb41e8989b0c2174568d4 Author: Douglas Gilbert Date: Thu Mar 3 00:31:29 2016 -0500 sg: fix dxferp in from_to case One of the strange things that the original sg driver did was let the user provide both a data-out buffer (it followed the sg_header+cdb) _and_ specify a reply length greater than zero. What happened was that the user data-out buffer was copied into some kernel buffers and then the mid level was told a read type operation would take place with the data from the device overwriting the same kernel buffers. The user would then read those kernel buffers back into the user space. From what I can tell, the above action was broken by commit fad7f01e61bf ("sg: set dxferp to NULL for READ with the older SG interface") in 2008 and syzkaller found that out recently. Make sure that a user space pointer is passed through when data follows the sg_header structure and command. Fix the abnormal case when a non-zero reply_len is also given. Fixes: fad7f01e61bf737fe8a3740d803f000db57ecac6 Cc: #v2.6.28+ Signed-off-by: Douglas Gilbert Reviewed-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 489011652a2d5555901def04c24d68874e8ba9a1 Merge: 59e6473 ff8e92d Author: Dan Williams Date: Wed Mar 9 17:15:43 2016 -0800 Merge branch 'for-4.6/pfn' into libnvdimm-for-next commit 59e6473980f321c16299e12db69d1fabc2644a6f Author: Dan Williams Date: Tue Mar 8 07:16:07 2016 -0800 libnvdimm, pmem: clear poison on write If a write is directed at a known bad block perform the following: 1/ write the data 2/ send a clear poison command 3/ invalidate the poison out of the cache hierarchy Cc: Cc: Ross Zwisler Reviewed-by: Vishal Verma Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 5 +++++ drivers/nvdimm/bus.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/nd.h | 2 ++ drivers/nvdimm/pmem.c | 29 +++++++++++++++++++++++++++- include/linux/pmem.h | 19 +++++++++++++++++++ 5 files changed, 100 insertions(+), 1 deletion(-) commit 0d6f3ebf9ebdf3d2047dbe63dda501990f095641 Author: Masanari Iida Date: Thu Feb 18 12:26:13 2016 +0900 Doc: nfs: Fix typos in Documentation/filesystems/nfs This patch fix spelling typos found in Documentation/filesystems/nfs Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet Documentation/filesystems/nfs/fault_injection.txt | 4 ++-- Documentation/filesystems/nfs/nfs-rdma.txt | 2 +- Documentation/filesystems/nfs/nfsroot.txt | 2 +- Documentation/filesystems/nfs/pnfs.txt | 6 +++--- Documentation/filesystems/nfs/rpc-server-gss.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit b5ebc8ec693281c3c1efff7459a069cbd8b9a149 Author: Dan Williams Date: Sun Mar 6 15:20:51 2016 -0800 libnvdimm, pmem: fix kmap_atomic() leak in error path When we enounter a bad block we need to kunmap_atomic() before returning. Cc: Cc: Ross Zwisler Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ff8e92d5d94b99aab39f439d532cba435947dfc0 Author: NeilBrown Date: Thu Mar 10 08:59:28 2016 +1100 nvdimm/btt: don't allocate unused major device number alloc_disk(0) does not require or use a ->major number, all devices are allocated with a major of BLOCK_EXT_MAJOR. So don't allocate btt_major. Signed-off-by: NeilBrown Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit ec56151d382c2140851b4f25203af9016ba84fea Author: NeilBrown Date: Thu Mar 10 08:59:28 2016 +1100 nvdimm/blk: don't allocate unused major device number When alloc_disk(0) is used ->major is completely ignored, all devices are allocated with a "major" of BLOCK_EXT_MAJOR. So don't allocate nd_blk_major Signed-off-by: NeilBrown Signed-off-by: Dan Williams drivers/nvdimm/blk.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit c85cc817e5b6c45a78c3b34170dfeb6469b56d82 Author: Lv Zheng Date: Wed Mar 2 14:16:25 2016 +0800 ACPI / OSL: Add support to install tables via initrd This patch adds support to install tables from initrd. If a table in the initrd wasn't used by the override mechanism, the table would be installed after initializing all RSDT/XSDT tables. Link: https://lkml.org/lkml/2014/2/28/368 Reported-by: Thomas Renninger Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/internal.h | 1 + drivers/acpi/osl.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/acpi/tables.c | 2 ++ 3 files changed, 52 insertions(+), 1 deletion(-) commit a543132ee04d1599a0abe913eaf43d1986021d24 Author: Lv Zheng Date: Wed Mar 2 14:16:17 2016 +0800 ACPI / OSL: Clean up initrd table override code This patch cleans up the initrd table override code by merging redundant logics and re-ordering code blocks. No functional changes. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/osl.c | 114 ++++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 62 deletions(-) commit 86e75410f067e4ff09d6a94d6bb6800ec956ccfe Author: Harb Abdulhamid Date: Tue Mar 1 13:31:45 2016 -0600 PNP / ACPI: add ACPI_RESOURCE_TYPE_SERIAL_BUS as a valid type An error message is printed for resources of type 19, which is a valid supported resource type. The Firmware Test Suite tool (fwts) reports this as a test failure. This change fixes the false test failures for ASL that use type 19 (ACPI_RESOURCE_TYPE_SERIAL_BUS) resources. Signed-off-by: Harb Abdulhamid Signed-off-by: Timur Tabi Signed-off-by: Rafael J. Wysocki drivers/pnp/pnpacpi/rsparser.c | 4 ++++ 1 file changed, 4 insertions(+) commit bea3c377c286f4f63f67f2e061c1d8851af76b7e Author: Colin Ian King Date: Sun Feb 28 20:31:49 2016 +0000 ACPI / util: remove redundant check if element is NULL element is &package->package.elements[i] which can never be NULL so the check to see if it is NULL is redundant and can be removed. Detected with static analysis by CoverityScan Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/utils.c | 4 ---- 1 file changed, 4 deletions(-) commit b2ca5dae31d61c4610ea3228f43f7cc66312897c Author: Colin Ian King Date: Thu Jan 21 17:05:47 2016 +0000 ACPI: Add acpi_force_32bit_fadt_addr option to force 32 bit FADT addresses Some HP laptops seem to have invalid 64 bit FADT X_PM* addresses which are causing various boot issues. In these cases, it would be useful to force ACPI to use the valid legacy 32 bit equivalent PM addresses. Add a acpi_force_32bit_fadt_addr to set the ACPICA acpi_gbl_use32_bit_fadt_addresses to TRUE to force this override. Link: https://bugs.launchpad.net/bugs/1529381 Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki Documentation/kernel-parameters.txt | 6 ++++++ drivers/acpi/tables.c | 10 ++++++++++ 2 files changed, 16 insertions(+) commit 75829dcf10862966f52716f2d67ac1c1b1eb486b Author: Paul Gortmaker Date: Mon Feb 15 00:27:51 2016 -0500 drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/acpi/Kconfig:config CRC_PMIC_OPREGION drivers/acpi/Kconfig: bool "ACPI operation region support for CrystalCove PMIC" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple modular references, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Acked-by: Aaron Lu Signed-off-by: Rafael J. Wysocki drivers/acpi/pmic/intel_pmic_crc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 020bf066a6019807fc52a83e8bea5e0ad6a285e1 Author: Paul Gortmaker Date: Mon Feb 15 00:27:50 2016 -0500 drivers/acpi: make apei/ghes.c more explicitly non-modular The Kconfig currently controlling compilation of this code is: config ACPI_APEI_GHES bool "APEI Generic Hardware Error Source" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We replace module.h with moduleparam.h as we are keeping the pre-existing module_param that the file has, as currently that is the easiest way to maintain compatibility with the existing boot arg use cases. Signed-off-by: Paul Gortmaker Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit cc079f8cf729aaa9e704bbaba3d21a20a6abc036 Author: Paul Gortmaker Date: Mon Feb 15 00:27:49 2016 -0500 drivers/acpi: make bgrt driver explicitly non-modular The Kconfig for this driver is currently: config ACPI_BGRT bool "Boottime Graphics Resource Table support" ...meaning that it currently is not being built as a module by anyone. Lets remove all modular references, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker Signed-off-by: Rafael J. Wysocki drivers/acpi/bgrt.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit f387e5b901adb8352fcdf031bb2c539e390b92e2 Author: Prakash, Prashanth Date: Wed Feb 17 13:21:03 2016 -0700 ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent The ACPI spec defines Minimum Request Turnaround Time(MRTT) and Maximum Periodic Access Rate(MPAR) to prevent the OSPM from sending too many requests than the platform can handle. For further details on these parameters please refer to section 14.1.3 of ACPI 6.0 spec. This patch includes MRTT/MPAR in deciding if or when a CPPC request can be sent to the platform to make sure CPPC implementation is compliant to the spec. Signed-off-by: Prashanth Prakash Acked-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit beee23aebc6650609ef1547f6d813fa5065f74aa Author: Prakash, Prashanth Date: Wed Feb 17 13:21:02 2016 -0700 ACPI / CPPC: replace writeX/readX to PCC with relaxed version We do not have a strict read/write order requirement while accessing PCC subspace. The only requirement is all access should be committed before triggering the PCC doorbell to transfer the ownership of PCC to the platform and this requirement is enforced by the PCC driver. Profiling on a many core system shows improvement of about 1.8us on average per freq change request(about 10% improvement on average). Since these operations are executed while holding the pcc_lock, reducing this time helps the CPPC implementation to scale much better as the number of cores increases. Signed-off-by: Prashanth Prakash Acked-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8b0f57889843af6304b80724e36bd3d93b6484b1 Author: Prakash, Prashanth Date: Wed Feb 17 13:21:01 2016 -0700 mailbox: pcc: optimized pcc_send_data pcc_send_data() can be invoked during the execution of performance critical code as in cppc_cpufreq driver. With acpi_* APIs, the doorbell register accessed in pcc_send_data() if present in system memory will be searched (in cached virt to phys addr mapping), mapped, read/written and then unmapped. These operations take significant amount of time. This patch maps the performance critical doorbell register during init and then reads/writes to it directly using the mapped virtual address. This patch + similar changes to CPPC acpi driver reduce the time per freq. transition from around 200us to about 20us for the CPPC cpufreq driver Signed-off-by: Prashanth Prakash Acked-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 7 deletions(-) commit 77e3d86f2f8c533c9c72fb5585b623b447d9bd57 Author: Prakash, Prashanth Date: Wed Feb 17 13:21:00 2016 -0700 ACPI / CPPC: optimized cpc_read and cpc_write cpc_read and cpc_write are used while holding the pcc_lock spin_lock, so they need to be as fast as possible. acpi_os_read/write_memory APIs linearly search through a list for cached mapping which is quite expensive. Since the PCC subspace is already mapped into virtual address space during initialization, we can just add the offset and access the necessary CPPC registers. This patch + similar changes to PCC driver reduce the time per freq. transition from around 200us to about 20us for the CPPC cpufreq driver. Signed-off-by: Prashanth Prakash Acked-by: Ashwin Chaugule Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 80 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 16 deletions(-) commit ad62e1e67751d21a3e15bca9d3ededc73de2cfa0 Author: Ashwin Chaugule Date: Wed Feb 17 13:20:59 2016 -0700 ACPI / CPPC: Optimize PCC Read Write operations Previously the send_pcc_cmd() code checked if the PCC operation had completed before returning from the function. This check was performed regardless of the PCC op type (i.e. Read/Write). Knowing the type of cmd can be used to optimize the check and avoid needless waiting. e.g. with Write ops, the actual Writing is done before calling send_pcc_cmd(). And the subsequent Writes will check if the channel is free at the entry of send_pcc_cmd() anyway. However, for Read cmds, we need to wait for the cmd completion bit to be flipped, since the actual Read ops follow after returning from the send_pcc_cmd(). So, only do the looping check at the end for Read ops. Also, instead of using udelay() calls, use ktime as a means to check for deadlines. The current deadline in which the Remote should flip the cmd completion bit is defined as N * Nominal latency. Where N is arbitrary and large enough to work on slow emulators and Nominal latency comes from the ACPI table (PCCT). This helps in working around the CONFIG_HZ effects on udelay() and also avoids needing different ACPI tables for Silicon and Emulation platforms. Signed-off-by: Ashwin Chaugule Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 101 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 29 deletions(-) commit 4db1fa6648b16490867db4661924a9e22bb74b2a Author: Zhiyi Sun Date: Wed Feb 24 00:08:11 2016 +0800 Documentation: kselftest: Remove duplicate word Remove duplicate word "for" in kselftest.txt. Signed-off-by: Zhiyi Sun Signed-off-by: Jonathan Corbet Documentation/kselftest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c22d6bef7caca3616720417996cb3e2629430929 Author: Javi Merino Date: Thu Feb 25 11:19:56 2016 +0000 doc: fix grammar Some minor typos: - make is unbindable -> make it unbindable - a underlying -> an underlying - different version -> different versions Cc: Jonathan Corbet Signed-off-by: Javi Merino Signed-off-by: Jonathan Corbet Documentation/filesystems/sharedsubtree.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce6550818280c1e7caae727d2b9504140b6370f0 Author: Philippe Loctaux Date: Mon Mar 7 02:36:18 2016 +0100 Documentation: Howto: Fixed subtitles style Fixed subtitles style, aligned them with their header. Signed-off-by: Philippe Loctaux Signed-off-by: Jonathan Corbet Documentation/HOWTO | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f9aeb7a6a84b1b72efe4e6ac32eb5028e25bb28 Author: Colin Ian King Date: Mon Feb 15 22:40:04 2016 +0000 ACPI / video: remove unused device_decode array device_decode is now no longer used, so we may as well remove it. Fixes gcc 6 warning: drivers/acpi/acpi_video.c:221:19: warning: ‘device_decode’ defined but not used [-Wunused-const-variable] static const char device_decode[][30] = { ^~~~~~~~~~~~~ Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 7 ------- 1 file changed, 7 deletions(-) commit 1b6e75ee295990d866ded77c29ffc6f88b831e26 Author: Oleg Drokin Date: Sat Feb 6 02:08:08 2016 -0500 ACPI / EC: Deny write access unless requested by module param In debugfs it's not enough to just set file mode to read-only to deny write access to a file, instead just don't provide the write method unless write access is really requested. Signed-off-by: Oleg Drokin Acked-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki drivers/acpi/ec_sys.c | 3 +++ 1 file changed, 3 insertions(+) commit 87aca73737e379f079993802d2c43606f7c5d26c Author: Jean Delvare Date: Thu Jan 21 09:20:12 2016 +0100 NFC: microread: Drop platform data header file Originally I only wanted to drop the unneeded inclusion of , but then noticed that struct microread_nfc_platform_data isn't actually used, and MICROREAD_DRIVER_NAME is redefined in the only file where it is used, so we can get rid of the header file and dead code altogether. Signed-off-by: Jean Delvare Cc: Lauro Ramos Venancio Cc: Aloisio Almeida Jr Signed-off-by: Samuel Ortiz MAINTAINERS | 1 - drivers/nfc/microread/i2c.c | 8 -------- include/linux/platform_data/microread.h | 35 --------------------------------- 3 files changed, 44 deletions(-) commit 1d751584e00b2538fe15a615fdad2a60a5a90a4e Author: Kaiyen Chang Date: Wed Feb 10 15:23:27 2016 -0800 ACPI / fan: Make struct dev_pm_ops const Silence the following checkpatch warning: WARNING: struct dev_pm_ops should normally be const. Signed-off-by: Kaiyen Chang Signed-off-by: Brian Norris Signed-off-by: Rafael J. Wysocki drivers/acpi/fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9531ab65f4ec066a6e6617a08a293c60397a161b Merge: 26e9093 1001659 Author: David S. Miller Date: Wed Mar 9 16:36:16 2016 -0500 Merge branch 'kcm' Tom Herbert says: ==================== kcm: Kernel Connection Multiplexor (KCM) Kernel Connection Multiplexor (KCM) is a facility that provides a message based interface over TCP for generic application protocols. The motivation for this is based on the observation that although TCP is byte stream transport protocol with no concept of message boundaries, a common use case is to implement a framed application layer protocol running over TCP. To date, most TCP stacks offer byte stream API for applications, which places the burden of message delineation, message I/O operation atomicity, and load balancing in the application. With KCM an application can efficiently send and receive application protocol messages over TCP using a datagram interface. In order to delineate message in a TCP stream for receive in KCM, the kernel implements a message parser. For this we chose to employ BPF which is applied to the TCP stream. BPF code parses application layer messages and returns a message length. Nearly all binary application protocols are parsable in this manner, so KCM should be applicable across a wide range of applications. Other than message length determination in receive, KCM does not require any other application specific awareness. KCM does not implement any other application protocol semantics-- these are are provided in userspace or could be implemented in a kernel module layered above KCM. KCM implements an NxM multiplexor in the kernel as diagrammed below: +------------+ +------------+ +------------+ +------------+ | KCM socket | | KCM socket | | KCM socket | | KCM socket | +------------+ +------------+ +------------+ +------------+ | | | | +-----------+ | | +----------+ | | | | +----------------------------------+ | Multiplexor | +----------------------------------+ | | | | | +---------+ | | | ------------+ | | | | | +----------+ +----------+ +----------+ +----------+ +----------+ | Psock | | Psock | | Psock | | Psock | | Psock | +----------+ +----------+ +----------+ +----------+ +----------+ | | | | | +----------+ +----------+ +----------+ +----------+ +----------+ | TCP sock | | TCP sock | | TCP sock | | TCP sock | | TCP sock | +----------+ +----------+ +----------+ +----------+ +----------+ The KCM sockets provide the datagram interface to applications, Psocks are the state for each attached TCP connection (i.e. where message delineation is performed on receive). A description of the APIs and design can be found in the included Documentation/networking/kcm.txt. In this patch set: - Add MSG_BATCH flag. This is used in sendmsg msg_hdr flags to indicate that more messages will be sent on the socket. The stack may batch messages up if it is beneficial for transmission. - In sendmmsg, set MSG_BATCH in all sub messages except for the last one. - In order to allow sendmmsg to contain multiple messages with SOCK_SEQPAKET we allow each msg_hdr in the sendmmsg to set MSG_EOR. - Add KCM module - This supports SOCK_DGRAM and SOCK_SEQPACKET. - KCM documentation v2: - Added splice and page operations. - Assemble receive messages in place on TCP socket (don't have a separate assembly queue. - Based on above, enforce maxmimum receive message to be the size of the recceive socket buffer. - Support message assembly timeout. Use the timeout value in sk_rcvtimeo on the TCP socket. - Tested some with a couple of other production applications, see ~5% improvement in application latency. Testing: Dave Watson has integrated KCM into Thrift and we intend to put these changes into open source. Example of this is in: https://github.com/djwatson/fbthrift/commit/ dd7e0f9cf4e80912fdb90f6cd394db24e61a14cc Some initial KCM Thrift benchmark numbers (comment from Dave) Thrift by default ties a single connection to a single thread. KCM is instead able to load balance multiple connections across multiple epoll loops easily. A test sending ~5k bytes of data to a kcm thrift server, dropping the bytes on recv: QPS Latency / std dev Latency without KCM 70336 209/123 with KCM 70353 191/124 A test sending a small request, then doing work in the epoll thread, before serving more requests: QPS Latency / std dev Latency without KCM 14282 559/602 with KCM 23192 344/234 At the high end, there's definitely some additional kernel overhead: Cranking the pipelining way up, with lots of small requests QPS Latency / std dev Latency without KCM 1863429 127/119 with KCM 1337713 192/241 --- So for a "realistic" workload, KCM performs pretty well (second case). Under extreme conditions of highest tps we still have some work to do. In its nature a multiplexor will spread work between CPUs which is logically good for load balancing but coan conflict with the goal promoting affinity. Batching messages on both send and receive are the means to recoup performance. Future support: - Integration with TLS (TLS-in-kernel is a separate initiative). - Page operations/splice support - Unconnected KCM sockets. Will be able to attach sockets to different destinations, AF_KCM addresses with be used in sendmsg and recvmsg to indicate destination - Explore more utility in performing BPF inline with a TCP data stream (setting SO_MARK, rxhash for messages being sent received on KCM sockets). - Performance work - Diagnose performance issues under high message load FAQ (Questions posted on LWN) Q: Why do this in the kernel? A: Because the kernel is good at scheduling threads and steering packets to threads. KCM fits well into this model since it allows the unit of work for scheduling and steering to be the application layer messages themselves. KCM should be thought of as generic application protocol acceleration. It to the philosophy that the kernel provides generic and extensible interfaces. Q: How can adding code in the path yield better performance? A: It is true that for just sending receiving a single message there would be some performance loss since the code path is longer (for instance comparing netperf to KCM). But for real production applications performance takes on many dynamics. Parallelism, context switching, affinity, granularity of locking, and load balancing are all relevant. The theory of KCM is that by an application-centric interface, the kernel can provide better support for these performance characteristics. Q: Why not use an existing message-oriented protocol such as RUDP, DCCP, SCTP, RDS, and others? A: Because that would entail using a completely new transport protocol. Deploying a new protocol at scale is either a huge undertaking or fundamentally infeasible. This is true in either the Internet and in the data center due in a large part to protocol ossification. Besides, KCM we want KCM to work existing, well deployed application protocols that we couldn't change even if we wanted to (e.g. http/2). KCM simply defines a new interface method, it does not redefine any aspect of the transport protocol nor application protocol, nor set any new requirements on these. Neither does KCM attempt to implement any application protocol logic other than message deliniation in the stream. These are fundamental requirement of KCM. Q: How does this affect TCP? A: It doesn't, not in the slightest. The use of KCM can be one-sided, KCM has no effect on the wire. Q: Why force TCP into doing something it's not designed for? A: TCP is defined as transport protocol and there is no standard that says the API into TCP must be stream based sockets, or for that matter sockets at all (or even that TCP needs to be implemented in a kernel). KCM is not inconsistent with the design of TCP just because to makes an message based interface over TCP, if it were then every application protocol sending messages over TCP would also be! :-) Q: What about the problem of a connections with very slow rate of incoming data? As a result your application can get storms of very short reads. And it actually happens a lot with connection from mobile devices and it is a problem for servers handling a lot of connections. A: The storm of short reads will occur regardless of whether KCM is used or not. KCM does have one advantage in this scenario though, it will only wake up the application when a full message has been received, not for each packet that makes up part of a bigger messages. If a bunch of small messages are received, the application can receive messages in batches using recvmmsg. Q: Why not just use DPDK, or at least provide KCM like functionality in DPDK? A: DPDK, or more generally OS bypass presumably with a TCP stack in userland, presents a different model of load balancing than that of KCM (and the kernel). KCM implements load balancing of messages across the threads of an application, whereas DPDK load balances based on queues which are more static and coarse-grained since multiple connections are bound to queues. DPDK works best when processing of packets is silo'ed in a thread on the CPU processing a queue, and packet processing (for both the stack and application) is fairly uniform. KCM works well for applications where the amount of work to process messages varies an application work is commonly delegated to worker threads often on different CPUs. The message based interface over TCP is something that could be provide by a DPDK or OS bypass library. Q: I'm not quite seeing this for HTTP. Maybe for HTTP/2, I guess, or web sockets? A: Yes. KCM is most appropriate for message based protocols over TCP where is easy to deduce the message length (e.g. a length field) and the protocol implements its own message ordering semantics. Fortunately this encompasses many modern protocols. Q: How is memory limited and controlled? A: In v2 all data for messages is now kept in socket buffers, either those for TCP or KCM, so socket buffer limits are applicable. This includes receive messages assembly which is now done ont teh TCP socket buffer instead of a separate queue-- this has the consequence that the TCP socket buffer limit provides an enforceable maxmimum message size. Additionally, a timeout may be set for messages assembly. The value used for this is taken from sk_rcvtimeo of the TCP socket. ==================== Signed-off-by: David S. Miller commit 10016594f4c6b3ef34c5de97d8ab62205d9d26a5 Author: Tom Herbert Date: Mon Mar 7 14:11:12 2016 -0800 kcm: Add description in Documentation Add kcm.txt to desribe KCM and interfaces. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller Documentation/networking/kcm.txt | 285 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) commit 29152a34f72cb4d7ab32885ad2f20a482c92a8f3 Author: Tom Herbert Date: Mon Mar 7 14:11:11 2016 -0800 kcm: Add receive message timeout This patch adds receive timeout for message assembly on the attached TCP sockets. The timeout is set when a new messages is started and the whole message has not been received by TCP (not in the receive queue). If the completely message is subsequently received the timer is cancelled, if the timer expires the RX side is aborted. The timeout value is taken from the socket timeout (SO_RCVTIMEO) that is set on a TCP socket (i.e. set by get sockopt before attaching a TCP socket to KCM. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/kcm.h | 3 +++ net/kcm/kcmproc.c | 6 ++++-- net/kcm/kcmsock.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) commit 7ced95ef525c329f947c424859cf2b0a3b731f8c Author: Tom Herbert Date: Mon Mar 7 14:11:10 2016 -0800 kcm: Add memory limit for receive message construction Message assembly is performed on the TCP socket. This is logically equivalent of an application that performs a peek on the socket to find out how much memory is needed for a receive buffer. The receive socket buffer also provides the maximum message size which is checked. The receive algorithm is something like: 1) Receive the first skbuf for a message (or skbufs if multiple are needed to determine message length). 2) Check the message length against the number of bytes in the TCP receive queue (tcp_inq()). - If all the bytes of the message are in the queue (incluing the skbuf received), then proceed with message assembly (it should complete with the tcp_read_sock) - Else, mark the psock with the number of bytes needed to complete the message. 3) In TCP data ready function, if the psock indicates that we are waiting for the rest of the bytes of a messages, check the number of queued bytes against that. - If there are still not enough bytes for the message, just return - Else, clear the waiting bytes and proceed to receive the skbufs. The message should now be received in one tcp_read_sock Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/kcm.h | 4 ++++ net/kcm/kcmproc.c | 6 ++++-- net/kcm/kcmsock.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) commit f29698fc6b3a45a5c6147eca8379f38be8232117 Author: Tom Herbert Date: Mon Mar 7 14:11:09 2016 -0800 kcm: Sendpage support Implement kcm_sendpage. Set in sendpage to kcm_sendpage in both dgram and seqpacket ops. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/kcm/kcmsock.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 2 deletions(-) commit 91687355b92735e5f247ed163b3b0b4d14c3cab6 Author: Tom Herbert Date: Mon Mar 7 14:11:08 2016 -0800 kcm: Splice support Implement kcm_splice_read. This is supported only for seqpacket. Add kcm_seqpacket_ops and set splice read to kcm_splice_read. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/kcm/kcmsock.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 2 deletions(-) commit cd6e111bf5be5c70aef96a86d791ee7be0c0e137 Author: Tom Herbert Date: Mon Mar 7 14:11:07 2016 -0800 kcm: Add statistics and proc interfaces This patch adds various counters for KCM. These include counters for messages and bytes received or sent, as well as counters for number of attached/unattached TCP sockets and other error or edge events. The statistics are exposed via a proc interface. /proc/net/kcm provides statistics per KCM socket and per psock (attached TCP sockets). /proc/net/kcm_stats provides aggregate statistics. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/kcm.h | 94 ++++++++++++ net/kcm/Makefile | 2 +- net/kcm/kcmproc.c | 422 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ net/kcm/kcmsock.c | 80 +++++++++++ 4 files changed, 597 insertions(+), 1 deletion(-) commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 Author: Tom Herbert Date: Mon Mar 7 14:11:06 2016 -0800 kcm: Kernel Connection Multiplexor module This module implements the Kernel Connection Multiplexor. Kernel Connection Multiplexor (KCM) is a facility that provides a message based interface over TCP for generic application protocols. With KCM an application can efficiently send and receive application protocol messages over TCP using datagram sockets. For more information see the included Documentation/networking/kcm.txt Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/socket.h | 6 +- include/net/kcm.h | 125 +++ include/uapi/linux/kcm.h | 40 + net/Kconfig | 1 + net/Makefile | 1 + net/kcm/Kconfig | 10 + net/kcm/Makefile | 3 + net/kcm/kcmsock.c | 2016 ++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 2201 insertions(+), 1 deletion(-) commit 473bd239b808a8af5241ce9996a16d283d88ddff Author: Tom Herbert Date: Mon Mar 7 14:11:05 2016 -0800 tcp: Add tcp_inq to get available receive bytes on socket Create a common kernel function to get the number of bytes available on a TCP socket. This is based on code in INQ getsockopt and we now call the function for that getsockopt. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/tcp.h | 24 ++++++++++++++++++++++++ net/ipv4/tcp.c | 15 +-------------- 2 files changed, 25 insertions(+), 14 deletions(-) commit fa9835e52e3ea946916c2ce6c625c86421131740 Author: Tom Herbert Date: Mon Mar 7 14:11:04 2016 -0800 net: Walk fragments in __skb_splice_bits Add walking of fragments in __skb_splice_bits. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/core/skbuff.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit f092276d85b82504e8a07498f4e9e0c51f06745c Author: Tom Herbert Date: Mon Mar 7 14:11:03 2016 -0800 net: Add MSG_BATCH flag Add a new msg flag called MSG_BATCH. This flag is used in sendmsg to indicate that more messages will follow (i.e. a batch of messages is being sent). This is similar to MSG_MORE except that the following messages are not merged into one packet, they are sent individually. sendmmsg is updated so that each contained message except for the last one is marked as MSG_BATCH. MSG_BATCH is a performance optimization in cases where a socket implementation can benefit by transmitting packets in a batch. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/socket.h | 1 + net/socket.c | 5 +++++ 2 files changed, 6 insertions(+) commit 28a94d8fb35b3a75b802f368ae6f4a9f6b0d435a Author: Tom Herbert Date: Mon Mar 7 14:11:02 2016 -0800 net: Allow MSG_EOR in each msghdr of sendmmsg This patch allows setting MSG_EOR in each individual msghdr passed in sendmmsg. This allows a sendmmsg to send multiple messages when using SOCK_SEQPACKET. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/socket.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f4a00aacdb5f6784d46e8c999b6bb52ece4b306b Author: Tom Herbert Date: Mon Mar 7 14:11:01 2016 -0800 net: Make sock_alloc exportable Export it for cases where we want to create sockets by hand. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/net.h | 1 + net/socket.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit ff3c44e675054533403909ecb76e78c1d4efbd26 Author: Tom Herbert Date: Mon Mar 7 14:11:00 2016 -0800 rcu: Add list_next_or_null_rcu This is a convenience function that returns the next entry in an RCU list or NULL if at the end of the list. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/rculist.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f995b5f720a72dfe7a1b33a43f2841b4e72d53b7 Author: Petr Mladek Date: Wed Mar 9 15:20:59 2016 +0100 livepatch: Fix the error message about unresolvable ambiguity klp_find_callback() stops the search when sympos is not defined and a second symbol of the same name is found. It means that the current error message about the unresolvable ambiguity always prints "(2 matches)". Let's remove this information. The total number of occurrences is not much helpful. The author of the patch still must put a non-trivial effort into searching the right position in the object file. [jkosina@suse.cz: fixed grammar as suggested by Josh] Signed-off-by: Petr Mladek Acked-by: Josh Poimboeuf Acked-by: Chris J Arges Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edd4a893e097d744e8069acf585f8b02dbbc9134 Author: Viresh Kumar Date: Thu Mar 3 14:51:33 2016 +0530 Revert "cpufreq: postfix policy directory with the first CPU in related_cpus" Revert commit 3510fac45492 (cpufreq: postfix policy directory with the first CPU in related_cpus). Earlier, the policy->kobj was added to the kobject core, before ->init() callback was called for the cpufreq drivers. Which allowed those drivers to add or remove, driver dependent, sysfs files/directories to the same kobj from their ->init() and ->exit() callbacks. That isn't possible anymore after commit 3510fac45492. Now, there is no other clean alternative that people can adopt. Its better to revert the earlier commit to allow cpufreq drivers to create/remove sysfs files from ->init() and ->exit() callbacks. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 55155291b32d24371256adbcc67f9f53cf3f314f Author: NeilBrown Date: Wed Mar 9 09:21:54 2016 +1100 pmem: don't allocate unused major device number When alloc_disk(0) or alloc_disk-node(0, XX) is used, the ->major number is completely ignored: all devices are allocated with a major of BLOCK_EXT_MAJOR. So there is no point allocating pmem_major. Signed-off-by: NeilBrown Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit af1996ef59dbcb36fe4878df7c717a02eb89d07a Author: Toshi Kani Date: Wed Mar 9 12:47:06 2016 -0700 ACPI: Change NFIT driver to insert new resource ACPI 6 defines persistent memory (PMEM) ranges in multiple firmware interfaces, e820, EFI, and ACPI NFIT table. This EFI change, however, leads to hit a bug in the grub bootloader, which treats EFI_PERSISTENT_MEMORY type as regular memory and corrupts stored user data [1]. Therefore, BIOS may set generic reserved type in e820 and EFI to cover PMEM ranges. The kernel can initialize PMEM ranges from ACPI NFIT table alone. This scheme causes a problem in the iomem table, though. On x86, for instance, e820_reserve_resources() initializes top-level entries (iomem_resource.child) from the e820 table at early boot-time. This creates "reserved" entry for a PMEM range, which does not allow region_intersects() to check with PMEM type. Change acpi_nfit_register_region() to call acpi_nfit_insert_resource(), which calls insert_resource() to insert a PMEM entry from NFIT when the iomem table does not have a PMEM entry already. That is, when a PMEM range is marked as reserved type in e820, it inserts "Persistent Memory" entry, which results as follows. + "Persistent Memory" + "reserved" This allows the EINJ driver, which calls region_intersects() to check PMEM ranges, to work continuously even if BIOS sets reserved type (or sets nothing) to PMEM ranges in e820 and EFI. [1]: https://lists.gnu.org/archive/html/grub-devel/2015-11/msg00209.html Signed-off-by: Toshi Kani Cc: Rafael J. Wysocki Cc: Dan Williams Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andrew Morton Signed-off-by: Dan Williams drivers/acpi/nfit.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 8095d0f225fe31eaac4a013177b77ed5283278f8 Author: Toshi Kani Date: Wed Mar 9 12:47:05 2016 -0700 resource: Export insert_resource and remove_resource insert_resource() and remove_resouce() are called by producers of resources, such as FW modules and bus drivers. These modules may be implemented as loadable modules. Export insert_resource() and remove_resouce() so that they can be called from such modules. link: https://lkml.org/lkml/2016/3/8/872 Signed-off-by: Toshi Kani Cc: Linus Torvalds Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andrew Morton Cc: Dan Williams Signed-off-by: Dan Williams kernel/resource.c | 2 ++ 1 file changed, 2 insertions(+) commit ff3cc952d3f009e6c376cc40651b87187ce364a6 Author: Toshi Kani Date: Wed Mar 9 12:47:04 2016 -0700 resource: Add remove_resource interface insert_resource() and insert_resource_conflict() are called by resource producers to insert a new resource. When there is any conflict, they move conflicting resources down to the children of the new resource. There is no destructor of these interfaces, however. Add remove_resource(), which removes a resource previously inserted by insert_resource() or insert_resource_conflict(), and moves the children up to where they were before. __release_resource() is changed to have @release_child, so that this function can be used for remove_resource() as well. Also add comments to clarify that these functions are intended for producers of resources to avoid any confusion with request/release_resource() for consumers. Signed-off-by: Toshi Kani Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andrew Morton Cc: Dan Williams Signed-off-by: Dan Williams include/linux/ioport.h | 1 + kernel/resource.c | 51 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 5 deletions(-) commit 4e0d8f7eff3fbfa3e3ac5782669c078f590dc9e2 Author: Toshi Kani Date: Wed Mar 9 12:47:03 2016 -0700 resource: Change __request_region to inherit from immediate parent __request_region() sets 'flags' of a new resource from @parent as it inherits the parent's attribute. When a target resource has a conflict, this function inserts the new resource entry under the conflicted entry by updating @parent. In this case, the new resource entry needs to inherit attribute from the updated parent. This conflict is a typical case since __request_region() is used to allocate a new resource from a specific resource range. For instance, request_mem_region() calls __request_region() with @parent set to &iomem_resource, which is the root entry of the whole iomem range. When this request results in inserting a new entry "DEV-A" under "BUS-1", "DEV-A" needs to inherit from the immediate parent "BUS-1" as it holds specific attribute for the range. root (&iomem_resource) : + "BUS-1" + "DEV-A" Change __request_region() to set 'flags' and 'desc' of a new entry from the immediate parent. Signed-off-by: Toshi Kani Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andrew Morton Cc: Dan Williams Signed-off-by: Dan Williams kernel/resource.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ed47226e06195935c5a2b88604b340a4364867e Author: Ayala Beker Date: Wed Feb 3 15:36:52 2016 +0200 iwlwifi: mvm: update GSCAN capabilities Gscan capabilities were updated with new capabilities supported by the device. While at it, simplify the firmware support conditional and move both conditions into the WARN() to make it easier to undertand and use the unlikely() for both. Signed-off-by: Ayala Beker Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 38 +++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 11 +++++++ drivers/net/wireless/intel/iwlwifi/iwl-fw.h | 13 ++++++++ 3 files changed, 48 insertions(+), 14 deletions(-) commit 81279c49ce472bf5900ef8b19bf91e2ad6bd1c34 Author: Johannes Berg Date: Wed Mar 9 14:58:47 2016 +0100 iwlwifi: mvm: don't try to offload AES-CMAC in AP/IBSS modes The firmware/hardware only supports checking AES-CMAC on RX, not using it on TX. For station mode this is fine, since it's the only thing it will ever do. For AP mode, it never receives such frames, but must be able to transmit them. This is currently broken since we try to enable them for hardware crypto (for RX only) and then treat them as TX_CMD_SEC_EXT, leading to FIFO underruns during TX so the frames never go out to the air. To fix this, simply use software on TX in AP (and IBSS) mode. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7d3ca7f4b1d5a43a1e0dbd112bb4c3bcf9a81fab Author: Emmanuel Grumbach Date: Mon Mar 7 10:16:38 2016 +0200 iwlwifi: mvm: adapt the firmware assert log to new firmware Newer firmware versions put different data in the memory which is read by the driver upon firmware crash. Just change the variable names in the code and the name of the data in the log that we print withouth any functional change. On older firmware, there will be a mismatch between the names that are printed and the content itself, but that's harmless. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/dvm/main.c | 8 +++---- .../wireless/intel/iwlwifi/iwl-devtrace-iwlwifi.h | 27 ++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 28 +++++++++++----------- 3 files changed, 30 insertions(+), 33 deletions(-) commit e0e168dc8c4e41bab6ab94a838cfee50dd2b5f25 Author: Gregory Greenman Date: Mon Feb 29 15:34:25 2016 +0200 iwlwifi: pcie: avoid restocks inside rx loop if not emergency When trying to reach high Rx throughput of more than 500Mbps on a device with a relatively weak CPU (Atom x5-Z8500), CPU utilization may become a bottleneck. Analysis showed that we are looping in iwl_pcie_rx_handle for very long periods which led to starvation of other threads (iwl_pcie_rx_handle runs with _bh disabled). We were handling Rx and allocating new buffers and the new buffers were ready quickly enough to be available before we had finished handling all the buffers available in the hardware. As a consequence, we called iwl_pcie_rxq_restock to refill the hardware with the new buffers, and start again handling new buffers without exiting the function. Since we read the hardware pointer again when we goto restart, new buffers were handled immediately instead of exiting the function. This patch avoids refilling RBs inside rx handling loop, unless an emergency situation is reached. It also doesn't read the hardware pointer again unless we are in an emergency (unlikely) case. This significantly reduce the maximal time we spend in iwl_pcie_rx_handle with _bh disabled. Signed-off-by: Gregory Greenman Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 59 ++++++++++++++++------------ 1 file changed, 33 insertions(+), 26 deletions(-) commit b358993b3f582f43a6098028b5b08d084dff4d24 Author: Chaya Rachel Ivgi Date: Sun Feb 14 14:03:10 2016 +0200 iwlwifi: mvm: return the cooling state index instead of the budget iwl_mvm_tcool_get_cur_state is the function that returns the cooling state index to the sysfs handler. This function returns mvm->cooling_dev.cur_state but that variable was set to the budget and not the cooling state index. Fix that. Add a missing blank line while at it. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 56 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 29 deletions(-) commit 416cb2467bba25a6729b95e1ada0254a9477a360 Author: Emmanuel Grumbach Date: Tue Mar 8 13:53:05 2016 +0200 iwlwifi: mvm: remove RRM advertisement mac80211 advertises this feature for all its drivers. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 -- 1 file changed, 2 deletions(-) commit 532beba378d26d5bd9bbb1b485e969c13bf72009 Author: Emmanuel Grumbach Date: Mon Mar 7 22:23:52 2016 +0200 iwlwifi: mvm: don't let NDPs mess the packet tracking We need to track the next packet that we will reclaim in order to know when the Tx queues are empty. This is useful when we open or tear down an A-MPDU session which requires to switch queue. The next packet being reclaimed is identified by its WiFi sequence number and this is relevant only when we use QoS. QoS NDPs do have a TID but have a meaningless sequence number. The spec mandates the receiver to ignore the sequence number in this case, allowing the transmitter to put any sequence number. Our implementation leaves it 0. When we reclaim a QoS NDP, we can't update the next_relcaim counter since the sequence number of the QoS NDP itself is invalid. We used to update the next_reclaim based on the sequence number of the QoS NDP which reset it to 1 (0 + 1) and because of this, we never knew when the queue got empty. This had to sad consequence to stuck the A-MPDU state machine in a transient state. To fix this, don't update next_reclaim when we reclaim a QoS NDP. Alesya saw this bug when testing u-APSD. Because the A-MPDU state machine was stuck in EMPTYING_DELBA, we updated mac80211 that we still have frames for that station when it got back to sleep. mac80211 then wrongly set the TIM bit in the beacon and requested to release non-existent frames from the A-MPDU queue. This led to a situation where the client was trying to poll frames but we had no frames to send. Reported-by: Alesya Shapira Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 17c867bfe89bd2e089752ac938468900387acbe2 Author: Sara Sharon Date: Mon Mar 7 14:18:29 2016 +0200 iwlwifi: add support for getting HW address from CSR From 9000 family on, we need to get HW address from host CSR registers. OEM can override it by fusing the override registers - read those first, and if those are 0 - read the OTP registers instead. In addition - bail out if no valid mac address is present. Make it shared for all NICs. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 + drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 10 +++ drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 75 ++++++++++++++++------ 4 files changed, 68 insertions(+), 22 deletions(-) commit 7b5424361ec9270f40c3e23cb747cc8b9ee66235 Author: Sara Sharon Date: Mon Feb 1 13:46:06 2016 +0200 iwlwifi: pcie: fine tune number of rxbs We kick the allocator when we have 2 RBDs that don't have attached RBs, and the allocator allocates 8 RBs meaning that it needs another 6 RBDs to attach the RBs to. The design is that allocator should always have enough RBDs to fulfill requests, so we give in advance 6 RBDs to the allocator so that when it is kicked, it gets additional 2 RBDs and has enough RBDs. These RBDs were taken from the Rx queue itself, meaning that each Rx queue didn't have the maximal number of RBDs, but MAX - 6. Change initial number of RBDs in the system to include both queue size and allocator reserves. Note the multi-queue is always 511 instead of 512 to avoid a full queue since we cannot detect this state easily enough in the 9000 arch. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 9 ++++++--- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 11 ++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) commit c9cb14a64c32f890d5a0649cb7d81dbfece33056 Author: Chaya Rachel Ivgi Date: Thu Mar 3 15:35:34 2016 +0200 iwlwifi: mvm: add support for async rx handler without hold the mutex When running async rx handler the framework holds the mvm->mutex before starting the async handler, that might cause a deadlock in case the handler calls to ops that lock the mutex as well. Add support for running async rx handler without hold the mutex before activating the handler. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 114 +++++++++++++++++---------- 1 file changed, 73 insertions(+), 41 deletions(-) commit 5151ad953c68f2af0b50cf8d074a902ccf001ae0 Author: Matti Gottlieb Date: Wed Mar 9 14:46:28 2016 +0200 iwlwifi: mvm: ROC: cleanup time event info on FW failure Currently when the FW sends start/stop aux roc time event notification with an error status, the driver returns an error value, but does not remove the time event, and does not notify the stack above that the time event is over. This causes problems that the stack above assumes we are still in the middle of a time event, and therefore can block different events, such as scanning. On FW failure notification, cleanup the time event parameters and notify the stack above that the time event is over. Signed-off-by: Matti Gottlieb Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 62d23403d4a201db117975d46c1889c79987069e Author: Sara Sharon Date: Sun Mar 6 09:51:29 2016 +0200 iwlwifi: mvm: turn off AMSDU bit in QoS control for de-aggregated AMSDUs Our hardware de-aggregates AMSDUs but copies the mac header as it to the de-aggregated MPDUs. We need to turn off the AMSDU bit in the QoS control ourselves. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 00f481bd895a826058d301b3093e86e819497b51 Author: Chaya Rachel Ivgi Date: Wed Feb 24 12:19:22 2016 +0200 iwlwifi: mvm: add ctdp operations to debugfs Add debugfs entries to get the ctdp budget average and to stop ctdp. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 42 +++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 78 +++++++++++++----------- 2 files changed, 86 insertions(+), 34 deletions(-) commit 61f846f37354fd294f3172845d9fec2c03f60a45 Author: Laxman Dewangan Date: Wed Mar 9 18:40:08 2016 +0530 thermal: doc: Add details of devm_thermal_zone_of_sensor_{register,unregister} Add details of the interface devm_thermal_zone_of_sensor_register() and devm_thermal_zone_of_sensor_unregister() in the . Signed-off-by: Laxman Dewangan Signed-off-by: Eduardo Valentin Documentation/thermal/sysfs-api.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit e498b4984db82b4ba3ceea7dba813222a31e9c2e Author: Laxman Dewangan Date: Wed Mar 9 18:40:06 2016 +0530 thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register Add resource managed version of thermal_zone_of_sensor_register() and thermal_zone_of_sensor_unregister(). This helps in reducing the code size in error path, remove of driver remove callbacks and making proper sequence for deallocations. Signed-off-by: Laxman Dewangan Signed-off-by: Eduardo Valentin drivers/thermal/of-thermal.c | 81 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/thermal.h | 18 ++++++++++ 2 files changed, 99 insertions(+) commit 3a7fd9c737e2c124d20c351529316d71962cf6ca Author: Laxman Dewangan Date: Wed Mar 9 18:40:05 2016 +0530 thermal: doc: Add details of thermal_zone_of_sensor_{register,unregister} Add details of the interface thermal_zone_of_sensor_register() and thermal_zone_of_sensor_unregister() in the thermal/sysfs-api.txt. The details describes the functionality and parameter which are passed to these interfaces. Signed-off-by: Laxman Dewangan Signed-off-by: Eduardo Valentin Documentation/thermal/sysfs-api.txt | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit acfcbaf1925f2dc5c46c61de69d756dec92a2ff8 Author: Martin Brandenburg Date: Sat Mar 5 13:17:39 2016 -0500 orangefs: make fs_mount_pending static Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 76 +++++++++++++++++++++---------------------- fs/orangefs/orangefs-kernel.h | 1 - 2 files changed, 38 insertions(+), 39 deletions(-) commit c62da5853de5564e367932185500f96ab70a6f7c Author: Martin Brandenburg Date: Mon Feb 29 16:07:35 2016 -0500 orangefs: Avoid symlink upcall if target is too long. Previously the client-core detected this condition by sheer luck! Since we used strncpy, no NUL byte would be included on the name. The client-core would call strlen, which would read past the end of its buffer, but return a number large enough that the client-core would return ENAMETOOLONG. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/namei.c | 3 +++ 1 file changed, 3 insertions(+) commit 162ada7764162eb2eb0a02546f820ca8b099cdea Author: Mike Marshall Date: Wed Mar 9 13:12:37 2016 -0500 Orangefs: improve the POSIXness of interrupted writes... Don't return EINTR on interrupted writes if some data has already been written. Signed-off-by: Mike Marshall fs/orangefs/file.c | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) commit cf07c0bf88b7e8765361e808b61fef287caedfe3 Author: Mike Marshall Date: Wed Mar 9 13:11:45 2016 -0500 Orangefs: add a new gossip statement Signed-off-by: Mike Marshall fs/orangefs/dir.c | 4 ++++ 1 file changed, 4 insertions(+) commit fb3229d5cd4c8e65178afe55f6727ff645cdb81a Author: Shaohua Li Date: Wed Mar 9 10:08:38 2016 -0800 md/raid5: output stripe state for debug Neil recently fixed an obscure race in break_stripe_batch_list. Debug would be quite convenient if we know the stripe state. This is what this patch does. Signed-off-by: Shaohua Li drivers/md/raid5.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 32b41ac21fde8f7cea465d74c570fc7bd0089163 Author: Christian König Date: Tue Mar 8 18:03:27 2016 +0100 drm/amdgpu: Revert "add mutex for ba_va->valids/invalids" Not needed any more because we need to protect the elements on the list anyway. This reverts commit 38bf516c75b4ef0f5c716e05fa9baab7c52d6c39. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 ++++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) commit 20250215821140801369b84f8cbe79a459a82ba5 Author: Christian König Date: Tue Mar 8 17:58:35 2016 +0100 drm/amdgpu: Revert "add lock for interval tree in vm" Not needed any more because we need to protect the elements on the list anyway. This reverts commit fe237ed7efec8ac147a4572fdf81173a7f8ddda7. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++-------------- 2 files changed, 2 insertions(+), 15 deletions(-) commit e17841b97587adfbe96f48c488fd0873ddfcaff0 Author: Christian König Date: Tue Mar 8 17:52:01 2016 +0100 drm/amdgpu: Revert "add spin lock to protect freed list in vm (v3)" Not needed any more because we need to protect the elements on the list anyway. This reverts commit dae6ecf9e6c9b677e577826c3ac665c6dd9c490b. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit b5a5ec55041bf129b767e7a2d282887226f4fae1 Author: Christian König Date: Tue Mar 8 17:47:46 2016 +0100 drm/amdgpu: reserve the PD during unmap and remove We not only need to protect the mapping tree and freed list itself, but also the items on those list. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit fb29b57c34488b343db2e3f00e713901385f8c0d Author: Felix Kuehling Date: Thu Mar 3 19:13:20 2016 -0500 drm/amdgpu: Fix two bugs in amdgpu_vm_bo_split_mapping Off-by-one: last is inclusive, so the maximum is start + max_size - 1 Wrong unit: addr is in bytes, max_size is in pages Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 459ee1c3fd097ab56ababd8ff4bb7ef6a792de33 Author: Mario Kleiner Date: Sun Mar 6 02:39:53 2016 +0100 drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards. As observed on Apple iMac10,1, DCE-3.2, RV-730, link rate of 2.7 Ghz is not selected, because the args.v1.ucConfig flag setting for 2.7 Ghz gets overwritten by a following assignment of the transmitter to use. Move link rate setup a few lines down to fix this. In practice this didn't have any positive or negative effect on display setup on the tested iMac10,1 so i don't know if backporting to stable makes sense or not. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/atombios_encoders.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c26a4017da144227bb4a02f354c9bb6079854201 Author: Alex Deucher Date: Thu Mar 3 11:49:34 2016 -0500 MAINTAINERS: update radeon entry to include amdgpu as well Both are maintained by same team. Reviewed-by: Christian König Acked-by: Thierry Reding Signed-off-by: Alex Deucher MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bedf2a65c1aa8fb29ba8527fd00c0f68ec1f55f1 Author: Alex Deucher Date: Wed Mar 2 12:10:20 2016 -0500 drm/amdgpu: disable runtime pm on PX laptops without dGPU power control Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) commit e64c952efb8e0c15ae82cec8e455ab4910690ef1 Author: Alex Deucher Date: Wed Mar 2 11:47:29 2016 -0500 drm/radeon: disable runtime pm on PX laptops without dGPU power control Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_atpx_handler.c | 8 ++++---- drivers/gpu/drm/radeon/radeon_device.c | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) commit 550da24f8d62fe81f3c13e3ec27602d6e44d43dc Author: NeilBrown Date: Wed Mar 9 12:58:25 2016 +1100 md/raid5: preserve STRIPE_PREREAD_ACTIVE in break_stripe_batch_list break_stripe_batch_list breaks up a batch and copies some flags from the batch head to the members, preserving others. It doesn't preserve or copy STRIPE_PREREAD_ACTIVE. This is not normally a problem as STRIPE_PREREAD_ACTIVE is cleared when a stripe_head is added to a batch, and is not set on stripe_heads already in a batch. However there is no locking to ensure one thread doesn't set the flag after it has just been cleared in another. This does occasionally happen. md/raid5 maintains a count of the number of stripe_heads with STRIPE_PREREAD_ACTIVE set: conf->preread_active_stripes. When break_stripe_batch_list clears STRIPE_PREREAD_ACTIVE inadvertently this could becomes incorrect and will never again return to zero. md/raid5 delays the handling of some stripe_heads until preread_active_stripes becomes zero. So when the above mention race happens, those stripe_heads become blocked and never progress, resulting is write to the array handing. So: change break_stripe_batch_list to preserve STRIPE_PREREAD_ACTIVE in the members of a batch. URL: https://bugzilla.kernel.org/show_bug.cgi?id=108741 URL: https://bugzilla.redhat.com/show_bug.cgi?id=1258153 URL: http://thread.gmane.org/5649C0E9.2030204@zoner.cz Reported-by: Martin Svec (and others) Tested-by: Tom Weber Fixes: 1b956f7a8f9a ("md/raid5: be more selective about distributing flags across batch.") Cc: stable@vger.kernel.org (v4.1 and later) Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b5eb41b8ce0a8be1e0da0f3f0f91cc29f4fcb16 Author: Xuelin Shi Date: Thu Feb 25 09:14:05 2016 +0800 powerpc/p5040: Add device node for RAID Engine add the missing RAID Engine device node for p5040. otherwise, the device can not be detected. Signed-off-by: Xuelin Shi Signed-off-by: Scott Wood arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 1 + arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi | 6 ++++++ 2 files changed, 7 insertions(+) commit 7e393220b6e1ecfa5520d1b2ca31150b7588f458 Author: Christophe Leroy Date: Mon Mar 7 18:44:37 2016 +0100 powerpc: optimise csum_partial() call when len is constant csum_partial is often called for small fixed length packets for which it is suboptimal to use the generic csum_partial() function. For instance, in my configuration, I got: * One place calling it with constant len 4 * Seven places calling it with constant len 8 * Three places calling it with constant len 14 * One place calling it with constant len 20 * One place calling it with constant len 24 * One place calling it with constant len 32 This patch renames csum_partial() to __csum_partial() and implements csum_partial() as a wrapper inline function which * uses csum_add() for small 16bits multiple constant length * uses ip_fast_csum() for other 32bits multiple constant * uses __csum_partial() in all other cases Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/checksum.h | 79 ++++++++++++++++++++++++++----------- arch/powerpc/lib/checksum_32.S | 4 +- arch/powerpc/lib/checksum_64.S | 4 +- arch/powerpc/lib/ppc_ksyms.c | 2 +- 4 files changed, 61 insertions(+), 28 deletions(-) commit ac6082dd32da2774241a75f1fca2de71a39ef768 Author: Raghav Dogra Date: Tue Feb 9 15:09:08 2016 +0530 powerpc/fsl-lbc: Modify suspend/resume entry sequence Modify platform driver suspend/resume to syscore suspend/resume. This is because p1022ds needs to use localbus when entering the PCIE resume. Signed-off-by: Raghav Dogra [scottwood: dropped makefile churn] Signed-off-by: Scott Wood arch/powerpc/sysdev/fsl_lbc.c | 49 +++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 11 deletions(-) commit 921fff351c3a7d2895f22d4a7a36b2f667709b9c Author: Christophe Leroy Date: Wed Feb 3 23:34:21 2016 +0100 powerpc/8xx: CONFIG_DEBUG_PAGEALLOC requires ITLBmiss for kernel addresses When CONFIG_DEBUG_PAGEALLOC is activated, the initial TLB mapping gets flushed to track accesses to wrong areas. Therefore, kernel addresses will also generate ITLB misses. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/kernel/head_8xx.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 501ea76687ef16a88a96cc9848e5d760f1c68e4e Author: Christophe Leroy Date: Thu Feb 4 11:07:48 2016 +0100 powerpc/885: set SDCR to 0x40 The MPC885 reference manual says that SDCR shall have value 0x40, but most exemples set SDCR to 0x1 With 0x1 in SDCR, we observe TX underruns on SCC when using it in QMC mode. According the NXP technical support, this is a copy/paste error from MPC860 reference manual, 0x40 being the only value supported by the MPC885 HW. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/sysdev/cpm1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b278268b63258c86e1df155c461df1259c9c6f05 Author: Bartlomiej Zolnierkiewicz Date: Wed Feb 3 16:50:17 2016 +0100 powerpc/86xx: disable IDE subsystem in mpc8610_hpcd_defconfig This patch disables deprecated IDE subsystem in mpc8610_hpcd_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Scott Wood arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig | 1 - 1 file changed, 1 deletion(-) commit 2fa1d23071f373715c1203772a15722bb863bfc6 Author: Bartlomiej Zolnierkiewicz Date: Wed Feb 3 16:50:10 2016 +0100 powerpc/85xx: disable IDE subsystem in stx_gp3_defconfig This patch disables deprecated IDE subsystem in stx_gp3_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Scott Wood Cc: Kumar Gala Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Scott Wood arch/powerpc/configs/85xx/stx_gp3_defconfig | 2 -- 1 file changed, 2 deletions(-) commit 451bc2e9e3fd30deb94f14a9d692e881dbf90649 Author: Bartlomiej Zolnierkiewicz Date: Wed Feb 3 16:50:08 2016 +0100 powerpc/85xx: disable IDE subsystem in ksi8560_defconfig This patch disables deprecated IDE subsystem in ksi8560_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Scott Wood Cc: Kumar Gala Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Scott Wood arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - 1 file changed, 1 deletion(-) commit ba1353eee070d0dc7385fb5332dd3656cea8ecf5 Author: Bartlomiej Zolnierkiewicz Date: Wed Feb 3 16:50:07 2016 +0100 powerpc/83xx: disable IDE subsystem in mpc834x_itx_defconfig This patch disables deprecated IDE subsystem in mpc834x_itx_defconfig (no IDE host drivers are selected in this config so there is no valid reason to enable IDE subsystem itself). Cc: Scott Wood Cc: Kumar Gala Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Scott Wood arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 66923a60ad80a963c0cd5ceecba9ba377cefba47 Author: Saurabh Sengar Date: Sun Jan 24 12:24:06 2016 +0530 qe: Use GFP_ATOMIC while spin_lock_irqsave is held cpm_muram_alloc_common is called twice and both the times spin_lock_irqsave is held. Using GFP_KERNEL can sleep in spin_lock_irqsave context and cause deadlock Signed-off-by: Saurabh Sengar Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 713df30bd9a036196efd58887c10e0d3ee0928f9 Author: Saurabh Sengar Date: Tue Jan 26 14:22:01 2016 +0530 qe: Make cpm_muram_alloc_common static as cpm_muram_alloc_common is used only in this file, making it static Signed-off-by: Saurabh Sengar Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_common.c | 66 +++++++++++++++++++++--------------------- include/soc/fsl/qe/qe.h | 2 -- 2 files changed, 33 insertions(+), 35 deletions(-) commit c9ee69c5e2dc41e4153b3742db1f3dde856d539c Author: Zhao Qiang Date: Thu Jan 21 09:06:04 2016 +0800 qe/ic: fix a buffer overflow error and add check elsewhere 127 is the theoretical up boundary of QEIC number, in fact there only be 44 qe_ic_info now. add check to overflow for qe_ic_info Signed-off-by: Zhao Qiang Acked-by: Li Yang Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_ic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7cafc65b3aa1b6970f92211c55712f115d876cfc Author: Takashi Sakamoto Date: Mon Mar 7 22:35:45 2016 +0900 ALSA: dice: force to add two pcm devices for listed models Some models reduce the number of available isochronous streams for higher sampling transfer frequency. Such models bring an issue about how to add PCM substreams. When at lower sampling transfer frequency, the models reports whole available streams, thus this driver can add enough number of PCM substreams at probing time. On the other hand, at higher sampling transfer frequency, this driver can just add reduced number of PCM substreams. After probed, even if the sampling transfer frequency is changed to lower rate, fewer PCM substreams are actually available. This is inconvenience. For the reason, this commit adds a list so that this driver assume models on the list to have two pairs of PCM substreams. This list keeps the name of model in which the number of available streams differs depending on sampling transfer frequency. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-pcm.c | 24 +++++++++++++++--------- sound/firewire/dice/dice.c | 41 +++++++++++++++++++++++++++++++++++++++++ sound/firewire/dice/dice.h | 2 ++ 3 files changed, 58 insertions(+), 9 deletions(-) commit 4bdc495c87b323721eace38c581d7bd2652aa613 Author: Takashi Sakamoto Date: Mon Mar 7 22:35:44 2016 +0900 ALSA: dice: handle several PCM substreams when any isochronous streams are available In former commits, ALSA dice driver can handle available isochronous streams. This commit adds support for several PCM substreams on the streams. The additional PCM substreams are available via another ALSA PCM character devices so that one ALSA PCM application can handle them without cumbersome operations. For example, two PCM substreams are available on each stream, two ALSA character devices are added for them. In configuration space of alsa-lib, it's represented with 'hw:0,0' and 'hw:0,1'. The PCM substreams are constraint to parameters of the corresponding streams. If the PCM substreams are unavailable for some reasons, open(2) to ALSA PCM character device returns error and reports ENXIO. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-pcm.c | 121 +++++++++++++++++++++++++---------------- 1 file changed, 75 insertions(+), 46 deletions(-) commit 436b5abe2224d6788eda7c5eb627b593bd96c438 Author: Takashi Sakamoto Date: Mon Mar 7 22:35:43 2016 +0900 ALSA: dice: handle whole available isochronous streams This commit enables ALSA dice driver to handle whole available streams. In Dice, certain registers represent the number of available streams at current sampling transfer frequency for both directions. The parameters of each stream are represented in a block of register. This block is aligned sequentially. These streams start simultaneously by writing enable bit to a register. This commit operates these registers when starting/stopping streams. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 398 ++++++++++++++++++++++++-------------- 1 file changed, 255 insertions(+), 143 deletions(-) commit 8ae25b760ade9856e5a217ca4f7c3d531b312ca4 Author: Takashi Sakamoto Date: Mon Mar 7 22:35:42 2016 +0900 ALSA: dice: have two sets of isochronous resources/streams Currently ALSA dice driver handles a pair of isochronous resources for IEC 61883-1/6 packet streaming. While, according to some documents about ASICs named as 'Dice', several isochronous streams are available. Here, I start to describe ASICs produced under 'Dice' name. * Dice II (designed by wavefront semiconductor, including TCAT's IP) * STD (with limited functionality of DTCP) * CP (with full functionality of DTCP) * TCD2210/2210-E (so-called 'Dice Mini') * TCD2220/2220-E (so-called 'Dice Jr.') * TCD3070-CH (so-called 'Dice III') Some documents are public and we can see hardware design of them. We can find some articles about hardware internal register definitions (not registers exported to IEEE 1394 bus). * DICE II User Guide * http://www.tctechnologies.tc/archive/downloads/dice_ii_user_guide.pdf * 6.1 AVS Audio Receivers * Table 6.1: AVS Audio Receiver Memory Map * ARX1-ARX4 * 6.2 AVS Audio Transmitters * Table 6.2: AVS Audio Transmitter Memory Map * ATX1, ATX2 * TCD22xx User Guide * http://www.tctechnologies.tc/downloads/tcd22xx_user_guide.pdf * 6.1 AVS Audio Receivers * Table 66: AVS Audio Receiver Memory Map * ARX1, ARX2 * 6/2 AVS Audio Transmitters * Table 67: AVS Audio Transmitter Memory Map * ATX1, ATX2 * DICE III * http://www.tctechnologies.tc/downloads/TCD3070-CH.pdf * Dual stream 63 channel transmitter/receiver For Dice II and TCD22xx series, maximum 16 data channels are transferred in an AMDTP packet, while for Dice III, maximum 32 data channels are transferred. According to the design of the series of these ASICs, this commit allows this driver to handle additional set of isochronous resources. For practical reason, two pair of isochronous resources are added. As of this commit, this driver still use a pair of the first isochronous resources. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-midi.c | 8 +++--- sound/firewire/dice/dice-pcm.c | 34 ++++++++++++++---------- sound/firewire/dice/dice-stream.c | 54 +++++++++++++++++++-------------------- sound/firewire/dice/dice.h | 31 +++++++++++++++++++--- 4 files changed, 79 insertions(+), 48 deletions(-) commit 9d93efe35ed011327999675d70bb1b12ccdbd62d Author: Linus Walleij Date: Wed Mar 9 22:02:52 2016 +0700 gpio: tps65912: fix bad merge I screwed up while merging the immutable branch for TPS65912, so fixing it unbroken again. Cc: Lee Jones Cc: Andrew F. Davis Signed-off-by: Linus Walleij drivers/gpio/gpio-tps65912.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70aba44b6cade8dc63261c4f97d5e83b0c02d07a Author: Linus Walleij Date: Wed Mar 9 22:00:27 2016 +0700 Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free" This reverts commit 3fab91ea284a3b795327dda915a3c150a49e4be2. drivers/gpio/gpio-lp3943.c | 22 ++++++++++++++++++++++ include/linux/mfd/lp3943.h | 6 ++++++ 2 files changed, 28 insertions(+) commit 08f511fd41c3afe303eb9b41bff0570f7c1b6937 Author: Rafael J. Wysocki Date: Fri Mar 4 03:58:22 2016 +0100 cpufreq: Reduce cpufreq_update_util() overhead a bit Use the observation that cpufreq_update_util() is only called by the scheduler with rq->lock held, so the callers of cpufreq_set_update_util_data() can use synchronize_sched() instead of synchronize_rcu() to wait for cpufreq_update_util() to complete. Moreover, if they are updated to do that, rcu_read_(un)lock() calls in cpufreq_update_util() might be replaced with rcu_read_(un)lock_sched(), respectively, but those aren't really necessary, because the scheduler calls that function from RCU-sched read-side critical sections already. In addition to that, if cpufreq_set_update_util_data() checks the func field in the struct update_util_data before setting the per-CPU pointer to it, the data->func check may be dropped from cpufreq_update_util() as well. Make the above changes to reduce the overhead from cpufreq_update_util() in the scheduler paths invoking it and to make the cleanup after removing its callbacks less heavy-weight somewhat. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Acked-by: Peter Zijlstra (Intel) drivers/cpufreq/cpufreq.c | 25 +++++++++++++++++-------- drivers/cpufreq/cpufreq_governor.c | 2 +- drivers/cpufreq/intel_pstate.c | 4 ++-- 3 files changed, 20 insertions(+), 11 deletions(-) commit e6f036571e1f65021a442ec7aad087a6a239ecfb Author: Rafael J. Wysocki Date: Sun Feb 28 02:33:29 2016 +0100 cpufreq: Select IRQ_WORK if CPU_FREQ_GOV_COMMON is set Commit 0eb463be3436 (cpufreq: governor: Replace timers with utilization update callbacks) made CPU_FREQ select IRQ_WORK, but that's not necessary, as it is sufficient for IRQ_WORK to be selected by CPU_FREQ_GOV_COMMON, so modify the cpufreq Kconfig to that effect. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6e45661f9be546811b62b2b01f32f4bf0c436c0 Author: Luis R. Rodriguez Date: Fri Jan 22 18:34:22 2016 -0800 dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar Signed-off-by: Luis R. Rodriguez Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: benh@kernel.crashing.org Cc: bhelgaas@google.com Cc: bp@suse.de Cc: dan.j.williams@intel.com Cc: daniel.vetter@ffwll.ch Cc: dhowells@redhat.com Cc: julia.lawall@lip6.fr Cc: konrad.wilk@oracle.com Cc: linux-fbdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@amacapital.net Cc: mst@redhat.com Cc: tomi.valkeinen@ti.com Cc: toshi.kani@hp.com Cc: vinod.koul@intel.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar arch/arm/mach-lpc32xx/phy3250.c | 13 ++++++------- arch/arm/mach-netx/fb.c | 14 ++++++-------- arch/arm/mach-nspire/clcd.c | 13 ++++++------- drivers/dma/iop-adma.c | 8 ++++---- drivers/dma/mv_xor.c | 4 ++-- drivers/dma/qcom_bam_dma.c | 14 +++++++------- drivers/gpu/drm/drm_gem_cma_helper.c | 13 ++++++------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 8 ++++---- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 13 ++++++------- drivers/gpu/drm/omapdrm/omap_gem.c | 8 ++++---- drivers/gpu/drm/sti/sti_cursor.c | 20 +++++++++----------- drivers/gpu/drm/sti/sti_gdp.c | 3 +-- drivers/gpu/drm/sti/sti_hqvdp.c | 6 +++--- drivers/gpu/drm/tegra/gem.c | 11 +++++------ drivers/gpu/drm/vc4/vc4_bo.c | 5 ++--- drivers/gpu/host1x/cdma.c | 8 ++++---- drivers/gpu/host1x/job.c | 10 ++++------ drivers/media/platform/coda/coda-bit.c | 10 +++++----- drivers/video/fbdev/acornfb.c | 4 ++-- drivers/video/fbdev/amba-clcd-versatile.c | 14 ++++++-------- drivers/video/fbdev/amba-clcd.c | 4 ++-- drivers/video/fbdev/atmel_lcdfb.c | 9 +++++---- drivers/video/fbdev/ep93xx-fb.c | 8 +++----- drivers/video/fbdev/gbefb.c | 8 ++++---- drivers/video/fbdev/imxfb.c | 12 ++++++------ drivers/video/fbdev/mx3fb.c | 9 ++++----- drivers/video/fbdev/nuc900fb.c | 8 ++++---- drivers/video/fbdev/omap/lcdc.c | 16 ++++++++-------- drivers/video/fbdev/pxa168fb.c | 8 ++++---- drivers/video/fbdev/pxafb.c | 4 ++-- drivers/video/fbdev/s3c-fb.c | 7 +++---- drivers/video/fbdev/s3c2410fb.c | 8 ++++---- drivers/video/fbdev/sa1100fb.c | 8 ++++---- include/linux/dma-mapping.h | 25 +++++++++++++++++-------- sound/arm/pxa2xx-pcm-lib.c | 12 ++++-------- sound/soc/fsl/imx-pcm-fiq.c | 10 ++++------ sound/soc/nuc900/nuc900-pcm.c | 6 ++---- sound/soc/omap/omap-pcm.c | 12 ++++-------- 38 files changed, 176 insertions(+), 197 deletions(-) commit 8b30a8b3c636a155bab9176ad209964c9c22252d Author: Borislav Petkov Date: Wed Mar 9 14:48:21 2016 +0100 x86/defconfigs/32: Set CONFIG_FRAME_WARN to the Kconfig default Sync it to the Kconfig default for 32-bit. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: tim.gardner@canonical.com Link: http://lkml.kernel.org/r/20160309134821.GD6564@pd.tnic Signed-off-by: Ingo Molnar arch/x86/configs/i386_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea8f75f981918c5946fc4029acdc86707fa901c1 Author: Jiri Olsa Date: Tue Mar 8 19:42:30 2016 +0100 perf tools: Omit unnecessary cast in perf_pmu__parse_scale There's no need to use a const char pointer, we can used char pointer from the beginning and omit the unnecessary cast. Reported-by: Ingo Molnar Signed-off-by: Jiri Olsa Cc: David Ahern Cc: H. Peter Anvin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160308184230.GB7897@krava.redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 242aa883a64d8c54cfeee47f3603b21bc705e081 Author: Viresh Kumar Date: Mon Feb 22 16:36:44 2016 +0530 cpufreq: Remove 'policy->governor_enabled' The entire sequence of events (like INIT/START or STOP/EXIT) for which cpufreq_governor() is called, is guaranteed to be protected by policy->rwsem now. The additional checks that were added earlier (as we were forced to drop policy->rwsem before calling cpufreq_governor() for EXIT event), aren't required anymore. Over that, they weren't sufficient really. They just take care of START/STOP events, but not INIT/EXIT and the state machine was never maintained properly by them. Kill the unnecessary checks and policy->governor_enabled field. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 17 ----------------- include/linux/cpufreq.h | 1 - 2 files changed, 18 deletions(-) commit a1317e091ab1386812ee8ab4e3bbd89f2811bc74 Author: Viresh Kumar Date: Mon Feb 22 16:36:43 2016 +0530 cpufreq: Rename __cpufreq_governor() to cpufreq_governor() The __ at the beginning of the routine aren't really necessary at all. Rename it to cpufreq_governor() instead. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 11eb69b984aae216ae43c79d2d43441ee68a63ca Author: Viresh Kumar Date: Mon Feb 22 16:36:42 2016 +0530 cpufreq: Relocate handle_update() to kill its declaration handle_update() is declared at the top of the file as its user appear before its definition. Relocate the routine to get rid of this. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit f737236b128cac7c355d0650a98c42ae4313f3f1 Author: Viresh Kumar Date: Mon Feb 22 14:18:20 2016 +0530 cpufreq: governor: Drop unnecessary checks from show() and store() The show() and store() routines in the cpufreq-governor core don't need to check if the struct governor_attr they want to use really provides the callbacks they need as expected (if that's not the case, it means a bug in the code anyway), so change them to avoid doing that. Also change the error value to -EBUSY, if the governor is getting removed and we aren't allowed to store any more changes. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 27de34823984e844f5dc042d39bb43f5dc98966f Author: Rafael J. Wysocki Date: Mon Feb 22 14:14:34 2016 +0100 cpufreq: governor: Fix race in dbs_update_util_handler() There is a scenario that may lead to undesired results in dbs_update_util_handler(). Namely, if two CPUs sharing a policy enter the funtion at the same time, pass the sample delay check and then one of them is stalled until dbs_work_handler() (queued up by the other CPU) clears the work counter, it may update the work counter and queue up another work item prematurely. To prevent that from happening, use the observation that the CPU queuing up a work item in dbs_update_util_handler() updates the last sample time. This means that if another CPU was stalling after passing the sample delay check and now successfully updated the work counter as a result of the race described above, it will see the new value of the last sample time which is different from what it used in the sample delay check before. If that happens, the sample delay check passed previously is not valid any more, so the CPU should not continue. Fixes: f17cbb53783c (cpufreq: governor: Avoid atomic operations in hot paths) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 94ab5e030fe10cfcc700050cc21535b824943077 Author: Rafael J. Wysocki Date: Sun Feb 21 03:15:34 2016 +0100 cpufreq: governor: Make gov_set_update_util() static The gov_set_update_util() routine is only used internally by the common governor code and it doesn't need to be exported, so make it static. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1112e9d83e5cd153b35dfbb52721f8b3d3163016 Author: Rafael J. Wysocki Date: Sun Feb 21 00:53:06 2016 +0100 cpufreq: governor: Narrow down the dbs_data_mutex coverage Since cpufreq_governor_dbs() is now always called with policy->rwsem held, it cannot be executed twice in parallel for the same policy. Thus it is not necessary to hold dbs_data_mutex around the invocations of cpufreq_governor_start/stop/limits() from it as those functions never modify any data that can be shared between different policies. However, cpufreq_governor_dbs() may be executed twice in parallal for different policies using the same gov->gdbs_data object and dbs_data_mutex is still necessary to protect that object against concurrent updates. For this reason, narrow down the dbs_data_mutex locking to cpufreq_governor_init/exit() where it is needed and rename the mutex to gov_dbs_data_mutex to reflect its purpose. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit e3f5ed9393042188a1716d3873415ef44161addf Author: Rafael J. Wysocki Date: Thu Feb 18 02:33:43 2016 +0100 cpufreq: governor: Make dbs_data_mutex static That mutex is only used by cpufreq_governor_dbs() and it doesn't need to be exported to modules, so make it static and drop the export incantation. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 3 +-- drivers/cpufreq/cpufreq_governor.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 47ebaac1f32dc606262be48a72f9cea6af376414 Author: Rafael J. Wysocki Date: Thu Feb 18 18:41:36 2016 +0100 cpufreq: governor: Relocate definitions of tuners structures Move the definitions of struct od_dbs_tuners and struct cs_dbs_tuners from the common governor header to the ondemand and conservative governor code, respectively, as they don't need to be in the common header any more. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 5 +++++ drivers/cpufreq/cpufreq_governor.h | 10 ---------- drivers/cpufreq/cpufreq_ondemand.h | 4 ++++ 3 files changed, 9 insertions(+), 10 deletions(-) commit 8c8f77fd0719a079450f59debed4f69ede825adb Author: Rafael J. Wysocki Date: Sun Feb 21 00:51:27 2016 +0100 cpufreq: governor: Move per-CPU data to the common code After previous changes there is only one piece of code in the ondemand governor making references to per-CPU data structures, but it can be easily modified to avoid doing that, so modify it accordingly and move the definition of per-CPU data used by the ondemand and conservative governors to the common code. Next, change that code to access the per-CPU data structures directly rather than via a governor callback. This causes the ->get_cpu_cdbs governor callback to become unnecessary, so drop it along with the macro and function definitions related to it. Finally, drop the definitions of struct od_cpu_dbs_info_s and struct cs_cpu_dbs_info_s that aren't necessary any more. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 9 +-------- drivers/cpufreq/cpufreq_governor.c | 31 +++++++++++++------------------ drivers/cpufreq/cpufreq_governor.h | 18 +----------------- drivers/cpufreq/cpufreq_ondemand.c | 26 ++++++++++---------------- 4 files changed, 25 insertions(+), 59 deletions(-) commit 7d5a9956af4ccf7d5cc0cd1f8d27d1691321bfc6 Author: Rafael J. Wysocki Date: Thu Feb 18 18:40:14 2016 +0100 cpufreq: governor: Make governor private data per-policy Some fields in struct od_cpu_dbs_info_s and struct cs_cpu_dbs_info_s are only used for a limited set of CPUs. Namely, if a policy is shared between multiple CPUs, those fields will only be used for one of them (policy->cpu). This means that they really are per-policy rather than per-CPU and holding room for them in per-CPU data structures is generally wasteful. Also moving those fields into per-policy data structures will allow some significant simplifications to be made going forward. For this reason, introduce struct cs_policy_dbs_info and struct od_policy_dbs_info to hold those fields. Define each of the new structures as an extension of struct policy_dbs_info (such that struct policy_dbs_info is embedded in each of them) and introduce new ->alloc and ->free governor callbacks to allocate and free those structures, respectively, such that ->alloc() will return a pointer to the struct policy_dbs_info embedded in the allocated data structure and ->free() will take that pointer as its argument. With that, modify the code accessing the data fields in question in per-CPU data objects to look for them in the new structures via the struct policy_dbs_info pointer available to it and drop them from struct od_cpu_dbs_info_s and struct cs_cpu_dbs_info_s. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/amd_freq_sensitivity.c | 5 ++--- drivers/cpufreq/cpufreq_conservative.c | 34 ++++++++++++++++++++++++++++++---- drivers/cpufreq/cpufreq_governor.c | 7 +++---- drivers/cpufreq/cpufreq_governor.h | 9 ++------- drivers/cpufreq/cpufreq_ondemand.c | 34 ++++++++++++++++++++++++---------- drivers/cpufreq/cpufreq_ondemand.h | 26 ++++++++++++++++++++++++++ 6 files changed, 87 insertions(+), 28 deletions(-) commit d1db75fffc22504c586c3fae8d602384ea899340 Author: Rafael J. Wysocki Date: Thu Feb 18 02:28:24 2016 +0100 cpufreq: ondemand: Rework the handling of powersave bias updates The ondemand_powersave_bias_init() function used for resetting data fields related to the powersave bias tunable of the ondemand governor works by walking all of the online CPUs in the system and updating the od_cpu_dbs_info_s structures for all of them. However, if governor tunables are per policy, the update should not touch the CPUs that are not associated with the given dbs_data. Moreover, since the data fields in question are only ever used for policy->cpu in each policy governed by ondemand, the update can be limited to those specific CPUs. Rework the code to take the above observations into account. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_ondemand.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit a33cce1c6cc3268d8b4843bf1e4ac1e70b27d107 Author: Rafael J. Wysocki Date: Thu Feb 18 02:26:55 2016 +0100 cpufreq: governor: Fix CPU load information updates via ->store The ->store() callbacks of some tunable sysfs attributes of the ondemand and conservative governors trigger immediate updates of the CPU load information for all CPUs "governed" by the given dbs_data by walking the cpu_dbs_info structures for all online CPUs in the system and updating them. This is questionable for two reasons. First, it may lead to a lot of extra overhead on a system with many CPUs if the given dbs_data is only associated with a few of them. Second, if governor tunables are per-policy, the CPUs associated with the other sets of governor tunables should not be updated. To address this issue, use the observation that in all of the places in question the update operation may be carried out in the same way (because all of the tunables involved are now located in struct dbs_data and readily available to the common code) and make the code in those places invoke the same (new) helper function that will carry out the update correctly. That new function always checks the ignore_nice_load tunable value and updates the CPUs' prev_cpu_nice data fields if that's set, which wasn't done by the original code in store_io_is_busy(), but it should have been done in there too. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 15 +++++---------- drivers/cpufreq/cpufreq_governor.c | 30 ++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq_governor.h | 1 + drivers/cpufreq/cpufreq_ondemand.c | 22 ++++------------------ 4 files changed, 40 insertions(+), 28 deletions(-) commit 76c5f66aa10720a377dfe8beebd39a0b2a938965 Author: Rafael J. Wysocki Date: Thu Feb 18 02:24:32 2016 +0100 cpufreq: ondemand: Drop one more callback from struct od_ops The ->powersave_bias_init_cpu callback in struct od_ops is only used in one place and that invocation may be replaced with a direct call to the function pointed to by that callback, so change the code accordingly and drop the callback. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.h | 1 - drivers/cpufreq/cpufreq_ondemand.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 8434dadbb457813a127f56d9f0fb7d22035027b9 Author: Rafael J. Wysocki Date: Thu Feb 18 02:22:42 2016 +0100 cpufreq: governor: Drop unused governor callback and data fields After some previous changes, the ->get_cpu_dbs_info_s governor callback and the "governor" field in struct dbs_governor (whose value represents the governor type) are not used any more, so drop them. Also drop the unused gov_ops field from struct dbs_governor. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 2 -- drivers/cpufreq/cpufreq_governor.h | 15 +-------------- drivers/cpufreq/cpufreq_ondemand.c | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) commit 702c9e542a25cf95683c08c56e711eddb80020ac Author: Rafael J. Wysocki Date: Thu Feb 18 02:21:21 2016 +0100 cpufreq: governor: Add a ->start callback for governors To avoid having to check the governor type explicitly in the common code in order to initialize data structures specific to the governor type properly, add a ->start callback to struct dbs_governor and use it to initialize those data structures for the ondemand and conservative governors. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 9 +++++++++ drivers/cpufreq/cpufreq_governor.c | 16 ++-------------- drivers/cpufreq/cpufreq_governor.h | 1 + drivers/cpufreq/cpufreq_ondemand.c | 10 ++++++++++ 4 files changed, 22 insertions(+), 14 deletions(-) commit 8847e038c1d19c20dda0d7a590e31ffa528da8a5 Author: Rafael J. Wysocki Date: Thu Feb 18 02:20:13 2016 +0100 cpufreq: governor: Move io_is_busy to struct dbs_data The io_is_busy governor tunable is only used by the ondemand governor and is located in the ondemand-specific data structure, but it is looked at by the common governor code that has to do ugly things to get to that value, so move it to struct dbs_data and modify ondemand accordingly. Since the conservative governor never touches that field, it will be always 0 for that governor and it won't have any effect on the results of computations in that case. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 27 +++++++++------------------ drivers/cpufreq/cpufreq_governor.h | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 12 +++++------- 3 files changed, 15 insertions(+), 26 deletions(-) commit 574ef14d5dbcd2743326cc1b28e61a1e7733162a Author: Rafael J. Wysocki Date: Thu Feb 18 02:19:00 2016 +0100 cpufreq: governor: Close dbs_data update race condition It is possible for a dbs_data object to be updated after its usage counter has become 0. That may happen if governor_store() runs (via a govenor tunable sysfs attribute write) in parallel with cpufreq_governor_exit() called for the last cpufreq policy associated with the dbs_data in question. In that case, if governor_store() acquires dbs_data->mutex right after cpufreq_governor_exit() has released it, the ->store() callback invoked by it may operate on dbs_data with no users. Although sysfs will cause the kobject_put() in cpufreq_governor_exit() to block until governor_store() has returned, that situation may lead to some unexpected results, depending on the implementation of the ->store callback, and therefore it should be avoided. To that end, modify governor_store() to check the dbs_data's usage count before invoking the ->store() callback and return an error if it is 0 at that point. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8eb055d3f53e52805907ea54e2eec0885be91a50 Author: Rafael J. Wysocki Date: Tue Feb 16 21:02:32 2016 +0100 cpufreq: ondemand: Drop unused callback from struct od_ops The ->freq_increase callback in struct od_ops is never invoked, so drop it. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.h | 1 - drivers/cpufreq/cpufreq_ondemand.c | 1 - 2 files changed, 2 deletions(-) commit a7f35cffb980f3aec75f74559a4320974c845b78 Author: Rafael J. Wysocki Date: Tue Feb 16 21:02:24 2016 +0100 cpufreq: ondemand: Simplify od_update() slightly Drop some lines of code from od_update() by arranging the statements in there in a more logical way. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_ondemand.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 07aa4402a009bc83194860e7869c491bab854d1c Author: Rafael J. Wysocki Date: Mon Feb 15 02:22:13 2016 +0100 cpufreq: governor: Use microseconds in sample delay computations Do not convert microseconds to jiffies and the other way around in governor computations related to the sampling rate and sample delay and drop delay_for_sampling_rate() which isn't of any use then. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_governor.c | 4 +--- drivers/cpufreq/cpufreq_governor.h | 15 ++------------- drivers/cpufreq/cpufreq_ondemand.c | 28 +++++++++++++--------------- 4 files changed, 17 insertions(+), 32 deletions(-) commit 6e96c5b3ac5181d4b787590e54c4af99d3fa5f2e Author: Rafael J. Wysocki Date: Mon Feb 15 02:21:35 2016 +0100 cpufreq: ondemand: Simplify conditionals in od_dbs_timer() Reduce the indentation level in the conditionals in od_dbs_timer() and drop the delay variable from it. No functional changes. Signed-off-by: Rafael J. Wysocki Reviewed-by: Viresh Kumar drivers/cpufreq/cpufreq_ondemand.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 57dc3bcd454eb420ddf25d89852993b61b351327 Author: Rafael J. Wysocki Date: Mon Feb 15 02:20:51 2016 +0100 cpufreq: governor: Move rate_mult to struct policy_dbs The rate_mult field in struct od_cpu_dbs_info_s is used by the code shared with the conservative governor and to access it that code has to do an ugly governor type check. However, first of all it is ever only used for policy->cpu, so it is per-policy rather than per-CPU and second, it is initialized to 1 by cpufreq_governor_start(), so if the conservative governor never modifies it, it will have no effect on the results of any computations. For these reasons, move rate_mult to struct policy_dbs_info (as a common field). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 25 +++++++++---------------- drivers/cpufreq/cpufreq_governor.h | 3 ++- drivers/cpufreq/cpufreq_ondemand.c | 23 +++++++++++++++-------- 3 files changed, 26 insertions(+), 25 deletions(-) commit 78347cdb89065f9d40ea28596ef2bd8058eb6d12 Author: Rafael J. Wysocki Date: Mon Feb 15 02:20:11 2016 +0100 cpufreq: governor: Reset sample delay in store_sampling_rate() If store_sampling_rate() updates the sample delay when the ondemand governor is in the middle of its high/low dance (OD_SUB_SAMPLE sample type is set), the governor will still do the bottom half of the previous sample which may take too much time. To prevent that from happening, change store_sampling_rate() to always reset the sample delay to 0 which also is consistent with the new behavior of cpufreq_governor_limits(). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 4cccf7555770b787fa80791a1407a27301f03920 Author: Rafael J. Wysocki Date: Mon Feb 15 02:19:31 2016 +0100 cpufreq: governor: Get rid of the ->gov_check_cpu callback The way the ->gov_check_cpu governor callback is used by the ondemand and conservative governors is not really straightforward. Namely, the governor calls dbs_check_cpu() that updates the load information for the policy and the invokes ->gov_check_cpu() for the governor. To get rid of that entanglement, notice that cpufreq_governor_limits() doesn't need to call dbs_check_cpu() directly. Instead, it can simply reset the sample delay to 0 which will cause a sample to be taken immediately. The result of that is practically equivalent to calling dbs_check_cpu() except that it will trigger a full update of governor internal state and not just the ->gov_check_cpu() part. Following that observation, make cpufreq_governor_limits() reset the sample delay and turn dbs_check_cpu() into a function that will simply evaluate the load and return the result called dbs_update(). That function can now be called by governors from the routines that previously were pointed to by ->gov_check_cpu and those routines can be called directly by each governor instead of dbs_check_cpu(). This way ->gov_check_cpu becomes unnecessary, so drop it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 26 +++++++++----------------- drivers/cpufreq/cpufreq_governor.c | 15 ++++++++------- drivers/cpufreq/cpufreq_governor.h | 3 +-- drivers/cpufreq/cpufreq_ondemand.c | 15 +++++++++------ 4 files changed, 27 insertions(+), 32 deletions(-) commit 57eb832f90e645dcb97d651ad052c0537cc1b3a7 Author: Rafael J. Wysocki Date: Tue Feb 16 00:58:47 2016 +0100 cpufreq: governor: Clean up load-related computations Clean up some load-related computations in dbs_check_cpu() and cpufreq_governor_start() to get rid of unnecessary operations and type casts and make the code easier to read. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 679b8fe43a6b723787cae1d9599ed776d7ce238b Author: Rafael J. Wysocki Date: Mon Feb 15 02:15:50 2016 +0100 cpufreq: governor: Fix nice contribution computation in dbs_check_cpu() The contribution of the CPU nice time to the idle time in dbs_check_cpu() is computed in a bogus way, as the code may subtract current and previous nice values for different CPUs. That doesn't matter for cases when cpufreq policies are not shared, but may lead to problems otherwise. Fix the computation and simplify it to avoid taking unnecessary steps. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit e4db2813d2e558b6b6bee464308678a57732b390 Author: Rafael J. Wysocki Date: Mon Feb 15 02:13:42 2016 +0100 cpufreq: governor: Avoid atomic operations in hot paths Rework the handling of work items by dbs_update_util_handler() and dbs_work_handler() so the former (which is executed in scheduler paths) only uses atomic operations when absolutely necessary. That is, when the policy is shared and dbs_update_util_handler() has already decided that this is the time to queue up a work item. In particular, this avoids the atomic ops entirely on platforms where policy objects are never shared. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 51 ++++++++++++++++++++++++++------------ drivers/cpufreq/cpufreq_governor.h | 3 +++ 2 files changed, 38 insertions(+), 16 deletions(-) commit f62b93740c30d0a3f50258d45415f00b763dd70a Author: Rafael J. Wysocki Date: Mon Feb 15 02:12:56 2016 +0100 cpufreq: governor: Simplify gov_cancel_work() slightly The atomic work counter incrementation in gov_cancel_work() is not necessary any more, because work items won't be queued up after gov_clear_update_util() anyway, so drop it along with the comment about how it may be missed by the gov_clear_update_util(). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 8 -------- 1 file changed, 8 deletions(-) commit b9db42730aeb23f91d7585786de25a260ab04098 Author: Rafael J. Wysocki Date: Mon Feb 15 22:15:34 2016 +0100 cpufreq: governor: Avoid irq_work_queue_on() crash on non-SMP ARM As it turns out, irq_work_queue_on() will crash if invoked on non-SMP ARM platforms, but in fact it is not necessary to use that function in the cpufreq governor code (as it doesn't matter to that code which CPU will handle the irq_work), so change it to always use irq_work_queue(). Fixes: 8fb47ff100af (cpufreq: governor: Replace timers with utilization update callbacks) Reported-and-tested-by: Guenter Roeck Reported-and-tested-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit a23d6d180914dd91e320283c81e4f84f028e24f4 Author: Viresh Kumar Date: Thu Feb 11 17:31:16 2016 +0530 cpufreq: ondemand: Rearrange od_dbs_timer() to avoid updating delay Avoid extra checks in od_dbs_timer() by rearranging updates to the local delay variable in it. Signed-off-by: Viresh Kumar [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_ondemand.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit aded387b94b69aeab10e1d112bab7f82c9241527 Author: Viresh Kumar Date: Thu Feb 11 17:31:15 2016 +0530 cpufreq: conservative: Update sample_delay_ns immediately The ondemand governor already updates sample_delay_ns immediately on updates to the sampling rate, but conservative doesn't do that. It was left out earlier as the code was really too complex to get that done easily. Things are sorted out very well now, however, and the conservative governor can be modified to follow ondemand in that respect. Moreover, since the code needed to implement that in the conservative governor would be identical to the corresponding ondemand governor's code, make that code common and change both governors to use it. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 14 ------- drivers/cpufreq/cpufreq_governor.c | 63 +++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq_governor.h | 2 + drivers/cpufreq/cpufreq_ondemand.c | 69 ---------------------------------- 4 files changed, 65 insertions(+), 83 deletions(-) commit 581c214b21e4faba06d913952e38e80635d9ada5 Author: Viresh Kumar Date: Thu Feb 11 17:31:14 2016 +0530 cpufreq: governor: No need to manage state machine now The cpufreq core now guarantees that policy->rwsem won't be dropped while running the ->governor callback for the CPUFREQ_GOV_POLICY_EXIT event and will be held acquired until the complete sequence of governor state changes has finished. This allows governor state machine checks to be dropped from multiple functions in cpufreq_governor.c. This also means that policy_dbs->policy can be initialized upfront, so the entire initialization of struct policy_dbs can be carried out in one place. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 99522fe6788f5bf627dce7c20ed9484c933511a3 Author: Viresh Kumar Date: Thu Feb 11 17:31:13 2016 +0530 cpufreq: Remove cpufreq_governor_lock We used to drop policy->rwsem just before calling __cpufreq_governor() in some cases earlier and so it was possible that __cpufreq_governor() ran concurrently via separate threads for the same policy. In order to guarantee valid state transitions for governors, 'governor_enabled' was required to be protected using some locking and cpufreq_governor_lock was added for that. But now __cpufreq_governor() is always called under policy->rwsem, and 'governor_enabled' is protected against races even without cpufreq_governor_lock. Get rid of the extra lock now. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw : Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 8 -------- drivers/cpufreq/cpufreq_governor.h | 1 - 2 files changed, 9 deletions(-) commit 49f18560f8bac5315047edfb673dd13d56cbcbc9 Author: Viresh Kumar Date: Thu Feb 11 17:31:12 2016 +0530 cpufreq: Call __cpufreq_governor() with policy->rwsem held The cpufreq core code is not consistent with respect to invoking __cpufreq_governor() under policy->rwsem. Changing all code to always hold policy->rwsem around __cpufreq_governor() invocations will allow us to remove cpufreq_governor_lock that is used today because we can't guarantee that __cpufreq_governor() isn't executed twice in parallel for the same policy. We should also ensure that policy->rwsem is held across governor state changes. For example, while adding a CPU to the policy in the CPU online path, we need to stop the governor, change policy->cpus, start the governor and then refresh its limits. The complete sequence must be guaranteed to complete without interruptions by concurrent governor state updates. That can be achieved by holding policy->rwsem around those sequences of operations. Also note that after this patch cpufreq_driver->stop_cpu() and ->exit() will get called under policy->rwsem which wasn't the case earlier. That shouldn't have any side effects, though. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 49 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) commit 69cee7147b4a4ea02085d571cd2d9974d4a4d8d5 Author: Viresh Kumar Date: Thu Feb 11 17:31:11 2016 +0530 cpufreq: Merge cpufreq_offline_prepare/finish routines Commit 1aee40ac9c86 (cpufreq: Invoke __cpufreq_remove_dev_finish() after releasing cpu_hotplug.lock) split the cpufreq's CPU offline routine in two pieces, one of them to be run with CPU offline/online locked and the other to be called later. The reason for that split was a possible deadlock scenario involving cpufreq sysfs attributes and CPU offline. However, the handling of CPU offline in cpufreq has changed since then. Policy sysfs attributes are never removed during CPU offline, so there's no need to worry about accessing them during CPU offline, because that can't lead to any deadlocks now. Governor sysfs attributes are still removed in __cpufreq_governor(_EXIT), but there is a new kobject type for them now and its show/store callbacks don't lock CPU offline/online (they don't need to do that). This means that the CPU offline code in cpufreq doesn't need to be split any more, so combine cpufreq_offline_prepare() with cpufreq_offline_finish(). Signed-off-by: Viresh Kumar [ rjw: Changelog ] Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) commit c54df0718423ea2941151d8516eb76ca6a32a4b4 Author: Viresh Kumar Date: Wed Feb 10 11:00:25 2016 +0530 cpufreq: governor: Create and traverse list of policy_dbs to avoid deadlock The dbs_data_mutex lock is currently used in two places. First, cpufreq_governor_dbs() uses it to guarantee mutual exclusion between invocations of governor operations from the core. Second, it is used by ondemand governor's update_sampling_rate() to ensure the stability of data structures walked by it. The second usage is quite problematic, because update_sampling_rate() is called from a governor sysfs attribute's ->store callback and that leads to a deadlock scenario involving cpufreq_governor_exit() which runs under dbs_data_mutex. Thus it is better to rework the code so update_sampling_rate() doesn't need to acquire dbs_data_mutex. To that end, rework update_sampling_rate() to walk a list of policy_dbs objects supported by the dbs_data one it has been called for (instead of walking cpu_dbs_info object for all CPUs). The list manipulation is protected with dbs_data->mutex which also is held around the execution of update_sampling_rate(), it is not necessary to hold dbs_data_mutex in that function any more. Reported-by: Juri Lelli Reported-by: Shilpasri G Bhat Signed-off-by: Viresh Kumar [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 22 ++++++++-- drivers/cpufreq/cpufreq_governor.h | 7 ++- drivers/cpufreq/cpufreq_ondemand.c | 89 +++++++++++++------------------------- 3 files changed, 54 insertions(+), 64 deletions(-) commit 68e80dae09033d778b98dc88e5bfe8fdade188e5 Author: Viresh Kumar Date: Tue Feb 9 09:01:35 2016 +0530 Revert "cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT" Earlier, when the struct freq-attr was used to represent governor attributes, the standard cpufreq show/store sysfs attribute callbacks were applied to the governor tunable attributes and they always acquire the policy->rwsem lock before carrying out the operation. That could have resulted in an ABBA deadlock if governor tunable attributes are removed under policy->rwsem while one of them is being accessed concurrently (if sysfs attributes removal wins the race, it will wait for the access to complete with policy->rwsem held while the attribute callback will block on policy->rwsem indefinitely). We attempted to address this issue by dropping policy->rwsem around governor tunable attributes removal (that is, around invocations of the ->governor callback with the event arg equal to CPUFREQ_GOV_POLICY_EXIT) in cpufreq_set_policy(), but that opened up race conditions that had not been possible with policy->rwsem held all the time. The previous commit, "cpufreq: governor: New sysfs show/store callbacks for governor tunables", fixed the original ABBA deadlock by adding new governor specific show/store callbacks. We don't have to drop rwsem around invocations of governor event CPUFREQ_GOV_POLICY_EXIT anymore, and original fix can be reverted now. Fixes: 955ef4833574 (cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT) Signed-off-by: Viresh Kumar Reported-by: Juri Lelli Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 5 ----- include/linux/cpufreq.h | 4 ---- 2 files changed, 9 deletions(-) commit fd8ddc482a7a5e015c0613c4d96543d5efad047c Author: Viresh Kumar Date: Tue Feb 9 09:01:34 2016 +0530 cpufreq: governor: Drop unused macros for creating governor tunable attributes The previous commit introduced a new set of macros for creating sysfs attributes that represent governor tunables and the old macros used for this purpose are not needed any more, so drop them. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.h | 89 -------------------------------------- 1 file changed, 89 deletions(-) commit c4435630361d9bebf7154a0c842dc1fb7ae39c99 Author: Viresh Kumar Date: Tue Feb 9 09:01:33 2016 +0530 cpufreq: governor: New sysfs show/store callbacks for governor tunables The ondemand and conservative governors use the global-attr or freq-attr structures to represent sysfs attributes corresponding to their tunables (which of them is actually used depends on whether or not different policy objects can use the same governor with different tunables at the same time and, consequently, on where those attributes are located in sysfs). Unfortunately, in the freq-attr case, the standard cpufreq show/store sysfs attribute callbacks are applied to the governor tunable attributes and they always acquire the policy->rwsem lock before carrying out the operation. That may lead to an ABBA deadlock if governor tunable attributes are removed under policy->rwsem while one of them is being accessed concurrently (if sysfs attributes removal wins the race, it will wait for the access to complete with policy->rwsem held while the attribute callback will block on policy->rwsem indefinitely). We attempted to address this issue by dropping policy->rwsem around governor tunable attributes removal (that is, around invocations of the ->governor callback with the event arg equal to CPUFREQ_GOV_POLICY_EXIT) in cpufreq_set_policy(), but that opened up race conditions that had not been possible with policy->rwsem held all the time. Therefore policy->rwsem cannot be dropped in cpufreq_set_policy() at any point, but the deadlock situation described above must be avoided too. To that end, use the observation that in principle governor tunables may be represented by the same data type regardless of whether the governor is system-wide or per-policy and introduce a new structure, struct governor_attr, for representing them and new corresponding macros for creating show/store sysfs callbacks for them. Also make their parent kobject use a new kobject type whose default show/store callbacks are not related to the standard core cpufreq ones in any way (and they don't acquire policy->rwsem in particular). Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Subject & changelog + rebase ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 72 ++++++++++++---------------------- drivers/cpufreq/cpufreq_governor.c | 64 ++++++++++++++++++++++++++---- drivers/cpufreq/cpufreq_governor.h | 39 +++++++++++++++++- drivers/cpufreq/cpufreq_ondemand.c | 72 ++++++++++++---------------------- 4 files changed, 144 insertions(+), 103 deletions(-) commit ff4b17895e3166084c76ae703cb1c757bcc59799 Author: Viresh Kumar Date: Tue Feb 9 09:01:32 2016 +0530 cpufreq: governor: Move common tunables to 'struct dbs_data' There are a few common tunables shared between the ondemand and conservative governors. Move them to struct dbs_data to simplify code. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 38 ++++++++++++++----------------- drivers/cpufreq/cpufreq_governor.c | 37 ++++++------------------------ drivers/cpufreq/cpufreq_governor.h | 14 +++++------- drivers/cpufreq/cpufreq_ondemand.c | 41 +++++++++++++++------------------- 4 files changed, 47 insertions(+), 83 deletions(-) commit d0684d3b8934cfb8171755cdb1fc87f4c0335655 Author: Viresh Kumar Date: Tue Feb 9 09:01:31 2016 +0530 cpufreq: governor: Create generic macro for common tunables Some tunables are present in governor-specific structures, whereas one (min_sampling_rate) is located directly in struct dbs_data. There is a special macro for creating its sysfs attribute and the show/store callbacks, but since more tunables are going to be moved to struct dbs_data, a new generic macro for such cases will be useful, so add it and use it for min_sampling_rate. Signed-off-by: Viresh Kumar Tested-by: Juri Lelli Tested-by: Shilpasri G Bhat [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 8 ++++---- drivers/cpufreq/cpufreq_governor.h | 36 +++++++++++++++++++--------------- drivers/cpufreq/cpufreq_ondemand.c | 8 ++++---- 3 files changed, 28 insertions(+), 24 deletions(-) commit fafd5e8ab29d965d6c7db326f2d4189dd9f3b002 Author: Rafael J. Wysocki Date: Mon Feb 8 23:57:22 2016 +0100 cpufreq: governor: Drop pointless goto from cpufreq_governor_init() It is silly to jump around "return 0", so don't do that. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 686cc637c99324ad52a6f8e59181f6407405bfe2 Author: Rafael J. Wysocki Date: Mon Feb 8 23:41:10 2016 +0100 cpufreq: governor: Rename skip_work to work_count The skip_work field in struct policy_dbs_info technically is a counter, so give it a new name to reflect that. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 14 +++++++------- drivers/cpufreq/cpufreq_governor.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit cea6a9e77228c261191bc92df0d24bf5356b99ff Author: Rafael J. Wysocki Date: Sun Feb 7 16:25:02 2016 +0100 cpufreq: governor: Symmetrize cpu_dbs_info initialization and cleanup Make the initialization of struct cpu_dbs_info objects in alloc_policy_dbs_info() and the code that cleans them up in free_policy_dbs_info() more symmetrical. In particular, set/clear the update_util.func field in those functions along with the policy_dbs field. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit bc505475b85de9a9903e84ef0b369d4637354201 Author: Rafael J. Wysocki Date: Sun Feb 7 16:24:26 2016 +0100 cpufreq: governor: Rearrange governor data structures The struct policy_dbs_info objects representing per-policy governor data are not accessible directly from the corresponding policy objects. To access them, one has to get a pointer to the struct cpu_dbs_info of policy->cpu and use the policy_dbs field of that which isn't really straightforward. To address that rearrange the governor data structures so the governor_data pointer in struct cpufreq_policy will point to struct policy_dbs_info (instead of struct dbs_data) and that will contain a pointer to struct dbs_data. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/amd_freq_sensitivity.c | 3 +- drivers/cpufreq/cpufreq_conservative.c | 6 ++- drivers/cpufreq/cpufreq_governor.c | 74 +++++++++++++++++----------------- drivers/cpufreq/cpufreq_governor.h | 27 +++++++------ drivers/cpufreq/cpufreq_ondemand.c | 18 +++++---- 5 files changed, 68 insertions(+), 60 deletions(-) commit e9751894000af398d5895b3ee96052f57b80cc44 Author: Rafael J. Wysocki Date: Sun Feb 7 16:23:49 2016 +0100 cpufreq: governor: Simplify cpufreq_governor_limits() Use the observation that cpufreq_governor_limits() doesn't have to get to the policy object it wants to manipulate by walking the reference chain cdbs->policy_dbs->policy, as the final pointer is actually equal to its argument, and make it access the policy object directy via its argument. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit d10b5eb5fce436ba22443ab83eeb36e195dbf772 Author: Rafael J. Wysocki Date: Sat Feb 6 13:50:24 2016 +0100 cpufreq: governor: Drop cpu argument from dbs_check_cpu() Since policy->cpu is always passed as the second argument to dbs_check_cpu(), it is not really necessary to pass it, because the function can obtain that value via its first argument just fine. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_governor.c | 8 ++++---- drivers/cpufreq/cpufreq_governor.h | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) commit e40e7b255e591d0448500c7910ec5693f58026bd Author: Rafael J. Wysocki Date: Wed Feb 10 17:07:44 2016 +0100 cpufreq: governor: Rename cpu_common_dbs_info to policy_dbs_info The struct cpu_common_dbs_info structure represents the per-policy part of the governor data (for the ondemand and conservative governors), but its name doesn't reflect its purpose. Rename it to struct policy_dbs_info and rename variables related to it accordingly. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_governor.c | 134 ++++++++++++++++----------------- drivers/cpufreq/cpufreq_governor.h | 8 +- drivers/cpufreq/cpufreq_ondemand.c | 28 +++---- 4 files changed, 86 insertions(+), 86 deletions(-) commit ea59ee0dc9796a4e879291cc2f4728d04c499313 Author: Rafael J. Wysocki Date: Sun Feb 7 16:09:51 2016 +0100 cpufreq: governor: Drop the gov pointer from struct dbs_data Since it is possible to obtain a pointer to struct dbs_governor from a pointer to the struct governor embedded in it with the help of container_of(), the additional gov pointer in struct dbs_data isn't really necessary. Drop that pointer and make the code using it reach the dbs_governor object via policy->governor. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/amd_freq_sensitivity.c | 2 +- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_governor.c | 63 ++++++++++++++++------------------ drivers/cpufreq/cpufreq_governor.h | 8 +++-- drivers/cpufreq/cpufreq_ondemand.c | 2 +- 5 files changed, 39 insertions(+), 38 deletions(-) commit 906a6e5aaef24d3c80bf6a06c794c7541aca64be Author: Rafael J. Wysocki Date: Sun Feb 7 16:07:51 2016 +0100 cpufreq: governor: Rework cpufreq_governor_dbs() Since it is possible to obtain a pointer to struct dbs_governor from a pointer to the struct governor embedded in it via container_of(), the second argument of cpufreq_governor_init() is not necessary. Accordingly, cpufreq_governor_dbs() doesn't need its second argument either and the ->governor callbacks for both the ondemand and conservative governors may be set to cpufreq_governor_dbs() directly. Make that happen. Signed-off-by: Rafael J. Wysocki Acked-by: Saravana Kannan Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 11 +---------- drivers/cpufreq/cpufreq_governor.c | 10 +++++----- drivers/cpufreq/cpufreq_governor.h | 3 +-- drivers/cpufreq/cpufreq_ondemand.c | 11 +---------- 4 files changed, 8 insertions(+), 27 deletions(-) commit 7bdad34d0890b69c30e8c6a50c9c2311a839fd68 Author: Rafael J. Wysocki Date: Sun Feb 7 16:05:07 2016 +0100 cpufreq: governor: Rename some data types and variables The ondemand and conservative governors are represented by struct common_dbs_data whose name doesn't reflect the purpose it is used for, so rename it to struct dbs_governor and rename variables of that type accordingly. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/amd_freq_sensitivity.c | 2 +- drivers/cpufreq/cpufreq_conservative.c | 8 ++-- drivers/cpufreq/cpufreq_governor.c | 88 +++++++++++++++++----------------- drivers/cpufreq/cpufreq_governor.h | 12 ++--- drivers/cpufreq/cpufreq_ondemand.c | 8 ++-- 5 files changed, 59 insertions(+), 59 deletions(-) commit af926185231a6e30d11a6035410b61405e203c3b Author: Rafael J. Wysocki Date: Fri Feb 5 03:16:08 2016 +0100 cpufreq: governor: Put governor structure into common_dbs_data For the ondemand and conservative governors (generally, governors that use the common code in cpufreq_governor.c), there are two static data structures representing the governor, the struct governor structure (the interface to the cpufreq core) and the struct common_dbs_data one (the interface to the cpufreq_governor.c code). There's no fundamental reason why those two structures have to be separate. Moreover, if the struct governor one is included into struct common_dbs_data, it will be possible to reach the latter from the policy via its policy->governor pointer, so it won't be necessary to pass a separate pointer to it around. For this reason, embed struct governor in struct common_dbs_data. Signed-off-by: Rafael J. Wysocki Acked-by: Saravana Kannan Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 78 ++++++++++++++++++---------------- drivers/cpufreq/cpufreq_governor.h | 3 +- drivers/cpufreq/cpufreq_ondemand.c | 28 ++++++------ 3 files changed, 58 insertions(+), 51 deletions(-) commit 5da3dd1e00918a9ac4b83885453bfa9cad732b44 Author: Rafael J. Wysocki Date: Fri Feb 5 03:15:24 2016 +0100 cpufreq: governor: Avoid passing dbs_data pointers around unnecessarily Do not pass struct dbs_data pointers to the family of functions implementing governor operations in cpufreq_governor.c as they can take that pointer from policy->governor by themselves. The cpufreq_governor_init() case is slightly more complicated, since policy->governor may be NULL when it is invoked, but then it can reach the pointer in question via its cdata argument just fine. While at it, rework cpufreq_governor_dbs() to avoid a pointless policy_governor check in the CPUFREQ_GOV_POLICY_INIT case. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 68 +++++++++++++++----------------------- 1 file changed, 27 insertions(+), 41 deletions(-) commit 2bb8d94fb03f808022c620f54b602a1e26d5cbac Author: Rafael J. Wysocki Date: Sun Feb 7 16:01:31 2016 +0100 cpufreq: governor: Use common mutex for dbs_data protection Every governor relying on the common code in cpufreq_governor.c has to provide its own mutex in struct common_dbs_data. However, there actually is no need to have a separate mutex per governor for this purpose, they may be using the same global mutex just fine. Accordingly, introduce a single common mutex for that and drop the mutex field from struct common_dbs_data. That at least will ensure that the mutex is always present and initialized regardless of what the particular governors do. Another benefit is that the common code does not need a pointer to a governor-related structure to get to the mutex which sometimes helps. Finally, it makes the code generally easier to follow. Signed-off-by: Rafael J. Wysocki Acked-by: Saravana Kannan Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_conservative.c | 1 - drivers/cpufreq/cpufreq_governor.c | 7 +++++-- drivers/cpufreq/cpufreq_governor.h | 6 +----- drivers/cpufreq/cpufreq_ondemand.c | 5 ++--- 4 files changed, 8 insertions(+), 11 deletions(-) commit 9be4fd2c7723a3057b0b39676fe4c8d5fd7118a4 Author: Rafael J. Wysocki Date: Wed Feb 10 16:53:50 2016 +0100 cpufreq: governor: Replace timers with utilization update callbacks Instead of using a per-CPU deferrable timer for queuing up governor work items, register a utilization update callback that will be invoked from the scheduler on utilization changes. The sampling rate is still the same as what was used for the deferrable timers and the added irq_work overhead should be offset by the eliminated timers overhead, so in theory the functional impact of this patch should not be significant. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Tested-by: Gautham R. Shenoy drivers/cpufreq/Kconfig | 1 + drivers/cpufreq/cpufreq_conservative.c | 6 +- drivers/cpufreq/cpufreq_governor.c | 165 +++++++++++++++------------------ drivers/cpufreq/cpufreq_governor.h | 19 ++-- drivers/cpufreq/cpufreq_ondemand.c | 43 +++++---- 5 files changed, 114 insertions(+), 120 deletions(-) commit a4675fbc4a7abe072ac6ba38c252f22a91ebcd94 Author: Rafael J. Wysocki Date: Fri Feb 5 01:45:30 2016 +0100 cpufreq: intel_pstate: Replace timers with utilization update callbacks Instead of using a per-CPU deferrable timer for utilization sampling and P-states adjustments, register a utilization update callback that will be invoked from the scheduler on utilization changes. The sampling rate is still the same as what was used for the deferrable timers, so the functional impact of this patch should not be significant. Based on an earlier patch from Srinivas Pandruvada. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada drivers/cpufreq/intel_pstate.c | 103 ++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 64 deletions(-) commit 34e2c555f3e13c90e9284e23d00f03be8a6e06c5 Author: Rafael J. Wysocki Date: Mon Feb 15 20:20:42 2016 +0100 cpufreq: Add mechanism for registering utilization update callbacks Introduce a mechanism by which parts of the cpufreq subsystem ("setpolicy" drivers or the core) can register callbacks to be executed from cpufreq_update_util() which is invoked by the scheduler's update_load_avg() on CPU utilization changes. This allows the "setpolicy" drivers to dispense with their timers and do all of the computations they need and frequency/voltage adjustments in the update_load_avg() code path, among other things. The update_load_avg() changes were suggested by Peter Zijlstra. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Acked-by: Peter Zijlstra (Intel) Acked-by: Ingo Molnar drivers/cpufreq/cpufreq.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/cpufreq.h | 34 ++++++++++++++++++++++++++++++++++ kernel/sched/deadline.c | 4 ++++ kernel/sched/fair.c | 26 +++++++++++++++++++++++++- kernel/sched/rt.c | 4 ++++ kernel/sched/sched.h | 1 + 6 files changed, 113 insertions(+), 1 deletion(-) commit d7b617f51be4fffa3cbb5adf6d4258e616dce294 Author: Jiri Olsa Date: Wed Mar 9 11:04:17 2016 +0100 perf tools: Pass perf_hpp_list all the way through setup_sort_list Pass perf_hpp_list all the way through setup_sort_list so that the sort entry can be added on the arbitrary list. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160309100417.GA30910@krava.redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 616df645d7238e45d3b369933a30fee4e4e305e2 Author: Chris Phlipot Date: Tue Mar 8 21:11:54 2016 -0800 perf tools: Fix perf script python database export crash Remove the union in evsel so that the database id and priv pointer can be used simultainously without conflicting and crashing. Detailed Description for the fixed bug follows: perf script crashes with a segmentation fault on user space tool version 4.5.rc7.ge2857b when using the python database export API. It works properly in 4.4 and prior versions. the crash fist appeared in: cfc8874a4859 ("perf script: Process cpu/threads maps") How to reproduce the bug: Remove any temporary files left over from a previous crash (if you have already attemped to reproduce the bug): $ rm -r test_db-perf-data $ dropdb test_db $ perf record timeout 1 yes >/dev/null $ perf script -s scripts/python/export-to-postgresql.py test_db Stack Trace: Program received signal SIGSEGV, Segmentation fault. __GI___libc_free (mem=0x1) at malloc.c:2929 2929 malloc.c: No such file or directory. (gdb) bt at util/stat.c:122 argv=, prefix=) at builtin-script.c:2231 argc=argc@entry=4, argv=argv@entry=0x7fffffffdf70) at perf.c:390 at perf.c:451 Signed-off-by: Chris Phlipot Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Peter Zijlstra Fixes: cfc8874a4859 ("perf script: Process cpu/threads maps") Link: http://lkml.kernel.org/r/1457500314-8912-1-git-send-email-cphlipot0@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 46dad054a19297af65c417c97cb920aa5bdf7e8c Author: Arnaldo Carvalho de Melo Date: Mon Mar 7 18:48:45 2016 -0300 perf jitdump: DWARF is also needed While building on a Docker container for ubuntu and installing package by package one ends up with: MKDIR /tmp/build/util/ CC /tmp/build/util/genelf.o util/genelf.c:22:19: fatal error: dwarf.h: No such file or directory #include ^ compilation terminated. mv: cannot stat '/tmp/build/util/.genelf.o.tmp': No such file or directory Because the jitdump code needs the DWARF related development packages to be installed. So make it dependent on that so that the build can succeed without jitdump support. Cc: Adrian Hunter Cc: Stephane Eranian Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-le498robnmxd40237wej3w62@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 10 +++++----- tools/perf/util/Build | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) commit 5a5fbdc0e3f1159a734f1890da60fce70e98271d Author: Paolo Bonzini Date: Tue Mar 8 10:00:11 2016 +0100 KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch It is now equal to use_eager_fpu(), which simply tests a cpufeature bit. Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/cpuid.c | 3 +-- arch/x86/kvm/x86.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) commit a87036add09283e6c4f4103a15c596c67b86ab86 Author: Paolo Bonzini Date: Tue Mar 8 09:52:13 2016 +0100 KVM: x86: disable MPX if host did not enable MPX XSAVE features When eager FPU is disabled, KVM will still see the MPX bit in CPUID and presumably the MPX vmentry and vmexit controls. However, it will not be able to expose the MPX XSAVE features to the guest, because the guest's accessible XSAVE features are always a subset of host_xcr0. In this case, we should disable the MPX CPUID bit, the BNDCFGS MSR, and the MPX vmentry and vmexit controls for nested virtualization. It is then unnecessary to enable guest eager FPU if the guest has the MPX CPUID bit set. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 13 ++++++++++--- arch/x86/kvm/cpuid.h | 9 +-------- arch/x86/kvm/vmx.c | 13 ++++++------- 3 files changed, 17 insertions(+), 18 deletions(-) commit 17eb3eef19f2c0541a7f04ad37c4a7fec89f0822 Author: Vaibhav Jain Date: Mon Feb 29 11:10:53 2016 +0530 cxl: Ignore probes for virtual afu pci devices Add a check at the beginning of cxl_probe function to ignore virtual pci devices created for each afu registered. This fixes the the errors messages logged about missing CXL vsec, when cxl probe is unable to find necessary vsec entries in device pci config space. The error message logged are of the form : cxl-pci 0004:00:00.0: ABORTING: CXL VSEC not found! cxl-pci 0004:00:00.0: cxl_init_adapter failed: -19 Cc: Ian Munsie Cc: Frederic Barrat Signed-off-by: Vaibhav Jain Reviewed-by: fbarrat@linux.vnet.ibm.com Reviewed-by: Andrew Donnellan Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/pci.c | 5 +++++ drivers/misc/cxl/vphb.c | 9 +++++++++ 3 files changed, 16 insertions(+) commit 0d3a13fbf1d1f3323d04499a727c17c80d156168 Author: Frederic Barrat Date: Fri Mar 4 12:26:44 2016 +0100 cxl: Remove cxl_get_phys_dev() kernel API The cxl_get_phys_dev() API returns a struct device pointer which could belong to either a struct pci_dev (bare-metal) or platform_device (powerVM). To avoid potential problems in drivers, remove that API. It was introduced to allow drivers to read the VPD of the adapter, but the cxl driver now provides the cxl_pci_read_adapter_vpd() API for that purpose. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 1 - include/misc/cxl.h | 3 --- 2 files changed, 4 deletions(-) commit ca946d4e4a390a5121bfc9076d85be0ddd55c266 Author: Frederic Barrat Date: Fri Mar 4 12:26:43 2016 +0100 cxlflash: Use new cxl_pci_read_adapter_vpd() API To read the adapter VPD, drivers can't rely on pci config APIs, as it wouldn't work on powerVM. cxl introduced a new kernel API especially for this, so start using it. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Uma Krishnan Acked-by: Matthew R. Ochs Acked-by: Manoj N. Kumar Signed-off-by: Michael Ellerman drivers/scsi/cxlflash/common.h | 1 - drivers/scsi/cxlflash/main.c | 18 ++---------------- 2 files changed, 2 insertions(+), 17 deletions(-) commit e7a801ad154593e9fed2e0de6820eb266db6766b Author: Christophe Lombard Date: Fri Mar 4 12:26:42 2016 +0100 cxl: Add tracepoints around the cxl hcall To ease debugging, add a few tracepoints around the cxl hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/hcalls.c | 9 +++ drivers/misc/cxl/trace.h | 193 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) commit 0d400f77c19e8d2606f8194846bcf18ebdc9df2a Author: Christophe Lombard Date: Fri Mar 4 12:26:41 2016 +0100 cxl: Adapter failure handling Check the AFU state whenever an API is called. The hypervisor may issue a reset of the adapter when it detects a fault. When it happens, it launches an error recovery which will either move the AFU to a permanent failure state, or in the disabled state. If the AFU is found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/cxl.h | 18 ++--- drivers/misc/cxl/file.c | 10 +-- drivers/misc/cxl/guest.c | 167 ++++++++++++++++++++++++++++++++++++++++++++- drivers/misc/cxl/main.c | 2 +- drivers/misc/cxl/native.c | 32 ++++----- drivers/misc/cxl/vphb.c | 2 +- 7 files changed, 198 insertions(+), 35 deletions(-) commit d601ea918b878582e60b773f2f943d8d292b2abf Author: Frederic Barrat Date: Fri Mar 4 12:26:40 2016 +0100 cxl: Support the cxl kernel API from a guest Like on bare-metal, the cxl driver creates a virtual PHB and a pci device for the AFU. The configuration space of the device is mapped to the configuration record of the AFU. Reuse the code defined in afu_cr_read8|16|32() when reading the configuration space of the AFU device. Even though the (virtual) AFU device is a pci device, the adapter is not. So a driver using the cxl kernel API cannot read the VPD of the adapter through the usual PCI interface. Therefore, we add a call to the cxl kernel API: ssize_t cxl_read_adapter_vpd(struct pci_dev *dev, void *buf, size_t count); Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 63 ++++++++++++++----- drivers/misc/cxl/cxl.h | 6 +- drivers/misc/cxl/guest.c | 26 ++++++++ drivers/misc/cxl/native.c | 50 +++++++++++++++ drivers/misc/cxl/pci.c | 9 ++- drivers/misc/cxl/vphb.c | 154 +++++++++++++++++++--------------------------- include/misc/cxl.h | 5 ++ 7 files changed, 203 insertions(+), 110 deletions(-) commit b40844aa55bb325de7509003c7529c75b0532412 Author: Frederic Barrat Date: Fri Mar 4 12:26:39 2016 +0100 cxl: Parse device tree and create cxl device(s) at boot Add new entry point to scan the device tree at boot in a guest, looking for cxl devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/base.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 594ff7d067ca42676e27e2a7b5dcc0ff039d08ca Author: Christophe Lombard Date: Fri Mar 4 12:26:38 2016 +0100 cxl: Support to flash a new image on the adapter from a guest The new flash.c file contains the logic to flash a new image on the adapter, through a hcall. It is an iterative process, with chunks of data of 1M at a time. There are also 2 phases: write and verify. The flash operation itself is driven from a user-land tool. Once flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman Documentation/powerpc/cxl.txt | 55 +++++ drivers/misc/cxl/Makefile | 2 +- drivers/misc/cxl/base.c | 7 + drivers/misc/cxl/cxl.h | 6 + drivers/misc/cxl/file.c | 11 +- drivers/misc/cxl/flash.c | 538 ++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cxl/guest.c | 15 ++ include/uapi/misc/cxl.h | 24 ++ 8 files changed, 653 insertions(+), 5 deletions(-) commit 4752876c71701b7663a5ded789058ab2c05f7d0f Author: Christophe Lombard Date: Fri Mar 4 12:26:37 2016 +0100 cxl: sysfs support for guests Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman Documentation/ABI/testing/sysfs-class-cxl | 10 ++-- drivers/misc/cxl/cxl.h | 7 +++ drivers/misc/cxl/guest.c | 25 +++++++++ drivers/misc/cxl/native.c | 7 +++ drivers/misc/cxl/sysfs.c | 89 ++++++++++++++++++++++++------- 5 files changed, 113 insertions(+), 25 deletions(-) commit 14baf4d9c739e6e69150512d2eb23c71fffcc192 Author: Christophe Lombard Date: Fri Mar 4 12:26:36 2016 +0100 cxl: Add guest-specific code The new of.c file contains code to parse the device tree to find out about cxl adapters and AFUs. guest.c implements the guest-specific callbacks for the backend API. The process element ID is not known until the context is attached, so we have to separate the context ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie [mpe: Fix SMP=n build, fix PSERIES=n build, minor whitespace fixes] Signed-off-by: Michael Ellerman drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2 +- drivers/misc/cxl/context.c | 6 +- drivers/misc/cxl/cxl.h | 37 +- drivers/misc/cxl/file.c | 2 +- drivers/misc/cxl/guest.c | 950 +++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cxl/hcalls.c | 1 - drivers/misc/cxl/hcalls.h | 1 + drivers/misc/cxl/main.c | 23 +- drivers/misc/cxl/of.c | 513 ++++++++++++++++++++++++ 10 files changed, 1525 insertions(+), 11 deletions(-) commit 7b1e5dc86c0030314f8f6e828177a6c5bb7b9006 Author: Grygorii Strashko Date: Fri Mar 4 17:25:35 2016 +0200 gpio: omap: drop dev field from gpio_bank structure GPIO chip structure already has "parent" field which is used for the same purpose as "dev" field in gpio_bank structure - store pointer on GPIO device. Hence, drop duplicated "dev" field from gpio_bank structure. Signed-off-by: Grygorii Strashko Acked-by: Santosh Shilimkar Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 57 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 28 deletions(-) commit d2d13ed01362ecddc3f76f9cca31b0cd5d663a7e Author: Yendapally Reddy Dhananjaya Reddy Date: Thu Mar 3 06:41:41 2016 -0500 pinctrl: Broadcom Northstar2 pinctrl device tree bindings Device tree binding documentation for Broadcom NS2 IOMUX Signed-off-by: Yendapally Reddy Dhananjaya Reddy Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/brcm,ns2-pinmux.txt | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) commit ab92f30875a7ec3e84644a5494febd8901e66742 Merge: bb9eadf b40c489 Author: Paolo Bonzini Date: Wed Mar 9 11:50:42 2016 +0100 Merge tag 'kvm-arm-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM updates for 4.6 - VHE support so that we can run the kernel at EL2 on ARMv8.1 systems - PMU support for guests - 32bit world switch rewritten in C - Various optimizations to the vgic save/restore code Conflicts: include/uapi/linux/kvm.h commit 0bae2f17323a4630c487a9b77c37bebf407424af Merge: adf32ea ca801a2 Author: Linus Walleij Date: Wed Mar 9 17:40:37 2016 +0700 Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel commit f49e0eb221f64334797b0c7fb7c6d5d94bac4510 Merge: fe2f954 82b0a43 Author: Thomas Gleixner Date: Wed Mar 9 11:12:00 2016 +0100 Merge tag 'gic-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull GIC updates for 4.6 from Marc Zyngier: - Basic GICv3 ACPI support - Alpine MSI widget on top of GICv3 - More RealView GIC support commit 1bcb58a099938c33acda78b212ed67b06b3359ef Author: Josh Poimboeuf Date: Wed Mar 9 00:07:01 2016 -0600 objtool: Only print one warning per function When objtool discovers an issue, it's very common for it to flood the terminal with a lot of duplicate warnings. For example: warning: objtool: rtlwifi_rate_mapping()+0x2e7: frame pointer state mismatch warning: objtool: rtlwifi_rate_mapping()+0x2f3: frame pointer state mismatch warning: objtool: rtlwifi_rate_mapping()+0x2ff: frame pointer state mismatch warning: objtool: rtlwifi_rate_mapping()+0x30b: frame pointer state mismatch ... The first warning is usually all you need. Change it to only warn once per function. Suggested-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/c47f3ca38aa01e2a9b6601f9e38efd414c3f3c18.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 042ba73fe7eb63872ee2d6ac86410052210c1f16 Author: Josh Poimboeuf Date: Wed Mar 9 00:07:00 2016 -0600 objtool: Add several performance improvements Use hash tables for instruction and rela lookups (and keep the linked lists around for sequential access). Also cache the section struct for the "__func_stack_frame_non_standard" section. With this change, "objtool check net/wireless/nl80211.o" goes from: real 0m1.168s user 0m1.163s sys 0m0.005s to: real 0m0.059s user 0m0.042s sys 0m0.017s for a 20x speedup. With the same object, it should be noted that the memory heap usage grew from 8MB to 62MB. Reducing the memory usage is on the TODO list. Reported-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/dd0d8e1449506cfa7701b4e7ba73577077c44253.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 18 ++++++++++++------ tools/objtool/elf.c | 21 +++++++++++++++------ tools/objtool/elf.h | 10 ++++++++-- 3 files changed, 35 insertions(+), 14 deletions(-) commit 1698872b5c772aebc5c43ca445cc0a79f12b9fcc Author: Josh Poimboeuf Date: Wed Mar 9 00:06:59 2016 -0600 tools: Copy hashtable.h into tools directory Copy hashtable.h from include/linux/tools.h. It's needed by objtool in the next patch in the series. Add some includes that it needs, and remove references to kernel-specific features like RCU and __read_mostly. Also change some if its dependency headers' includes to use quotes instead of brackets so gcc can find them. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/be3bef72f6540d8a510515408119d968a0e18179.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/include/asm-generic/bitops/__fls.h | 2 +- tools/include/asm-generic/bitops/fls.h | 2 +- tools/include/asm-generic/bitops/fls64.h | 2 +- tools/include/linux/hashtable.h | 152 +++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 3 deletions(-) commit 8133fbb4240ae2918d993defa0f6824864412f56 Author: Josh Poimboeuf Date: Wed Mar 9 00:06:58 2016 -0600 objtool: Fix false positive warnings for functions with multiple switch statements Ingo reported [1] some false positive objtool warnings: drivers/net/wireless/realtek/rtlwifi/base.o: warning: objtool: rtlwifi_rate_mapping()+0x2e7: frame pointer state mismatch drivers/net/wireless/realtek/rtlwifi/base.o: warning: objtool: rtlwifi_rate_mapping()+0x2f3: frame pointer state mismatch ... And so did the 0-day bot [2]: drivers/gpu/drm/radeon/cik.o: warning: objtool: cik_tiling_mode_table_init()+0x6ce: call without frame pointer save/setup drivers/gpu/drm/radeon/cik.o: warning: objtool: cik_tiling_mode_table_init()+0x72b: call without frame pointer save/setup ... Both sets of warnings involve functions which have multiple switch statements. When there's more than one switch statement in a function, objtool interprets all the switch jump tables as a single table. If the targets of one jump table assume a stack frame and the targets of another one don't, it prints false positive warnings. Fix the bug by detecting the size of each switch jump table. For multiple tables, each one ends where the next one begins. [1] https://lkml.kernel.org/r/20160308103716.GA9618@gmail.com [2] https://lists.01.org/pipermail/kbuild-all/2016-March/018124.html Reported-by: Ingo Molnar Reported-by: kbuild test robot Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/2d7eecc6bc52d301f494b80f5fd62c2b6c895658.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 145 +++++++++++++++++++++++++++++------------- 1 file changed, 100 insertions(+), 45 deletions(-) commit a196e17198224cacd2d992f12cb6d81d354de82f Author: Josh Poimboeuf Date: Wed Mar 9 00:06:57 2016 -0600 objtool: Rename some variables and functions Rename some list heads to distinguish them from hash node heads, which are added later in the patch series. Also rename the get_*() functions to add_*(), which is more descriptive: they "add" data to the objtool_file struct. Also rename rodata_rela and text_rela to be clearer: - text_rela refers to a rela entry in .rela.text. - rodata_rela refers to a rela entry in .rela.rodata. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/ee0eca2bba8482aa45758958c5586c00a7b71e62.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 80 ++++++++++++++++++++++--------------------- tools/objtool/elf.c | 22 ++++++------ tools/objtool/elf.h | 4 +-- 3 files changed, 54 insertions(+), 52 deletions(-) commit e2a5f18a1ba11e8b1e9ee53b6fca4be12bb5749e Author: Josh Poimboeuf Date: Wed Mar 9 00:06:56 2016 -0600 objtool: Remove superflous INIT_LIST_HEAD The insns list is initialized twice, in cmd_check() and in decode_instructions(). Remove the latter. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/be6e21d7eec1f072095d22a1cbe144057135e097.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 2 -- 1 file changed, 2 deletions(-) commit 74aec058beb0bdaf64454291ef4ba176932bfad3 Author: Josh Poimboeuf Date: Wed Mar 9 00:06:55 2016 -0600 objtool: Add helper macros for traversing instructions Add some helper macros to make it easier to traverse instructions, and to abstract the details of the instruction list implementation in preparation for creating a hash structure. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/8e1715d5035bc02b4db28d0fccef6bb1170d1f12.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 128 ++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 73 deletions(-) commit d8d1b2cb58540b0cf572be4715167c473193888e Author: Josh Poimboeuf Date: Wed Mar 9 00:06:54 2016 -0600 objtool: Fix false positive warnings related to sibling calls With some configs [1], objtool prints a bunch of false positive warnings like: arch/x86/events/core.o: warning: objtool: x86_del_exclusive()+0x0: frame pointer state mismatch For some reason this config has a bunch of sibling calls. When objtool follows a sibling call jump, it attempts to compare the frame pointer state. But it also accidentally compares the FENTRY state, resulting in a false positive warning. [1] https://lkml.kernel.org/r/20160308154909.GA20956@gmail.com Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/382de77ccaaa8cd79b27a155c3d109ebd4ce0219.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d435fb5ef74c31909ca58f93aa87ad09b17bbe9a Author: Josh Poimboeuf Date: Wed Mar 9 00:06:53 2016 -0600 objtool: Compile with debugging symbols Compile objtool with debugging symbols ('-g') to help tools like perf and gdb understand what it's doing. Combined with '-O2', it's not always helpful, but it's better than nothing. Reported-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/c295e9ee9ed360dc8b2e1d180c859f11cfc151ef.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1e03249510b32645826bbf61a1452dd766c2e5c Author: Josh Poimboeuf Date: Wed Mar 9 00:06:52 2016 -0600 objtool: Detect infinite recursion I don't _think_ dead_end_function() can get into a recursive loop, but just in case, stop the loop and print a warning. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/ff489a63e6feb88abb192cfb361d81626dcf3e89.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 45 +++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) commit 81bfafca1332869160e9da789252276e2f34a14e Author: Josh Poimboeuf Date: Wed Mar 9 00:06:51 2016 -0600 objtool: Prevent infinite recursion in noreturn detection Ingo reported an infinite loop in objtool with a certain randconfig [1]. With the given config, two functions in crypto/ablkcipher.o contained sibling calls to each other, which threw the recursive call in dead_end_function() for a loop (literally!). Split the noreturn detection into two passes. In the first pass, check for return instructions. In the second pass, do the potentially recursive sibling call check. In most cases, the first pass will be good enough. In the rare case where a second pass is needed, recursion should hopefully no longer be possible. [1] https://lkml.kernel.org/r/20160308154909.GA20956@gmail.com Reported-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/16afb602640ef43b7782087d6cca17bf6fc13603.1457502970.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 3a99e6db539e53cc9c79282e80f8362b0cb96ac8 Author: Ingo Molnar Date: Wed Mar 9 10:40:01 2016 +0100 perf bench mem: Prepare the x86-64 build for upstream memcpy_mcsafe() changes The following upcoming upstream commit: 92b0729c34ca ("x86/mm, x86/mce: Add memcpy_mcsafe()") Adds _ASM_EXTABLE_FAULT(), which is not available in user-space and breaks the build. We don't really need _ASM_EXTABLE_FAULT() in user-space, so simply wrap it to nothing. Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Hitoshi Mitake Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/perf/bench/mem-memcpy-x86-64-asm.S | 5 +++++ 1 file changed, 5 insertions(+) commit 82b0a434b436f5da69ddd24bd6a6fa5dc4484310 Author: Linus Walleij Date: Mon Feb 22 15:01:01 2016 +0100 irqchip/gic/realview: Support more RealView DCC variants In the add-on file for the GIC dealing with the RealView family we currently only handle the PB11MPCore, let's extend this to manage the RealView EB ARM11MPCore as well. The Revision B of the ARM11MPCore core tile is a bit special and needs special handling as it moves a system control register around at random. Cc: Arnd Bergmann Cc: devicetree@vger.kernel.org Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/arm,gic.txt | 1 + drivers/irqchip/irq-gic-realview.c | 44 +++++++++++++++++++--- 2 files changed, 39 insertions(+), 6 deletions(-) commit a13690297ce49262ae44e41b25a954124609eea8 Author: Antoine Tenart Date: Fri Feb 19 16:22:45 2016 +0100 Documentation/bindings: Document the Alpine MSIX driver Following the addition of the Alpine MSIX driver, this patch adds the corresponding bindings documentation. Acked-by: Marc Zyngier Signed-off-by: Antoine Tenart Signed-off-by: Tsahee Zidenberg Signed-off-by: Marc Zyngier .../interrupt-controller/al,alpine-msix.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e6b78f2c3e14a9e3a909be3e6ec305d9f1cbabbd Author: Antoine Tenart Date: Fri Feb 19 16:22:44 2016 +0100 irqchip: Add the Alpine MSIX interrupt controller This patch adds the Alpine MSIX interrupt controller driver. Signed-off-by: Antoine Tenart Signed-off-by: Tsahee Zidenberg Acked-by: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 6 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-alpine-msi.c | 293 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 300 insertions(+) commit 0fc6fa2924d0dd54aa5c780a964c2812acf55ded Author: Antoine Tenart Date: Fri Feb 19 16:22:43 2016 +0100 irqchip/gic-v3: Always return IRQ_SET_MASK_OK_DONE in gic_set_affinity Always return IRQ_SET_MASK_OK_DONE instead of IRQ_SET_MASK_OK when the affinity has been updated. When using stacked irqchips, returning IRQ_SET_MASK_OK_DONE means skipping all descendant irqchips. Signed-off-by: Antoine Tenart Acked-by: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df88e91bbfd16662f3c8dcba27ad19e9eb4ebcef Author: Andy Shevchenko Date: Wed Mar 9 11:20:00 2016 +0200 spi: respect the maximum segment size of DMA device The device which is actually does DMA may have a limitation of the maximum segment size. Respect this setting when preparing scatter-gather list. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/spi/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61cadcf46cfdb9f7eec70527968c2b91e9823786 Author: Shawn Lin Date: Wed Mar 9 16:11:32 2016 +0800 spi: rockchip: check requesting dma channel with EPROBE_DEFER Let's defer probing the driver if the return value of dma_request_slave_channel is ERR_PTR(-EPROBE_DEFER) instead of disabling dma capability directly. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 557b7ea34b9a10a5e13f4d7fd58ac965d801e3bd Author: Shawn Lin Date: Wed Mar 9 16:11:23 2016 +0800 spi: rockchip: migrate to dmaengine_terminate_async dmaengine_terminate_all is deprecated, let's use dmaengine_terminate_async for interrupt handling. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea98491133439773b69345eb9a314fc5f15e07a4 Author: Shawn Lin Date: Wed Mar 9 16:11:15 2016 +0800 spi: rockchip: check return value of dmaengine_prep_slave_sg We should check return value of dmaengine_prep_slave_sg, otherwise we take risk of null pointer. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 9dab1868ec0db4bce44db2759beadf1b2156085a Author: Carlo Caione Date: Tue Mar 1 23:04:34 2016 +0100 pinctrl: amlogic: Make driver independent from two-domain configuration In the Amlogic Meson8 / Meson8b platforms we have two different buses: cbus and aobus, corresponding to 2 different power domains (regular and always-on). On each bus a different set of registers is mapped to manage muxes, GPIOs and in general to control a clear subset of the pins. Considering this architecture, having two different pinctrl devices, one for each bus / power domain, makes much more sense than just having one single device. Right now we have one single pin controller driver that uses two different domains (represented by 'gpio' and 'gpio-ao' sub-nodes in the DTS) to manage the set of registers on the two buses. This dual-domain configuration is hardcoded into the driver that strictly requires one domain for each bus in the same pin controller device. With this patch we refactor the driver to allow splitting the driver in two parts. This change is needed to have a proper description of the HW in the device-tree where we want to introduce aobus and cbus. Signed-off-by: Carlo Caione Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 135 ++++++++++++--------------- drivers/pinctrl/meson/pinctrl-meson.h | 21 +---- drivers/pinctrl/meson/pinctrl-meson8.c | 137 +++++++++++++++------------ drivers/pinctrl/meson/pinctrl-meson8b.c | 159 +++++++++++++++++--------------- 4 files changed, 228 insertions(+), 224 deletions(-) commit ac1afc46573a7d5447f23be5f88bc43580a92530 Author: Carlo Caione Date: Tue Mar 1 23:04:33 2016 +0100 pinctrl: amlogic: Separate some pin functions for Meson8 / Meson8b Separate functions for pins controlled by different pin controllers. Signed-off-by: Carlo Caione Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson8b.c | 35 +++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 023269cc989bbae2c4c59dc5999f6db51c76f4d0 Author: Huiquan Zhong Date: Fri Jan 15 00:12:31 2016 +0800 mfd: lpss: Add PCI IDs for Intel Broxton B-Step platform Add PCI IDs for Intel Broxton B-Step platform, which have same LPSS devices with A-Step. Signed-off-by: Huiquan Zhong Signed-off-by: Qipeng Zha cked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit c2e04af072647465358095ce55c29cba7d5c18a6 Author: Axel Lin Date: Thu Jan 21 08:49:31 2016 +0800 mfd: Allow i2c modular drivers to build with I2C=m These drivers can be built as module, so make them depend on I2C rather than I2C=y. Signed-off-by: Axel Lin Acked-by: Adam Thomson Signed-off-by: Lee Jones drivers/mfd/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 84cb36cac581c915ef4e8b70abb73e084325df92 Author: Andy Shevchenko Date: Fri Jan 22 16:48:46 2016 +0200 mfd: intel-lpss: Remove clock tree on error path We forgot to remove the clock tree if something goes wrong in ->probe(). Add a call to intel_lpss_unregister_clock() on error path in ->probe() to fix the potential issue. Fixes: 4b45efe85263 (mfd: Add support for Intel Sunrisepoint LPSS devices) Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss.c | 1 + 1 file changed, 1 insertion(+) commit dbc352b9f16de45277abf2e30d0317ce55fc1e57 Author: Aaro Koskinen Date: Mon Jan 11 21:46:49 2016 +0200 mfd: tps65010: Fix init when the driver is built-in tps65010 driver's initcall cannot succeed when the driver is built-in, because it expects that the I2C probe is completed at initcall time; this cannot happen as MFD is initialized before I2C. Also on systems where the chip is not present there is unnecessary 30 ms delay during the boot. Instead of waiting for probe to finish, just register the I2C device. If some boards need retry mechanism for startup glitches, that should be done in the actual probe function. Also delete the driver banner message. The patch allows to use tps65010 again with OMAP1 (where it's required to be built-in) and enables e.g. USB and LED functionality on OMAP5912 OSK. Signed-off-by: Aaro Koskinen Signed-off-by: Lee Jones drivers/mfd/tps65010.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit bab070620ebe130ec5296817caf074f5f5211d71 Merge: c4726ab 0708677 04e0981 ca801a2 Author: Lee Jones Date: Wed Mar 9 12:56:47 2016 +0700 Merge branches 'ib-mfd-clk-4.6', 'ib-mfd-input-iio-4.6', 'ib-mfd-regulator-4.6' and 'ib-mfd-regulator-gpio-4.6' into ibs-for-mfd-merged commit 0708677558dd7d03e70292549433f0f6b04a5e00 Author: Arnd Bergmann Date: Fri Feb 12 12:15:29 2016 +0100 iio: adc/imx25-gcq: Move incorrect do_div The newly added driver uses do_div() to device a 32-bit number, which now provokes a warning: drivers/iio/adc/fsl-imx25-gcq.c: In function 'mx25_gcq_setup_cfgs': include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ This replaces the do_div() call with a straight division operator. Signed-off-by: Arnd Bergmann Fixes: 6df2e98c3ea5 ("iio: adc: Add imx25-gcq ADC driver") Signed-off-by: Lee Jones drivers/iio/adc/fsl-imx25-gcq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 600be30a8bc1d405f791e01dbef84679e14529b8 Author: Jan Kara Date: Tue Mar 8 23:39:21 2016 -0500 ext4: remove i_ioend_count Remove counter of pending io ends as it is unused. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 7 +------ fs/ext4/inode.c | 3 --- fs/ext4/page-io.c | 4 ---- fs/ext4/super.c | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) commit 109811c20fb8ec46e2ed01750214a32a9163d164 Author: Jan Kara Date: Tue Mar 8 23:36:46 2016 -0500 ext4: simplify io_end handling for AIO DIO When mapping blocks for direct IO, we allocate io_end structure before mapping blocks and store pointer to it in the inode. This creates a requirement that any AIO DIO using io_end must be protected by i_mutex. This created problems in the past with dioread_nolock mode which was corrupting io_end pointers. Also io_end is allocated unnecessarily in case where we don't need to convert any extents (which is a common case for example when overwriting file). We fix the problem by allocating io_end only once we return unwritten extent from block mapping function for AIO DIO (so we can save some pointless io_end allocations) and we pass pointer to it in bh->b_private which generic DIO code later passes to our end IO callback. That way we remove any need for global pointer to io_end structure and thus fix the races. The downside of this change is that the checking for unwritten IO in flight in ext4_extents_can_be_merged() is more racy since we now increment i_unwritten / set EXT4_STATE_DIO_UNWRITTEN only after dropping i_data_sem. However the check has been racy already before because ext4_writepages() already increment i_unwritten after dropping i_data_sem and reserved blocks save us from hitting ENOSPC in the worst case. Signed-off-by: Jan Kara fs/ext4/ext4.h | 10 ---- fs/ext4/extents.c | 35 +++----------- fs/ext4/inode.c | 133 ++++++++++++++++++++++++++++-------------------------- 3 files changed, 74 insertions(+), 104 deletions(-) commit efe70c29511544b0468723fe92c1847b3b0ca046 Author: Jan Kara Date: Tue Mar 8 23:35:46 2016 -0500 ext4: move trans handling and completion deferal out of _ext4_get_block There is no need to handle starting of a transaction and deferal of DIO completion in _ext4_get_block() function. We can move this out to get block functions for direct IO that need it. That way we can add stricter checks verifying things work as we expect. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 91 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 32 deletions(-) commit caf02abf9bd00b4c23745a055c4f4c243eecd392 Author: Robin H. Johnson Date: Sun Mar 6 22:02:30 2016 +0000 PCI: Add QEMU top-level IDs for (sub)vendor & device Introduce PCI_VENDOR/PCI_SUBVENDOR/PCI_SUBDEVICE defines to replace the constants scattered in the kernel already used to detect QEMU. They are defined in the QEMU codebase per docs/specs/pci-ids.txt. Signed-off-by: Robin H. Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Takashi Iwai Reviewed-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin Acked-by: Daniel Vetter drivers/gpu/drm/bochs/bochs_drv.c | 4 ++-- drivers/gpu/drm/cirrus/cirrus_drv.c | 5 +++-- drivers/virtio/virtio_pci_common.c | 2 +- include/linux/pci_ids.h | 4 ++++ sound/pci/intel8x0.c | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) commit ce53bfc4374cada8b645765e2b4ad5831e760932 Merge: a567500 7084fa8 Author: Greg Kroah-Hartman Date: Tue Mar 8 20:28:19 2016 -0800 Merge tag 'usb-serial-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.6-rc1 Here are some cp210x register-accessor updates and general usb-serial code clean ups. Signed-off-by: Johan Hovold commit b40c4892d175874d118860c8282a85ee7b64bcbb Author: Marc Zyngier Date: Tue Feb 9 17:36:09 2016 +0000 arm64: KVM: vgic-v3: Only wipe LRs on vcpu exit So far, we're always writing all possible LRs, setting the empty ones with a zero value. This is obvious doing a low of work for nothing, and we're better off clearing those we've actually dirtied on the exit path (it is very rare to inject more than one interrupt at a time anyway). Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v3-sr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0d98d00b8d80bfdee95cf7e85f20f107377e2662 Author: Marc Zyngier Date: Thu Mar 3 15:43:58 2016 +0000 arm64: KVM: vgic-v3: Reset LRs at boot time In order to let the GICv3 code be more lazy in the way it accesses the LRs, it is necessary to start with a clean slate. Let's reset the LRs on each CPU when the vgic is probed (which includes a round trip to EL2...). Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_asm.h | 1 + arch/arm64/kvm/hyp/vgic-v3-sr.c | 9 +++++++++ virt/kvm/arm/vgic-v3.c | 7 +++++++ 3 files changed, 17 insertions(+) commit 84e8b9c88d5fe9c9a59ed24ae44d7ac0983df92b Author: Marc Zyngier Date: Tue Feb 9 17:09:49 2016 +0000 arm64: KVM: vgic-v3: Do not save an LR known to be empty On exit, any empty LR will be signaled in ICH_ELRSR_EL2. Which means that we do not have to save it, and we can just clear its state in the in-memory copy. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v3-sr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b4344545cf85d2a6ad546ec21dab5f76487e020e Author: Marc Zyngier Date: Tue Feb 9 18:53:04 2016 +0000 arm64: KVM: vgic-v3: Save maintenance interrupt state only if required Next on our list of useless accesses is the maintenance interrupt status registers (ICH_MISR_EL2, ICH_EISR_EL2). It is pointless to save them if we haven't asked for a maintenance interrupt the first place, which can only happen for two reasons: - Underflow: ICH_HCR_UIE will be set, - EOI: ICH_LR_EOI will be set. These conditions can be checked on the in-memory copies of the regs. Should any of these two condition be valid, we must read GICH_MISR. We can then check for ICH_MISR_EOI, and only when set read ICH_EISR_EL2. This means that in most case, we don't have to save them at all. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v3-sr.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 1b8e83c04ee2c05c0cd0d304c4b389adf24ebe7f Author: Marc Zyngier Date: Wed Feb 17 10:25:05 2016 +0000 arm64: KVM: vgic-v3: Avoid accessing ICH registers Just like on GICv2, we're a bit hammer-happy with GICv3, and access them more often than we should. Adopt a policy similar to what we do for GICv2, only save/restoring the minimal set of registers. As we don't access the registers linearly anymore (we may skip some), the convoluted accessors become slightly simpler, and we can drop the ugly indexing macro that tended to confuse the reviewers. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v3-sr.c | 293 ++++++++++++++++++++++++---------------- include/kvm/arm_vgic.h | 6 - virt/kvm/arm/vgic-v3.c | 4 +- 3 files changed, 182 insertions(+), 121 deletions(-) commit 667a87a928c9e1939b1a518be0d62b24378c1fe8 Author: Marc Zyngier Date: Tue Feb 9 17:37:39 2016 +0000 KVM: arm/arm64: vgic-v2: Make GICD_SGIR quicker to hit The GICD_SGIR register lives a long way from the beginning of the handler array, which is searched linearly. As this is hit pretty often, let's move it up. This saves us some precious cycles when the guest is generating IPIs. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic-v2-emul.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cc1daf0b82f12040065bb1a77dd7945b9ef821f8 Author: Marc Zyngier Date: Tue Feb 9 17:36:09 2016 +0000 KVM: arm/arm64: vgic-v2: Only wipe LRs on vcpu exit So far, we're always writing all possible LRs, setting the empty ones with a zero value. This is obvious doing a lot of work for nothing, and we're better off clearing those we've actually dirtied on the exit path (it is very rare to inject more than one interrupt at a time anyway). Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v2-sr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d6400d77463d5c3dd386c27d07a236a07daaf33e Author: Marc Zyngier Date: Thu Mar 3 15:43:58 2016 +0000 KVM: arm/arm64: vgic-v2: Reset LRs at boot time In order to let make the GICv2 code more lazy in the way it accesses the LRs, it is necessary to start with a clean slate. Let's reset the LRs on each CPU when the vgic is probed. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic-v2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f8cfbce1bb85984d2601a18e8f21dacc1b79dce3 Author: Marc Zyngier Date: Tue Feb 9 17:09:49 2016 +0000 KVM: arm/arm64: vgic-v2: Do not save an LR known to be empty On exit, any empty LR will be signaled in GICH_ELRSR*. Which means that we do not have to save it, and we can just clear its state in the in-memory copy. Take this opportunity to move the LR saving code into its own function. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v2-sr.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 2a1044f8b7bfd99296774f5f90abf8f96013a997 Author: Marc Zyngier Date: Tue Feb 9 17:07:18 2016 +0000 KVM: arm/arm64: vgic-v2: Move GICH_ELRSR saving to its own function In order to make the saving path slightly more readable and prepare for some more optimizations, let's move the GICH_ELRSR saving to its own function. No functional change. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v2-sr.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit c813bb17f2b7166adb1c740ffc0d957b46271fa1 Author: Marc Zyngier Date: Tue Feb 9 17:01:33 2016 +0000 KVM: arm/arm64: vgic-v2: Save maintenance interrupt state only if required Next on our list of useless accesses is the maintenance interrupt status registers (GICH_MISR, GICH_EISR{0,1}). It is pointless to save them if we haven't asked for a maintenance interrupt the first place, which can only happen for two reasons: - Underflow: GICH_HCR_UIE will be set, - EOI: GICH_LR_EOI will be set. These conditions can be checked on the in-memory copies of the regs. Should any of these two condition be valid, we must read GICH_MISR. We can then check for GICH_MISR_EOI, and only when set read GICH_EISR*. This means that in most case, we don't have to save them at all. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v2-sr.c | 54 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) commit 59f00ff9afc028053fa9281407627e95008ebd5c Author: Marc Zyngier Date: Tue Feb 2 19:35:34 2016 +0000 KVM: arm/arm64: vgic-v2: Avoid accessing GICH registers GICv2 registers are *slow*. As in "terrifyingly slow". Which is bad. But we're equaly bad, as we make a point in accessing them even if we don't have any interrupt in flight. A good solution is to first find out if we have anything useful to write into the GIC, and if we don't, to simply not do it. This involves tracking which LRs actually have something valid there. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier include/kvm/arm_vgic.h | 2 ++ virt/kvm/arm/hyp/vgic-v2-sr.c | 72 ++++++++++++++++++++++++++++++------------- 2 files changed, 52 insertions(+), 22 deletions(-) commit 26e9093110fb9ceb10093e4914b129b58d49a425 Author: Alexei Starovoitov Date: Tue Mar 8 15:07:54 2016 -0800 samples/bpf: add map performance test performance tests for hash map and per-cpu hash map with and without pre-allocation Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/map_perf_test_kern.c | 100 +++++++++++++++++++++++++ samples/bpf/map_perf_test_user.c | 155 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 259 insertions(+) commit 7dcc42b685b4acf7b2f3f08d157f1574e1bec7f7 Author: Alexei Starovoitov Date: Tue Mar 8 15:07:53 2016 -0800 samples/bpf: stress test bpf_get_stackid increase stress by also calling bpf_get_stackid() from various *spin* functions Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/spintest_kern.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9d8b612d88e81c2cf7dbc0d4a827da6ca0d848e0 Author: Alexei Starovoitov Date: Tue Mar 8 15:07:52 2016 -0800 samples/bpf: add bpf map stress test this test calls bpf programs from different contexts: from inside of slub, from rcu, from pretty much everywhere, since it kprobes all spin_lock functions. It stresses the bpf hash and percpu map pre-allocation, deallocation logic and call_rcu mechanisms. User space part adding more stress by walking and deleting map elements. Note that due to nature bpf_load.c the earlier kprobe+bpf programs are already active while loader loads new programs, creates new kprobes and attaches them. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 +++ samples/bpf/spintest_kern.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ samples/bpf/spintest_user.c | 50 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) commit e28e87ed474c5a0b378c66fb85efc8e487f4f63f Author: Daniel Borkmann Date: Tue Mar 8 23:36:03 2016 +0100 ip_tunnel, bpf: ip_tunnel_info_opts_{get, set} depends on CONFIG_INET Helpers like ip_tunnel_info_opts_{get,set}() are only available if CONFIG_INET is set, thus add an empty definition into the header for the !CONFIG_INET case, where already other empty inline helpers are defined. This avoids ifdef kludge inside filter.c, but also vxlan and geneve themself where this facility can only be used with, depend on INET being set. For the !INET case TUNNEL_OPTIONS_PRESENT would never be set in flags. Fixes: 14ca0751c96f ("bpf: support for access to tunnel options") Reported-by: Fengguang Wu Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/ip_tunnels.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6be2a3a0769849d234ef830617c5a7235b8f48e8 Author: Arnd Bergmann Date: Wed Mar 2 16:58:53 2016 +0100 pinctrl: at91: use __maybe_unused to hide pm functions The at91-pio4 pinctrl driver uses SET_SYSTEM_SLEEP_PM_OPS() to conditionally set the correct suspend/resume options, but they become unused when CONFIG_PM is disabled: drivers/pinctrl/pinctrl-at91-pio4.c:827:12: error: 'atmel_pctrl_suspend' defined but not used [-Werror=unused-function] drivers/pinctrl/pinctrl-at91-pio4.c:847:12: error: 'atmel_pctrl_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations so the compiler knows it can silently drop them instead of warning. Signed-off-by: Arnd Bergmann Acked-by: Nicolas Ferre Acked-by: Ludovic Desroches Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 705965bd6dfadc3b2e0241da1423ef660bdd04c8 Author: Jan Kara Date: Tue Mar 8 23:08:10 2016 -0500 ext4: rename and split get blocks functions Rename ext4_get_blocks_write() to ext4_get_blocks_unwritten() to better describe what it does. Also split out get blocks functions for direct IO. Later we move functionality from _ext4_get_blocks() there. There's no functional change in this patch. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 8 +++-- fs/ext4/indirect.c | 10 +++--- fs/ext4/inline.c | 7 ++-- fs/ext4/inode.c | 96 ++++++++++++++++++++++++++++++++++-------------------- 4 files changed, 74 insertions(+), 47 deletions(-) commit 331207af11964954f51ec44689b93977ac0c6843 Author: Wolfram Sang Date: Tue Mar 1 17:38:46 2016 +0100 pinctrl: sh-pfc: core: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/pinctrl/sh-pfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e142d05263a4beedefd331d445c394f4397e9f03 Author: Jan Kara Date: Tue Mar 8 22:44:50 2016 -0500 ext4: use i_mutex to serialize unaligned AIO DIO Currently we've used hashed aio_mutex to serialize unaligned AIO DIO. However the code cleanups that happened after 2011 when the lock was introduced made aio_mutex acquired at almost the same places where we already have exclusion using i_mutex. So just use i_mutex for the exclusion of unaligned AIO DIO. The change moves waiting for pending unwritten extent conversion under i_mutex. That makes special handling of O_APPEND writes unnecessary and also avoids possible livelocking of unaligned AIO DIO with aligned one (nothing was preventing contiguous stream of aligned AIO DIOs to let unaligned AIO DIO wait forever). Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 --- fs/ext4/file.c | 32 +++++++++++++------------------- fs/ext4/super.c | 5 +---- 3 files changed, 14 insertions(+), 26 deletions(-) commit adf32eaa05323449b74b36f25b918583e2bdb6f1 Author: Axel Lin Date: Mon Feb 22 15:24:54 2016 +0800 gpio: mpc8xxx: Slightly update the code for better readability Setting gc->direction_output to gc->direction_output looks strange. I think this change makes the intention more clear. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cd0d3f58a0ca05773c29b5e5b82f075b607777ba Author: Axel Lin Date: Mon Feb 22 15:24:01 2016 +0800 gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip *read_reg and *write_reg can be removed because at all the places to call them, we can just use gc->read_reg/gc->write_reg instead. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 48 ++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit fa4007ca06e4c808b002067c2ea02a9bebdc044b Author: Axel Lin Date: Mon Feb 22 15:22:52 2016 +0800 gpio: mpc8xxx: Fixup setting gpio direction output For devtype with specific gpio_dir_out implementation, current code is wrong because below code sets both gc->direction_output and mpc8xxx_gc->direction_output to the same function. gc->direction_output = devtype->gpio_dir_out ?: gc->direction_output; mpc8xxx_gc->direction_output = gc->direction_output; Set mpc8xxx_gc->direction_output = gc->direction_output first to fix it. This way mpc8xxx_gc->direction_output actually calls the standard bgpio_dir_out() to update register. Fixes: commit 42178e2a1e42 ("drivers/gpio: Switch gpio-mpc8xxx to use gpio-generic") Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1233a1fbb0e0efab91458bfdf744dcef6bf0f615 Author: Masahiro Yamada Date: Wed Mar 2 15:14:40 2016 +0900 pinctrl: uniphier: rename CONFIG options and file names The current "CONFIG_PINCTRL_UNIPHIER_PH1_*" is too long. It would not hurt to drop "PH1_" because "UNIPHIER_" already well specifies the SoC family. Also, rename files for consistency. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/Kconfig | 12 +- drivers/pinctrl/uniphier/Makefile | 14 +- drivers/pinctrl/uniphier/pinctrl-ph1-ld4.c | 891 ------------ drivers/pinctrl/uniphier/pinctrl-ph1-ld6b.c | 1279 ------------------ drivers/pinctrl/uniphier/pinctrl-ph1-pro4.c | 1565 ---------------------- drivers/pinctrl/uniphier/pinctrl-ph1-pro5.c | 1356 ------------------- drivers/pinctrl/uniphier/pinctrl-ph1-sld8.c | 799 ----------- drivers/pinctrl/uniphier/pinctrl-proxstream2.c | 1274 ------------------ drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 891 ++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 1279 ++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 1565 ++++++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 1356 +++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 1274 ++++++++++++++++++ drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 799 +++++++++++ 14 files changed, 7177 insertions(+), 7177 deletions(-) commit 5ab260aac64db003e466a82bf6633368b50125b1 Author: Paul Gortmaker Date: Mon Feb 29 15:48:43 2016 -0500 pinctrl: sunxi: make A80 explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN9I_A80_R drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN9I ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_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: Chen-Yu Tsai Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 3bd6ad7b688e200ac7633b16affa164d7cd5ef07 Author: Jan Kara Date: Tue Mar 8 22:26:39 2016 -0500 ext4: pack ioend structure better On 64-bit architectures we have two 4-byte holes in struct ext4_io_end. Order entries better to avoid this and thus make the structure occupy 64 instead of 72 bytes for 64-bit architectures. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5576e08d17fcf81bd0869c26e2c25f4181b11d2 Author: Paul Gortmaker Date: Mon Feb 29 15:48:41 2016 -0500 pinctrl: stm32: make explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/stm32/Kconfig:config PINCTRL_STM32F429 drivers/pinctrl/stm32/Kconfig: bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Also note that MODULE_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: Patrice Chotard Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Maxime Coquelin Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32f429.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit a43647b6d8f43b1dab717a90c2b8fe2b34129b41 Author: Paul Gortmaker Date: Mon Feb 29 15:48:40 2016 -0500 pinctrl: sh-pfc: make explicitly non-modular The Kconfig / Makefile currently controlling compilation of this code is: drivers/pinctrl/sh-pfc/Makefile:obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o drivers/pinctrl/sh-pfc/Makefile:sh-pfc-objs = core.o pinctrl.o drivers/pinctrl/sh-pfc/Kconfig:config PINCTRL_SH_PFC drivers/pinctrl/sh-pfc/Kconfig: def_bool y ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init already wasn't being used in this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: linux-renesas-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Laurent Pinchart Acked-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/pinctrl/sh-pfc/core.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 2496eb3205d404a9c65ac272fb6c464a0e266b2c Author: Paul Gortmaker Date: Mon Feb 29 15:48:39 2016 -0500 pinctrl: meson: make explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/Kconfig:config PINCTRL_MESON drivers/pinctrl/Kconfig: bool ...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 driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We don't replace module.h with init.h since the file already has that. 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: Beniamino Galvani Cc: Carlo Caione Cc: Masahiro Yamada Cc: Antoine Tenart Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d4bc6b920b8ed73882ac1d2c42d2c1ca4b2c63ae Author: Paul Gortmaker Date: Mon Feb 29 15:48:38 2016 -0500 pinctrl: pinctrl-mt6397 driver explicitly non-modular The Kconfig for this driver is currently: config PINCTRL_MT6397 bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397 ...meaning that it is currently not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Matthias Brugger Cc: linux-gpio@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Hongzhou Yang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit bcc76199784804c7c0793db42001272a9fabe5db Author: Paul Gortmaker Date: Mon Feb 29 15:48:37 2016 -0500 pinctrl: sunxi: does not need module.h This file is not modular, nor is it using modular functions. The only thing close is the global THIS_MODULE which comes from export.h so lets replace it appropriately and cut back on the amount of header stuff we draw in by several thousand lines. Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28c5a41e4aa44f162297d596030900b90aa1cf08 Author: Phil Reid Date: Tue Mar 1 14:25:41 2016 +0800 gpio: mcp23s08: Add support for mcp23s18 This patch adds support for the mcp23s18 which is very similar to the mcp23s17. A couple of control bits are not the same. Notable IOCON_HAEN (s17 only) & IOCON_INTCC. Which can be ignored. Patch changes the following: - Add mcp23s18 types. - Always set mirror bit if the dts defines mcp23s18. regardless of type. Mirror bit is ignored on 8 bit devices anyway. - In mcp23s08_probe use chip.ngpio instead of logic based on type to determine number of gpio lins to increment by. This is set appropiately by the call to mcp23s08_probe_one. - Add mcp23s18 to device tree documentation. - Remove statement that irqs don't work for spi. They do. Tested with mcp23s18. Signed-off-by: Phil Reid Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-mcp23s08.txt | 4 +--- drivers/gpio/gpio-mcp23s08.c | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) commit df2e90551b7db4b5a4da5eaa78742f47f2799aa2 Author: Marek Vasut Date: Mon Feb 29 17:23:17 2016 +0100 dt-bindings: gpio: altera: Fix altr,interrupt-type property The altr,interrupt-trigger property is not used by the driver. Instead, altr,interrupt-type is used by the driver and the driver does not probe if this property is not specified. Therefore, it is expected that there are no users of the -trigger property in the wild and that this is a typo in the documentation for the altera-pio controller. This patch fixes the typo. Signed-off-by: Marek Vasut Cc: Tien Hock Loh Cc: Linus Walleij Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-altera.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f436bc2726c6451bd15b63f100f00dcee52ba103 Author: Andreas Werner Date: Mon Feb 29 19:44:43 2016 +0100 gpio: add driver for MEN 16Z127 GPIO controller The 16Z127 is a 32bit GPIO controller on a MCB FPGA. Every single line can be configured as input and output. Push pull and open drain are supported as well as setting a debounce value for the input lines. Signed-off-by: Andreas Werner Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-menz127.c | 200 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit 04a0e4dee85642138dc7bd78f50ebee397e057a8 Author: Tomasz Nowicki Date: Tue Jan 19 14:11:18 2016 +0100 irqchip/gic-v3-its: Mark its_init() and its children as __init gicv3_init_bases() is the only caller for its_init(), also it is a __init function, so mark its_init() as __init too, then recursively mark the functions called as __init. This will help to introduce ITS initialization using ACPI tables as we will use acpi_table_parse_entries family functions there which belong to __init section as well. Acked-by: Marc Zyngier Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f6ae5085d37b2eaf6cac30ccf4d425e95c7d4b63 Author: Hanjun Guo Date: Tue Jan 19 14:11:17 2016 +0100 irqchip/gic-v3: Remove gic_root_node variable from the ITS code The gic_root_node variable defined in ITS driver is not actually used, so just remove it. Acked-by: Marc Zyngier Signed-off-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 3 --- 1 file changed, 3 deletions(-) commit b70fb7af67158250bf16db467926e6e105d8bc49 Author: Tomasz Nowicki Date: Tue Jan 19 14:11:16 2016 +0100 irqchip/gic-v3: ACPI: Add redistributor support via GICC structures Following ACPI spec: On systems supporting GICv3 and above, GICR Base Address in MADT GICC structure holds the 64-bit physical address of the associated Redistributor. If all of the GIC Redistributors are in the always-on power domain, GICR structures should be used to describe the Redistributors instead, and this field must be set to 0. It means that we have two ways to initialize registirbutors map. 1. via GICD structure which can accommodate many redistributors as a region 2. via GICC which is able to describe single redistributor This patch is going to add support for second option. Considering redistributors, GICD and GICC subtables have be mutually exclusive. While discovering and mapping redistributor, we need to know its size in advance. For the GICC case, redistributor can be in a power-domain that is off, thus we cannot relay on GICR TYPER register. Therefore, we get GIC version from distributor register and map 2xSZ_64K for GICv3 and 4xSZ_64K for GICv4. Acked-by: Marc Zyngier Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 114 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 101 insertions(+), 13 deletions(-) commit ffa7d6166a9611ed9ad117b56f7f513901b31408 Author: Tomasz Nowicki Date: Tue Jan 19 14:11:15 2016 +0100 irqchip/gic-v3: Add ACPI support for GICv3/4 initialization With the refator of gic_of_init(), GICv3/4 can be initialized by gic_init_bases() with gic distributor base address and gic redistributor region(s). So get the redistributor region base addresses from MADT GIC redistributor subtable, and the distributor base address from GICD subtable to init GICv3 irqchip in ACPI way. Note: GIC redistributor base address may also be provided in GICC structures on systems supporting GICv3 and above if the GIC Redistributors are not in the always-on power domain, this patch didn't implement such feature yet. Acked-by: Marc Zyngier Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 137 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit db57d7460ea74de2204ddc303520753f256ea67d Author: Tomasz Nowicki Date: Tue Jan 19 14:11:14 2016 +0100 irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver Isolate hardware abstraction (FDT) code to gic_of_init(). Rest of the logic goes to gic_init_bases() and expects well defined data to initialize GIC properly. The same solution is used for GICv2 driver. This is needed for ACPI initialization later. Acked-by: Marc Zyngier Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 130 ++++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 52 deletions(-) commit 630300d5fcb6ee9c32c75d8b576c100fbb794159 Author: Adam Baker Date: Sat Mar 5 15:34:56 2016 +0000 hwmon: Create an NSA320 hardware monitoring driver Create a driver to support the hardware monitoring chip present in the Zyxel NSA320 and some of the other Zyxel NAS devices. The driver reads fan speed and temperature from a suitably pre-programmed MCU on the device. Signed-off-by: Adam Baker [groeck: Dropped .owner field initialization] Signed-off-by: Guenter Roeck Documentation/hwmon/nsa320 | 53 +++++++++++ drivers/hwmon/Kconfig | 15 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/nsa320-hwmon.c | 215 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 284 insertions(+) commit 49023d2e4ead0fc9e0896331037746b267d46ad4 Author: Jon Hunter Date: Tue Mar 8 12:28:20 2016 +0000 spi: core: Fix deadlock when sending messages The function __spi_pump_messages() is called by spi_pump_messages() and __spi_sync(). The function __spi_sync() has an argument 'bus_locked' that indicates if it is called with the SPI bus mutex held or not. If 'bus_locked' is false then __spi_sync() will acquire the mutex itself. Commit 556351f14e74 ("spi: introduce accelerated read support for spi flash devices") made a change to acquire the SPI bus mutex within __spi_pump_messages(). However, this change did not check to see if the mutex is already held. If __spi_sync() is called with the mutex held (ie. 'bus_locked' is true), then a deadlock occurs when __spi_pump_messages() is called. Fix this deadlock by passing the 'bus_locked' state from __spi_sync() to __spi_pump_messages() and only acquire the mutex if not already held. In the case where __spi_pump_messages() is called from spi_pump_messages() it is assumed that the mutex is not held and so call __spi_pump_messages() with 'bus_locked' set to false. Finally, move the unlocking of the mutex to the end of the __spi_pump_messages() function to simplify the code and only call cond_resched() if there are no errors. Fixes: 556351f14e74 ("spi: introduce accelerated read support for spi flash devices") Signed-off-by: Jon Hunter Signed-off-by: Mark Brown drivers/spi/spi.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 3fab91ea284a3b795327dda915a3c150a49e4be2 Author: Axel Lin Date: Mon Feb 29 21:08:19 2016 +0800 gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free The implementation of lp3943_gpio_request/lp3943_gpio_free test pin_used for tracing the pin usage. However, gpiolib already checks FLAG_REQUESTED flag for the same purpose. So remove the redundant implementation. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-lp3943.c | 22 ---------------------- include/linux/mfd/lp3943.h | 6 ------ 2 files changed, 28 deletions(-) commit 83430833b4d4a9c9b23964babbeb1f36450f8136 Author: Manoj N. Kumar Date: Fri Mar 4 15:55:20 2016 -0600 cxlflash: Increase cmd_per_lun for better throughput With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single adapter is able to attain close to the maximum throughput (380kIOPS). Also change the number of RRQ entries that can be queued. Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 8 +++++--- drivers/scsi/cxlflash/main.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 603ecce95f4817074a724a889cd88c3c8210f933 Author: Manoj N. Kumar Date: Fri Mar 4 15:55:19 2016 -0600 cxlflash: Fix to avoid unnecessary scan with internal LUNs When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17 10:09:00 tul83p1 kernel: [ 3708.561134] cxlflash 0008:00:00.0: cxlflash_queuecommand: (scp=c0000000fc1f0f00) 11/1/0/0 cdb=(A0000000-00000000-10000000-00000000) Dec 17 10:09:00 tul83p1 kernel: [ 3708.561147] process_cmd_err: cmd failed afu_rc=32 scsi_rc=0 fc_rc=0 afu_extra=0xE, scsi_extra=0x0, fc_extra=0x0 By definition, both of the internal LUNs are on the first port/channel. When the lun_mode is switched to internal LUN the same value for host->max_channel is retained. This causes an unnecessary scan over the second port/channel. This fix alters the host->max_channel to 0 (1 port), if internal LUNs are configured and switches it back to 1 (2 ports) while going back to external LUNs. Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5d1952acd0d56f6b6835aa45bea763ee97b9e66f Author: Uma Krishnan Date: Fri Mar 4 15:55:18 2016 -0600 cxlflash: Reorder user context initialization In order to support cxlflash in the PowerVM environment, underlying hypervisor APIs have imposed a kernel API ordering change. For the superpipe access to LUN, user applications need a context. The cxlflash module creates this context by making a sequence of cxl calls. In the current code, a context is initialized via cxl_dev_context_init() followed by cxl_process_element(), a function that obtains the process element id. Finally, cxl_start_work() is called to attach the process element. In the PowerVM environment, a process element id cannot be obtained from the hypervisor until the process element is attached. The cxlflash module is unable to create contexts without a valid process element id. To fix this problem, cxl_start_work() is called before obtaining the process element id. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 8a96b52af58721caf4f7496d0737e8ec6b63c86e Author: Matthew R. Ochs Date: Fri Mar 4 15:55:17 2016 -0600 cxlflash: Simplify attach path error cleanup The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when function callouts need to be restructured. Problems range from inserting error path bugs in previously 'good' code to the cleanup path imposing design changes to how the normal path is structured. A less restrictive approach is needed to support ordering changes that come about when operating in different environments. To overcome this restriction, the error cleanup path is modified to have a single entrypoint and use conditional logic to cleanup where necessary. Entities that require multiple cleanup steps must be carefully vetted to ensure their APIs support state. In cases where they do not (none as of this commit) additional local variables can be used to maintain state on their behalf. Signed-off-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 55 ++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 24 deletions(-) commit 5e6632d19ea2fafaec1b7c4cda7f7157ee8ad983 Author: Matthew R. Ochs Date: Fri Mar 4 15:55:16 2016 -0600 cxlflash: Split out context initialization Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to initialize a context must be known before the context is even allocated. This design point is not flexible when the order of context creation needs to be modified. Specifically, this can lead to problems when members of the context information structure are a part of an ordering dependency (i.e. - the 'work' structure embedded within the context). To remedy, the allocation is left as-is, inside of the existing create_context() routine and the initialization is transitioned to a new void routine, init_context(). At the same time, in anticipation of these routines not being called in sequence, a state boolean is added to the context information structure to track when the context has been initilized. The context teardown routine, destroy_context(), is modified to support being called with a non-initialized context. Signed-off-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 92 +++++++++++++++++++++++---------------- drivers/scsi/cxlflash/superpipe.h | 1 + 2 files changed, 56 insertions(+), 37 deletions(-) commit 6ded8b3cbd9a6254da5a38f35e20aa3c316d9092 Author: Uma Krishnan Date: Fri Mar 4 15:55:15 2016 -0600 cxlflash: Unmap problem state area before detaching master context When operating in the PowerVM environment, the cxlflash module can receive an error from the hypervisor indicating that there are existing mappings in the page table for the process MMIO space. This issue exists because term_afu() currently invokes term_mc() before stop_afu(), allowing for the master context to be detached first and the problem state area to be unmapped second. To resolve this issue, stop_afu() should be called before term_mc(). Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 961487e46a87079a573348896a0d39c1cb10947d Author: Manoj N. Kumar Date: Fri Mar 4 15:55:14 2016 -0600 cxlflash: Simplify PCI registration The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to be mapped to the device's memory. The use of services such as pci_set_dma_mask() are problematic on hypervisor managed systems as the IBM CXL flash adapter is operating under a virtual PCI Host Bridge (virtual PHB) which does not support these services. cxlflash 0001:00:00.0: init_pci: Failed to set PCI DMA mask rc=-5 The resolution is to simplify init_pci(), to a point where it does the bare minimum (pci_enable_device). Similarly, remove the call the pci_release_regions() from cxlflash_remove(). Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 54 +------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) commit cc2a73a4a9fb6961fccc5b5d16303630107f2ab9 Author: Linus Walleij Date: Wed Mar 9 09:10:02 2016 +0700 pinctrl: pxa2xx: export symbols The pxa2xxx fails some automated builds because of unexported symbols. Reported-by: kbuild test robot Signed-off-by: Linus Walleij drivers/pinctrl/pxa/pinctrl-pxa2xx.c | 2 ++ 1 file changed, 2 insertions(+) commit cbffa3a5146a90f46806cef3a98b8be5833727e8 Author: Christophe Lombard Date: Fri Mar 4 12:26:35 2016 +0100 cxl: Separate bare-metal fields in adapter and AFU data structures Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/cxl.h | 84 +++++++++++++++++++++++++++------------- drivers/misc/cxl/irq.c | 2 +- drivers/misc/cxl/main.c | 1 - drivers/misc/cxl/native.c | 85 +++++++++++++++++++++-------------------- drivers/misc/cxl/pci.c | 95 +++++++++++++++++++++++++++------------------- drivers/misc/cxl/sysfs.c | 2 +- drivers/misc/cxl/vphb.c | 4 +- 8 files changed, 164 insertions(+), 111 deletions(-) commit 444c4ba4616503baf68cffbf6748047d308b8cd2 Author: Christophe Lombard Date: Fri Mar 4 12:26:34 2016 +0100 cxl: New hcalls to support cxl adapters The hypervisor calls provide an interface with a coherent platform facility and function. It matches version 0.16 of the 'PAPR changes' document. The following hcalls are supported: H_ATTACH_CA_PROCESS Attach a process element to a coherent platform function. H_DETACH_CA_PROCESS Detach a process element from a coherent platform function. H_CONTROL_CA_FUNCTION Allow the partition to manipulate or query certain coherent platform function behaviors. H_COLLECT_CA_INT_INFO Collect interrupt info about a coherent. platform function after an interrupt occurred H_CONTROL_CA_FAULTS Control the operation of a coherent platform function after a fault occurs. H_DOWNLOAD_CA_FACILITY Support for downloading a base adapter image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 23 +- drivers/misc/cxl/hcalls.c | 639 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cxl/hcalls.h | 203 +++++++++++++++ drivers/misc/cxl/main.c | 26 ++ drivers/misc/cxl/native.c | 1 + 5 files changed, 890 insertions(+), 2 deletions(-) commit c0efa9aee8504ce16250320c1e5464bdb7e24400 Author: Christophe Lombard Date: Fri Mar 4 12:26:33 2016 +0100 powerpc: New possible return value from hcall The hcalls introduced for cxl use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) commit 73d55c3b59f7d9cadc1dbc07d75ccee6c81fdf5b Author: Frederic Barrat Date: Fri Mar 4 12:26:32 2016 +0100 cxl: IRQ allocation for guests The PSL interrupt cannot be multiplexed in a guest, as it is not supported by the hypervisor. So an interrupt will be allocated for it for each context. It will still be the first interrupt found in the first interrupt range, but is treated almost like any other AFU interrupt when creating/deleting the context. Only the handler is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/irq.c | 78 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 14 deletions(-) commit 6d625ed9a7b04c5905dcaab564ec560be586822f Author: Frederic Barrat Date: Fri Mar 4 12:26:31 2016 +0100 cxl: Update cxl_irq() prototype The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit ea2d1f95efd7c100617235918bac370414aec1ad Author: Frederic Barrat Date: Fri Mar 4 12:26:30 2016 +0100 cxl: Isolate a few bare-metal-specific calls A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 3 ++- drivers/misc/cxl/cxl.h | 7 +++++-- drivers/misc/cxl/debugfs.c | 4 ++++ drivers/misc/cxl/fault.c | 19 +++++++++++-------- 4 files changed, 22 insertions(+), 11 deletions(-) commit 2b04cf310ba8c123e9957cfab80274e7606bf53c Author: Frederic Barrat Date: Fri Mar 4 12:26:29 2016 +0100 cxl: Rename some bare-metal specific functions Rename a few functions, changing the 'cxl_' prefix to either 'cxl_pci_' or 'cxl_native_', to make clear that the implementation is bare-metal specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 28 +++++++------- drivers/misc/cxl/native.c | 98 ++++++++++++++++++++++++----------------------- drivers/misc/cxl/pci.c | 78 +++++++++++++++++++------------------ 3 files changed, 104 insertions(+), 100 deletions(-) commit 5be587b1110132b4f05e0bc3515a145365e910fe Author: Frederic Barrat Date: Fri Mar 4 12:26:28 2016 +0100 cxl: Introduce implementation-specific API The backend API (in cxl.h) lists some low-level functions whose implementation is different on bare-metal and in a guest. Each environment implements its own functions, and the common code uses them through function pointers, defined in cxl_backend_ops Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 8 +-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++++++++++------- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c | 15 ++--- drivers/misc/cxl/irq.c | 19 ++++--- drivers/misc/cxl/main.c | 11 ++-- drivers/misc/cxl/native.c | 135 ++++++++++++++++++++++++++++----------------- drivers/misc/cxl/pci.c | 16 +++--- drivers/misc/cxl/sysfs.c | 32 +++++++---- drivers/misc/cxl/vphb.c | 6 +- 11 files changed, 185 insertions(+), 120 deletions(-) commit cca44c0192b03d179786ec34b070e7de42966cc6 Author: Frederic Barrat Date: Fri Mar 4 12:26:27 2016 +0100 cxl: Define process problem state area at attach time only CXL kernel API was defining the process problem state area during context initialization, making it possible to map the problem state area before attaching the context. This won't work on a powerVM guest. So force the logical behavior, like in userspace: attach first, then map the problem state area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d56d301b51746e71f7bdaaba10973f054c3c736e Author: Frederic Barrat Date: Fri Mar 4 12:26:26 2016 +0100 cxl: Move bare-metal specific code to specialized files Move a few functions around to better separate code specific to bare-metal environment from code which will be commonly used between guest and bare-metal. Code specific to bare-metal is meant to be in native.c or pci.c only. It's basically anything which touches the card p1 registers, some p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 24 +---- drivers/misc/cxl/irq.c | 205 +-------------------------------------- drivers/misc/cxl/main.c | 2 +- drivers/misc/cxl/native.c | 240 +++++++++++++++++++++++++++++++++++++++++++++- drivers/misc/cxl/pci.c | 18 ---- 5 files changed, 245 insertions(+), 244 deletions(-) commit 8633186209e35dfafc27c3d0f0d5e702ab47265f Author: Christophe Lombard Date: Fri Mar 4 12:26:25 2016 +0100 cxl: Move common code away from bare-metal-specific files Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 9 +++++++ drivers/misc/cxl/irq.c | 14 +++++----- drivers/misc/cxl/main.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cxl/native.c | 21 --------------- drivers/misc/cxl/pci.c | 48 +-------------------------------- 5 files changed, 84 insertions(+), 75 deletions(-) commit ff06c5ffbcb4ffa542fb80c897be977956fafecc Author: Vitaly Kuznetsov Date: Mon Mar 7 11:59:44 2016 +0100 scsi: storvsc: fix SRB_STATUS_ABORTED handling Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags") filtered SRB_STATUS_AUTOSENSE_VALID out effectively making the (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID) case a dead code. The logic from this branch (e.g. storvsc_device_scan() call) is still required, fix the check. Cc: #v4.4+ Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags") Signed-off-by: Vitaly Kuznetsov Acked-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 84bd64993f916bcf86270c67686ecf4cea7b8933 Author: Maurizio Lombardi Date: Fri Mar 4 10:41:49 2016 +0100 be2iscsi: set the boot_kset pointer to NULL in case of failure In beiscsi_setup_boot_info(), the boot_kset pointer should be set to NULL in case of failure otherwise an invalid pointer dereference may occur later. Cc: Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+) commit 6540a65da90c09590897310e31993b1f6e28485a Author: Martin K. Petersen Date: Sat Mar 5 17:52:02 2016 -0500 sd: Fix discard granularity when LBPRZ=1 Commit 397737223c59 ("sd: Make discard granularity match logical block size when LBPRZ=1") accidentally set the granularity to one byte instead of one logical block on devices that provide deterministic zeroes after UNMAP. Signed-off-by: Martin K. Petersen Reported-by: Mike Snitzer Reviewed-by: Ewan Milne Reviewed-by: Bart Van Assche Fixes: 397737223c59e89dca7305feb6528caef8fbef84 Cc: #v4.4+ drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 949e9b827eb4736d96df520c67d07a54c64e99b8 Author: Andrew Donnellan Date: Fri Oct 23 17:19:46 2015 +1100 powerpc/eeh: eeh_pci_enable(): fix checking of post-request state In eeh_pci_enable(), after making the request to set the new options, we call eeh_ops->wait_state() to check that the request finished successfully. At the moment, if eeh_ops->wait_state() returns 0, we return 0 without checking that it reflects the expected outcome. This can lead to callers further up the chain incorrectly assuming the slot has been successfully unfrozen and continuing to attempt recovery. On powernv, this will occur if pnv_eeh_get_pe_state() or pnv_eeh_get_phb_state() return 0, which in turn occurs if the relevant OPAL call returns OPAL_EEH_STOPPED_MMIO_DMA_FREEZE or OPAL_EEH_PHB_ERROR respectively. On pseries, this will occur if pseries_eeh_get_state() returns 0, which in turn occurs if RTAS reports that the PE is in the MMIO Stopped and DMA Stopped states. Obviously, none of these cases represent a successful completion of a request to thaw MMIO or DMA. Fix the check so that a wait_state() return value of 0 won't be considered successful for the EEH_OPT_THAW_MMIO or EEH_OPT_THAW_DMA cases. Signed-off-by: Andrew Donnellan Acked-by: Gavin Shan Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e237a5518425155faa508a087f28269f58074b92 Author: Chen Fan Date: Mon Feb 15 12:52:01 2016 +0800 x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected" Per the x86-specific footnote to PCI spec r3.0, sec 6.2.4, the value 255 in the Interrupt Line register means "unknown" or "no connection." Previously, when we couldn't derive an IRQ from the _PRT, we fell back to using the value from Interrupt Line as an IRQ. It's questionable whether we should do that at all, but the spec clearly suggests we shouldn't do it for the value 255 on x86. Calling request_irq() with IRQ 255 may succeed, but the driver won't receive any interrupts. Or, if IRQ 255 is shared with another device, it may succeed, and the driver's ISR will be called at random times when the *other* device interrupts. Or it may fail if another device is using IRQ 255 with incompatible flags. What we *want* is for request_irq() to fail predictably so the driver can fall back to polling. On x86, assume 255 in the Interrupt Line means the INTx line is not connected. In that case, set dev->irq to IRQ_NOTCONNECTED so request_irq() will fail gracefully with -ENOTCONN. We found this problem on a system where Secure Boot firmware assigned Interrupt Line 255 to an i801_smbus device and another device was already using MSI-X IRQ 255. This was in v3.10, where i801_probe() fails if request_irq() fails: i801_smbus 0000:00:1f.3: enabling device (0140 -> 0143) i801_smbus 0000:00:1f.3: can't derive routing for PCI INT C i801_smbus 0000:00:1f.3: PCI INT C: no GSI genirq: Flags mismatch irq 255. 00000080 (i801_smbus) vs. 00000000 (megasa) CPU: 0 PID: 2487 Comm: kworker/0:1 Not tainted 3.10.0-229.el7.x86_64 #1 Hardware name: FUJITSU PRIMEQUEST 2800E2/D3736, BIOS PRIMEQUEST 2000 Serie5 Call Trace: dump_stack+0x19/0x1b __setup_irq+0x54a/0x570 request_threaded_irq+0xcc/0x170 i801_probe+0x32f/0x508 [i2c_i801] local_pci_probe+0x45/0xa0 i801_smbus 0000:00:1f.3: Failed to allocate irq 255: -16 i801_smbus: probe of 0000:00:1f.3 failed with error -16 After aeb8a3d16ae0 ("i2c: i801: Check if interrupts are disabled"), i801_probe() will fall back to polling if request_irq() fails. But we still need this patch because request_irq() may succeed or fail depending on other devices in the system. If request_irq() fails, i801_smbus will work by falling back to polling, but if it succeeds, i801_smbus won't work because it expects interrupts that it may not receive. Signed-off-by: Chen Fan Acked-by: Thomas Gleixner Acked-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_irq.c | 29 +++++++++++++++++++++++++---- include/linux/interrupt.h | 10 ++++++++++ kernel/irq/manage.c | 9 ++++++++- 3 files changed, 43 insertions(+), 5 deletions(-) commit 41795a8a3cff8e4ba54236ca16c3814ba9cd7f39 Author: Jon Hunter Date: Fri Mar 4 10:55:15 2016 +0000 PM / Domains: Fix potential NULL pointer dereference In the function of_genpd_get_from_provider(), we never check to see if the argument 'genpdspec' is NULL before dereferencing it. Add error checking to handle any NULL pointers. Signed-off-by: Jon Hunter Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 3 +++ 1 file changed, 3 insertions(+) commit beda5fc1ff9b527059290a97b672d2ee0eb7b92f Author: Jon Hunter Date: Fri Mar 4 10:55:14 2016 +0000 PM / Domains: Fix removal of a subdomain Commit 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use before removing) added a test to ensure that a subdomain is not a master to another subdomain or if any devices are using the subdomain before removing. This change incorrectly used the "slave_links" list to determine if the subdomain is a master to another subdomain, where it should have been using the "master_links" list instead. The "slave_links" list will never be empty for a subdomain and so a subdomain can never be removed. Fix this by testing if the "master_links" list is empty instead. Fixes: 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use before removing) Signed-off-by: Jon Hunter Reviewed-by: Thierry Reding Acked-by: Ulf Hansson Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 076395cae20381340a0e92ad3d76fe3e280f8a1c Author: Laurent Pinchart Date: Wed Mar 2 01:20:38 2016 +0200 PM / Domains: Propagate start and restore errors during runtime resume During runtime resume the return values of the start and restore steps are ignored. As a result drivers are not notified of runtime resume failures and can't propagate them up. Fix it by returning an error if either the start or restore step fails, and clean up properly in the error path. Signed-off-by: Laurent Pinchart Acked-by: Kevin Hilman Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 0ba554e45c674181a3e5c42c7a6cccbbc75a0dd7 Author: Geert Uytterhoeven Date: Tue Feb 23 17:49:18 2016 +0100 PM / Domains: Join state name and index in debugfs output For low-power states, the state index is part of the state, hence join them with a hyphen in the /sys/kernel/debug/pm_genpd/pm_genpd_summary output. E.g. "off 0" becomes "off-0". Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Tested-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6954d43292674aaacc9b1cdbc28b1b2ea0cc6445 Author: Geert Uytterhoeven Date: Tue Feb 23 17:49:17 2016 +0100 PM / Domains: Restore alignment of slaves in debugfs output The slave domains are no longer aligned with the table header in the /sys/kernel/debug/pm_genpd/pm_genpd_summary output. Worse, the alignment differs depending on the actual name of the state. Format the state name and index into a buffer, and print that like before to restore alignment. Use "%u" for unsigned int while we're at it. Fixes: fc5cbf0c94b6f7fd (PM / Domains: Support for multiple states) Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Tested-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 323ee64aa175a67fbbe744e809777d17e6fb42d7 Author: Jacob Pan Date: Wed Feb 24 13:31:38 2016 -0800 powercap/rapl: track lead cpu per package RAPL driver operates on MSRs that are under package/socket scope instead of core scope. However, the current code does not keep track of which CPUs are available on each package for MSR access. Therefore it has to search for an active CPU on a given package each time. This patch optimizes the package level operations by tracking a per package lead CPU during initialization and CPU hotplug. The runtime search for active CPU is avoided. Suggested-by: Thomas Gleixner Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 59 +++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 39 deletions(-) commit 309557f558a6f276e364b08d916c0f644b5bd2e1 Author: Jacob Pan Date: Wed Feb 24 13:31:37 2016 -0800 powercap/rapl: add package reference per domain This patch adds to each rapl domain a reference of the package it belongs to. At runtime, we can then avoid searching the package data for each access. It simplifies the domain level operations which depend on package level information. Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 66 ++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 45 deletions(-) commit f14a1396d8f19b6c53593045eba86d10360a0cee Author: Jacob Pan Date: Wed Feb 24 13:31:36 2016 -0800 powercap/rapl: reduce ipi calls Reduce remote CPU calls for MSR access by combining read modify write into one function. Suggested-by: Peter Zijlstra Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 119 ++++++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 34 deletions(-) commit 16ccbd87c2e5d95f40f3b7a90f40cc2b34b89a22 Author: Jacob Pan Date: Wed Feb 24 13:31:35 2016 -0800 cpumask: export cpumask_any_but Export cpumask_any_but() for module use. This will be used by drivers such as intel_rapl to locate an active cpu on a socket. Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki lib/cpumask.c | 1 + 1 file changed, 1 insertion(+) commit b6c7347f2f6176fa3225903fbfe63b1ccd01ec9d Author: Gavin Shan Date: Fri Feb 26 11:14:00 2016 +1100 powerpc/eeh: Remove duplicated check in eeh_dump_pe_log() When eeh_dump_pe_log() is only called by eeh_slot_error_detail(), we already have the check that the PE isn't in PCI config blocked state in eeh_slot_error_detail(). So we needn't the duplicated check in eeh_dump_pe_log(). This removes the duplicated check in eeh_dump_pe_log(). No logical changes introduced. Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 7 ------- 1 file changed, 7 deletions(-) commit eca036ee1b4ea0ce4f311f4d8cb73731ef2f0b26 Author: Gavin Shan Date: Fri Mar 4 10:53:14 2016 +1100 powerpc/eeh: Synchronize recovery in host/guest When passing through SRIOV VFs to guest, we possibly encounter EEH error on PF. In this case, the VF PEs are put into frozen state. The error could be reported to guest before it's captured by the host. That means the guest could attempt to recover errors on VFs before host gets chance to recover errors on PFs. The VFs won't be recovered successfully. This enforces the recovery order for above case: the recovery on child PE in guest is hold until the recovery on parent PE in host is completed. Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3fa7bf7229993eac65fd6ade2ffc5f75150b40e1 Author: Gavin Shan Date: Fri Mar 4 10:53:13 2016 +1100 powerpc/eeh: Don't remove passed VFs When we have partial hotplug as part of the error recovery on PF, the VFs that are bound with vfio-pci driver will experience hotplug. That's not allowed. This checks if the VF PE is passed or not. If it does, we leave the VF without removing it. Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 3 +++ 1 file changed, 3 insertions(+) commit 2311cca55589ae7889071e11e18c9260b68314e2 Author: Gavin Shan Date: Fri Mar 4 10:53:12 2016 +1100 powerpc/eeh: Don't propagate error to guest When EEH error happened to the parent PE of those PEs that have been passed through to guest, the error is propagated to guest domain and the VFIO driver's error handlers are called. It's not correct as the error in the host domain shouldn't be propagated to guests and affect them. This adds one more limitation when calling EEH error handlers. If the PE has been passed through to guest, the error handlers won't be called. Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 67086e32b56481531ab1292b284e074b1a8d764c Author: Wei Yang Date: Fri Mar 4 10:53:11 2016 +1100 powerpc/eeh: powerpc/eeh: Support error recovery for VF PE PFs are enumerated on PCI bus, while VFs are created by PF's driver. In EEH recovery, it has two cases: 1. Device and driver is EEH aware, error handlers are called. 2. Device and driver is not EEH aware, un-plug the device and plug it again by enumerating it. The special thing happens on the second case. For a PF, we could use the original pci core to enumerate the bus, while for VF we need to record the VFs which aer un-plugged then plug it again. Also The patch caches the VF index in pci_dn, which can be used to calculate VF's bus, device and function number. Those information helps to locate the VF's PCI device instance when doing hotplug during EEH recovery if necessary. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 2 + arch/powerpc/include/asm/pci-bridge.h | 1 + arch/powerpc/kernel/eeh.c | 8 ++ arch/powerpc/kernel/eeh_dev.c | 1 + arch/powerpc/kernel/eeh_driver.c | 137 +++++++++++++++++++++++++++------- arch/powerpc/kernel/pci_dn.c | 4 +- 6 files changed, 127 insertions(+), 26 deletions(-) commit 0dc2830e0a48d520c7db7cc55dbbd0edefac02f5 Author: Wei Yang Date: Fri Mar 4 10:53:10 2016 +1100 powerpc/powernv: Support PCI config restore for VFs After PE reset, OPAL API opal_pci_reinit() is called on all devices contained in the PE to reinitialize them. While skiboot is not aware of VFs, we have to implement the function in kernel to reinitialize VFs after reset on PE for VFs. In this patch, two functions pnv_pci_fixup_vf_mps() and pnv_eeh_restore_vf_config() both manipulate the MPS of the VF, since for a VF it has three cases. 1. Normal creation for a VF In this case, pnv_pci_fixup_vf_mps() is called to make the MPS a proper value compared with its parent. 2. EEH recovery without VF removed In this case, MPS is stored in pci_dn and pnv_eeh_restore_vf_config() is called to restore it and reinitialize other part. 3. EEH recovery with VF removed In this case, VF will be removed then re-created. Both functions are called. First pnv_pci_fixup_vf_mps() is called to store the proper MPS to pci_dn and then pnv_eeh_restore_vf_config() is called to do proper thing. This introduces two functions: pnv_pci_fixup_vf_mps() to fixup the VF's MPS to make sure it is equal to parent's and store this value in pci_dn for future use. pnv_eeh_restore_vf_config() to re-initialize on VF by restoring MPS, disabling completion timeout, enabling SERR, etc. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pci-bridge.h | 1 + arch/powerpc/platforms/powernv/eeh-powernv.c | 95 +++++++++++++++++++++++++++- 2 files changed, 93 insertions(+), 3 deletions(-) commit 9312bc5bab5907937db20c9f8c094d0c02dd78db Author: Wei Yang Date: Fri Mar 4 10:53:09 2016 +1100 powerpc/powernv: Support EEH reset for VF PE PEs for VFs don't have primary bus. So they have to have their own reset backend, which is used during EEH recovery. The patch implements the reset backend for VF's PE by issuing FLR or AF FLR to the VFs, which are contained in the PE. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh.c | 9 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 127 ++++++++++++++++++++++++++- 3 files changed, 133 insertions(+), 4 deletions(-) commit c29fa27d26e3189009ba42786f0c0dce14a90940 Author: Wei Yang Date: Fri Mar 4 10:53:08 2016 +1100 powerpc/eeh: Create PE for VFs This creates PEs for VFs in the weak function pcibios_bus_add_device(). Those PEs for VFs are identified with newly introduced flag EEH_PE_VF so that we treat them differently during EEH recovery. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh_pe.c | 10 ++++++++-- arch/powerpc/platforms/powernv/eeh-powernv.c | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) commit 39218cd00ebf08b16edf015adc363de42d9ad612 Author: Wei Yang Date: Fri Mar 4 10:53:07 2016 +1100 powerpc/eeh: EEH device for VF VFs and their corresponding pdn are created and released dynamically when their PF's SRIOV capability is enabled and disabled. This creates and releases EEH devices for VFs when creating and releasing their pdn instances, which means EEH devices and pdn instances have same life cycle. Also, VF's EEH device is identified by (struct eeh_dev::physfn). Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/pci_dn.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 51c0e87e9a48d081d7ccb40d7454a0fa2935a424 Author: Wei Yang Date: Fri Mar 4 10:53:06 2016 +1100 powerpc/eeh: Cache normal BARs, not windows or IOV BARs This restricts the EEH address cache to use only the first 7 BARs. This makes __eeh_addr_cache_insert_dev() ignore PCI bridge window and IOV BARs. As the result of this change, eeh_addr_cache_get_dev() will return VFs from VF's resource addresses instead of parent PFs. This also removes PCI bridge check as we limit __eeh_addr_cache_insert_dev() to 7 BARs and this effectively excludes PCI bridges from being cached. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_cache.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 971427f5827d5a013965878e196d6930a977e8a7 Author: Wei Yang Date: Fri Mar 4 10:53:05 2016 +1100 powerpc/pci: Remove VFs prior to PF As commit ac205b7bb72f ("PCI: make sriov work with hotplug remove") indicates, VFs which is on the same PCI bus as their PF, should be removed before the PF. Otherwise, we might run into kernel crash at PCI unplugging time. This applies the above pattern to powerpc PCI hotplug path. Signed-off-by: Wei Yang Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/pci-hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b77061f8d03cdaf71d91ea356835131d651b103 Author: Wei Yang Date: Fri Mar 4 10:53:04 2016 +1100 PCI: Add pcibios_bus_add_device() weak function This adds weak function pcibios_bus_add_device() for arch dependent code could do proper setup. For example, powerpc could setup EEH related resources for SRIOV VFs. Signed-off-by: Wei Yang Reviewed-by: Gavin Shan Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman drivers/pci/bus.c | 3 +++ include/linux/pci.h | 1 + 2 files changed, 4 insertions(+) commit c194f7ea7f68f2690533832ec22f0d7ed4f2d74d Author: Wei Yang Date: Fri Mar 4 10:53:03 2016 +1100 PCI/IOV: Rename and export virtfn_{add, remove} During EEH recovery, hotplug is applied to the devices which don't have drivers or their drivers don't support EEH. However, the hotplug, which was implemented based on PCI bus, can't be applied to VF directly. Instead, we unplug and plug individual PCI devices (VFs). This renames virtn_{add,remove}() and exports them so they can be used in PCI hotplug during EEH recovery. Signed-off-by: Wei Yang Reviewed-by: Gavin Shan Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman drivers/pci/iov.c | 10 +++++----- include/linux/pci.h | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 4eb0799ff93b54dd40c0c5bb06f60f1eb015635b Author: Gavin Shan Date: Tue Feb 9 15:50:23 2016 +1100 powerpc/eeh: Reworked eeh_pe_bus_get() The original implementation is ugly: unnecessary if statements and "out" tag. This reworks the function to avoid above weaknesses. No functional changes introduced. Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_pe.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit ccb361d2fdda8975c8bbc8a1749c31dbd62dd276 Author: Javier Martinez Canillas Date: Thu Feb 18 15:19:11 2016 -0300 thermal: exynos: Defer probe if vtmu is present but not registered The driver doesn't check if the regulator_get_optional return value is -EPROBE_DEFER so it will wrongly assume that the regulator couldn't be found just because the regulator driver wasn't registered yet, i.e: exynos-tmu 10060000.tmu: Regulator node (vtmu) not found In this case the return value should be propagated to allow the driver probe function to be deferred until the regulator driver is registered. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Javier Martinez Canillas Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d3583cd1cb1a51825f195b2cfe8b855827803eb Author: Javier Martinez Canillas Date: Thu Feb 18 15:19:10 2016 -0300 thermal: exynos: Use devm_regulator_get_optional() for vtmu The Exynos TMU DT binding says that the vtmu-supply is optional but the driver uses devm_regulator_get() that creates a dummy regulator if it's not defined in the DT. For example the following message is in the log: 10060000.tmu supply vtmu not found, using dummy regulator Use the optional version of regulator_get() that doesn't create a dummy regulator and instead returns a -ENODEV errno code. Since it's expected that a regulator may not be defined and the driver will inform about it: exynos-tmu 10060000.tmu: Regulator node (vtmu) not found Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Javier Martinez Canillas Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bc40ddfe807b07bd54193791296a3a9448280de Author: Javier Martinez Canillas Date: Thu Feb 18 15:19:09 2016 -0300 thermal: exynos: List vtmu-supply as optional property in DT binding The Exynos Thermal Management Unit binding says that the vtmu-supply is optional but is listed in the required properties section. Add an optional properties section and move the regulator property there. Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Signed-off-by: Javier Martinez Canillas Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 3a3a5f15869fa74472c377a556c3d00453403854 Author: Krzysztof Kozlowski Date: Thu Feb 18 14:14:20 2016 +0900 thermal: exynos: Print a message about exceeded number of supported trip-points When DeviveTree contains more trip-points than SoC can configure (usually more than four) and polling mode is not enabled, then the remaining trip-points will be silently ignored. No interrupts will be generated for them. This might be quite dangerous when one provides DTB with a non-configurable critical trip-point, like (assuming four supported thresholds in TMU): - alert @50 C (type: active), - alert @60 C (type: active), - alert @70 C (type: active), - alert @80 C (type: active), - critical @120 C (type: critical) <- no interrupts generated. This is a mistake in DTB so print a message in such case. Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin drivers/thermal/samsung/exynos_tmu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 516fdcea0db8f367bc814572cb8486de424cb0fc Author: Don Brace Date: Tue Mar 8 16:05:51 2016 -0600 cciss: update MAINTAINERS Reviewed-by: Kevin Barnett Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Jens Axboe MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa7b29e8bfa288c8473d0c4a3ac120b3a2707e06 Author: Krzysztof Kozlowski Date: Thu Feb 18 14:14:19 2016 +0900 thermal: exynos: Document number of supported trip-points Document the number of configurable temperature thresholds (for trip-points in interrupt-driven mode). Acked-by: Rob Herring Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit a41e939b279836916531cb4b3860b69a21e71b46 Author: Krzysztof Kozlowski Date: Thu Feb 18 14:14:18 2016 +0900 thermal: exynos: Document compatible for Exynos5433 TMU Commit 488c7455d74c ("thermal: exynos: Add the support for Exynos5433 TMU") added new compatible but forgot to update documentation. Acked-by: Rob Herring Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 1 + 1 file changed, 1 insertion(+) commit 48c7823f42da2bc881ae2e325ed40123871c2fb9 Author: Jon Derrick Date: Tue Mar 8 10:34:54 2016 -0700 NVMe: Remove unused sq_head read in completion path Signed-off-by: Jon Derrick Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 2 -- 1 file changed, 2 deletions(-) commit 1e059e20ac297346512d9581a8cd3f3cca6a29f9 Author: Bob Moore Date: Fri Feb 19 14:17:43 2016 +0800 ACPICA: Utilities: Update trace mechinism for acquire_object ACPICA commit 0824ab90e03c2e4239e890615f447e7962b1daa2 Was not using the correct macro. Updated a comment in acoutput.h Link: https://github.com/acpica/acpica/commit/0824ab90 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utcache.c | 2 +- include/acpi/acoutput.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8e47e15e917fca36945c2f03de28cfda0c8499f0 Author: Jean Delvare Date: Thu Feb 18 13:54:02 2016 +0100 PCI/AER: Log aer_inject error injections Log successful error injections so that injected errors can be differentiated from real errors. Suggested-by: Bjorn Helgaas Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas CC: Borislav Petkov drivers/pci/pcie/aer/aer_inject.c | 3 +++ 1 file changed, 3 insertions(+) commit 96b45ea5dc19425ca04b53ab2b56af9e2bcc28c6 Author: Jean Delvare Date: Thu Feb 18 13:52:46 2016 +0100 PCI/AER: Log actual error causes in aer_inject The aer_inject driver is very quiet. In most cases, it merely returns an error code to user-space, leaving the user with little clue about the actual reason for the failure. So, log error messages for 4 of the most frequent causes of failure: * Can't find the root port of the specified device. * Device doesn't support AER. * Root port doesn't support AER. * AER device not found. This gives the user a chance to understand why aer-inject failed. Based on a preliminary patch by Thomas Renninger. Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas CC: Borislav Petkov CC: Thomas Renninger drivers/pci/pcie/aer/aer_inject.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3bc11851413fcf58f6a2d8f69346609c9db339ed Author: Jean Delvare Date: Thu Feb 18 13:52:01 2016 +0100 PCI/AER: Use dev_warn() in aer_inject dev_warn() is better than printk(LOG_WARNING...) as it records which device the message relates to. Also add a prefix "aer_inject:" to help differentiate real errors from injected errors. Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas CC: Borislav Petkov drivers/pci/pcie/aer/aer_inject.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 20ac75e563d09f56fb00caa25a3afdb88573472d Author: Jean Delvare Date: Thu Feb 18 13:50:45 2016 +0100 PCI/AER: Fix aer_inject error codes EPERM means "Operation not permitted", which doesn't reflect the lack of support for AER. EPROTONOSUPPORT (Protocol not supported) is a better choice of error code if the device or its root port lack support for AER. Likewise, EINVAL means "Invalid argument", which is not suitable for cases where the AER error device is missing or unusable. ENODEV and EPROTONOSUPPORT, respectively, fit better. Suggested-by: Borislav Petkov Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas CC: Borislav Petkov CC: Prarit Bhargava drivers/pci/pcie/aer/aer_inject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e32faa303f7f63bad8f9f04267878d61e0f7e0b5 Author: Thierry Reding Date: Tue Feb 9 15:52:33 2016 +0100 PCI: tegra: Remove misleading PHYS_OFFSET BARs are disabled when the size register is 0, so it's misleading to write a base address into the start register. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56e75e2a15d0b28261503d415eb56bb4c2b92be5 Author: Thierry Reding Date: Tue Feb 9 15:52:32 2016 +0100 PCI: tegra: Track bus -> CPU mapping Track the offsets of the bus -> CPU mapping for I/O and memory. This is cosmetic for current Tegra chips because the offset is always 0. But to properly support legacy use-cases, like VGA, this would be needed so that PCI bus addresses can be relocated. While at it, also request the I/O resource both in physical memory and I/O space to make /proc/iomem consistent, as well as add the I/O region to the list of host bridge resources. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 8493a952432bf00138b3d3c53a9300e353c18a6d Author: Thierry Reding Date: Tue Feb 9 15:52:31 2016 +0100 PCI: tegra: Remove unused struct tegra_pcie.num_ports field The num_ports field of the tegra_pcie structure is never used so remove it. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 1 - 1 file changed, 1 deletion(-) commit b4d18d71ec12f9f0ad3190b65e1a33ef1e6f8561 Author: Thierry Reding Date: Tue Feb 9 15:30:48 2016 +0100 PCI: tegra: Implement ->{add,remove}_bus() callbacks The configuration space mapping on Tegra is somewhat special, and in order to avoid wasting virtual address space the configuration space for each bus needs to be stitched together from several blocks which form a single continuous virtual address range for accessors. Currently the configuration space is mapped upon the first access to one of its registers. However, the mapping operation may sleep under certain circumstances, so doing it from the configuration space accessors (they are protected by a spin lock) will trigger a warning. To avoid the warning, use the ->add_bus() callback to perform the mapping at enumeration time when the operation is allowed to sleep. Also add an implementation of ->remove_bus() that undoes the mapping established by the ->add_bus() callback. While it isn't currently possible to unload the module, there is work underway to remedy this, and this code will come in handy when that happens. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 54 ++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 20 deletions(-) commit 057bd2e0528ec68b3d0481ede0b26a31a9e5d2f1 Author: Thierry Reding Date: Tue Feb 9 15:30:47 2016 +0100 PCI: Add pci_ops.{add,remove}_bus() callbacks Add pci_ops.{add,remove}_bus() callbacks, which will be called on every newly created bus and when a bus is being removed, respectively. This can be used by drivers to implement driver-specific initialization and teardown of the bus, in addition to the architecture-specifics implemented by the pcibios_add_bus() and the pcibios_remove_bus() functions. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 6 ++++++ drivers/pci/remove.c | 4 ++++ include/linux/pci.h | 2 ++ 3 files changed, 12 insertions(+) commit 74e5053cd71bdfe9b390000edb5a63dcf1607305 Author: Eduardo Valentin Date: Tue Mar 8 13:32:48 2016 -0800 thermal: mtk: allow compile testing on UM Following the fix on thermal Kconfig, this patch adds dependency on HAS_IOMEM so driver properly compile test on UM arch. Cc: Krzysztof Kozlowski Cc: Zhang Rui Cc: Matthias Brugger Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ab9d1e4f7b0217948a3b35a64178602ab30ff45d Merge: 3c1a79f a5fd276 Author: Dave Chinner Date: Wed Mar 9 08:18:30 2016 +1100 Merge branch 'xfs-misc-fixes-4.6-3' into for-next commit a5fd276bdc4fb71b06d100a6abc77ad682f77de4 Author: Luis de Bethencourt Date: Wed Mar 9 08:17:56 2016 +1100 xfs: remove impossible condition bp_release is set to 0 just before the breakpoint of the for loop before the conditional check (in line 458). The other breakpoint is a goto that skips the dead code. Addresses-Coverity-Id: 102338 Signed-off-by: Luis de Bethencourt Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 30cbc591c34e680e8b5d6d675ea49effe42a0570 Author: Darrick J. Wong Date: Wed Mar 9 08:15:14 2016 +1100 xfs: check sizes of XFS on-disk structures at compile time Check the sizes of XFS on-disk structures when compiling the kernel. Use this to catch inadvertent changes in structure size due to padding and alignment issues, etc. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_ondisk.h | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_super.c | 3 ++ 2 files changed, 120 insertions(+) commit e7e127e3c767094aca96ee976729dc5f756666df Author: Bjorn Helgaas Date: Tue Mar 8 14:57:21 2016 -0600 PCI: Include pci/hotplug Kconfig directly from pci/Kconfig Include pci/hotplug/Kconfig directly from pci/Kconfig, so arches don't have to source both pci/Kconfig and pci/hotplug/Kconfig. Note that this effectively adds pci/hotplug/Kconfig to the following arches, because they already sourced drivers/pci/Kconfig but they previously did not source drivers/pci/hotplug/Kconfig: alpha arm avr32 frv m68k microblaze mn10300 sparc unicore32 Inspired-by-patch-from: Bogicevic Sasa Signed-off-by: Bjorn Helgaas arch/arm64/Kconfig | 1 - arch/blackfin/Kconfig | 2 -- arch/ia64/Kconfig | 2 -- arch/m32r/Kconfig | 2 -- arch/mips/Kconfig | 2 -- arch/powerpc/Kconfig | 2 -- arch/s390/Kconfig | 1 - arch/sh/Kconfig | 2 -- arch/tile/Kconfig | 3 --- arch/x86/Kconfig | 2 -- arch/xtensa/Kconfig | 2 -- drivers/parisc/Kconfig | 2 -- drivers/pci/Kconfig | 1 + 13 files changed, 1 insertion(+), 23 deletions(-) commit 5e25166f32e7364422e2c413b5667713d6fa0f85 Author: Wei Ni Date: Tue Mar 8 11:19:01 2016 +0800 thermal: tegra_soctherm: fix sign bit of temperature The sign bit of temperature readback is bit 0, not bit 1. Change to BIT(0) to fix it. Signed-off-by: Wei Ni Reviewed-by: Matt Longnecker Signed-off-by: Eduardo Valentin drivers/thermal/tegra_soctherm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f8fc43217a01c98be88aa53794b4d1333a07a5a Author: Bogicevic Sasa Date: Wed Feb 3 13:24:22 2016 -0800 PCI: Include pci/pcie/Kconfig directly from pci/Kconfig Include pci/pcie/Kconfig directly from pci/Kconfig, so arches don't have to source both pci/Kconfig and pci/pcie/Kconfig. Note that this effectively adds pci/pcie/Kconfig to the following arches, because they already sourced drivers/pci/Kconfig but they previously did not source drivers/pci/pcie/Kconfig: alpha avr32 blackfin frv m32r m68k microblaze mn10300 parisc sparc unicore32 xtensa [bhelgaas: changelog, source pci/pcie/Kconfig at top of pci/Kconfig, whitespace] Signed-off-by: Sasa Bogicevic Signed-off-by: Bjorn Helgaas arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/ia64/Kconfig | 2 -- arch/mips/Kconfig | 2 -- arch/powerpc/Kconfig | 2 -- arch/s390/Kconfig | 1 - arch/sh/Kconfig | 2 -- arch/tile/Kconfig | 1 - arch/x86/Kconfig | 2 -- drivers/pci/Kconfig | 3 +++ 10 files changed, 3 insertions(+), 14 deletions(-) commit f14b488d50b7dc234ddaed53ce4293c9eac47457 Merge: 8aba8b8 c3f85cf Author: David S. Miller Date: Tue Mar 8 15:28:33 2016 -0500 Merge branch 'bpf-map-prealloc' Alexei Starovoitov says: ==================== bpf: map pre-alloc v1->v2: . fix few issues spotted by Daniel . converted stackmap into pre-allocation as well . added a workaround for lockdep false positive . added pcpu_freelist_populate to be used by hashmap and stackmap this path set switches bpf hash map to use pre-allocation by default and introduces BPF_F_NO_PREALLOC flag to keep old behavior for cases where full map pre-allocation is too memory expensive. Some time back Daniel Wagner reported crashes when bpf hash map is used to compute time intervals between preempt_disable->preempt_enable and recently Tom Zanussi reported a dead lock in iovisor/bcc/funccount tool if it's used to count the number of invocations of kernel '*spin*' functions. Both problems are due to the recursive use of slub and can only be solved by pre-allocating all map elements. A lot of different solutions were considered. Many implemented, but at the end pre-allocation seems to be the only feasible answer. As far as pre-allocation goes it also was implemented 4 different ways: - simple free-list with single lock - percpu_ida with optimizations - blk-mq-tag variant customized for bpf use case - percpu_freelist For bpf style of alloc/free patterns percpu_freelist is the best and implemented in this patch set. Detailed performance numbers in patch 3. Patch 2 introduces percpu_freelist Patch 1 fixes simple deadlocks due to missing recursion checks Patch 5: converts stackmap to pre-allocation Patches 6-9: prepare test infra Patch 10: stress test for hash map infra. It attaches to spin_lock functions and bpf_map_update/delete are called from different contexts Patch 11: stress for bpf_get_stackid Patch 12: map performance test Reported-by: Daniel Wagner Reported-by: Tom Zanussi ==================== Signed-off-by: David S. Miller commit c3f85cffc50d2f259903555979581a632b945ec2 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:21 2016 -0800 samples/bpf: test both pre-alloc and normal maps extend test coveraged to include pre-allocated and run-time alloc maps Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/test_maps.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 89b976070190eb9dd14943c0d6ca4b7209f61405 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:20 2016 -0800 samples/bpf: add map_flags to bpf loader note old loader is compatible with new kernel. map_flags are optional Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_helpers.h | 1 + samples/bpf/bpf_load.c | 3 ++- samples/bpf/fds_example.c | 2 +- samples/bpf/libbpf.c | 5 +++-- samples/bpf/libbpf.h | 2 +- samples/bpf/sock_example.c | 2 +- samples/bpf/test_maps.c | 19 ++++++++++++------- samples/bpf/test_verifier.c | 4 ++-- 8 files changed, 23 insertions(+), 15 deletions(-) commit 3622e7e4935105991dc648bca650c858576aecda Author: Alexei Starovoitov Date: Mon Mar 7 21:57:19 2016 -0800 samples/bpf: move ksym_search() into library move ksym search from offwaketime into library to be reused in other tests Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 62 ++++++++++++++++++++++++++++++++++++++ samples/bpf/bpf_load.h | 6 ++++ samples/bpf/offwaketime_user.c | 67 +----------------------------------------- 3 files changed, 69 insertions(+), 66 deletions(-) commit 618ec9a7b1fda46f8dd4a630ded983aeb51218f3 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:18 2016 -0800 samples/bpf: make map creation more verbose map creation is typically the first one to fail when rlimits are too low, not enough memory, etc Make this failure scenario more verbose Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 557c0c6e7df8e14a46bd7560d193fa5bbc00a858 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:17 2016 -0800 bpf: convert stackmap to pre-allocation It was observed that calling bpf_get_stackid() from a kprobe inside slub or from spin_unlock causes similar deadlock as with hashmap, therefore convert stackmap to use pre-allocated memory. The call_rcu is no longer feasible mechanism, since delayed freeing causes bpf_get_stackid() to fail unpredictably when number of actual stacks is significantly less than user requested max_entries. Since elements are no longer freed into slub, we can push elements into freelist immediately and let them be recycled. However the very unlikley race between user space map_lookup() and program-side recycling is possible: cpu0 cpu1 ---- ---- user does lookup(stackidX) starts copying ips into buffer delete(stackidX) calls bpf_get_stackid() which recyles the element and overwrites with new stack trace To avoid user space seeing a partial stack trace consisting of two merged stack traces, do bucket = xchg(, NULL); copy; xchg(,bucket); to preserve consistent stack trace delivery to user space. Now we can move memset(,0) of left-over element value from critical path of bpf_get_stackid() into slow-path of user space lookup. Also disallow lookup() from bpf program, since it's useless and program shouldn't be messing with collected stack trace. Note that similar race between user space lookup and kernel side updates is also present in hashmap, but it's not a new race. bpf programs were always allowed to modify hash and array map elements while user space is copying them. Fixes: d5a3b1f69186 ("bpf: introduce BPF_MAP_TYPE_STACK_TRACE") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 1 + kernel/bpf/stackmap.c | 86 ++++++++++++++++++++++++++++++++++++++++----------- kernel/bpf/syscall.c | 2 ++ 3 files changed, 71 insertions(+), 18 deletions(-) commit 823707b68d6e6c4b1be619b039c7045fef1740e6 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:16 2016 -0800 bpf: check for reserved flag bits in array and stack maps Suggested-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/arraymap.c | 2 +- kernel/bpf/stackmap.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 6c90598174322b8888029e40dd84a4eb01f56afe Author: Alexei Starovoitov Date: Mon Mar 7 21:57:15 2016 -0800 bpf: pre-allocate hash map elements If kprobe is placed on spin_unlock then calling kmalloc/kfree from bpf programs is not safe, since the following dead lock is possible: kfree->spin_lock(kmem_cache_node->lock)...spin_unlock->kprobe-> bpf_prog->map_update->kmalloc->spin_lock(of the same kmem_cache_node->lock) and deadlocks. The following solutions were considered and some implemented, but eventually discarded - kmem_cache_create for every map - add recursion check to slow-path of slub - use reserved memory in bpf_map_update for in_irq or in preempt_disabled - kmalloc via irq_work At the end pre-allocation of all map elements turned out to be the simplest solution and since the user is charged upfront for all the memory, such pre-allocation doesn't affect the user space visible behavior. Since it's impossible to tell whether kprobe is triggered in a safe location from kmalloc point of view, use pre-allocation by default and introduce new BPF_F_NO_PREALLOC flag. While testing of per-cpu hash maps it was discovered that alloc_percpu(GFP_ATOMIC) has odd corner cases and often fails to allocate memory even when 90% of it is free. The pre-allocation of per-cpu hash elements solves this problem as well. Turned out that bpf_map_update() quickly followed by bpf_map_lookup()+bpf_map_delete() is very common pattern used in many of iovisor/bcc/tools, so there is additional benefit of pre-allocation, since such use cases are must faster. Since all hash map elements are now pre-allocated we can remove atomic increment of htab->count and save few more cycles. Also add bpf_map_precharge_memlock() to check rlimit_memlock early to avoid large malloc/free done by users who don't have sufficient limits. Pre-allocation is done with vmalloc and alloc/free is done via percpu_freelist. Here are performance numbers for different pre-allocation algorithms that were implemented, but discarded in favor of percpu_freelist: 1 cpu: pcpu_ida 2.1M pcpu_ida nolock 2.3M bt 2.4M kmalloc 1.8M hlist+spinlock 2.3M pcpu_freelist 2.6M 4 cpu: pcpu_ida 1.5M pcpu_ida nolock 1.8M bt w/smp_align 1.7M bt no/smp_align 1.1M kmalloc 0.7M hlist+spinlock 0.2M pcpu_freelist 2.0M 8 cpu: pcpu_ida 0.7M bt w/smp_align 0.8M kmalloc 0.4M pcpu_freelist 1.5M 32 cpu: kmalloc 0.13M pcpu_freelist 0.49M pcpu_ida nolock is a modified percpu_ida algorithm without percpu_ida_cpu locks and without cross-cpu tag stealing. It's faster than existing percpu_ida, but not as fast as pcpu_freelist. bt is a variant of block/blk-mq-tag.c simlified and customized for bpf use case. bt w/smp_align is using cache line for every 'long' (similar to blk-mq-tag). bt no/smp_align allocates 'long' bitmasks continuously to save memory. It's comparable to percpu_ida and in some cases faster, but slower than percpu_freelist hlist+spinlock is the simplest free list with single spinlock. As expeceted it has very bad scaling in SMP. kmalloc is existing implementation which is still available via BPF_F_NO_PREALLOC flag. It's significantly slower in single cpu and in 8 cpu setup it's 3 times slower than pre-allocation with pcpu_freelist, but saves memory, so in cases where map->max_entries can be large and number of map update/delete per second is low, it may make sense to use it. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 2 + include/uapi/linux/bpf.h | 3 + kernel/bpf/hashtab.c | 240 +++++++++++++++++++++++++++++++++-------------- kernel/bpf/syscall.c | 15 ++- 4 files changed, 186 insertions(+), 74 deletions(-) commit e19494edab82f55a633911f25094581891bdc351 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:14 2016 -0800 bpf: introduce percpu_freelist Introduce simple percpu_freelist to keep single list of elements spread across per-cpu singly linked lists. /* push element into the list */ void pcpu_freelist_push(struct pcpu_freelist *, struct pcpu_freelist_node *); /* pop element from the list */ struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *); The object is pushed to the current cpu list. Pop first trying to get the object from the current cpu list, if it's empty goes to the neigbour cpu list. For bpf program usage pattern the collision rate is very low, since programs push and pop the objects typically on the same cpu. Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/Makefile | 2 +- kernel/bpf/percpu_freelist.c | 100 +++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/percpu_freelist.h | 31 ++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) commit b121d1e74d1f24654bdc3165d3db1ca149501356 Author: Alexei Starovoitov Date: Mon Mar 7 21:57:13 2016 -0800 bpf: prevent kprobe+bpf deadlocks if kprobe is placed within update or delete hash map helpers that hold bucket spin lock and triggered bpf program is trying to grab the spinlock for the same bucket on the same cpu, it will deadlock. Fix it by extending existing recursion prevention mechanism. Note, map_lookup and other tracing helpers don't have this problem, since they don't hold any locks and don't modify global data. bpf_trace_printk has its own recursive check and ok as well. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 3 +++ kernel/bpf/syscall.c | 13 +++++++++++++ kernel/trace/bpf_trace.c | 2 -- 3 files changed, 16 insertions(+), 2 deletions(-) commit 01cf9d524ff06703dbed37014f34dba9c1b2434d Author: Bharat Kumar Gogada Date: Thu Feb 11 21:58:11 2016 +0530 microblaze/PCI: Support generic Xilinx AXI PCIe Host Bridge IP driver Modify the Microblaze PCI subsystem to work with the generic drivers/pci/host/pcie-xilinx.c driver on Microblaze and Zynq. [bhelgaas: changelog] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek arch/microblaze/Kconfig | 3 +++ arch/microblaze/pci/pci-common.c | 56 +++++++--------------------------------- drivers/pci/host/Kconfig | 2 +- 3 files changed, 14 insertions(+), 47 deletions(-) commit e5d4b2006c97a99492d53638ee016e9f37ae43cb Author: Bharat Kumar Gogada Date: Thu Feb 11 21:58:10 2016 +0530 PCI: xilinx: Update Zynq binding with Microblaze node Update Zynq PCI binding documentation with Microblaze node. [bhelgaas: fix "microbalze_0_intc" typo] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Acked-by: Michal Simek .../devicetree/bindings/pci/xilinx-pcie.txt | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) commit bf82c350e940f5ee3508a94165a99eda81298d5f Author: Krzysztof Kozlowski Date: Fri Mar 4 10:03:59 2016 +0900 thermal: Fix build error of missing devm_ioremap_resource on UM The devres.o gets linked if HAS_IOMEM is present so on ARCH=um allyesconfig (COMPILE_TEST) failed on many files with: drivers/built-in.o: In function `kirkwood_thermal_probe': kirkwood_thermal.c:(.text+0x390a25): undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `exynos_tmu_probe': exynos_tmu.c:(.text+0x39246b): undefined reference to `devm_ioremap' The users of devm_ioremap_resource() which are compile-testable should depend on HAS_IOMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 8 ++++++++ drivers/thermal/samsung/Kconfig | 1 + 2 files changed, 9 insertions(+) commit 8aba8b83128a04197991518e241aafd3323b705d Merge: 02daec7 3dc94f9 Author: David S. Miller Date: Tue Mar 8 15:16:51 2016 -0500 Merge branch 'ipv6-per-netns-gc' Michal Kubecek says: ==================== ipv6: per netns FIB6 walkers and garbage collector Commit 2ac3ac8f86f2 ("ipv6: prevent fib6_run_gc() contention") reduced the risk of contention on FIB6 garbage collector lock on systems with many CPUs. However, one of our customers can still observe heavy contention on fib6_gc_lock which can even trigger the soft lockup detector. This is caused by garbage collector running in forced mode from a timer. While there is one timer per network namespace, the instances of fib6_run_gc() running from them are protected by one global spinlock so that only one garbage collector can run at any moment and other namespaces have to wait. As most relevant data structures are separated per netns, there is little reason for garbage collectors blocking each other. Similar problem exists for walkers: changes in one tree do not need to adjust (and block) walkers traversing FIB trees in other namespaces. This series separates both the walkers infrastructure and garbage collector so that they work independently in network namespaces. v2: get rid of ifdef in ipv6_route_seq_setup_walk(), pass net from callers instead ==================== Signed-off-by: David S. Miller commit 3dc94f93be161ec4203673de9a34b7362d8985b5 Author: Michal Kubeček Date: Tue Mar 8 14:44:45 2016 +0100 ipv6: per netns FIB garbage collection One of our customers observed issues with FIB6 garbage collectors running in different network namespaces blocking each other, resulting in soft lockups (fib6_run_gc() initiated from timer runs always in forced mode). Now that FIB6 walkers are separated per namespace, there is no more need for instances of fib6_run_gc() in different namespaces blocking each other. There is still a call to icmp6_dst_gc() which operates on shared data but this function is protected by its own shared lock. Signed-off-by: Michal Kubecek Reviewed-by: Cong Wang Signed-off-by: David S. Miller include/net/netns/ipv6.h | 1 + net/ipv6/ip6_fib.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9a03cd8f38efb83c13fbe62aff50eea4efff93da Author: Michal Kubeček Date: Tue Mar 8 14:44:35 2016 +0100 ipv6: per netns fib6 walkers The IPv6 FIB data structures are separated per network namespace but there is still only one global walkers list and one global walker list lock. This means changes in one namespace unnecessarily interfere with walkers in other namespaces. Replace the global list with per-netns lists (and give each its own lock). Signed-off-by: Michal Kubecek Reviewed-by: Cong Wang Signed-off-by: David S. Miller include/net/netns/ipv6.h | 2 ++ net/ipv6/ip6_fib.c | 68 +++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 32 deletions(-) commit 3570df914f9cae15df7f6ba472a51eaf798fdb46 Author: Michal Kubeček Date: Tue Mar 8 14:44:25 2016 +0100 ipv6: replace global gc_args with local variable Global variable gc_args is only used in fib6_run_gc() and functions called from it. As fib6_run_gc() makes sure there is at most one instance of fib6_clean_all() running at any moment, we can replace gc_args with a local variable which will be needed once multiple instances (per netns) of garbage collector are allowed. Signed-off-by: Michal Kubecek Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2c51391d2559a825a10e0abfbfb0e247d9c344b3 Author: Bharat Kumar Gogada Date: Thu Feb 11 21:58:09 2016 +0530 PCI: xilinx: Don't call pci_fixup_irqs() on Microblaze The Xilinx AXI PCIe Host Bridge Soft IP driver was previously only supported on ARM (in particular, on ARCH_ZYNC), and pci_fixup_irqs() is available there. But Microblaze will do IRQ fixup in pcibios_add_device(), so pci_fixup_irqs() is not available on Microblaze. Don't call pci_fixup_irqs() on Microblaze, so the driver can work on both Zynq and Microblaze Architectures. [bhelgaas: revise changelog to show similarity to bdb8a1844f31 ("PCI: iproc: Call pci_fixup_irqs() for ARM64 as well as ARM")] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 2 ++ 1 file changed, 2 insertions(+) commit 4c01f3b089a0bb843aadfb4d7617180b8b88b880 Author: Bharat Kumar Gogada Date: Thu Feb 11 21:58:08 2016 +0530 PCI: xilinx: Remove dependency on ARM-specific struct hw_pci The Xilinx PCIe host controller driver uses pci_common_init_dev(), which is ARM-specific and requires the ARM struct hw_pci. The part of pci_common_init_dev() that is needed is limited and can be done here without using hw_pci. Create and scan the root bus directly without using the ARM pci_common_init_dev() interface. [bhelgaas: revise changelog to show similarity to 79953dd22c1d ("PCI: rcar: Remove dependency on ARM-specific struct hw_pci")] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 82 +++++++++--------------------------------- 1 file changed, 16 insertions(+), 66 deletions(-) commit 133800d1f0288b9ddfc0d0aded10d9efa82d5b8c Author: Marcelo Ricardo Leitner Date: Tue Mar 8 10:34:28 2016 -0300 sctp: fix copying more bytes than expected in sctp_add_bind_addr Dmitry reported that sctp_add_bind_addr may read more bytes than expected in case the parameter is a IPv4 addr supplied by the user through calls such as sctp_bindx_add(), because it always copies sizeof(union sctp_addr) while the buffer may be just a struct sockaddr_in, which is smaller. This patch then fixes it by limiting the memcpy to the min between the union size and a (new parameter) provided addr size. Where possible this parameter still is the size of that union, except for reading from user-provided buffers, which then it accounts for protocol type. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/bind_addr.c | 14 ++++++++------ net/sctp/protocol.c | 1 + net/sctp/sm_make_chunk.c | 3 ++- net/sctp/socket.c | 4 +++- 5 files changed, 15 insertions(+), 9 deletions(-) commit 13369194256a95c5fd63472b0f5abcfd58a284c1 Author: Dan Carpenter Date: Wed Mar 2 13:00:55 2016 +0300 thermal: ti-soc-thermal: clean up the error handling a bit We don't need to initialize "ret". We can move the IS_ERR() checks into the if condition instead of doing an assignment first. Also there is a check for "ret" when we know it is zero so we can remove that. Signed-off-by: Dan Carpenter Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-bandgap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8255e4e2376189c497cb722fd6aea36b540f7125 Author: Simon Horman Date: Wed Mar 2 11:04:26 2016 +0900 thermal: rcar: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67bc3f4226c1d29ee820eff98fcaf8a9283938fe Author: Wolfram Sang Date: Tue Mar 1 17:38:31 2016 +0100 thermal: rcar_thermal: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Acked-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 02daec7c2274c03ac84f1cbe41204ad8f8e3ca6c Merge: f8b33d8 6316ea6 Author: David S. Miller Date: Tue Mar 8 14:51:44 2016 -0500 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. Updates to support autoneg for all supported speeds, add PF port statistics, and Advanced Error Reporting. v2: Fixed patch 3 to not use parentheses on function return. ==================== Signed-off-by: David S. Miller commit 6316ea6db93d875df333e7ab205bf1aa3b3616d7 Author: Satish Baddipadige Date: Mon Mar 7 15:38:48 2016 -0500 bnxt_en: Enable AER support. Add pci_error_handler callbacks to support for pcie advanced error recovery. Signed-off-by: Satish Baddipadige Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 109 ++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 8ddc9aaa725a9337fc7bbe95fe1d1499769fb9b2 Author: Michael Chan Date: Mon Mar 7 15:38:47 2016 -0500 bnxt_en: Include hardware port statistics in ethtool -S. Include the more useful port statistics in ethtool -S for the PF device. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 105 +++++++++++++++++++++- 1 file changed, 103 insertions(+), 2 deletions(-) commit 9947f83fb79ca501f5ab24c370211bfb78b6b364 Author: Michael Chan Date: Mon Mar 7 15:38:46 2016 -0500 bnxt_en: Include some hardware port statistics in ndo_get_stats64(). Include some of the port error counters (e.g. crc) in ->ndo_get_stats64() for the PF device. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3bdf56c47dfcd819ab1e73644c2eb9c72c08f29e Author: Michael Chan Date: Mon Mar 7 15:38:45 2016 -0500 bnxt_en: Add port statistics support. Gather periodic port statistics if the device is PF and link is up. This is triggered in bnxt_timer() every one second to request firmware to DMA the counters. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 50 +++++++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 11 ++++++- 2 files changed, 60 insertions(+), 1 deletion(-) commit f1a082a6f79fd5f06b27ef05a5ba7ec8d6e83b4c Author: Michael Chan Date: Mon Mar 7 15:38:44 2016 -0500 bnxt_en: Extend autoneg to all speeds. Allow all autoneg speeds aupported by firmware to be advertised. If the advertising parameter is 0, then all supported speeds will be advertised. Remove BNXT_ALL_COPPER_ETHTOOL_SPEED which is no longer used as all supported speeds can be advertised. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ---- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 14 ++++---------- 2 files changed, 4 insertions(+), 14 deletions(-) commit 4b32cacca28fe8b29bf266feff19b6fc2180402e Author: Michael Chan Date: Mon Mar 7 15:38:43 2016 -0500 bnxt_en: Use common function to get ethtool supported flags. The supported bits and advertising bits in ethtool have the same definitions. The same is true for the firmware bits. So use the common function to handle the conversion for both supported and advertising bits. v2: Don't use parentheses on function return. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 29 +++++++---------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 3277360eb29c6e482391975717d983060ecbd28d Author: Michael Chan Date: Mon Mar 7 15:38:42 2016 -0500 bnxt_en: Add reporting of link partner advertisement. And report actual pause settings to ETHTOOL_GPAUSEPARAM to let ethtool resolve the actual pause settings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 20 ++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit 27c4d578600c401c119c012a90920805fab05cc9 Author: Michael Chan Date: Mon Mar 7 15:38:41 2016 -0500 bnxt_en: Refactor bnxt_fw_to_ethtool_advertised_spds(). Include the conversion of pause bits and add one extra call layer so that the same refactored function can be reused to get the link partner advertisement bits. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 33 ++++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 0259882e342e5626d204a5c87d0c3fbbad4d7736 Author: Bharat Kumar Gogada Date: Thu Feb 11 21:58:07 2016 +0530 PCI: xilinx: Use of_pci_get_host_bridge_resources() to parse DT Use the new of_pci_get_host_bridge_resources() API in place of the PCI OF DT parser. [bhelgaas: revise changelog to show similarity to 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT")] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Ravi Kiran Gummaluri Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 107 ++--------------------------------------- 1 file changed, 5 insertions(+), 102 deletions(-) commit d8aacd87180141ff6b812b53de77a4336e87c91a Author: Jozsef Kadlecsik Date: Tue Mar 8 20:29:10 2016 +0100 netfilter: ipset: Check IPSET_ATTR_ETHER netlink attribute length Julia Lawall pointed out that IPSET_ATTR_ETHER netlink attribute length was not checked explicitly, just for the maximum possible size. Malicious netlink clients could send shorter attribute and thus resulting a kernel read after the buffer. The patch adds the explicit length checkings. Reported-by: Julia Lawall Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 ++ net/netfilter/ipset/ip_set_hash_mac.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit f8b33d8e870758ccff13e5f81fd5050b52a42d35 Author: Kyeong Yoo Date: Mon Mar 7 17:07:57 2016 +1300 net_sched: dsmark: use qdisc_dequeue_peeked() This fix is for dsmark similar to commit 3557619f0f6f7496ed453d4825e249 ("net_sched: prio: use qdisc_dequeue_peeked") and makes use of qdisc_dequeue_peeked() instead of direct dequeue() call. First time, wrr peeks dsmark, which will then peek into sfq. sfq dequeues an skb and it's stored in sch->gso_skb. Next time, wrr tries to dequeue from dsmark, which will call sfq dequeue directly. This results skipping the previously peeked skb. So changed dsmark dequeue to call qdisc_dequeue_peeked() instead to use peeked skb if exists. Signed-off-by: Kyeong Yoo Signed-off-by: David S. Miller net/sched/sch_dsmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 527860fe4684bf69281d7479c5034243dd6c36c4 Author: Luis de Bethencourt Date: Wed Oct 14 19:43:29 2015 +0100 thermal: db8500_cpufreq_cooling: Compile with COMPILE_TEST This driver only has runtime but no build time dependencies, so it can be built for testing purposes if the Kconfig COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that drivers are not affected by changes that could cause build regressions. Signed-off-by: Luis de Bethencourt Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c38cd61aef20fce34c669caa901634ca5f88bf8 Merge: d24ad3f 8a6bf5d Author: David S. Miller Date: Tue Mar 8 14:25:20 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter updates for your net-next tree, they are: 1) Remove useless debug message when deleting IPVS service, from Yannick Brosseau. 2) Get rid of compilation warning when CONFIG_PROC_FS is unset in several spots of the IPVS code, from Arnd Bergmann. 3) Add prandom_u32 support to nft_meta, from Florian Westphal. 4) Remove unused variable in xt_osf, from Sudip Mukherjee. 5) Don't calculate IP checksum twice from netfilter ipv4 defrag hook since fixing af_packet defragmentation issues, from Joe Stringer. 6) On-demand hook registration for iptables from netns. Instead of registering the hooks for every available netns whenever we need one of the support tables, we register this on the specific netns that needs it, patchset from Florian Westphal. 7) Add missing port range selection to nf_tables masquerading support. BTW, just for the record, there is a typo in the description of 5f6c253ebe93b0 ("netfilter: bridge: register hooks only when bridge interface is added") that refers to the cluster match as deprecated, but it is actually the CLUSTERIP target (which registers hooks inconditionally) the one that is scheduled for removal. ==================== Signed-off-by: David S. Miller commit d24ad3fc0e454b4354acc10149ecceda445d6a75 Merge: 810813c 1400615 Author: David S. Miller Date: Tue Mar 8 13:58:52 2016 -0500 Merge branch 'bpf-next' Daniel Borkmann says: ==================== BPF updates Couple of misc updates to BPF, besides others this series adds bpf_csum_diff() to be used with L3 csums, allows for managing tunnel options for collect meta data mode, and enabling ipv6 traffic class for collect meta data in vxlan specifically (geneve already supports it). For more details, please see individual patches. The series requires net to be merged into net-next first to avoid any further pending merge conflicts. ==================== Signed-off-by: David S. Miller commit 1400615d64cf5afee533aff8234c837da465841b Author: Daniel Borkmann Date: Fri Mar 4 15:15:08 2016 +0100 vxlan: allow setting ipv6 traffic class We can already do that for IPv4, but IPv6 support was missing. Add it for vxlan, so it can be used with collect metadata frontends. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/vxlan.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit db3c6139e6ead91b42e7c2ad044ed8beaee884e6 Author: Daniel Borkmann Date: Fri Mar 4 15:15:07 2016 +0100 bpf, vxlan, geneve, gre: fix usage of dst_cache on xmit The assumptions from commit 0c1d70af924b ("net: use dst_cache for vxlan device"), 468dfffcd762 ("geneve: add dst caching support") and 3c1cb4d2604c ("net/ipv4: add dst cache support for gre lwtunnels") on dst_cache usage when ip_tunnel_info is used is unfortunately not always valid as assumed. While it seems correct for ip_tunnel_info front-ends such as OVS, eBPF however can fill in ip_tunnel_info for consumers like vxlan, geneve or gre with different remote dsts, tos, etc, therefore they cannot be assumed as packet independent. Right now vxlan, geneve, gre would cache the dst for eBPF and every packet would reuse the same entry that was first created on the initial route lookup. eBPF doesn't store/cache the ip_tunnel_info, so each skb may have a different one. Fix it by adding a flag that checks the ip_tunnel_info. Also the !tos test in vxlan needs to be handeled differently in this context as it is currently inferred from ip_tunnel_info as well if present. ip_tunnel_dst_cache_usable() helper is added for the three tunnel cases, which checks if we can use dst cache. Fixes: 0c1d70af924b ("net: use dst_cache for vxlan device") Fixes: 468dfffcd762 ("geneve: add dst caching support") Fixes: 3c1cb4d2604c ("net/ipv4: add dst cache support for gre lwtunnels") Signed-off-by: Daniel Borkmann Acked-by: Paolo Abeni Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/geneve.c | 6 ++---- drivers/net/vxlan.c | 24 ++++++++++++------------ include/net/ip_tunnels.h | 15 +++++++++++++++ net/core/filter.c | 2 +- net/ipv4/ip_gre.c | 10 ++++++---- 5 files changed, 36 insertions(+), 21 deletions(-) commit 14ca0751c96f8d3d0f52e8ed3b3236f8b34d3460 Author: Daniel Borkmann Date: Fri Mar 4 15:15:06 2016 +0100 bpf: support for access to tunnel options After eBPF being able to programmatically access/manage tunnel key meta data via commit d3aa45ce6b94 ("bpf: add helpers to access tunnel metadata") and more recently also for IPv6 through c6c33454072f ("bpf: support ipv6 for bpf_skb_{set,get}_tunnel_key"), this work adds two complementary helpers to generically access their auxiliary tunnel options. Geneve and vxlan support this facility. For geneve, TLVs can be pushed, and for the vxlan case its GBP extension. I.e. setting tunnel key for geneve case only makes sense, if we can also read/write TLVs into it. In the GBP case, it provides the flexibility to easily map the group policy ID in combination with other helpers or maps. I chose to model this as two separate helpers, bpf_skb_{set,get}_tunnel_opt(), for a couple of reasons. bpf_skb_{set,get}_tunnel_key() is already rather complex by itself, and there may be cases for tunnel key backends where tunnel options are not always needed. If we would have integrated this into bpf_skb_{set,get}_tunnel_key() nevertheless, we are very limited with remaining helper arguments, so keeping compatibility on structs in case of passing in a flat buffer gets more cumbersome. Separating both also allows for more flexibility and future extensibility, f.e. options could be fed directly from a map, etc. Moreover, change geneve's xmit path to test only for info->options_len instead of TUNNEL_GENEVE_OPT flag. This makes it more consistent with vxlan's xmit path and allows for avoiding to specify a protocol flag in the API on xmit, so it can be protocol agnostic. Having info->options_len is enough information that is needed. Tested with vxlan and geneve. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller drivers/net/geneve.c | 4 +-- include/uapi/linux/bpf.h | 11 +++++++ net/core/filter.c | 83 ++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 90 insertions(+), 8 deletions(-) commit 2208087061c4ad88de188911367effc550144836 Author: Daniel Borkmann Date: Fri Mar 4 15:15:05 2016 +0100 bpf: allow to propagate df in bpf_skb_set_tunnel_key Added by 9a628224a61b ("ip_tunnel: Add dont fragment flag."), allow to feed df flag into tunneling facilities (currently supported on TX by vxlan, geneve and gre) as a hint from eBPF's bpf_skb_set_tunnel_key() helper. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 577c50aade0f34926e4a47f61629739e6da91af6 Author: Daniel Borkmann Date: Fri Mar 4 15:15:04 2016 +0100 bpf: make helper function protos static They are only used here, so there's no reason they should not be static. Only the vlan push/pop protos are used in the test_bpf suite. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8afd54c87ad7089734ef0527937a256586ba828a Author: Daniel Borkmann Date: Fri Mar 4 15:15:03 2016 +0100 bpf: add flags to bpf_skb_store_bytes for clearing hash When overwriting parts of the packet with bpf_skb_store_bytes() that were fed previously into skb->hash calculation, we should clear the current hash with skb_clear_hash(), so that a next skb_get_hash() call can determine the correct hash related to this skb. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 1 + net/core/filter.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 8050c0f0274a15841756968857cfb07b3ab809ae Author: Daniel Borkmann Date: Fri Mar 4 15:15:02 2016 +0100 bpf: allow bpf_csum_diff to feed bpf_l3_csum_replace as well Commit 7d672345ed29 ("bpf: add generic bpf_csum_diff helper") added a generic checksum diff helper that can feed bpf_l4_csum_replace() with a target __wsum diff that is to be applied to the L4 checksum. This facility is very flexible, can be cascaded, allows for adding, removing, or diffing data, or for calculating the pseudo header checksum from scratch, but it can also be reused for working with the IPv4 header checksum. Thus, analogous to bpf_l4_csum_replace(), add a case for header field value of 0 to change the checksum at a given offset through a new helper csum_replace_by_diff(). Also, in addition to that, this provides an easy to use interface for feeding precalculated diffs f.e. coming from a map. It nicely complements bpf_l3_csum_replace() that currently allows only for csum updates of 2 and 4 byte diffs. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/checksum.h | 5 +++++ net/core/filter.c | 6 ++++++ 2 files changed, 11 insertions(+) commit fa6e3ca274429b66e12d06abc5a6c013cef66471 Author: Stefan Agner Date: Tue Mar 8 10:35:24 2016 -0800 Input: ad7879 - add device tree support Add device tree support for the I2C and SPI variant of AD7879(-1). This allows to specify the touchscreen controller as a I2C client node or SPI slave device. Most of the options available in platform data are also available as device tree properties, the only exception being GPIO capabilities, which can not be activated through device tree currently. Signed-off-by: Stefan Agner Acked-by: Rob Herring Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/ad7879.txt | 53 ++++++++ drivers/input/touchscreen/ad7879-i2c.c | 10 ++ drivers/input/touchscreen/ad7879-spi.c | 10 ++ drivers/input/touchscreen/ad7879.c | 148 +++++++++++++-------- 4 files changed, 163 insertions(+), 58 deletions(-) commit 5f2940c4a544ae9040d0feff6da06a994cc201ff Author: Stefan Agner Date: Tue Mar 8 10:34:38 2016 -0800 Input: ad7879 - fix default x/y axis assignment The X/Y position measurements read from the controller are interpreted wrong. The first measurement X+ contains the Y position, and the second measurement Y+ the X position (see also Table 11 Register Table in the data sheet). The problem is already known and a swap option has been introduced: commit 6680884a4420 ("Input: ad7879 - add option to correct xy axis") However, the meaning of the new boolean is inverted since the underlying values are already swapped. Let ts->swap_xy set to true actually be the swapped configuration of the two axis. Signed-off-by: Stefan Agner Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4774f400935fbb44a25f5e8fd5c5583431e28ac1 Author: Stefan Agner Date: Tue Mar 8 10:34:04 2016 -0800 Input: ad7879 - move header to platform_data directory The header file is used by the SPI and I2C variant of the driver. Therefore, move it to a more generic place under platform_data. Signed-off-by: Stefan Agner Signed-off-by: Dmitry Torokhov arch/blackfin/mach-bf527/boards/ezbrd.c | 2 +- arch/blackfin/mach-bf527/boards/ezkit.c | 2 +- arch/blackfin/mach-bf527/boards/tll6527m.c | 2 +- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- arch/blackfin/mach-bf538/boards/ezkit.c | 2 +- drivers/input/touchscreen/ad7879.c | 10 ++++---- include/linux/platform_data/ad7879.h | 41 ++++++++++++++++++++++++++++++ include/linux/spi/ad7879.h | 41 ------------------------------ 8 files changed, 51 insertions(+), 51 deletions(-) commit 0c0e0736acad4e76e718456c75d78ad95eea0011 Author: Bjorn Helgaas Date: Tue Mar 1 11:38:46 2016 -0600 PCI: Set ROM shadow location in arch code, not in PCI core IORESOURCE_ROM_SHADOW means there is a copy of a device's option ROM in RAM. The existence of such a copy and its location are arch-specific. Previously the IORESOURCE_ROM_SHADOW flag was set in arch code, but the 0xC0000-0xDFFFF location was hard-coded into the PCI core. If we're using a shadow copy in RAM, disable the ROM BAR and release the address space it was consuming. Move the location information from the PCI core to the arch code that sets IORESOURCE_ROM_SHADOW. Save the location of the RAM copy in the struct resource for PCI_ROM_RESOURCE. After this change, pci_map_rom() will call pci_assign_resource() and pci_enable_rom() for these IORESOURCE_ROM_SHADOW resources, which we did not do before. This is safe because: - pci_assign_resource() will do nothing because the resource is marked IORESOURCE_PCI_FIXED, which means we can't move it, and - pci_enable_rom() will not turn on the ROM BAR's enable bit because the resource is marked IORESOURCE_ROM_SHADOW, which means it is in RAM rather than in PCI memory space. Storing the location in the struct resource means "lspci" will show the shadow location, not the value from the ROM BAR. Signed-off-by: Bjorn Helgaas arch/ia64/pci/fixup.c | 22 ++++++++++++++++------ arch/x86/pci/fixup.c | 22 ++++++++++++++++------ drivers/pci/rom.c | 11 ----------- include/linux/ioport.h | 2 +- 4 files changed, 33 insertions(+), 24 deletions(-) commit 4708f9a55b31062dd19b12788ecf614aa4e79bea Author: Bjorn Helgaas Date: Thu Mar 3 08:53:47 2016 -0600 PCI: Don't enable/disable ROM BAR if we're using a RAM shadow copy If we're using a RAM shadow copy instead of the ROM BAR, we don't need to touch the ROM BAR enable bit. Signed-off-by: Bjorn Helgaas drivers/pci/rom.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 2ea4adf75235c14c5a52a90eb3c282383f79a86b Author: Bjorn Helgaas Date: Tue Mar 1 10:58:04 2016 -0600 PCI: Don't assign or reassign immutable resources IORESOURCE_PCI_FIXED means the resource can't be moved, so if it's set, don't bother trying to assign or reassign the resource. Signed-off-by: Bjorn Helgaas drivers/pci/setup-res.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 63e22924f5dc08badf9870c4a52ef4e7f7cbf218 Author: Bjorn Helgaas Date: Tue Mar 1 11:32:29 2016 -0600 PCI: Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED A shadow copy of an option ROM is placed by the BIOS as a fixed address. Set IORESOURCE_PCI_FIXED to indicate that we can't move the shadow copy. This prevents warnings like the following when we assign resources: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment This warning is emitted by pdev_sort_resources(), which already ignores IORESOURCE_PCI_FIXED resources. Link: http://lkml.kernel.org/r/CA+55aFyVMfTBB0oz_yx8+eQOEJnzGtCsYSj9QuhEpdZ9BHdq5A@mail.gmail.com Signed-off-by: Bjorn Helgaas arch/ia64/pci/fixup.c | 3 ++- arch/x86/pci/fixup.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b894157145e4ac7598d7062bc93320898a5e059e Author: Bjorn Helgaas Date: Fri Feb 26 09:15:11 2016 -0600 x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs The Home Agent and PCU PCI devices in Broadwell-EP have a non-BAR register where a BAR should be. We don't know what the side effects of sizing the "BAR" would be, and we don't know what address space the "BAR" might appear to describe. Mark these devices as having non-compliant BARs so the PCI core doesn't touch them. Signed-off-by: Bjorn Helgaas Tested-by: Andi Kleen CC: stable@vger.kernel.org arch/x86/pci/fixup.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9289b9d3aaf63171729bc06671d93d3164b3f0c5 Author: Bjorn Helgaas Date: Mon Mar 7 10:53:16 2016 -0600 unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition HAVE_ARCH_PCI_SET_DMA_MASK is unused, so remove the #define for it. Signed-off-by: Bjorn Helgaas Acked-by: GUAN Xuetao arch/unicore32/include/mach/hardware.h | 5 ----- 1 file changed, 5 deletions(-) commit 810813c47a564416f6306ae214e2661366c987a7 Merge: d66ab51 e2857b8 Author: David S. Miller Date: Tue Mar 8 12:34:12 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Several cases of overlapping changes, as well as one instance (vxlan) of a bug fix in 'net' overlapping with code movement in 'net-next'. Signed-off-by: David S. Miller commit 92b0729c34cab1f46d89aace3e66015f0bb4a682 Author: Tony Luck Date: Thu Feb 18 11:47:26 2016 -0800 x86/mm, x86/mce: Add memcpy_mcsafe() Make use of the EXTABLE_FAULT exception table entries to write a kernel copy routine that doesn't crash the system if it encounters a machine check. Prime use case for this is to copy from large arrays of non-volatile memory used as storage. We have to use an unrolled copy loop for now because current hardware implementations treat a machine check in "rep mov" as fatal. When that is fixed we can simplify. Return type is a "bool". True means that we copied OK, false means that it didn't. Signed-off-by: Tony Luck Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/a44e1055efc2d2a9473307b22c91caa437aa3f8b.1456439214.git.tony.luck@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/string_64.h | 13 +++++ arch/x86/kernel/x8664_ksyms_64.c | 2 + arch/x86/lib/memcpy_64.S | 117 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+) commit f6d635ad341d5cc0b9c7ab46adfbf3bf5886cee4 Author: Tejun Heo Date: Tue Mar 8 11:51:26 2016 -0500 cgroup: implement cgroup_subsys->implicit_on_dfl Some controllers, perf_event for now and possibly freezer in the future, don't really make sense to control explicitly through "cgroup.subtree_control". For example, the primary role of perf_event is identifying the cgroups of tasks; however, because the controller also keeps a small amount of state per cgroup, it can't be replaced with simple cgroup membership tests. This patch implements cgroup_subsys->implicit_on_dfl flag. When set, the controller is implicitly enabled on all cgroups on the v2 hierarchy so that utility type controllers such as perf_event can be enabled and function transparently. An implicit controller doesn't show up in "cgroup.controllers" or "cgroup.subtree_control", is exempt from no internal process rule and can be stolen from the default hierarchy even if there are non-root csses. v2: Reimplemented on top of the recent updates to css handling and subsystem rebinding. Rebinding implicit subsystems is now a simple matter of exempting it from the busy subsystem check. Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 13 +++++++++++++ kernel/cgroup.c | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) commit e4857982f49d21c05a84351b56724bf353022355 Author: Tejun Heo Date: Tue Mar 8 11:51:26 2016 -0500 cgroup: use css_set->mg_dst_cgrp for the migration target cgroup Migration can be multi-target on the default hierarchy when a controller is enabled - processes belonging to each child cgroup have to be moved to the child cgroup itself to refresh css association. This isn't a problem for cgroup_migrate_add_src() as each source css_set still maps to single source and target cgroups; however, cgroup_migrate_prepare_dst() is called once after all source css_sets are added and thus might not have a single destination cgroup. This is currently worked around by specifying NULL for @dst_cgrp and using the source's default cgroup as destination as the only multi-target migration in use is self-targetting. While this works, it's subtle and clunky. As all taget cgroups are already specified while preparing the source css_sets, this clunkiness can easily be removed by recording the target cgroup in each source css_set. This patch adds css_set->mg_dst_cgrp which is recorded on cgroup_migrate_src() and used by cgroup_migrate_prepare_dst(). This also makes migration code ready for arbitrary multi-target migration. Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 9 +++++---- kernel/cgroup.c | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) commit 37ff9f8f474216d0cfca7565a4e0caa521ee6e7e Author: Tejun Heo Date: Tue Mar 8 11:51:26 2016 -0500 cgroup: make cgroup[_taskset]_migrate() take cgroup_root instead of cgroup On the default hierarchy, a migration can be multi-source and/or multi-destination. cgroup_taskest_migrate() used to incorrectly assume single destination cgroup but the bug has been fixed by 1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from subtree_control enabling"). Since the commit, @dst_cgrp to cgroup[_taskset]_migrate() is only used to determine which subsystems are affected or which cgroup_root the migration is taking place in. As such, @dst_cgrp is misleading. This patch replaces @dst_cgrp with @root. Signed-off-by: Tejun Heo kernel/cgroup.c | 70 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 6c694c88255b2052d9922d62df6df7c9e152eeeb Author: Tejun Heo Date: Tue Mar 8 11:51:25 2016 -0500 cgroup: move migration destination verification out of cgroup_migrate_prepare_dst() cgroup_migrate_prepare_dst() verifies whether the destination cgroup is allowable; however, the test doesn't really belong there. It's too deep and common in the stack and as a result the test itself is gated by another test. Separate the test out into cgroup_may_migrate_to() and update cgroup_attach_task() and cgroup_transfer_tasks() to perform the test directly. This doesn't cause any behavior differences. Signed-off-by: Tejun Heo kernel/cgroup.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 58cdb1ceb15aab7b34719ad225ff023775d774e7 Author: Tejun Heo Date: Tue Mar 8 11:51:25 2016 -0500 cgroup: fix incorrect destination cgroup in cgroup_update_dfl_csses() cgroup_update_dfl_csses() should move each task in the subtree to self; however, it was incorrectly calling cgroup_migrate_add_src() with the root of the subtree as @dst_cgrp. Fortunately, cgroup_migrate_add_src() currently uses @dst_cgrp only to determine the hierarchy and the bug doesn't cause any actual breakages. Fix it. Signed-off-by: Tejun Heo kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a8698058ae493ae53b1a8a2fa23d2e37000d73e Author: Borislav Petkov Date: Tue Mar 8 17:40:41 2016 +0100 perf/x86/intel/rapl: Simplify quirk handling even more Drop the quirk() function pointer in favor of a simple boolean which says whether the quirk should be applied or not. Update comment while at it. Signed-off-by: Borislav Petkov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Harish Chegondi Cc: Jacob Pan Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: linux-tip-commits@vger.kernel.org Link: http://lkml.kernel.org/r/20160308164041.GF16568@pd.tnic Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 1cf8067b541884366b7db3a328342073fed2f38f Author: Chunyu Hu Date: Tue Mar 8 21:37:02 2016 +0800 tracing: Fix typoes in code comment and printk in trace_nop.c echo nop > /sys/kernel/debug/tracing/options/current_tracer echo 1 > /sys/kernel/debug/tracing/options/test_nop_accept echo 0 > /sys/kernel/debug/tracing/options/test_nop_accept echo 1 > /sys/kernel/debug/tracing/options/test_nop_refuse Before the fix, the dmesg is a bit ugly since a align issue. [ 191.973081] nop_test_accept flag set to 1: we accept. Now cat trace_options to see the result [ 195.156942] nop_test_refuse flag set to 1: we refuse.Now cat trace_options to see the result After the fix, the dmesg will show aligned log for nop_test_refuse and nop_test_accept. [ 2718.032413] nop_test_refuse flag set to 1: we refuse. Now cat trace_options to see the result [ 2734.253360] nop_test_accept flag set to 1: we accept. Now cat trace_options to see the result Link: http://lkml.kernel.org/r/1457444222-8654-2-git-send-email-chuhu@redhat.com Signed-off-by: Chunyu Hu Signed-off-by: Steven Rostedt kernel/trace/trace_nop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a664edb374c704a734a0df41fc742c285a5beb52 Author: Yang Shi Date: Thu Mar 3 01:08:57 2016 -0800 tracing, writeback: Replace cgroup path to cgroup ino commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made writeback tracepoints print out cgroup path when CGROUP_WRITEBACK is enabled, but it may trigger the below bug on -rt kernel since kernfs_path and kernfs_path_len are called by tracepoints, which acquire spin lock that is sleepable on -rt kernel. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:930 in_atomic(): 1, irqs_disabled(): 0, pid: 625, name: kworker/u16:3 INFO: lockdep is turned off. Preemption disabled at:[] wb_writeback+0xec/0x830 CPU: 7 PID: 625 Comm: kworker/u16:3 Not tainted 4.4.1-rt5 #20 Hardware name: Freescale Layerscape 2085a RDB Board (DT) Workqueue: writeback wb_workfn (flush-7:0) Call trace: [] dump_backtrace+0x0/0x200 [] show_stack+0x24/0x30 [] dump_stack+0x88/0xa8 [] ___might_sleep+0x2ec/0x300 [] rt_spin_lock+0x38/0xb8 [] kernfs_path_len+0x30/0x90 [] trace_event_raw_event_writeback_work_class+0xe8/0x2e8 [] wb_writeback+0x620/0x830 [] wb_workfn+0x61c/0x950 [] process_one_work+0x3ac/0xb30 [] worker_thread+0x9c/0x7a8 [] kthread+0x190/0x1b0 [] ret_from_fork+0x10/0x30 With unlocked kernfs_* functions, synchronize_sched() has to be called in kernfs_rename which could be called in syscall path, but it is problematic. So, print out cgroup ino instead of path name, which could be converted to path name by userland. Withouth CGROUP_WRITEBACK enabled, it just prints out root dir. But, root dir ino vary from different filesystems, so printing out -1U to indicate an invalid cgroup ino. Link: http://lkml.kernel.org/r/1456996137-8354-1-git-send-email-yang.shi@linaro.org Acked-by: Tejun Heo Signed-off-by: Yang Shi Signed-off-by: Steven Rostedt include/trace/events/writeback.h | 121 +++++++++++++++------------------------ 1 file changed, 45 insertions(+), 76 deletions(-) commit 353206f5ca05eb65704b2b3ec9a331b4fdfd3257 Author: Steven Rostedt (Red Hat) Date: Mon Feb 22 15:55:09 2016 -0500 tracing: Use flags instead of bool in trigger structure gcc isn't known for handling bool in structures. Instead of using bool, use an integer mask and use bit flags instead. Signed-off-by: Steven Rostedt kernel/trace/trace.h | 71 +++++++++++++++++++++++-------------- kernel/trace/trace_events_trigger.c | 8 ++--- 2 files changed, 49 insertions(+), 30 deletions(-) commit a88e1cfb1d3081ffb34864d9cf8a5c289630f48e Author: Tom Zanussi Date: Thu Dec 10 12:50:49 2015 -0600 tracing: Add an unreg_all() callback to trigger commands Add a new unreg_all() callback that can be used to remove all command-specific triggers from an event and arrange to have it called whenever a trigger file is opened with O_TRUNC set. Commands that don't want truncate semantics, or existing commands that don't implement this function simply do nothing and their triggers remain intact. Link: http://lkml.kernel.org/r/2b7d62854d01f28c19185e1bbb8f826f385edfba.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 9 +++++++-- kernel/trace/trace_events_trigger.c | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) commit a5863dae84e2da83a1e5de485a7f150d0c28f08e Author: Tom Zanussi Date: Thu Dec 10 12:50:48 2015 -0600 tracing: Add needs_rec flag to event triggers Add a new needs_rec flag for triggers that require unconditional access to trace records in order to function. Normally a trigger requires access to the contents of a trace record only if it has a filter associated with it (since filters need the contents of a record in order to make a filtering decision). Some types of triggers, such as 'hist' triggers, require access to trace record contents independent of the presence of filters, so add a new flag for those triggers. Link: http://lkml.kernel.org/r/7be8fa38f9b90fdb6c47ca0f98d20a07b9fd512b.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 7 +++++++ kernel/trace/trace_events_trigger.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 104f281044a9c2ac86b851bbebbf74500172b625 Author: Tom Zanussi Date: Thu Dec 10 12:50:47 2015 -0600 tracing: Add a per-event-trigger 'paused' field Add a simple per-trigger 'paused' flag, allowing individual triggers to pause. We could leave it to individual triggers that need this functionality to do it themselves, but we also want to allow other events to control pausing, so add it to the trigger data. Link: http://lkml.kernel.org/r/fed37e4879684d7dcc57fe00ce0cbf170032b06d.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 1 + kernel/trace/trace_events_trigger.c | 4 ++++ 2 files changed, 5 insertions(+) commit dbfeaa7abae4f105afdf8ed4f85b5879cff136ea Author: Tom Zanussi Date: Thu Dec 10 12:50:46 2015 -0600 tracing: Add get_syscall_name() Add a utility function to grab the syscall name from the syscall metadata, given a syscall id. Link: http://lkml.kernel.org/r/be26a8dfe3f15e16a837799f1c1e2b4d62742843.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 5 +++++ kernel/trace/trace_syscalls.c | 11 +++++++++++ 2 files changed, 16 insertions(+) commit c4a5923055c9e0c87dfc0387f7cda5ee2bbac3c1 Author: Tom Zanussi Date: Thu Dec 10 12:50:45 2015 -0600 tracing: Add event record param to trigger_ops.func() Some triggers may need access to the trace event, so pass it in. Also fix up the existing trigger funcs and their callers. Link: http://lkml.kernel.org/r/543e31e9fc445ef61077421ab219033401c39846.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt include/linux/trace_events.h | 7 ++++--- kernel/trace/trace.h | 6 ++++-- kernel/trace/trace_events_trigger.c | 36 +++++++++++++++++++----------------- 3 files changed, 27 insertions(+), 22 deletions(-) commit ab4bf008928e8fc73fe1cbaa9249792d36845345 Author: Tom Zanussi Date: Thu Dec 10 12:50:44 2015 -0600 tracing: Make event trigger functions available Make various event trigger utility functions available outside of trace_events_trigger.c so that new triggers can be defined outside of that file. Link: http://lkml.kernel.org/r/4a40c1695dd43cac6cd475d72e13ffe30ba84bff.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 14 ++++++++++++++ kernel/trace/trace_events_trigger.c | 28 +++++++++++++--------------- 2 files changed, 27 insertions(+), 15 deletions(-) commit 4ef56902fba4d9949918c6266e67ba7d05fba7a4 Author: Tom Zanussi Date: Thu Dec 10 12:50:43 2015 -0600 tracing: Make ftrace_event_field checking functions available Make is_string_field() and is_function_field() accessible outside of trace_event_filters.c for other users of ftrace_event_fields. Link: http://lkml.kernel.org/r/2d3f00d3311702e556e82eed7754bae6f017939f.1449767187.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Reviewed-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Reviewed-by: Namhyung Kim Signed-off-by: Steven Rostedt kernel/trace/trace.h | 12 ++++++++++++ kernel/trace/trace_events_filter.c | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 633f6f58af445022e38417599a4789b5fc510b71 Author: Steven Rostedt (Red Hat) Date: Fri Feb 19 13:59:54 2016 -0500 tracing: Remove duplicate checks for online CPUs Some trace events have conditions that check if the current CPU is online or not before recording the tracepoint. That's because certain trace events are in locations that can be called as the CPU is going offline and when RCU no longer monitors it (like kfree and friends). The check was added because trace events require RCU to be active. This is a trace event infrastructure issue and not something that individual trace events should worry about. The tracepoint.h code now has added a check to see if the current CPU is considered online, and it only does the tracepoint if it is. There's no more need for individual trace events to also include this check. It is now redundant. Cc: Shreyas B. Prabhu Signed-off-by: Steven Rostedt include/trace/events/kmem.h | 42 ++++-------------------------------------- include/trace/events/tlb.h | 4 +--- 2 files changed, 5 insertions(+), 41 deletions(-) commit f8b11260a445169989d01df75d35af0f56178f95 Author: Eric Wheeler Date: Mon Mar 7 15:17:50 2016 -0800 bcache: fix cache_set_flush() NULL pointer dereference on OOM When bch_cache_set_alloc() fails to kzalloc the cache_set, the asyncronous closure handling tries to dereference a cache_set that hadn't yet been allocated inside of cache_set_flush() which is called by __cache_set_unregister() during cleanup. This appears to happen only during an OOM condition on bcache_register. Signed-off-by: Eric Wheeler Cc: stable@vger.kernel.org drivers/md/bcache/super.c | 3 +++ 1 file changed, 3 insertions(+) commit d39cdd2036a63eef17a14efbd969405ca5612886 Author: Chunyu Hu Date: Tue Mar 8 21:37:01 2016 +0800 tracing: Make tracer_flags use the right set_flag callback When I was updating the ftrace_stress test of ltp. I encountered a strange phenomemon, excute following steps: echo nop > /sys/kernel/debug/tracing/current_tracer echo 0 > /sys/kernel/debug/tracing/options/funcgraph-cpu bash: echo: write error: Invalid argument check dmesg: [ 1024.903855] nop_test_refuse flag set to 0: we refuse.Now cat trace_options to see the result The reason is that the trace option test will randomly setup trace option under tracing/options no matter what the current_tracer is. but the set_tracer_option is always using the set_flag callback from the current_tracer. This patch adds a pointer to tracer_flags and make it point to the tracer it belongs to. When the option is setup, the set_flag of the right tracer will be used no matter what the the current_tracer is. And the old dummy_tracer_flags is used for all the tracers which doesn't have a tracer_flags, having issue to use it to save the pointer of a tracer. So remove it and use dynamic dummy tracer_flags for tracers needing a dummy tracer_flags, as a result, there are no tracers sharing tracer_flags, so remove the check code. And save the current tracer to trace_option_dentry seems not good as it may waste mem space when mount the debug/trace fs more than one time. Link: http://lkml.kernel.org/r/1457444222-8654-1-git-send-email-chuhu@redhat.com Signed-off-by: Chunyu Hu [ Fixed up function tracer options to work with the change ] Signed-off-by: Steven Rostedt kernel/trace/trace.c | 28 ++++++++++++++-------------- kernel/trace/trace.h | 1 + kernel/trace/trace_functions.c | 6 ++++++ 3 files changed, 21 insertions(+), 14 deletions(-) commit 9b299728ed777428b3908ac72ace5f8f84b97789 Author: Eric Wheeler Date: Fri Feb 26 14:33:56 2016 -0800 bcache: cleaned up error handling around register_cache() Fix null pointer dereference by changing register_cache() to return an int instead of being void. This allows it to return -ENOMEM or -ENODEV and enables upper layers to handle the OOM case without NULL pointer issues. See this thread: http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3521 Fixes this error: gargamel:/sys/block/md5/bcache# echo /dev/sdh2 > /sys/fs/bcache/register bcache: register_cache() error opening sdh2: cannot allocate memory BUG: unable to handle kernel NULL pointer dereference at 00000000000009b8 IP: [] cache_set_flush+0x102/0x15c [bcache] PGD 120dff067 PUD 1119a3067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: veth ip6table_filter ip6_tables (...) CPU: 4 PID: 3371 Comm: kworker/4:3 Not tainted 4.4.2-amd64-i915-volpreempt-20160213bc1 #3 Hardware name: System manufacturer System Product Name/P8H67-M PRO, BIOS 3904 04/27/2013 Workqueue: events cache_set_flush [bcache] task: ffff88020d5dc280 ti: ffff88020b6f8000 task.ti: ffff88020b6f8000 RIP: 0010:[] [] cache_set_flush+0x102/0x15c [bcache] Signed-off-by: Eric Wheeler Tested-by: Marc MERLIN Cc: drivers/md/bcache/super.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 07cc6ef8edc47f8b4fc1e276d31127a0a5863d4d Author: Eric Wheeler Date: Fri Feb 26 14:39:06 2016 -0800 bcache: fix race of writeback thread starting before complete initialization The bch_writeback_thread might BUG_ON in read_dirty() if dc->sb==BDEV_STATE_DIRTY and bch_sectors_dirty_init has not yet completed its related initialization. This patch downs the dc->writeback_lock until after initialization is complete, thus preventing bch_writeback_thread from proceeding prematurely. See this thread: http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3453 Signed-off-by: Eric Wheeler Tested-by: Marc MERLIN Cc: Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 29b75eb2d56a714190a93d7be4525e617591077a Author: Jianyu Zhan Date: Mon Mar 7 09:32:24 2016 +0800 futex: Replace barrier() in unqueue_me() with READ_ONCE() Commit e91467ecd1ef ("bug in futex unqueue_me") introduced a barrier() in unqueue_me() to prevent the compiler from rereading the lock pointer which might change after a check for NULL. Replace the barrier() with a READ_ONCE() for the following reasons: 1) READ_ONCE() is a weaker form of barrier() that affects only the specific load operation, while barrier() is a general compiler level memory barrier. READ_ONCE() was not available at the time when the barrier was added. 2) Aside of that READ_ONCE() is descriptive and self explainatory while a barrier without comment is not clear to the casual reader. No functional change. [ tglx: Massaged changelog ] Signed-off-by: Jianyu Zhan Acked-by: Christian Borntraeger Acked-by: Darren Hart Cc: dave@stgolabs.net Cc: peterz@infradead.org Cc: linux@rasmusvillemoes.dk Cc: akpm@linux-foundation.org Cc: fengguang.wu@intel.com Cc: bigeasy@linutronix.de Link: http://lkml.kernel.org/r/1457314344-5685-1-git-send-email-nasa4836@gmail.com Signed-off-by: Thomas Gleixner kernel/futex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 92821c261d1f0ca250b7cff4e4bbcc58d8530f90 Author: Tom St Denis Date: Thu Mar 3 09:46:41 2016 -0500 drm/amd/amdgpu: Fix indentation in do_set_base() (DCEv8) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ff923479ee9b6ba9244398c7e97878fa37b5343c Author: Tom St Denis Date: Thu Mar 3 09:45:29 2016 -0500 drm/amd/amdgpu: make afmt_init cleanup if alloc fails (DCEv8) If the allocation fails free memory and return error code. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 74c1e842793fcc470413b1f7d14e2e74e1e8240b Author: Tom St Denis Date: Thu Mar 3 09:42:43 2016 -0500 drm/amd/amdgpu: Move config init flag to bottom of sw_init (DCEv8) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 84cffef127cce662e73f5f887c590ac582dcc845 Author: Tom St Denis Date: Thu Mar 3 09:31:49 2016 -0500 drm/amd/amdgpu: Don't proceed into audio_fini if audio is disabled (DCEv8) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 849dc32b20a496a45ad8d00fefd8ade37a272aba Author: Tom St Denis Date: Thu Mar 3 09:25:05 2016 -0500 drm/amd/amdgpu: Fix identation in do_set_base() (DCEv10) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 720a6ce3cedf664834df436c343ea2ccc26272fa Author: Tom St Denis Date: Thu Mar 3 09:23:48 2016 -0500 drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10) Make the function free memory and return an error code if the allocation fails. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 98822a2f748cf400a1fa08eabd0ccf6baa146a92 Author: Tom St Denis Date: Thu Mar 3 09:21:44 2016 -0500 drm/amd/amdgpu: Move initialized flag to bottom of sw_init (DCEv10) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 441ce96f14075f7c5e2995f07e7f037cc43c4a08 Author: Tom St Denis Date: Thu Mar 3 09:20:10 2016 -0500 drm/amd/amdgpu: Don't proceed in audio_fini if disabled (DCEv10) If audio is disabled we shouldn't proceed into the fini function. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3 +++ 1 file changed, 3 insertions(+) commit e484f8d47965d1fecac3c46977bf1fd3e688b432 Author: Tom St Denis Date: Wed Mar 2 12:07:02 2016 -0500 drm/amd/amdgpu: Fix indentation in dce_v11_0_crtc_do_set_base() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 041ab0a49482502bd138203fd1b4d529eab97fe4 Author: Tom St Denis Date: Wed Mar 2 09:19:57 2016 -0500 drm/amd/amdgpu: Make afmt_init() cleanup if alloc fails (DCEv11) Updated DCEv11 afmt_init to cleanup if any kzalloc fails and then return an error code. Don't continue initializing the audio stack in that case. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c437b9d6c093c83c485a40c0f9e0d2cd98b36d38 Author: Tom St Denis Date: Wed Mar 2 09:14:40 2016 -0500 drm/amd/amdgpu: Move init flag to after init in sw_init() (DCEv11) Don't set config_init to true until all config statements pass. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bcc71beb2a101699426820d5cd3f28dcb9877181 Author: Tom St Denis Date: Wed Mar 2 09:10:50 2016 -0500 drm/amd/amdgpu: Whitespace typo fix in sw_init (DCEv11) Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29f646dfb2269fa55d48a8d8c91a42ee64e5e4fc Author: Tom St Denis Date: Wed Mar 2 08:58:07 2016 -0500 drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabled If amdgpu_audio is disabled then the audio structure is not initialized so we shouldn't read it in the fini function. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 2f568dbd6b944c2e8c0c54b53c2211c23995e6a4 Author: Christian König Date: Tue Feb 23 12:36:59 2016 +0100 drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6 That avoids lock inversion between the BO reservation lock and the anon_vma lock. v2: * Changed amdgpu_bo_list_entry.user_pages to an array of pointers * Lock mmap_sem only for get_user_pages * Added invalidation of unbound userpointer BOs * Fixed memory leak and page reference leak v3 (chk): * Revert locking mmap_sem only for_get user_pages * Revert adding invalidation of unbound userpointer BOs * Sanitize and fix error handling v4 (chk): * Init userpages pointer everywhere. * Fix error handling when get_user_pages() fails. * Add invalidation of unbound userpointer BOs again. v5 (chk): * Add maximum number of tries. v6 (chk): * Fix error handling when we run out of tries. Signed-off-by: Christian König Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling (v4) Acked-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 114 +++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 23 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 53 +++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 + 6 files changed, 174 insertions(+), 24 deletions(-) commit d564a06e1c9c285bab1c1579c18c811aa1271884 Author: Christian König Date: Tue Mar 1 15:51:53 2016 +0100 drm/amdgpu: if a GDS switch is needed emit a pipeline sync as well Otherwise we might change the GDS settings while they are still in use. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit b8c7b39ec1db98199df5bee33ca145ed9c2c62e7 Author: Christian König Date: Tue Mar 1 15:42:52 2016 +0100 drm/amdgpu: split pipeline sync and vm flush This allows us to use the pipeline sync for other tasks as well. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 29 ++++++++++++++++++++++------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++++++++-- 4 files changed, 35 insertions(+), 9 deletions(-) commit 971fe9a9414b2ccabc11ff6a5ff6be0d6f2dabda Author: Christian König Date: Tue Mar 1 15:09:25 2016 +0100 drm/amdgpu: switch the GDS only on demand v2 Switching the GDS space to often seems to be problematic. This patch together with the following can avoid VM faults on context switch. v2: extend commit message a bit Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Reviewed-by: Chunming Zhou (v1) drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 43 ++++++++++++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 2 deletions(-) commit cffadc83c7016ba68721affe5da537ead279e2d2 Author: Christian König Date: Tue Mar 1 13:34:49 2016 +0100 drm/amdgpu: move the GDS switch into vm flush as well After all it's an operation on the VMID. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 11 ++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 +++++++++++++----- 3 files changed, 21 insertions(+), 14 deletions(-) commit 364beb2cc45247e980a097e53d0932e143873333 Author: Christian König Date: Tue Feb 16 17:39:39 2016 +0100 drm/amdgpu: return the common fence from amdgpu_fence_emit Try to avoid using the hardware specific fences even more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 27 ++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 +++---- 3 files changed, 19 insertions(+), 19 deletions(-) commit 257bf15a4b9795f8b352beb6e72a7e3e5aab8d27 Author: Christian König Date: Tue Feb 16 11:24:58 2016 +0100 drm/amdgpu: add slap cache for sync objects as well We need them all the time. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 36 ++++++++++++++++++++++++++++---- 3 files changed, 36 insertions(+), 4 deletions(-) commit 336d1f5efe93db3d997a6d105760dd613d7ecdce Author: Christian König Date: Tue Feb 16 10:57:10 2016 +0100 drm/amdgpu: remove HW fence owner Not used any more since we now always use the sheduler. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 ++------- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 +----- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 8 +------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++----- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 3 +-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 +-- 12 files changed, 16 insertions(+), 43 deletions(-) commit bcc634f4a8f10a851dd3d8429ea28998351ca843 Author: Christian König Date: Tue Feb 16 16:23:02 2016 +0100 drm/amdgpu: cleanup the sync code No need for two functions doing the same, remove one and add comments what those functions actually do. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 48 ++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 18 deletions(-) commit 637dd3b5ca9e0d38b046f04e97a1d2f7523e7e25 Author: Christian König Date: Thu Mar 3 14:24:57 2016 +0100 drm/amdgpu: prevent get_user_pages recursion Remember the tasks which are inside get_user_pages() and ignore MMU callbacks from there. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 48 ++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 10 deletions(-) commit 211dff5518d938d0c11205af3113d2c7a292dd98 Author: Christian König Date: Mon Feb 22 15:40:59 2016 +0100 drm/amdgpu: group userptr in the BO list v2 We need them together with the next patch. v2: Don't take bo reference twice Signed-off-by: Christian König Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 24 +++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- 3 files changed, 18 insertions(+), 11 deletions(-) commit a8bd1bec7c68dd5082012bcdd1d765e65b3ee05c Author: Christian König Date: Thu Mar 3 10:50:01 2016 +0100 drm/amdgpu: sync to the active user on reusing a VMID Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 13459bd0fb4d178bcbd20cff155f1849313cd3bf Author: Chunming Zhou Date: Thu Mar 3 14:47:54 2016 +0800 drm/amdgpu: Clear HDP_MISC_CNTL.HDP_FLUSH_INVALIDATE_CACHE So that we can invalidate and flush the HDP independently Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cc958e67aa47372e8e1e875c653cd9328f215cb4 Author: Chunming Zhou Date: Thu Mar 3 12:06:45 2016 +0800 drm/amdgpu: add hdp invalidation for sdma v3_0 Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6ad550c35d8c5327a548bc59bba406ef2db51f1b Author: Chunming Zhou Date: Thu Mar 3 12:06:34 2016 +0800 drm/amdgpu: add hdp invalidation for sdma v2_4 Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 498dd97ddbc47fdb8a5e3bf4df8a77893b8b07a2 Author: Chunming Zhou Date: Thu Mar 3 12:05:44 2016 +0800 drm/amdgpu: add hdp invalidation for cik sdma Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d35db5617a75b3c77a61008e8fbf249ab8c24e5e Author: Chunming Zhou Date: Thu Mar 3 11:55:13 2016 +0800 drm/amdgpu: add hdp invalidation for gfx8 Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0955860b87183d4bf506eb861760ea178de027bf Author: Chunming Zhou Date: Thu Mar 3 11:46:40 2016 +0800 drm/amdgpu: add hdp invalidation for gfx7 Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 11afbde85eeba1ccb0a459c49444aaf9032e9755 Author: Chunming Zhou Date: Thu Mar 3 11:38:48 2016 +0800 drm/amdgpu: add hdp_invalidate function It's called after emitting ibs. Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++++ 2 files changed, 7 insertions(+) commit 5c55db83b759b079ead93aa0767fc97048b1f899 Author: Chunming Zhou Date: Wed Mar 2 11:30:31 2016 +0800 drm/amdgpu: wait engine idle before vm flush for sdma Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 15 +++++++++++++++ 3 files changed, 44 insertions(+) commit b6bae58d8b6c21357198255cdb42a3929e7f7357 Author: Daniel Vetter Date: Thu Jan 21 11:08:58 2016 +0100 drm/amdgpu: Switch to drm_vblank_on/off (v2) Equivalent change to the radeon driver. Note that with radeon this caught a bug in the dri3 DDX implementation, which asked for vblank interrupts when the pipe is off. That bug needs to be fixed before we can merge this patch (if amdgpu is affected too). Michel discovered this one. v2: agd: switch dce8 as well. Acked-by: Michel Dänzer Cc: Michel Dänzer Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 777e3cbc791f131806d9bf24b3325637c7fc228d Author: Daniel Vetter Date: Thu Jan 21 11:08:57 2016 +0100 drm/radeon: Switch to drm_vblank_on/off These should be functionally equivalent to the older per/post modeset functions, except that they block out drm_vblank_get right away. There's only the clock adjusting code (outside of pageflips) in readone which uses drm_vblank_get. But that code doesn't synchronize against concurrent modesets and instead handles any such races by waiting for the right vblank to arrive with a short timetout. The longer-term plan here is to switch all kms drivers to drm_vblank_on/off so that common code like pending event cleanup can be done there, while drm_vblank_pre/post_modeset will be purely drm internal for the old UMS ioctl. Note that with this patch Michel uncovered a bug in the dri3 implementation of the DDX (it does vblank waits when the pipe is off), which had to be fixed first. Cc: Michel Dänzer Acked-and-tested-by: Michel Dänzer Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_crtc.c | 4 ++-- drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0bf5df3b58e152ba2a50f9918f31a9c15b479b64 Author: Nils Wallménius Date: Sat Mar 5 06:59:51 2016 +0100 drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device Clean up leftover from radeon code. Signed-off-by: Nils Wallménius Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 4 ---- 3 files changed, 7 deletions(-) commit 4223cc3de2c4de880a945f265d9e24cbd01b2293 Author: Alex Deucher Date: Thu Mar 3 12:27:46 2016 -0500 drm/amdgpu/ci: sync up with dpm changes from radeon Looks like radeon commit: d3052b8ce8a308d2086519fa5f7c4966257ea184 was missed. Reviewed-by: Christian König Reviewed-by: Ken Wang Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 12424e55281beb97a6fbfb1ba31a9d90c45e6102 Author: Alex Deucher Date: Thu Mar 3 12:28:37 2016 -0500 drm/amdgpu/ci: remove redundant pcie setup Looks like this got leftover by accident. Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 225ac139285a3ebde698694a4957a9de907b97ee Author: Alex Deucher Date: Thu Mar 3 11:28:24 2016 -0500 drm/amdgpu/ci: drop some old thermal setup This was leftover from a long time ago and is not longer needed since the thermal controller setup code was added. Additional mucking with the thermal interrupts can cause spurious thermal events which can lead to unnecessary state changes. Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 08095e70783f1d8296f858d37a9e1878f5da0623 Author: Keith Busch Date: Fri Mar 4 13:15:17 2016 -0700 NVMe: Create discard zero quirk white list The NVMe specification does not require discarded blocks return zeroes on read, but provides that behavior as a possibility. Some applications more efficiently use an SSD if reads on discarded blocks were deterministically zero, based on the "discard_zeroes_data" queue attribute. There is no specification defined way to determine device behavior on discarded blocks, so the driver always left the queue setting disabled. We can only know behavior based on individual device models, so this patch adds a flag to the NVMe "quirk" list that vendors may set if they know their controller works that way. The patch also sets the new flag for one such known device. Signed-off-by: Keith Busch Suggested-by: Artur Paszkiewicz Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 8 +++++++- drivers/nvme/host/nvme.h | 6 ++++++ drivers/nvme/host/pci.c | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) commit 7eb792bf7c253cb63202aae72885f5f7abdd8668 Author: Adam Buchbinder Date: Fri Mar 4 11:20:04 2016 -0800 s390: Fix misspellings in comments Signed-off-by: Adam Buchbinder Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/perf_event.h | 2 +- arch/s390/include/asm/rwsem.h | 2 +- arch/s390/kernel/perf_cpum_cf.c | 2 +- arch/s390/kernel/perf_event.c | 2 +- arch/s390/kvm/guestdbg.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) commit 1e133ab296f3ff8d9e58a5e758291ed39ba72ad7 Author: Martin Schwidefsky Date: Tue Mar 8 11:49:57 2016 +0100 s390/mm: split arch/s390/mm/pgtable.c The pgtable.c file is quite big, before it grows any larger split it into pgtable.c, pgalloc.c and gmap.c. In addition move the gmap related header definitions into the new gmap.h header and all of the pgste helpers from pgtable.h to pgtable.c. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/gmap.h | 64 ++ arch/s390/include/asm/pgalloc.h | 4 - arch/s390/include/asm/pgtable.h | 123 +--- arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kvm/diag.c | 1 + arch/s390/kvm/interrupt.c | 1 + arch/s390/kvm/kvm-s390.c | 3 +- arch/s390/kvm/priv.c | 1 + arch/s390/mm/Makefile | 4 +- arch/s390/mm/fault.c | 1 + arch/s390/mm/gmap.c | 774 ++++++++++++++++++++ arch/s390/mm/pgalloc.c | 360 +++++++++ arch/s390/mm/pgtable.c | 1532 ++++++--------------------------------- 13 files changed, 1464 insertions(+), 1405 deletions(-) commit 227be799c39a28bf5d68187a4ea1b43190d96515 Author: Martin Schwidefsky Date: Tue Mar 8 11:09:25 2016 +0100 s390/mm: uninline pmdp_xxx functions from pgtable.h The pmdp_xxx function are smaller than their ptep_xxx counterparts but to keep things symmetrical unline them as well. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 136 ++++++++++++++++------------------------ arch/s390/mm/hugetlbpage.c | 7 +-- arch/s390/mm/pgtable.c | 93 +++++++++++++++++++-------- 3 files changed, 124 insertions(+), 112 deletions(-) commit ebde765c0e85f48534f98779b22349bf00761b61 Author: Martin Schwidefsky Date: Tue Mar 8 11:08:09 2016 +0100 s390/mm: uninline ptep_xxx functions from pgtable.h The code in the various ptep_xxx functions has grown quite large, consolidate them to four out-of-line functions: ptep_xchg_direct to exchange a pte with another with immediate flushing ptep_xchg_lazy to exchange a pte with another in a batched update ptep_modify_prot_start to begin a protection flags update ptep_modify_prot_commit to commit a protection flags update Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgtable.h | 374 ++++++---------------------------------- arch/s390/kvm/kvm-s390.c | 2 +- arch/s390/mm/pgtable.c | 295 +++++++++++++++++++++++++++---- 3 files changed, 318 insertions(+), 353 deletions(-) commit 6d6acd140ab3d46348ec3a9dbfd386d9ca42b825 Author: Sudeep Holla Date: Mon Mar 7 11:26:18 2016 +0000 arm64: dts: juno/vexpress: fix node name unit-address presence warnings Commit fa38a82096a1 ("scripts/dtc: Update to upstream version 53bf130b1cdd") added warnings on node name unit-address presence/absence mismatch in device trees. This patch fixes those warning on all the juno/vexpress platforms where unit-address is present in node name while the reg/ranges property is not present. It also adds unit-address to all smb bus node. Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/foundation-v8.dtsi | 2 +- arch/arm64/boot/dts/arm/juno-base.dtsi | 14 +++++----- arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 30 +++++++++++----------- arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts | 2 +- arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 14 +++++----- .../boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts | 10 ++++---- 6 files changed, 36 insertions(+), 36 deletions(-) commit 14ddde78c787248ada9da2f2d04900548ffcf342 Merge: 58122bf e2857b8 Author: Ingo Molnar Date: Tue Mar 8 14:25:45 2016 +0100 Merge branch 'linus' into x86/fpu, to pick up fixes Signed-off-by: Ingo Molnar commit 0dd0036f6e07f741a1356b424b84a3164b6e59cf Author: Andy Lutomirski Date: Mon Feb 29 15:50:20 2016 -0800 x86/asm-offsets: Remove PARAVIRT_enabled It no longer has any users. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: david.vrabel@citrix.com Cc: konrad.wilk@oracle.com Cc: lguest@lists.ozlabs.org Cc: xen-devel@lists.xensource.com Signed-off-by: Ingo Molnar arch/x86/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) commit 58a5aac5331388a175a42b6ed2154f0559cefb21 Author: Andy Lutomirski Date: Mon Feb 29 15:50:19 2016 -0800 x86/entry/32: Introduce and use X86_BUG_ESPFIX instead of paravirt_enabled x86_64 has very clean espfix handling on paravirt: espfix64 is set up in native_iret, so paravirt systems that override iret bypass espfix64 automatically. This is robust and straightforward. x86_32 is messier. espfix is set up before the IRET paravirt patch point, so it can't be directly conditionalized on whether we use native_iret. We also can't easily move it into native_iret without regressing performance due to a bizarre consideration. Specifically, on 64-bit kernels, the logic is: if (regs->ss & 0x4) setup_espfix; On 32-bit kernels, the logic is: if ((regs->ss & 0x4) && (regs->cs & 0x3) == 3 && (regs->flags & X86_EFLAGS_VM) == 0) setup_espfix; The performance of setup_espfix itself is essentially irrelevant, but the comparison happens on every IRET so its performance matters. On x86_64, there's no need for any registers except flags to implement the comparison, so we fold the whole thing into native_iret. On x86_32, we don't do that because we need a free register to implement the comparison efficiently. We therefore do espfix setup before restoring registers on x86_32. This patch gets rid of the explicit paravirt_enabled check by introducing X86_BUG_ESPFIX on 32-bit systems and using an ALTERNATIVE to skip espfix on paravirt systems where iret != native_iret. This is also messy, but it's at least in line with other things we do. This improves espfix performance by removing a branch, but no one cares. More importantly, it removes a paravirt_enabled user, which is good because paravirt_enabled is ill-defined and is going away. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Andrew Cooper Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: david.vrabel@citrix.com Cc: konrad.wilk@oracle.com Cc: lguest@lists.ozlabs.org Cc: xen-devel@lists.xensource.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 15 ++------------- arch/x86/include/asm/cpufeatures.h | 8 ++++++++ arch/x86/kernel/cpu/common.c | 25 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 13 deletions(-) commit c54f0d6ae057444453f5167e66ed999e8cf26936 Author: David Hildenbrand Date: Wed Dec 2 08:53:52 2015 +0100 KVM: s390: allocate only one DMA page per VM We can fit the 2k for the STFLE interpretation and the crypto control block into one DMA page. As we now only have to allocate one DMA page, we can clean up the code a bit. As a nice side effect, this also fixes a problem with crycbd alignment in case special allocation debug options are enabled, debugged by Sascha Silbe. Acked-by: Christian Borntraeger Reviewed-by: Dominik Dingel Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 23 +++++++++------ arch/s390/kvm/kvm-s390.c | 60 +++++++++++++++------------------------- arch/s390/kvm/kvm-s390.h | 4 +-- arch/s390/kvm/priv.c | 2 +- 4 files changed, 41 insertions(+), 48 deletions(-) commit 80bc79dc0b18b17510ceb1e2d2d1999104af03c9 Author: David Hildenbrand Date: Wed Dec 2 09:43:29 2015 +0100 KVM: s390: enable STFLE interpretation only if enabled for the guest Not setting the facility list designation disables STFLE interpretation, this is what we want if the guest was told to not have it. Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b3c17f10fa2cfc29cf35e4821275e046e725213e Author: David Hildenbrand Date: Mon Feb 22 14:14:50 2016 +0100 KVM: s390: wake up when the VCPU cpu timer expires When the VCPU cpu timer expires, we have to wake up just like when the ckc triggers. For now, setting up a cpu timer in the guest and going into enabled wait will never lead to a wakeup. This patch fixes this problem. Just as for the ckc, we have to take care of waking up too early. We have to recalculate the sleep time and go back to sleep. Please note that the timer callback calls kvm_s390_get_cpu_timer() from interrupt context. As the timer is canceled when leaving handle_wait(), and we don't do any VCPU cpu timer writes/updates in that function, we can be sure that we will never try to read the VCPU cpu timer from the same cpu that is currentyl updating the timer (deadlock). Reported-by: Sascha Silbe Tested-by: Sascha Silbe Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 48 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) commit 5ebda31686af6bb70affdcc5777ebc7ed81c0eac Author: David Hildenbrand Date: Mon Feb 22 13:52:27 2016 +0100 KVM: s390: step the VCPU timer while in enabled wait The cpu timer is a mean to measure task execution time. We want to account everything for a VCPU for which it is responsible. Therefore, if the VCPU wants to sleep, it shall be accounted for it. We can easily get this done by not disabling cpu timer accounting when scheduled out while sleeping because of enabled wait. Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 4 ++-- arch/s390/kvm/kvm-s390.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 9c23a1318eb12fcf76d9f663d2c3d88598e62a55 Author: David Hildenbrand Date: Wed Feb 17 21:53:33 2016 +0100 KVM: s390: protect VCPU cpu timer with a seqcount For now, only the owning VCPU thread (that has loaded the VCPU) can get a consistent cpu timer value when calculating the delta. However, other threads might also be interested in a more recent, consistent value. Of special interest will be the timer callback of a VCPU that executes without having the VCPU loaded and could run in parallel with the VCPU thread. The cpu timer has a nice property: it is only updated by the owning VCPU thread. And speaking about accounting, a consistent value can only be calculated by looking at cputm_start and the cpu timer itself in one shot, otherwise the result might be wrong. As we only have one writing thread at a time (owning VCPU thread), we can use a seqcount instead of a seqlock and retry if the VCPU refreshed its cpu timer. This avoids any heavy locking and only introduces a counter update/check plus a handful of smp_wmb(). The owning VCPU thread should never have to retry on reads, and also for other threads this might be a very rare scenario. Please note that we have to use the raw_* variants for locking the seqcount as lockdep will produce false warnings otherwise. The rq->lock held during vcpu_load/put is also acquired from hardirq context. Lockdep cannot know that we avoid potential deadlocks by disabling preemption and thereby disable concurrent write locking attempts (via vcpu_put/load). Reviewed-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 8 ++++++++ arch/s390/kvm/kvm-s390.c | 30 ++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) commit db0758b29709815d93a963e31e2ec87ecf74f8bd Author: David Hildenbrand Date: Mon Feb 15 09:42:25 2016 +0100 KVM: s390: step VCPU cpu timer during kvm_run ioctl Architecturally we should only provide steal time if we are scheduled away, and not if the host interprets a guest exit. We have to step the guest CPU timer in these cases. In the first shot, we will step the VCPU timer only during the kvm_run ioctl. Therefore all time spent e.g. in interception handlers or on irq delivery will be accounted for that VCPU. We have to take care of a few special cases: - Other VCPUs can test for pending irqs. We can only report a consistent value for the VCPU thread itself when adding the delta. - We have to take care of STP sync, therefore we have to extend kvm_clock_sync() and disable preemption accordingly - During any call to disable/enable/start/stop we could get premeempted and therefore get start/stop calls. Therefore we have to make sure we don't get into an inconsistent state. Whenever a VCPU is scheduled out, sleeping, in user space or just about to enter the SIE, the guest cpu timer isn't stepped. Please note that all primitives are prepared to be called from both environments (cpu timer accounting enabled or not), although not completely used in this patch yet (e.g. kvm_s390_set_cpu_timer() will never be called while cpu timer accounting is enabled). Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/kvm/kvm-s390.c | 76 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 76 insertions(+), 2 deletions(-) commit 4287f247f6cfaea0ed73b5104e94cd737e1ac0ae Author: David Hildenbrand Date: Mon Feb 15 09:40:12 2016 +0100 KVM: s390: abstract access to the VCPU cpu timer We want to manually step the cpu timer in certain scenarios in the future. Let's abstract any access to the cpu timer, so we can hide the complexity internally. Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 5 +++-- arch/s390/kvm/kvm-s390.c | 31 +++++++++++++++++++++++-------- arch/s390/kvm/kvm-s390.h | 2 ++ 3 files changed, 28 insertions(+), 10 deletions(-) commit 01a745ac8b6c5d323a37194c242f7c77f3402469 Author: David Hildenbrand Date: Fri Feb 12 20:41:56 2016 +0100 KVM: s390: store cpu id in vcpu->cpu when scheduled in By storing the cpu id, we have a way to verify if the current cpu is owning a VCPU. Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 2 ++ 1 file changed, 2 insertions(+) commit dce382b6c72717b610741340f05e959764b851b8 Author: Alexander Yarygin Date: Fri Feb 19 12:21:26 2016 +0300 KVM: s390: Add diag "watchdog functions" to trace event decoding DIAG 0x288 may occur now. Let's add its code to the diag table in sie.h. Signed-off-by: Alexander Yarygin Signed-off-by: Christian Borntraeger arch/s390/include/uapi/asm/sie.h | 1 + 1 file changed, 1 insertion(+) commit 5488dc16fde74595a40c5d20ae52d978313f0b4e Author: Lionel Landwerlin Date: Fri Feb 26 17:05:00 2016 +0000 drm: introduce pipe color correction properties Patch based on a previous series by Shashank Sharma. This introduces optional properties to enable color correction at the pipe level. It relies on 3 transformations applied to every pixels displayed. First a lookup into a degamma table, then a multiplication of the rgb components by a 3x3 matrix and finally another lookup into a gamma table. The following properties can be added to a pipe : - DEGAMMA_LUT : blob containing degamma LUT - DEGAMMA_LUT_SIZE : number of elements in DEGAMMA_LUT - CTM : transformation matrix applied after the degamma LUT - GAMMA_LUT : blob containing gamma LUT - GAMMA_LUT_SIZE : number of elements in GAMMA_LUT DEGAMMA_LUT_SIZE and GAMMA_LUT_SIZE are read only properties, set by the driver to tell userspace applications what sizes should be the lookup tables in DEGAMMA_LUT and GAMMA_LUT. A helper is also provided so legacy gamma correction is redirected through these new properties. v2: Register LUT size properties as range v3: Fix round in drm_color_lut_get_value() helper More docs on how degamma/gamma properties are used v4: Update contributors v5: Rename CTM_MATRIX property to CTM (Doh!) Add legacy gamma_set atomic helper Describe CTM/LUT acronyms in the kernel doc v6: Fix missing blob unref in drm_atomic_helper_crtc_reset Signed-off-by: Shashank Sharma Signed-off-by: Kumar, Kiran S Signed-off-by: Kausal Malladi Signed-off-by: Lionel Landwerlin Reviewed-by: Matt Roper Acked-by: Rob Bradford [danvet: CrOS maintainers are also happy with the userspacde side: https://codereview.chromium.org/1182063002/ ] Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456506302-640-4-git-send-email-lionel.g.landwerlin@intel.com Documentation/DocBook/gpu.tmpl | 59 ++++++++++++++++++- drivers/gpu/drm/drm_atomic.c | 88 ++++++++++++++++++++++++++++- drivers/gpu/drm/drm_atomic_helper.c | 110 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/drm_crtc.c | 35 ++++++++++++ drivers/gpu/drm/drm_crtc_helper.c | 33 +++++++++++ include/drm/drm_atomic_helper.h | 3 + include/drm/drm_crtc.h | 46 ++++++++++++++- include/drm/drm_crtc_helper.h | 3 + include/uapi/drm/drm_mode.h | 15 +++++ 9 files changed, 386 insertions(+), 6 deletions(-) commit 1f25184656a00a59e3a953189070d42a749f6aee Merge: e2857b8 4f49b90 Author: Ingo Molnar Date: Tue Mar 8 13:17:54 2016 +0100 Merge branch 'timers/core-v9' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/nohz Pull nohz enhancements from Frederic Weisbecker: "Currently in nohz full configs, the tick dependency is checked asynchronously by nohz code from interrupt and context switch for each concerned subsystem with a set of function provided by these. Such functions are made of many conditions and details that can be heavyweight as they are called on fastpath: sched_can_stop_tick(), posix_cpu_timer_can_stop_tick(), perf_event_can_stop_tick()... Thomas suggested a few months ago to make that tick dependency check synchronous. Instead of checking subsystems details from each interrupt to guess if the tick can be stopped, every subsystem that may have a tick dependency should set itself a flag specifying the state of that dependency. This way we can verify if we can stop the tick with a single lightweight mask check on fast path. This conversion from a pull to a push model to implement tick dependency is the core feature of this patchset that is split into: * Nohz wide kick simplification * Improve nohz tracing * Introduce tick dependency mask * Migrate scheduler, posix timers, perf events and sched clock tick dependencies to the tick dependency mask." Signed-off-by: Ingo Molnar commit 8d801243192f4dca693f9ff0c7953ff2ce01164d Author: Adam Baker Date: Sat Mar 5 15:34:55 2016 +0000 hwmon: Define binding for the nsa320-hwmon driver Define a binding for the hardware monitoring chip present in the Zyxel NSA-320 and some of the other Zyxel NAS devices. Signed-off-by: Adam Baker Acked-by: Rob Herring [groeck: Fixed whitespace error] Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/nsa320-mcu.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8e2a7f5b9a8c49f1f4e1dc8972198510f43c0b2e Author: Kostenzer Felix Date: Sun Mar 6 23:20:06 2016 +0100 x86/nmi: Mark 'ignore_nmis' as __read_mostly ignore_nmis is used in two distinct places: 1. modified through {stop,restart}_nmi by alternative_instructions 2. read by do_nmi to determine if default_do_nmi should be called or not thus the access pattern conforms to __read_mostly and do_nmi() is a fastpath. Signed-off-by: Kostenzer Felix Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/nmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bb9eadf0c35f2e7eb5ca6468f46ebb7473b85537 Author: Paolo Bonzini Date: Tue Feb 23 14:19:20 2016 +0100 KVM: MMU: micro-optimize gpte_access Avoid AND-NOT, most x86 processor lack an instruction for it. Signed-off-by: Paolo Bonzini arch/x86/kvm/paging_tmpl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6bb69c9b69c315200ddc2bc79aee14c0184cf5b2 Author: Paolo Bonzini Date: Tue Feb 23 12:51:19 2016 +0100 KVM: MMU: simplify last_pte_bitmap Branch-free code is fun and everybody knows how much Avi loves it, but last_pte_bitmap takes it a bit to the extreme. Since the code is simply doing a range check, like (level == 1 || ((gpte & PT_PAGE_SIZE_MASK) && level < N) we can make it branch-free without storing the entire truth table; it is enough to cache N. Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 8 ++----- arch/x86/kvm/mmu.c | 50 +++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 30 deletions(-) commit 50c9e6f3a69dfa458ecb671bcbd11e2eea6db0c1 Author: Paolo Bonzini Date: Thu Feb 25 10:47:38 2016 +0100 KVM: MMU: coalesce more page zapping in mmu_sync_children mmu_sync_children can only process up to 16 pages at a time. Check if we need to reschedule, and do not bother zapping the pages until that happens. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 2a74003ae818cfaf129ed4df89499a1c2b796129 Author: Paolo Bonzini Date: Wed Feb 24 11:26:10 2016 +0100 KVM: MMU: move zap/flush to kvm_mmu_get_page kvm_mmu_get_page is the only caller of kvm_sync_page_transient and kvm_sync_pages. Moving the handling of the invalid_list there removes the need for the underdocumented kvm_sync_page_transient function. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 1f50f1b3a4630966fb3cd1f56892acb03580bd37 Author: Paolo Bonzini Date: Wed Feb 24 11:07:14 2016 +0100 KVM: MMU: invert return value of mmu.sync_page and *kvm_sync_page* Return true if the page was synced (and the TLB must be flushed) and false if the page was zapped. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 31 ++++++++++++++----------------- arch/x86/kvm/paging_tmpl.h | 4 ++-- 2 files changed, 16 insertions(+), 19 deletions(-) commit 9a43c5d9c3f13a2fc3864570e33438347319b584 Author: Paolo Bonzini Date: Wed Feb 24 10:28:01 2016 +0100 KVM: MMU: cleanup __kvm_sync_page and its callers Calling kvm_unlink_unsync_page in the middle of __kvm_sync_page makes things unnecessarily tricky. If kvm_mmu_prepare_zap_page is called, it will call kvm_unlink_unsync_page too. So kvm_unlink_unsync_page can be called just as well at the beginning or the end of __kvm_sync_page... which means that we might do it in kvm_sync_page too and remove the parameter. kvm_sync_page ends up being the same code that kvm_sync_pages used to have before the previous patch. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit df748f864a342375aaa52a7e043fae7142376d01 Author: Paolo Bonzini Date: Wed Feb 24 10:19:30 2016 +0100 KVM: MMU: use kvm_sync_page in kvm_sync_pages If the last argument is true, kvm_unlink_unsync_page is called anyway in __kvm_sync_page (either by kvm_mmu_prepare_zap_page or by __kvm_sync_page itself). Therefore, kvm_sync_pages can just call kvm_sync_page, instead of going through kvm_unlink_unsync_page+__kvm_sync_page. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 35a70510ee13b0ab130968ed399eeeb5106bc12e Author: Paolo Bonzini Date: Wed Feb 24 10:03:27 2016 +0100 KVM: MMU: move TLB flush out of __kvm_sync_page By doing this, kvm_sync_pages can use __kvm_sync_page instead of reinventing it. Because of kvm_mmu_flush_or_zap, the code does not end up being more complex than before, and more cleanups to kvm_sync_pages will come in the next patches. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 53 ++++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit b8c67b7a086c9b2f96a2cf95624a9000a6be2922 Author: Paolo Bonzini Date: Wed Feb 24 11:21:55 2016 +0100 KVM: MMU: introduce kvm_mmu_flush_or_zap This is a generalization of mmu_pte_write_flush_tlb, that also takes care of calling kvm_mmu_commit_zap_page. The next patches will introduce more uses. Reviewed-by: Takuya Yoshikawa Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit fe2f95468e4bdf4a526be4f86efaefe48ca63b83 Author: Denys Vlasenko Date: Sun Mar 6 19:11:16 2016 +0100 x86/apic: Deinline _flat_send_IPI_mask, save ~150 bytes _flat_send_IPI_mask: 157 bytes, 3 callsites text data bss dec hex filename 96183823 20860520 36122624 153166967 9212477 vmlinux1_before 96183699 20860520 36122624 153166843 92123fb vmlinux Signed-off-by: Denys Vlasenko Cc: Borislav Petkov Cc: Daniel J Blueman Cc: Linus Torvalds Cc: Mike Travis Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1457287876-6001-2-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/apic_flat_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a8aa8acab4f3949e05ceb51e36f627b1651814c Author: Denys Vlasenko Date: Sun Mar 6 19:11:15 2016 +0100 x86/apic: Deinline __default_send_IPI_*, save ~200 bytes __default_send_IPI_shortcut: 49 bytes, 2 callsites __default_send_IPI_dest_field: 108 bytes, 7 callsites text data bss dec hex filename 96184086 20860488 36122624 153167198 921255e vmlinux_before 96183823 20860520 36122624 153166967 9212477 vmlinux Signed-off-by: Denys Vlasenko Cc: Borislav Petkov Cc: Daniel J Blueman Cc: Linus Torvalds Cc: Mike Travis Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1457287876-6001-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/ipi.h | 58 ++------------------------------------------ arch/x86/kernel/apic/ipi.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 56 deletions(-) commit fe36d8912c8e402c62ce5a8712b6a47baae1ceaa Merge: 16a8083 e2857b8 Author: Ingo Molnar Date: Tue Mar 8 12:26:07 2016 +0100 Merge branch 'linus' into irq/core, to pick up fixes Signed-off-by: Ingo Molnar commit f9c904b7613b8b4c85b10cd6b33ad41b2843fa9d Author: Chris Friesen Date: Sat Mar 5 23:18:48 2016 -0600 sched/cputime: Fix steal_account_process_tick() to always return jiffies The callers of steal_account_process_tick() expect it to return whether a jiffy should be considered stolen or not. Currently the return value of steal_account_process_tick() is in units of cputime, which vary between either jiffies or nsecs depending on CONFIG_VIRT_CPU_ACCOUNTING_GEN. If cputime has nsecs granularity and there is a tiny amount of stolen time (a few nsecs, say) then we will consider the entire tick stolen and will not account the tick on user/system/idle, causing /proc/stats to show invalid data. The fix is to change steal_account_process_tick() to accumulate the stolen time and only account it once it's worth a jiffy. (Thanks to Frederic Weisbecker for suggestions to fix a bug in my first version of the patch.) Signed-off-by: Chris Friesen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/56DBBDB8.40305@mail.usask.ca Signed-off-by: Ingo Molnar kernel/sched/cputime.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 72f9f3fdc928dc3ecd223e801b32d930b662b6ed Author: Luca Abeni Date: Mon Mar 7 12:27:04 2016 +0100 sched/deadline: Remove dl_new from struct sched_dl_entity The dl_new field of struct sched_dl_entity is currently used to identify new deadline tasks, so that their deadline and runtime can be properly initialised. However, these tasks can be easily identified by checking if their deadline is smaller than the current time when they switch to SCHED_DEADLINE. So, dl_new can be removed by introducing this check in switched_to_dl(); this allows to simplify the SCHED_DEADLINE code. Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457350024-7825-2-git-send-email-luca.abeni@unitn.it Signed-off-by: Ingo Molnar include/linux/sched.h | 6 +----- kernel/sched/core.c | 1 - kernel/sched/deadline.c | 35 +++++++++++++---------------------- 3 files changed, 14 insertions(+), 28 deletions(-) commit e17dc65328057c00db7e1bfea249c8771a78b30b Author: Andi Kleen Date: Tue Mar 1 14:25:24 2016 -0800 perf/x86/intel: Fix PEBS data source interpretation on Nehalem/Westmere Jiri reported some time ago that some entries in the PEBS data source table in perf do not agree with the SDM. We investigated and the bits changed for Sandy Bridge, but the SDM was not updated. perf already implements the bits correctly for Sandy Bridge and later. This patch patches it up for Nehalem and Westmere. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: jolsa@kernel.org Link: http://lkml.kernel.org/r/1456871124-15985-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 ++ arch/x86/events/intel/ds.c | 11 ++++++++++- arch/x86/events/perf_event.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) commit b3e6246336a4a329644418a1c66e2c6bed44ef81 Author: Stephane Eranian Date: Thu Mar 3 20:50:42 2016 +0100 perf/x86/pebs: Add proper PEBS constraints for Broadwell This patch adds a Broadwell specific PEBS event constraint table. Broadwell has a fix for the HT corruption bug erratum HSD29 on Haswell. Therefore, there is no need to mark events 0xd0, 0xd1, 0xd2, 0xd3 has requiring the exclusive mode across both sibling HT threads. This holds true for regular counting and sampling (see core.c) and PEBS (ds.c) which we fix in this patch. In doing so, we relax evnt scheduling for these events, they can now be programmed on any 4 counters without impacting what is measured on the sibling thread. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@redhat.com Cc: adrian.hunter@intel.com Cc: jolsa@redhat.com Cc: kan.liang@intel.com Cc: namhyung@kernel.org Link: http://lkml.kernel.org/r/1457034642-21837-4-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/ds.c | 24 ++++++++++++++++++++++++ arch/x86/events/perf_event.h | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) commit 8077eca079a212f26419c57226f28696b7100683 Author: Stephane Eranian Date: Thu Mar 3 20:50:41 2016 +0100 perf/x86/pebs: Add workaround for broken OVFL status on HSW+ This patch fixes an issue with the GLOBAL_OVERFLOW_STATUS bits on Haswell, Broadwell and Skylake processors when using PEBS. The SDM stipulates that when the PEBS iterrupt threshold is crossed, an interrupt is posted and the kernel is interrupted. The kernel will find GLOBAL_OVF_SATUS bit 62 set indicating there are PEBS records to drain. But the bits corresponding to the actual counters should NOT be set. The kernel follows the SDM and assumes that all PEBS events are processed in the drain_pebs() callback. The kernel then checks for remaining overflows on any other (non-PEBS) events and processes these in the for_each_bit_set(&status) loop. As it turns out, under certain conditions on HSW and later processors, on PEBS buffer interrupt, bit 62 is set but the counter bits may be set as well. In that case, the kernel drains PEBS and generates SAMPLES with the EXACT tag, then it processes the counter bits, and generates normal (non-EXACT) SAMPLES. I ran into this problem by trying to understand why on HSW sampling on a PEBS event was sometimes returning SAMPLES without the EXACT tag. This should not happen on user level code because HSW has the eventing_ip which always point to the instruction that caused the event. The workaround in this patch simply ensures that the bits for the counters used for PEBS events are cleared after the PEBS buffer has been drained. With this fix 100% of the PEBS samples on my user code report the EXACT tag. Before: $ perf record -e cpu/event=0xd0,umask=0x81/upp ./multichase $ perf report -D | fgrep SAMPLES PERF_RECORD_SAMPLE(IP, 0x2): 11775/11775: 0x406de5 period: 73469 addr: 0 exact=Y \--- EXACT tag is missing After: $ perf record -e cpu/event=0xd0,umask=0x81/upp ./multichase $ perf report -D | fgrep SAMPLES PERF_RECORD_SAMPLE(IP, 0x4002): 11775/11775: 0x406de5 period: 73469 addr: 0 exact=Y \--- EXACT tag is set The problem tends to appear more often when multiple PEBS events are used. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: kan.liang@intel.com Cc: namhyung@kernel.org Link: http://lkml.kernel.org/r/1457034642-21837-3-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5690ae28e472d25e330ad0c637a5cea3fc39fb32 Author: Stephane Eranian Date: Thu Mar 3 20:50:40 2016 +0100 perf/x86/intel: Add definition for PT PMI bit This patch adds a definition for GLOBAL_OVFL_STATUS bit 55 which is used with the Processor Trace (PT) feature. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: kan.liang@intel.com Cc: namhyung@kernel.org Link: http://lkml.kernel.org/r/1457034642-21837-2-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/perf_event.h | 1 + 1 file changed, 1 insertion(+) commit c3d266c8a9838cc141b69548bc3b1b18808ae8c4 Author: Kan Liang Date: Thu Mar 3 18:07:28 2016 -0500 perf/x86/intel: Fix PEBS warning by only restoring active PMU in pmi This patch tries to fix a PEBS warning found in my stress test. The following perf command can easily trigger the pebs warning or spurious NMI error on Skylake/Broadwell/Haswell platforms: sudo perf record -e 'cpu/umask=0x04,event=0xc4/pp,cycles,branches,ref-cycles,cache-misses,cache-references' --call-graph fp -b -c1000 -a Also the NMI watchdog must be enabled. For this case, the events number is larger than counter number. So perf has to do multiplexing. In perf_mux_hrtimer_handler, it does perf_pmu_disable(), schedule out old events, rotate_ctx, schedule in new events and finally perf_pmu_enable(). If the old events include precise event, the MSR_IA32_PEBS_ENABLE should be cleared when perf_pmu_disable(). The MSR_IA32_PEBS_ENABLE should keep 0 until the perf_pmu_enable() is called and the new event is precise event. However, there is a corner case which could restore PEBS_ENABLE to stale value during the above period. In perf_pmu_disable(), GLOBAL_CTRL will be set to 0 to stop overflow and followed PMI. But there may be pending PMI from an earlier overflow, which cannot be stopped. So even GLOBAL_CTRL is cleared, the kernel still be possible to get PMI. At the end of the PMI handler, __intel_pmu_enable_all() will be called, which will restore the stale values if old events haven't scheduled out. Once the stale pebs value is set, it's impossible to be corrected if the new events are non-precise. Because the pebs_enabled will be set to 0. x86_pmu.enable_all() will ignore the MSR_IA32_PEBS_ENABLE setting. As a result, the following NMI with stale PEBS_ENABLE trigger pebs warning. The pending PMI after enabled=0 will become harmless if the NMI handler does not change the state. This patch checks cpuc->enabled in pmi and only restore the state when PMU is active. Here is the dump: Call Trace: [] dump_stack+0x63/0x85 [] warn_slowpath_common+0x82/0xc0 [] warn_slowpath_null+0x1a/0x20 [] intel_pmu_drain_pebs_nhm+0x2be/0x320 [] intel_pmu_handle_irq+0x279/0x460 [] ? native_write_msr_safe+0x6/0x40 [] ? vunmap_page_range+0x20d/0x330 [] ? unmap_kernel_range_noflush+0x11/0x20 [] ? ghes_copy_tofrom_phys+0x10f/0x2a0 [] ? ghes_read_estatus+0x98/0x170 [] perf_event_nmi_handler+0x2d/0x50 [] nmi_handle+0x69/0x120 [] default_do_nmi+0xe6/0x100 [] do_nmi+0xe2/0x130 [] end_repeat_nmi+0x1a/0x1e [] ? native_write_msr_safe+0x6/0x40 [] ? native_write_msr_safe+0x6/0x40 [] ? native_write_msr_safe+0x6/0x40 <> [] ? x86_perf_event_set_period+0xd8/0x180 [] x86_pmu_start+0x4c/0x100 [] x86_pmu_enable+0x28d/0x300 [] perf_pmu_enable.part.81+0x7/0x10 [] perf_mux_hrtimer_handler+0x200/0x280 [] ? __perf_install_in_context+0xc0/0xc0 [] __hrtimer_run_queues+0xfd/0x280 [] hrtimer_interrupt+0xa8/0x190 [] ? __perf_read_group_add.part.61+0x1a0/0x1a0 [] local_apic_timer_interrupt+0x38/0x60 [] smp_apic_timer_interrupt+0x3d/0x50 [] apic_timer_interrupt+0x8c/0xa0 [] ? __perf_read_group_add.part.61+0x1a0/0x1a0 [] ? smp_call_function_single+0xd5/0x130 [] ? smp_call_function_single+0xcb/0x130 [] ? __perf_read_group_add.part.61+0x1a0/0x1a0 [] event_function_call+0x10a/0x120 [] ? ctx_resched+0x90/0x90 [] ? cpu_clock_event_read+0x30/0x30 [] ? _perf_event_disable+0x60/0x60 [] _perf_event_enable+0x5b/0x70 [] perf_event_for_each_child+0x38/0xa0 [] ? _perf_event_disable+0x60/0x60 [] perf_ioctl+0x12d/0x3c0 [] ? selinux_file_ioctl+0x95/0x1e0 [] do_vfs_ioctl+0xa1/0x5a0 [] ? sched_clock+0x9/0x10 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x1a/0xa4 ---[ end trace aef202839fe9a71d ]--- Uhhuh. NMI received for unknown reason 2d on CPU 2. Do you have a strange power saving mode enabled? Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1457046448-6184-1-git-send-email-kan.liang@intel.com [ Fixed various typos and other small details. ] Signed-off-by: Ingo Molnar arch/x86/events/core.c | 13 +++++++++++++ arch/x86/events/intel/core.c | 15 +++++++++++++-- arch/x86/events/intel/knc.c | 4 +++- 3 files changed, 29 insertions(+), 3 deletions(-) commit e72daf3f4d764c47fb71c9bdc7f9c54a503825b1 Author: Jiri Olsa Date: Tue Mar 1 20:03:52 2016 +0100 perf/x86/intel: Use PAGE_SIZE for PEBS buffer size on Core2 Using PAGE_SIZE buffers makes the WRMSR to PERF_GLOBAL_CTRL in intel_pmu_enable_all() mysteriously hang on Core2. As a workaround, we don't do this. The hard lockup is easily triggered by running 'perf test attr' repeatedly. Most of the time it gets stuck on sample session with small periods. # perf test attr -vv 14: struct perf_event_attr setup : --- start --- ... 'PERF_TEST_ATTR=/tmp/tmpuEKz3B /usr/bin/perf record -o /tmp/tmpuEKz3B/perf.data -c 123 kill >/dev/null 2>&1' ret 1 Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Cc: Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Wang Nan Link: http://lkml.kernel.org/r/20160301190352.GA8355@krava.redhat.com Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 13 +++++++++++-- arch/x86/events/perf_event.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) commit 927a5570855836e5d5859a80ce7e91e963545e8f Author: Alexander Shishkin Date: Wed Mar 2 13:24:14 2016 +0200 perf/core: Fix perf_sched_count derailment The error path in perf_event_open() is such that asking for a sampling event on a PMU that doesn't generate interrupts will end up in dropping the perf_sched_count even though it hasn't been incremented for this event yet. Given a sufficient amount of these calls, we'll end up disabling scheduler's jump label even though we'd still have active events in the system, thereby facilitating the arrival of the infernal regions upon us. I'm fixing this by moving account_event() inside perf_event_alloc(). Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/1456917854-29427-1-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ea2ca36b658cfc6081ee454e97593c81f646806e Author: Aravind Gopalakrishnan Date: Mon Mar 7 14:02:21 2016 +0100 x86/mce/AMD: Document some functionality In an attempt to aid in understanding of what the threshold_block structure holds, provide comments to describe the members here. Also, trim comments around threshold_restart_bank() and update copyright info. No functional change is introduced. Signed-off-by: Aravind Gopalakrishnan [ Shorten comments. ] Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1457021458-2522-6-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar arch/x86/include/asm/amd_nb.h | 26 +++++++++++++++++--------- arch/x86/kernel/cpu/mcheck/mce_amd.c | 7 ++----- 2 files changed, 19 insertions(+), 14 deletions(-) commit 2cd3b5f9033f0b051842a279dac5a54271cbd3c8 Author: Aravind Gopalakrishnan Date: Mon Mar 7 14:02:20 2016 +0100 x86/mce: Clarify comments regarding deferred error Deferred errors indicate errors that hardware could not fix. But it still does not cause any interruption to program flow. So it does not generate any #MC and UC bit in MCx_STATUS is not set. Correct comment. Signed-off-by: Aravind Gopalakrishnan Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1457021458-2522-5-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dd1e17a55b0bb1206c71c7a4344c5e3037cdf65 Author: Aravind Gopalakrishnan Date: Mon Mar 7 14:02:19 2016 +0100 x86/mce/AMD: Fix logic to obtain block address In upcoming processors, the BLKPTR field is no longer used to indicate the MSR number of the additional register. Insted, it simply indicates the prescence of additional MSRs. Fix the logic here to gather MSR address from MSR_AMD64_SMCA_MCx_MISC() for newer processors and fall back to existing logic for older processors. [ Drop nextaddr_out label; style cleanups. ] Signed-off-by: Aravind Gopalakrishnan Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1457021458-2522-4-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 4 ++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 84 +++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 29 deletions(-) commit be0aec23bf4624fd55650629fe8df20483487049 Author: Aravind Gopalakrishnan Date: Mon Mar 7 14:02:18 2016 +0100 x86/mce/AMD, EDAC: Enable error decoding of Scalable MCA errors For Scalable MCA enabled processors, errors are listed per IP block. And since it is not required for an IP to map to a particular bank, we need to use HWID and McaType values from the MCx_IPID register to figure out which IP a given bank represents. We also have a new bit (TCC) in the MCx_STATUS register to indicate Task context is corrupt. Add logic here to decode errors from all known IP blocks for Fam17h Model 00-0fh and to print TCC errors. [ Minor fixups. ] Signed-off-by: Aravind Gopalakrishnan Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1457021458-2522-3-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 59 ++++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 29 +++ drivers/edac/mce_amd.c | 335 ++++++++++++++++++++++++++++++++++- 3 files changed, 420 insertions(+), 3 deletions(-) commit adc53f2e0ae2fcff10a4b981df14729ffb1482fc Author: Aravind Gopalakrishnan Date: Mon Mar 7 14:02:17 2016 +0100 x86/mce: Move MCx_CONFIG MSR definitions Those MSRs are used only by the MCE code so move them there. Signed-off-by: Aravind Gopalakrishnan Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1456785179-14378-2-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 4 ++++ arch/x86/include/asm/msr-index.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit a1a8ba2d4a7cf9884b97b733b45692f9114c5132 Merge: b2f9d67 e2857b8 Author: Ingo Molnar Date: Tue Mar 8 11:48:00 2016 +0100 Merge branch 'linus' into ras/core, to pick up fixes Signed-off-by: Ingo Molnar commit 4739f744530a78bbf7e92b5cf93c10bf1ee09f41 Author: Fu Wei Date: Mon Feb 29 16:46:48 2016 +0800 arm64: dts: foundation-v8: add SBSA Generic Watchdog device node This can be a example of adding SBSA Generic Watchdog device node into some dts files for the Soc which contains SBSA Generic Watchdog. Acked-by: Arnd Bergmann Signed-off-by: Fu Wei [edited subject and moved change to dtsi file] Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/foundation-v8.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 836856e3bd61d0644e5178a2c1b51d90459e2788 Author: Arnd Bergmann Date: Wed Mar 2 16:59:02 2016 +0100 wireless: cw1200: use __maybe_unused to hide pm functions_ The cw1200 uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. For the DEV_PM_OPS definition, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/st/cw1200/cw1200_spi.c | 9 ++------- drivers/net/wireless/st/cw1200/pm.h | 9 +++++++-- 2 files changed, 9 insertions(+), 9 deletions(-) commit 73fb270592164b1917442f8bff4c791d095ee2ef Author: Larry Finger Date: Thu Feb 25 11:03:01 2016 -0600 rtlwifi: Fix size of wireless mode variable Smatch reports the following warning: CHECK drivers/net/wireless/realtek/rtlwifi/rc.c drivers/net/wireless/realtek/rtlwifi/rc.c:144 _rtl_rc_rate_set_series() warn: impossible condition '(wireless_mode == 256) => (0-255 == 256)' This warning arises because commit acc6907b87a9 ("rtlwifi: Fix warning from ieee80211_get_tx_rates() when using 5G") now checks the wireless mode for WIRELESS_MODE_AC_ONLY (BIT(8)) in _rtl_rc_rate_set_series(). As a result, all quantities used to store the wireless mode must be u16. This patch also reorders struct rtl_sta_info to save a little space. Fixes: d76d65fd2695 ("rtlwifi: fix broken VHT support") Reported-by: Dan Williams Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rc.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-) commit 6436257b491cc0d456c39330dfc22126148d5ed7 Author: Ingo Molnar Date: Tue Mar 8 11:09:53 2016 +0100 time/timekeeping: Work around false positive GCC warning Newer GCC versions trigger the following warning: kernel/time/timekeeping.c: In function ‘get_device_system_crosststamp’: kernel/time/timekeeping.c:987:5: warning: ‘clock_was_set_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (discontinuity) { ^ kernel/time/timekeeping.c:1045:15: note: ‘clock_was_set_seq’ was declared here unsigned int clock_was_set_seq; ^ GCC clearly is unable to recognize that the 'do_interp' boolean tracks the initialization status of 'clock_was_set_seq'. The GCC version used was: gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) Work it around by initializing clock_was_set_seq to 0. Compilers that are able to recognize the code flow will eliminate the unnecessary initialization. Acked-by: Thomas Gleixner Cc: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b8d1e53f6da63920ba569405b8d57ddbb42a988 Author: Maarten Lankhorst Date: Thu Mar 3 10:17:42 2016 +0100 drm/atomic: Clean up update_connector_routing. connector_state->crtc can no longer be unset by accident, so that check can be removed. The other code open-codes drm_atomic_get_existing_crtc_state, so use that. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä [danvet: Resolve tiny conflict due to gcc warning fix on previous patch.] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit ec5aaa586fe0d826b6e65a60756b9bbf4d93e011 Author: Maarten Lankhorst Date: Thu Mar 3 10:17:41 2016 +0100 drm/atomic: Clean up steal_encoder, v2. Now that only encoders can be stolen that are part of the state steal_encoder no longer needs to inspect all connectors, just those that are part of the atomic state. Changes since v1: - Change return value to void, can no longer fail. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä [danvet: Appease gcc, reported by kbuild.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456996662-8704-7-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 8248b65df653c0a536bdd64f8a6c8bb150bfdd60 Author: Maarten Lankhorst Date: Thu Mar 3 10:17:40 2016 +0100 drm/atomic: Handle encoder assignment conflicts in a separate check, v3. The current check doesn't handle the case where we don't steal an encoder, but keep it on the current connector. If we repurpose disable_conflicting_encoders to do the checking, we just have to reject the ones that conflict. Changes since v1: - Return early with empty encoder_mask, drm_for_each_connector requires connection_mutex held. Changes since v2: - Add comments for the loops. Signed-off-by: Maarten Lankhorst Testcase: kms_setmode.invalid-clone-single-crtc-stealing Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456996662-8704-6-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 77 +++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 34 deletions(-) commit 40616a26d1c68e4c80e2358a02297ba492f4cc17 Author: Maarten Lankhorst Date: Thu Mar 3 10:17:39 2016 +0100 drm/atomic: Handle encoder stealing from set_config better. Instead of failing with -EINVAL when conflicting encoders are found, the legacy set_config will disable other connectors when encoders conflict. With the previous commit this becomes a lot easier to implement. set_config only adds connectors to the state that are modified, and because of the previous commit that calls add_affected_connectors only on set->crtc it means any connector not part of the modeset can be stolen from. We disable the connector in that case, and possibly the crtc if required. Atomic modeset itself still doesn't allow encoder stealing, the results would be too unpredictable. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456996662-8704-5-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 69 +++++++++++++++++++++++++++++++++++++ include/drm/drm_crtc.h | 2 ++ 2 files changed, 71 insertions(+) commit ff19b7867fcaa00638018e116c63aba75c4b07ba Author: Maarten Lankhorst Date: Thu Mar 3 10:17:38 2016 +0100 drm/atomic: Always call steal_encoder, v2. There's no need to have a separate function to get the crtc which is stolen, this can already be found when actually stealing the encoder. drm_for_each_connector already checks for connection_mutex, so use that macro now. Changes since v1: - Do not check for NULL crtc in connector_state, this may happen when a crtc is disabled and its encoder stolen. - Because of this, use connector->state->crtc instead of conn_state->crtc. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456996662-8704-4-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 74 ++++++++++--------------------------- 1 file changed, 20 insertions(+), 54 deletions(-) commit a1ce94d03bfdfaa1ef31c1a84383105888ac5f3b Author: Martin Koegler Date: Wed Mar 2 19:26:28 2016 +0100 ALSA: seq: Provide card number / PID via sequencer client info rawmidi devices expose the card number via IOCTLs, which allows to find the corresponding device in sysfs. The sequencer provides no identifing data. Chromium works around this issue by scanning rawmidi as well as sequencer devices and matching them by using assumtions, how the kernel register sequencer devices. This changes adds support for exposing the card number for kernel clients as well as the PID for user client. The minor of the API version is changed to distinguish between the zero initialised reserved field and card number 0. [minor coding style fixes by tiwai] Signed-off-by: Martin Koegler Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai include/uapi/sound/asequencer.h | 6 ++++-- sound/core/seq/seq_clientmgr.c | 14 ++++++++++++++ sound/core/seq/seq_clientmgr.h | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) commit 56d94d70398f0fbb1863a03a145db1a86f009a71 Merge: bb63f72 fc4f000 Author: Takashi Iwai Date: Tue Mar 8 10:49:43 2016 +0100 Merge branch 'topic/hda' into for-next commit fc4f000bf8c0cbf38f44de6bd5e225574e572ed4 Author: Takashi Iwai Date: Fri Mar 4 11:34:18 2016 +0100 ALSA: hda - Fix unexpected resume through regmap code path HD-audio driver has a mechanism to trigger the runtime resume automatically at accessing the verbs. This auto-resume, however, causes the mutex deadlock when invoked from the regmap handler since the regmap keeps the mutex while auto-resuming. For avoiding that, there is some tricky check in the HDA regmap handler to return -EAGAIN error to back-off when the codec is powered down. Then the caller of regmap r/w will retry after properly turning on the codec power. This works in most cases, but there seems a slight race between the codec power check and the actual on-demand auto-resume trigger. This resulted in the lockdep splat, eventually leading to a real deadlock. This patch tries to address the race window by getting the runtime PM refcount at the check time using pm_runtime_get_if_in_use(). With this call, we can keep the power on only when the codec has been already turned on, and back off if not. For keeping the code consistency, the code touching the runtime PM is stored in hdac_device.c although it's used only locally in hdac_regmap.c. Reported-by: Jiri Slaby Cc: Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 2 ++ sound/hda/hdac_device.c | 16 ++++++++++++ sound/hda/hdac_regmap.c | 69 ++++++++++++++++++++++++++++++++----------------- 3 files changed, 64 insertions(+), 23 deletions(-) commit b9461ba85f11de61d11ad4e13c806ff174ddf577 Merge: 0096685 58ecd33 Author: Ingo Molnar Date: Tue Mar 8 10:15:43 2016 +0100 Merge branch 'email/acme' into perf/core Merge perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Allow grouping multiple sort keys per 'perf report/top --hierarchy' level (Namhyung Kim) - Document 'perf stat --detailed' option (Borislav Petkov) Infrastructure changes: - jitdump prep work for supporting it with Intel PT (Adrian Hunter) - Use 64-bit shifts with (TSC) time conversion (Adrian Hunter) Fixes: - Explicitly declare inc_group_count as a void function (Colin Ian King) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 58ecd33be90647724a78ce5e0b42f5bc482771fd Author: Namhyung Kim Date: Mon Mar 7 16:44:51 2016 -0300 perf report: Use hierarchy hpp list on gtk Now hpp formats are linked using perf_hpp_list_node when hierarchy is enabled. Like in stdio, use this info to print entries with multiple sort keys in a single hierarchy properly. Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-8-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/gtk/hists.c | 55 ++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit a61a22f6845f9e86e0ca60d1d256a35ca12312ef Author: Namhyung Kim Date: Mon Mar 7 16:44:50 2016 -0300 perf hists browser: Use hierarchy hpp list Now hpp formats are linked using perf_hpp_list_node when hierarchy is enabled. Like in stdio, use this info to print entries with multiple sort keys in a single hierarchy properly. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-7-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/browsers/hists.c | 81 +++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 36 deletions(-) commit f58c95e344c26223c6503e6ecb0c1e11806d91e0 Author: Namhyung Kim Date: Mon Mar 7 16:44:49 2016 -0300 perf report: Use hierarchy hpp list on stdio Now hpp formats are linked using perf_hpp_list_node when hierarchy is enabled. Use this info to print entries with multiple sort keys in a single hierarchy properly. For example, the below example shows using 4 sort keys with 2 levels. $ perf report --hierarchy -s '{prev_pid,prev_comm},{next_pid,next_comm}' \ --percent-limit 1 -i perf.data.sched ... # Overhead prev_pid+prev_comm / next_pid+next_comm # ........... ....................................... # 22.36% 0 swapper/0 9.48% 17773 transmission-gt 5.25% 109 kworker/0:1H 1.53% 6524 Xephyr 21.39% 17773 transmission-gt 9.52% 0 swapper/0 9.04% 0 swapper/2 1.78% 0 swapper/3 Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-6-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/stdio/hist.c | 103 +++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 46 deletions(-) commit 2dbbe9f26c082be5aa0e8ba5480e7bac43b2c4f0 Author: Namhyung Kim Date: Mon Mar 7 16:44:48 2016 -0300 perf hists: Fix indent for multiple hierarchy sort key When multiple sort keys are used in a single hierarchy, it should indent using number of hierarchy levels instead of number of sort keys. Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-5-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/browsers/hists.c | 23 ++++++++++------------- tools/perf/ui/hist.c | 1 + tools/perf/ui/stdio/hist.c | 26 +++++++++++--------------- tools/perf/util/hist.h | 1 + 4 files changed, 23 insertions(+), 28 deletions(-) commit a23f37e864609f0887c1cb77c4d5b62586484a61 Author: Namhyung Kim Date: Mon Mar 7 16:44:47 2016 -0300 perf hists: Support multiple sort keys in a hierarchy level This implements having multiple sort keys in a single hierarchy level. Originally only single sort key is supported for each level, but now using the group syntax with '{ }', it can set more than one sort key in one level. Note that now it needs to quote in order to prevent shell interpretation. For example: $ perf report --hierarchy -s '{comm,dso},sym' ... # Overhead Command / Shared Object / Symbol # .............. .......................................... # 48.67% swapper [kernel.vmlinux] 34.42% [k] intel_idle 1.30% [k] __tick_nohz_idle_enter 1.03% [k] cpuidle_reflect 8.87% firefox libpthread-2.22.so 6.60% [.] __GI___libc_recvmsg 1.18% [.] pthread_cond_signal@@GLIBC_2.3.2 1.09% [.] 0x000000000000ff4b 6.11% Xorg libc-2.22.so 5.27% [.] __memcpy_sse2_unaligned In the above example, the command name and the shared object name are shown on the same line but the symbol name is on the different line. Since the first two are grouped by '{}', they are in the same level. Suggested-and-Tested=by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-4-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/sort.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 1b2dbbf41a0f4cf7a5662bccb9a18128d16e5ffb Author: Namhyung Kim Date: Mon Mar 7 16:44:46 2016 -0300 perf hists: Use own hpp_list for hierarchy mode Now each hists has its own hpp lists in hierarchy. So instead of having a pointer to a single perf_hpp_fmt in a hist entry, make it point the hpp_list for its level. This will be used to support multiple sort keys in a single hierarchy level. Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-3-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/browsers/hists.c | 45 +++++++++++++++++-------------- tools/perf/ui/gtk/hists.c | 20 +++++++++----- tools/perf/ui/hist.c | 5 ++++ tools/perf/ui/stdio/hist.c | 44 +++++++++++++++---------------- tools/perf/util/hist.c | 60 ++++++++++++++++++++++++------------------ tools/perf/util/hist.h | 1 + tools/perf/util/sort.h | 1 + 7 files changed, 103 insertions(+), 73 deletions(-) commit c3bc0c436899d01c3a09fddb308d487cc032fbd2 Author: Namhyung Kim Date: Mon Mar 7 16:44:45 2016 -0300 perf hists: Introduce perf_hpp__setup_hists_formats() The perf_hpp__setup_hists_formats() is to build hists-specific output formats (and sort keys). Currently it's only used in order to build the output format in a hierarchy with same sort keys, but it could be used with different sort keys in non-hierarchy mode later. Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457361308-514-2-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/hist.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/hist.c | 12 ++++++++++ tools/perf/util/hist.h | 11 +++++++++ tools/perf/util/sort.c | 32 +++++++++++++++++++++++++ 4 files changed, 118 insertions(+) commit f594bae08183fb6b57db55387794ece3e1edf6f6 Author: Borislav Petkov Date: Mon Mar 7 16:44:44 2016 -0300 perf stat: Document --detailed option I'm surprised this remained undocumented since at least 2011. And it is actually a very useful switch, as Steve and I came to realize recently. Add the text from 2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events") which added the incrementing aspect to -d. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Borislav Petkov Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Mel Gorman Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Fixes: 2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events") Link: http://lkml.kernel.org/r/1457347294-32546-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar tools/perf/Documentation/perf-stat.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4b633eba14627bcb1ef5c7a498e7dc308cd6a5d6 Author: Namhyung Kim Date: Mon Mar 7 16:44:43 2016 -0300 perf hists: Add level field to struct perf_hpp_fmt The level field is to distinguish levels in the hierarchy mode. Currently each column (perf_hpp_fmt) has a different level. Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457103582-28396-2-git-send-email-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 74 ++++++++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 33 deletions(-) commit a23f96ee4d51ebd50b83ce0dbb5d04898fb8e3cb Author: Adrian Hunter Date: Mon Mar 7 16:44:42 2016 -0300 perf tools: Use 64-bit shifts with (TSC) time conversion Commit b9511cd761fa ("perf/x86: Fix time_shift in perf_event_mmap_page") altered the time conversion algorithms documented in the perf_event.h header file, to use 64-bit shifts. That was done to make the code more future-proof (i.e. some time in the future a 32-bit shift could be allowed). Reflect those changes in perf tools. Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457005856-6143-9-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar tools/perf/arch/x86/tests/rdpmc.c | 2 +- tools/perf/util/tsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4a018cc47932ef1e68a0600ce3ac100df70fab2a Author: Adrian Hunter Date: Mon Mar 7 16:44:41 2016 -0300 perf jit: Move clockid validation Move clockid validation into jit_process() so it can later be made conditional. Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457005856-6143-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar tools/perf/builtin-inject.c | 24 ------------------------ tools/perf/util/jitdump.c | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 24 deletions(-) commit 570735b33d122bcb259ef67c6aa63e5609af5752 Author: Adrian Hunter Date: Mon Mar 7 16:44:40 2016 -0300 perf jit: Let jit_process() return errors In preparation for moving clockid validation into jit_process(). Previously a return value of zero meant the processing had been done and non-zero meant either the processing was not done (i.e. not the jitdump file mmap event) or an error occurred. Change it so that zero means the processing was not done, one means the processing was done and successful, and negative values are an error. Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457005856-6143-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar tools/perf/builtin-inject.c | 16 ++++++++++++---- tools/perf/util/jitdump.c | 6 ++++-- 2 files changed, 16 insertions(+), 6 deletions(-) commit 5fb0ac16c5091f48eecf1a77e461f6957a463d61 Author: Adrian Hunter Date: Mon Mar 7 16:44:39 2016 -0300 perf session: Simplify tool stubs Some of the stubs are identical so just have one function for them. Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457005856-6143-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar tools/perf/util/session.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) commit 640dad47988ec4b734d71934be103bb6e931279f Author: Adrian Hunter Date: Mon Mar 7 16:44:38 2016 -0300 perf inject: Hit all DSOs for AUX data in JIT and other cases Currently, when injecting build ids, if there is AUX data then 'perf inject' hits all DSOs because it is not known which DSOs the trace data would hit. That needs to be done for JIT injection also, and in fact there is no reason to distinguish what kind of injection is being done. That is, any time there is AUX data and the HEADER_BUID_ID feature flag is set, and the AUX data is not being processed, then hit all DSOs. This patch does that. Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457005856-6143-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar tools/perf/builtin-inject.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 07ef7574458369cb0345facc748e964af68a75f4 Author: Colin Ian King Date: Mon Mar 7 16:44:37 2016 -0300 perf tools: Explicitly declare inc_group_count as a void function The return type is not defined, so it defaults to int, however, the function is not returning anything, so this is clearly not correct. Make it a void function. Signed-off-by: Colin Ian King Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: David Ahern Cc: He Kuang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wang Nan Link: http://lkml.kernel.org/r/1457008214-14393-1-git-send-email-colin.king@canonical.com Signed-off-by: Ingo Molnar tools/perf/util/parse-events.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7866f5a0bab747bbb10a228bcb15e97839a6c8ba Author: Henry Paulissen Date: Mon Feb 29 00:13:27 2016 +0100 pinctrl: sunxi: Change mux setting on PI irq pins While I was testing irq's on the cubietruck I found a couple of not working irq pins. Further diving into the problem it opened up a mess called "manual". This so called manual (A20 user manual v1.3 dated 2014-10-10) says: Pin overview: Page 237: EINT26 is on mux 5. Page 288: EINT26 is on mux 6. The manual is so contradicting that further tests had to be made to see which of the 2 statements where correct. This patch is based on actual outcome of these tests and not what the manual says. Test procedure used: Connect a 1 pulse per second (GPS) line to the pin. echo pin### > /sys/class/gpio/export echo in > /sys/class/gpio/gpio###/direction echo rising > /sys/class/gpio/gpio###/edge Check /proc/interrupts if a irq was attached and if irq's where received. Hardware used: Henry Paulissen: Cubietruck Andere Przywara: BananaPi M1 Tested-by: Andre Przywara Reviewed-by: Andre Przywara Signed-off-by: Henry Paulissen Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9c24ef41fe128eb4c36b7786fced39ef5acd10de Author: Henry Paulissen Date: Mon Feb 29 00:13:26 2016 +0100 pinctrl: sunxi: Remove non existing irq's While I was testing irq's on the cubietruck I found a couple of not working irq pins. Further diving into the problem it opened up a mess called "manual". This so called manual (A20 user manual v1.3 dated 2014-10-10) says: Pin overview: Page 233: EINT12 is on pin PC19 mux6. Page 236: EINT12 is on pin PH12 mux6. Now, it is a bit strange to have the same IRQ on 2 different pins, but I guess this could still be possible hardware wise. But then: Pin registers: Page 253: EINT12 is *not* on pin PC19. Page 281: EINT12 is on pin PH12. The manual is so contradicting that further tests had to be made to see which of the 2 statements where correct. This patch is based on actual outcome of these tests and not what the manual says. Test procedure used: Connect a 1 pulse per second (GPS) line to the pin. echo pin### > /sys/class/gpio/export echo in > /sys/class/gpio/gpio###/direction echo rising > /sys/class/gpio/gpio###/edge Check /proc/interrupts if a irq was attached and if irq's where received. Signed-off-by: Henry Paulissen Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit fa283db76f681b9e17af2c329817042134178e7f Author: Amitoj Kaur Chawla Date: Sun Feb 28 18:00:56 2016 +0530 gpio: timberdale: Switch to devm_ioremap_resource() Replace calls to devm_request_mem_region and devm_ioremap with a direct call to devm_ioremap_resource instead and modify error handling. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the Coccinelle semantic patch that is used to make this change is as follows: // @nm@ expression myname; identifier i; @@ struct platform_driver i = { .driver = { .name = myname } }; @@ expression dev,res,size,e1,e; expression nm.myname; @@ -if (!devm_request_mem_region(dev, res->start, size, - \(res->name\|dev_name(dev)\|myname\))) { - ... - return ...; -} ... when != res->start = e1 e = -devm_ioremap(dev,res->start,size); +devm_ioremap_resource(dev,res); if -(e == NULL) +(IS_ERR(e)) { ... -return ...; +return PTR_ERR(e); } // Further, updated error handling by hand as devm_ioremap_resource gives appropriate error messages, so remove unnecessary error messages. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Linus Walleij drivers/gpio/gpio-timberdale.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit 8626ada871f123390b39910d47de84ab3cf67443 Author: Philipp Zabel Date: Thu Feb 25 18:23:07 2016 +0100 pinctrl: imx: attach iomuxc device to gpr syscon Commit bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform devices") added the possibility to register syscon devices without associated platform device. This also removed regmap debugfs facilities, which don't work without a device. This patch associates the syscon regmap that handles the IOMUX controller's general purpose registers with the pinctrl device so that the GPR registers appear in the regmap debugfs directory again. For example, on i.MX6Q the GPR registers now can be read from /sys/kernel/debug/regmap/20e0000.iomuxc-gpr/registers. Signed-off-by: Philipp Zabel Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 10 ++++++++++ drivers/pinctrl/freescale/pinctrl-imx.h | 1 + drivers/pinctrl/freescale/pinctrl-imx50.c | 1 + drivers/pinctrl/freescale/pinctrl-imx53.c | 1 + drivers/pinctrl/freescale/pinctrl-imx6dl.c | 1 + drivers/pinctrl/freescale/pinctrl-imx6q.c | 1 + drivers/pinctrl/freescale/pinctrl-imx6sl.c | 1 + drivers/pinctrl/freescale/pinctrl-imx6sx.c | 1 + drivers/pinctrl/freescale/pinctrl-imx6ul.c | 1 + drivers/pinctrl/freescale/pinctrl-imx7d.c | 1 + 10 files changed, 19 insertions(+) commit 6dcfd7291bae5ed030bb2b3f69c734f62606ef9b Author: Julien Grossholtz Date: Fri Feb 26 18:06:59 2016 -0500 gpio: ts4800: Add IMX51 dependency The TS-4800 is an i.MX515 board. Its GPIO driver should only be compiled for this CPU or for test builds. Signed-off-by: Julien Grossholtz Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2c7e3306d23864d49f686f22e56e180ff0fffb7f Author: Phil Elwell Date: Mon Feb 29 17:30:08 2016 -0800 pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing The DT bindings for pinctrl-bcm2835 allow both the function and pull to contain either one entry or one per pin. However, an error in the DT parsing can cause failures if the number of pulls differs from the number of functions. Cc: stable@vger.kernel.org Signed-off-by: Eric Anholt Signed-off-by: Phil Elwell Reviewed-by: Stephen Warren Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ace2e7a48ab426eaa9745ace4c50c6a7adb3992 Author: Borislav Petkov Date: Mon Mar 7 11:10:04 2016 +0100 x86/microcode/intel: Drop orig_sum from ext signature checksum It is 0 because for !0 values we would have exited already. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1457345404-28884-6-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/intel_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5b46b5e003724547f0c83041cada15f9f496590d Author: Borislav Petkov Date: Mon Mar 7 11:10:03 2016 +0100 x86/microcode/intel: Improve microcode sanity-checking error messages Turn them into proper sentences. Add comments to microcode_sanity_check() to explain what it does. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1457345404-28884-5-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/intel_lib.c | 36 ++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 7d0161569a3b66aaa01520002c3e5fd7126d071f Author: Borislav Petkov Date: Mon Mar 7 11:10:02 2016 +0100 x86/microcode/intel: Merge two consecutive if-statements Merge the two consecutive "if (ext_table_size)". No functional change. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1457345404-28884-4-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/intel_lib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c0414622177ae4739a49ca7dad4306a681e2878b Author: Borislav Petkov Date: Mon Mar 7 11:10:01 2016 +0100 x86/microcode/intel: Get rid of DWSIZE sizeof(u32) is perfectly clear as it is. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1457345404-28884-3-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/microcode_intel.h | 1 - arch/x86/kernel/cpu/microcode/intel_lib.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit bc864af13f34d19c911f5691d87bdacc9ce109f5 Author: Chris Bainbridge Date: Mon Mar 7 11:10:00 2016 +0100 x86/microcode/intel: Change checksum variables to u32 Microcode checksum verification should be done using unsigned 32-bit values otherwise the calculation overflow results in undefined behaviour. This is also nicely documented in the SDM, section "Microcode Update Checksum": "To check for a corrupt microcode update, software must perform a unsigned DWORD (32-bit) checksum of the microcode update. Even though some fields are signed, the checksum procedure treats all DWORDs as unsigned. Microcode updates with a header version equal to 00000001H must sum all DWORDs that comprise the microcode update. A valid checksum check will yield a value of 00000000H." but for some reason the code has been using ints from the very beginning. In practice, this bug possibly manifested itself only when doing the microcode data checksum - apparently, currently shipped Intel microcode doesn't have an extended signature table for which we do checksum verification too. UBSAN: Undefined behaviour in arch/x86/kernel/cpu/microcode/intel_lib.c:105:12 signed integer overflow: -1500151068 + -2125470173 cannot be represented in type 'int' CPU: 0 PID: 0 Comm: swapper Not tainted 4.5.0-rc5+ #495 ... Call Trace: dump_stack ? inotify_ioctl ubsan_epilogue handle_overflow __ubsan_handle_add_overflow microcode_sanity_check get_matching_model_microcode.isra.2.constprop.8 ? early_idt_handler_common ? strlcpy ? find_cpio_data load_ucode_intel_bsp load_ucode_bsp ? load_ucode_bsp x86_64_start_kernel [ Expand and massage commit message. ] Signed-off-by: Chris Bainbridge Signed-off-by: Borislav Petkov Cc: hmh@hmh.eng.br Link: http://lkml.kernel.org/r/1456834359-5132-1-git-send-email-chris.bainbridge@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/intel_lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c77dd678a7659d58625bd3b3a36d1329d9e7d44c Author: Sudip Mukherjee Date: Tue Mar 8 13:35:31 2016 +0530 ASoC: rt5640: remove unused variable We are getting build warning about: sound/soc/codecs/rt5640.c:1892:11: warning: unused variable 'dai_sel' The use of the variable was removed but the variable itself was not removed. Fixes: c467fc0e010b ("ASoC: rt5640: Set PLL src according to source") Signed-off-by: Sudip Mukherjee Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 016bf20829fa00f5e64805f77b7677365151f4af Merge: a961f9b 725e3b7 Author: Linus Walleij Date: Tue Mar 8 14:41:41 2016 +0700 Merge branch 'devm-gpiochip-add-data' into devel commit a7c2ded6962da1ee289c37a988b73d313388c803 Author: James Ban Date: Tue Mar 8 11:37:03 2016 +0900 regulator: pv88060: fix incorrect clear of event register This is a patch to fix incorrect clear of event register. Signed-off-by: James Ban Signed-off-by: Mark Brown drivers/regulator/pv88060-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e729b50307bfe9c541d08dd591c1dd6aef1999e8 Author: Lars-Peter Clausen Date: Fri Mar 4 11:15:06 2016 +0100 be2iscsi: 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: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9648388fc7737365be7a8092e77df78ccc2cd1a4 Author: Brian Norris Date: Fri Jan 29 11:25:37 2016 -0800 mtd: spi-nor: support lock/unlock for a few Winbond chips These are recent Winbond models that are known to have lock/unlock support via writing the Status Register, and that also support the TB (Top/Bottom) protection bit. Tested on w25q32dw. [Note on style: these entries are getting pretty long lines, so I picked a style that seems reasonable for splitting up the flags separate from the other mostly-similar fields.] Signed-off-by: Brian Norris Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d Author: Brian Norris Date: Fri Jan 29 11:25:36 2016 -0800 mtd: spi-nor: add TB (Top/Bottom) protect support Some flash support a bit in the status register that inverts protection so that it applies to the bottom of the flash, not the top. This yields additions to the protection range table, as noted in the comments. Because this feature is not universal to all flash that support lock/unlock, control it via a new flag. Signed-off-by: Brian Norris Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 70 ++++++++++++++++++++++++++++++++++++++----- include/linux/mtd/spi-nor.h | 2 ++ 2 files changed, 65 insertions(+), 7 deletions(-) commit 76a4707de5e18dc32d9cb4e990686140c5664a15 Author: Brian Norris Date: Fri Jan 29 11:25:35 2016 -0800 mtd: spi-nor: add SPI_NOR_HAS_LOCK flag We can't determine this purely by manufacturer type (see commit 67b9bcd36906 ("mtd: spi-nor: fix Spansion regressions (aliased with Winbond)")), and it's not autodetectable by anything like SFDP. So make a new flag for it. Signed-off-by: Brian Norris Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0618114e2c5dd059f8d22787e62e3f1723af68fc Author: Brian Norris Date: Fri Jan 29 11:25:34 2016 -0800 mtd: spi-nor: use BIT() for flash_info flags It's a little easier to read and make sure there are no collisions (IMO). Signed-off-by: Brian Norris Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 47b8edbf0d43dcb9fda83833c05470edf59c31e3 Author: Brian Norris Date: Fri Jan 29 11:25:33 2016 -0800 mtd: spi-nor: disallow further writes to SR if WP# is low Locking the flash is most useful if it provides real hardware security. Otherwise, it's little more than a software permission bit. A reasonable use case that provides real HW security might be like follows: (1) hardware WP# is deasserted (2) program flash (3) flash range is protected via status register (4) hardware WP# is asserted (5) flash protection range can no longer be changed, until WP# is deasserted In this way, flash protection is co-owned by hardware and software. Now, one would expect to be able to perform step (3) with ioctl(MEMLOCK), except that the spi-nor driver does not set the Status Register Protect bit (a.k.a. Status Register Write Disable (SRWD)), so even though the range is now locked, it does not satisfy step (5) -- it can still be changed by a call to ioctl(MEMUNLOCK). So, let's enable status register protection after the first lock command, and disable protection only when the flash is fully unlocked. Signed-off-by: Brian Norris Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f8860802da84aa2bbc9f316e549a349fb40cda63 Author: Brian Norris Date: Fri Jan 29 11:25:32 2016 -0800 mtd: spi-nor: make lock/unlock bounds checks more obvious and robust There are a few different corner cases to the current logic that seem undesirable: * mtd_lock() with offs==0 trips a bounds issue on ofs - mtd->erasesize < 0 * mtd_unlock() on the middle of a flash that is already unlocked will return -EINVAL * probably other corner cases So, let's stop doing "smart" checks like "check the block below us", let's just do the following: (a) pass only non-negative offsets/lengths to stm_is_locked_sr() (b) add a similar stm_is_unlocked_sr() function, so we can check if the *entire* range is unlocked (and not just whether some part of it is unlocked) Then armed with (b), we can make lock() and unlock() much more symmetric: (c) short-circuit the procedure if there is no work to be done, and (d) check the entire range above/below This also aligns well with the structure needed for proper TB (Top/Bottom) support. Signed-off-by: Brian Norris Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 68 +++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 18 deletions(-) commit 4c0dba447ef4a97dfbae6e876312e952667eddc4 Author: Brian Norris Date: Fri Jan 29 11:25:31 2016 -0800 mtd: spi-nor: silently drop lock/unlock for already locked/unlocked region If, for instance, the entire flash is already unlocked and I try to mtd_unlock() the entire device, I don't expect to see an EINVAL error. It should just silently succeed. Ditto for mtd_lock(). Signed-off-by: Brian Norris Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit edf891ef9ab773363f8e58022a26d7d31604aed6 Author: Brian Norris Date: Fri Jan 29 11:25:30 2016 -0800 mtd: spi-nor: wait for SR_WIP to clear on initial unlock Fixup a piece leftover by commit 32321e950d8a ("mtd: spi-nor: wait until lock/unlock operations are ready"). That commit made us wait for the WIP bit to settle after lock/unlock operations, but it missed the open-coded "unlock" that happens at probe() time. We should probably have this code utilize the unlock() routines in the future, to avoid duplication, but unfortunately, flash which need to be unlocked don't all have a proper ->flash_unlock() callback. Signed-off-by: Brian Norris Cc: Stas Sergeev Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit 550e3b23a53c88adfa46e64f9d442743e65d47da Merge: 984fee6 6157bd7 Author: Dave Airlie Date: Tue Mar 8 10:51:51 2016 +1000 Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next Some more radeon and amdgpu stuff for drm-next. Mostly just bug fixes for new features and cleanups. * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix rb bitmap & cu bitmap calculation drm/amdgpu: trace the pd_addr in vm_grab_id as well drm/amdgpu: fix VM faults caused by vm_grab_id() v4 drm/amdgpu: update radeon acpi header drm/radeon: update radeon acpi header drm/amd: cleanup get_mfd_cell_dev() drm/amdgpu: fix error handling in amdgpu_bo_list_set drm/amd/powerplay: fix code style warning. drm/amd: Do not make DRM_AMD_ACP default to y drm/amdgpu/gfx: fix off by one in rb rework (v2) commit 984fee64355bf5384319e2ef31f0b03273629799 Merge: 507d44a 8779aa8 Author: Dave Airlie Date: Tue Mar 8 10:51:14 2016 +1000 Merge branch 'drm-etnaviv-next' of git://git.pengutronix.de/git/lst/linux into drm-next Notable changes: - correctness fixes to the GPU cache flushing when switching execution state and when powering down the GPU - reduction of time spent in hardirq-off context - placement improvements to the GPU DMA linear window, allowing the driver to properly work on i.MX6 systems with more than 2GB of RAM * 'drm-etnaviv-next' of git://git.pengutronix.de/git/lst/linux: drm: etnaviv: clean up submit_bo() drm: etnaviv: clean up vram_mapping submission/retire path drm: etnaviv: improve readability of command insertion to ring buffer drm: etnaviv: clean up GPU command submission drm: etnaviv: use previous GPU pipe state when pipe switching drm: etnaviv: flush all GPU caches when stopping GPU drm: etnaviv: track current execution state drm: etnaviv: extract arming of semaphore drm: etnaviv: extract replacement of WAIT command drm: etnaviv: extract command ring reservation drm/etnaviv: move GPU linear window to end of DMA window drm/etnaviv: move runtime PM balance into retire worker commit 507d44a9e1bb01661c75b88fd866d2461ab41c9c Merge: d8c6166 5790ff7 Author: Dave Airlie Date: Tue Mar 8 10:50:37 2016 +1000 Merge tag 'drm-intel-next-2016-02-29' of git://anongit.freedesktop.org/drm-intel into drm-next - fbc by default on hsw&bdw, thanks to great work by Paulo! - psr by default hsw,bdw,vlv&chv, thanks to great work by Rodrigo! - fixes to hw state readout vs. rpm issues (Imre) - dc3 fixes&improvements (Mika), this and above already cherr-pick to -fixes - first part of locking fixes from Tvrtko - proper atomic code for load detect (Maarten) - more rpm fixes from Ville - more atomic work from Maarten * tag 'drm-intel-next-2016-02-29' of git://anongit.freedesktop.org/drm-intel: (63 commits) drm/i915: Update DRIVER_DATE to 20160229 drm/i915: Execlists cannot pin a context without the object drm/i915: Reduce the pointer dance of i915_is_ggtt() drm/i915: Rename vma->*_list to *_link for consistency drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) drm/i915/lrc: Only set RS ctx enable in ctx control reg if there is a RS drm/i915/gen9: Set value of Indirect Context Offset based on gen version drm/i915: Remove update_sprite_watermarks. drm/i915: Kill off intel_crtc->atomic.wait_vblank, v6. drm/i915: Unify power domain handling. drm/i915: Pass crtc state to modeset_get_crtc_power_domains. drm/i915: Add for_each_pipe_masked() drm/i915: Make sure pipe interrupts are processed before turning off power well on BDW+ drm/i915: synchronize_irq() before turning off disp2d power well on VLV/CHV drm/i915: Skip PIPESTAT reads from irq handler on VLV/CHV when power well is down drm/i915/gen9: Write dc state debugmask bits only once drm/i915/gen9: Extend dmc debug mask to include cores drm/i915/gen9: Verify and enforce dc6 state writes drm/i915/gen9: Check for DC state mismatch drm/i915/fbc: enable FBC by default on HSW and BDW ... commit d8c61663c7a8e5041f5c2a4b142f24d0d7861ad6 Merge: a90cc3f2 d0ec32c Author: Dave Airlie Date: Tue Mar 8 10:49:58 2016 +1000 Merge tag 'tilcdc-4.6' of https://github.com/jsarha/linux into drm-next tilcdc changes for v4.6 Accumulated fixes and improvements from ti-linux-4.1. * Almost complete rewrite of pagefliping code * dma-buf support * pinctrl support * lot of fixes and cleanups * tag 'tilcdc-4.6' of https://github.com/jsarha/linux: (22 commits) drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data drm/tilcdc: Initialize crtc->port drm/tilcdc: Disable sync lost interrupt if it fires on every frame drm/tilcdc: Add prints on sync lost and FIFO underrun interrupts drm/tilcdc: Remove the duplicate LCDC_INT_ENABLE_SET_REG in registers[] drm/tilcdc: Fix interrupt enable/disable code for version 2 tilcdc drm/tilcdc: Do not update the next frame buffer close to vertical blank drm/tilcdc: Get rid of complex ping-pong mechanism drm/tilcdc: cleanup irq handling drm/tilcdc: remove broken error handling drm/tilcdc: split reset to a separate function drm/tilcdc: disable crtc on unload drm/tilcdc: cleanup runtime PM handling drm/tilcdc: Allocate register storage based on the actual number registers drm/tilcdc: fix build error when !CONFIG_CPU_FREQ drm/tilcdc: Implement dma-buf support for tilcdc drm/tilcdc: disable the lcd controller/dma engine when suspend invoked drm/tilcdc: make frame_done interrupt active at all times drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected drm/tilcdc: adopt pinctrl support ... commit a8c65d504e0b2256f7672506ae6ea68d88ef020a Author: Boris BREZILLON Date: Mon Mar 7 10:46:54 2016 +0100 mtd: nand: simplify nand_bch_init() usage nand_bch_init() requires several arguments which could directly be deduced from the mtd device. Get rid of those useless parameters. nand_bch_init() is also requiring the caller to provide a proper eccbytes value, while this value could be deduced from the ecc.size and ecc.strength value. Fallback to eccbytes calculation when it is set to 0. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 6 ++---- drivers/mtd/nand/nand_bch.c | 27 +++++++++++++++++---------- drivers/mtd/nand/omap2.c | 28 ++++++++++++---------------- include/linux/mtd/nand_bch.h | 8 ++------ 4 files changed, 33 insertions(+), 36 deletions(-) commit f2de0fa64306651bc5aa04f6bb56c057658486d5 Author: Boris BREZILLON Date: Mon Mar 7 10:46:53 2016 +0100 mtd: mtdswap: remove useless if (!mtd->ecclayout) test If the MTD device does not have OOB, the mtd->oobsize and mtd->oobavail fields are set to zero, and we are testing those values in the following test. Remove the useless if (!mtd->ecclayout) test. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/mtdswap.c | 8 -------- 1 file changed, 8 deletions(-) commit 29f1058a90b319b01c4cf469720e0350212d5c9c Author: Boris BREZILLON Date: Mon Mar 7 10:46:52 2016 +0100 mtd: create an mtd_oobavail() helper and make use of it Currently, all MTD drivers/sublayers exposing an OOB area are doing the same kind of test to extract the available OOB size based on the mtd_info and mtd_oob_ops structures. Move this common logic into an inline function and make use of it. Signed-off-by: Boris Brezillon Suggested-by: Priit Laes Signed-off-by: Brian Norris drivers/mtd/mtdpart.c | 5 +---- drivers/mtd/nand/nand_base.c | 16 ++++------------ drivers/mtd/onenand/onenand_base.c | 19 +++---------------- include/linux/mtd/mtd.h | 5 +++++ 4 files changed, 13 insertions(+), 32 deletions(-) commit f5b8aa78ef086248145363bf1ffe5ca4348b6a98 Author: Boris BREZILLON Date: Mon Mar 7 10:46:51 2016 +0100 mtd: kill the ecclayout->oobavail field ecclayout->oobavail is just redundant with the mtd->oobavail field. Moreover, it prevents static const definition of ecc layouts since the NAND framework is calculating this value based on the ecclayout->oobfree field. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/devices/docg3.c | 5 ++- drivers/mtd/mtdswap.c | 16 ++++----- drivers/mtd/nand/brcmnand/brcmnand.c | 8 ++--- drivers/mtd/nand/docg4.c | 1 - drivers/mtd/nand/hisi504_nand.c | 1 - drivers/mtd/nand/nand_base.c | 14 ++++---- drivers/mtd/onenand/onenand_base.c | 16 ++++----- drivers/mtd/tests/oobtest.c | 49 +++++++++++++-------------- drivers/staging/mt29f_spinand/mt29f_spinand.c | 1 - fs/jffs2/wbuf.c | 6 ++-- include/linux/mtd/mtd.h | 1 - 11 files changed, 53 insertions(+), 65 deletions(-) commit 708a24c18979af6a55fc3d9a397910af0d47872a Author: James Simmons Date: Mon Mar 7 18:10:24 2016 -0500 staging: lustre: make LNet use lprocfs_call_handler Sometime ago a patch was submitted to duplicate the proc_call_handler code in the LNet layer. This was due to the thinking libcfs was not used by the LNet layer. This was a wrong assumption so lets make LNet use the lprocfs_call_handler from the libcfs layer. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/libcfs/libcfs.h | 4 +++ drivers/staging/lustre/lnet/lnet/router_proc.c | 32 ++++------------------ drivers/staging/lustre/lustre/libcfs/module.c | 9 +++--- 3 files changed, 15 insertions(+), 30 deletions(-) commit 5900ba932efc30fce67abeb8f73ad2b3e522915e Author: James Simmons Date: Mon Mar 7 18:10:23 2016 -0500 staging: lustre: rename proc_call_handler to lprocfs_call_handler Using proc_call_handler as a function name is way too generic. Rename to lprocfs_call_handler to avoid possible collisions. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/libcfs/module.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 31b36ec65007f18c485ede7920ec3e1ea9614414 Author: James Simmons Date: Mon Mar 7 18:10:22 2016 -0500 staging: lustre: change test to assert in LNetGetId The ln_refcount test was changed into an assert. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/api-ni.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 19b2056ff7a9a2f711decee389ad75cca1e25ee4 Author: James Nunez Date: Mon Mar 7 18:10:21 2016 -0500 staging: lustre: Correct missing newline Several error messages are missing newline characters at the end of the message. Newlines are added where necessary and other minor corrections; no punctuation at the end of an error message, add a return code to the end of error messages, device name at the beginning, etc. There are just a couple of places where newlines are removed and this is only in LDLM_DEBUG_NOLOCK. The definition of LDLM_DEBUG_NOLOCK already has a newline in it and resulted in double newlines printed. Signed-off-by: James Nunez Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4871 Reviewed-on: http://review.whamcloud.com/10000 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Cliff White Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/framework.c | 6 +++--- drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 8 ++++---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 ++- drivers/staging/lustre/lustre/mgc/mgc_request.c | 3 ++- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- drivers/staging/lustre/lustre/obdecho/echo_client.c | 8 ++++++-- drivers/staging/lustre/lustre/osc/osc_cache.c | 9 +++++---- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/client.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/sec.c | 4 ++-- 19 files changed, 40 insertions(+), 32 deletions(-) commit ea7a1484baa33574f932f0ade4443072ec0fc9fe Author: Sebastien Buisson Date: Mon Mar 7 18:10:20 2016 -0500 staging: lustre: fix 'data race condition' issue in framework.c Fix 'data race condition' defects found by Coverity version 6.5.0: Data race condition (MISSING_LOCK) Accessing variable without holding lock. Elsewhere, this variable is accessed with lock held. Signed-off-by: Sebastien Buisson Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744 Reviewed-on: http://review.whamcloud.com/6568 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/framework.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a739735c55a961d342652b38b27d3ef1c2d1ca1c Author: Sebastien Buisson Date: Mon Mar 7 18:10:19 2016 -0500 staging: lustre: fix 'NULL pointer dereference' errors Fix 'NULL pointer dereference' defects found by Coverity version 6.5.3: Dereference after null check (FORWARD_NULL) For instance, Passing null pointer to a function which dereferences it. Dereference before null check (REVERSE_INULL) Null-checking variable suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Dereference null return value (NULL_RETURNS) The following fixes for the LNet layer are broken out of patch http://review.whamcloud.com/4720. Signed-off-by: Sebastien Buisson Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2217 Reviewed-on: http://review.whamcloud.com/4720 Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/lib-move.c | 2 + drivers/staging/lustre/lnet/selftest/conctl.c | 49 +++++++++++----------- .../lustre/lustre/include/lustre/lustre_user.h | 3 ++ drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 7 +++- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 10 ++++- .../lustre/lustre/obdclass/lprocfs_status.c | 24 ++++++----- drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +- 9 files changed, 61 insertions(+), 40 deletions(-) commit c206f8bc543858ed2d82b1547c1a986dbd3df022 Author: Sebastien Buisson Date: Mon Mar 7 18:10:18 2016 -0500 staging: lustre: fix 'data race condition' issue in conrpc.c Fix 'data race condition' defects found by Coverity version 6.5.0: Data race condition (MISSING_LOCK) Accessing variable without holding lock. Elsewhere, this variable is accessed with lock held. Signed-off-by: Sebastien Buisson Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744 Reviewed-on: http://review.whamcloud.com/6567 Reviewed-by: Liang Zhen Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conrpc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b7acfc959b72cbb429859ec4912b48f00eacf2c3 Author: Liang Zhen Date: Mon Mar 7 18:10:17 2016 -0500 staging: lustre: LNet network latency simulation Incoming lnet message can be delayed for seconds if it can match any of LNet Delay Rules. User can add/remove/list Delay Rule by lctl commands: - lctl net_delay_add Add a new Delay Rule to LNet, options <-s | --source SRC_NID> <-d | --dest DST_NID> <<-r | --rate RATE_NUMBER> <-i | --interlval SECONDS>> <-l | --latency DELAY_LATENCY> - lctl net_delay_del Remove matched Delay Rule from LNet, options: <[-a | --all] | <-s | --source SRC_NID> <-d | --dest DST_NID>> - lctl net_delay_list List all Delay Rules in LNet - lctl net_delay_reset Reset statistic counters for all Delay Rules Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11409 Reviewed-by: Amir Shehata Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 17 + .../staging/lustre/include/linux/lnet/lib-types.h | 3 + .../staging/lustre/include/linux/lnet/lnetctl.h | 21 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 1 + drivers/staging/lustre/lnet/lnet/lib-move.c | 73 +-- drivers/staging/lustre/lnet/lnet/lib-msg.c | 6 + drivers/staging/lustre/lnet/lnet/net_fault.c | 595 ++++++++++++++++++++- 7 files changed, 681 insertions(+), 35 deletions(-) commit 0fbbced21a94e038e4edb9069fa7a6d98c7ec64a Author: Liang Zhen Date: Mon Mar 7 18:10:16 2016 -0500 staging: lustre: LNet drop rule implementation This is implementation of LNet Drop Rule, which can randomly drop LNet messages at specified rate. LNet Drop Rule can only be applied to receive side of message. User can add drop_rule either on end point of cluster (client/server) or on LNet routers. Here are lctl command to control LNet Drop Rules: - net_drop_add -s SRC_NID -d DEST_NID --rate VALUE drop 1/@VALUE of messages from @SRC_NID to @DEST_NID - net_drop_del -s SRC_NID -d DEST_NID remove all drop rules from @SRC_NID to @DEST_NID - net_drop_list list all drop rules on current node Examples: - lctl net_drop_add -s *@o2ib0 -d 192.168.1.102@tcp 1000 add new drop rule, it will drop 1/1000 messages from network o2ib0 to 192.168.1.102@tcp - lctl net_drop_add -s 10.8.6.123@o2ib1 -d * 500 add new drop rule, it will drop 1/500 messages from 10.8.6.123@o2ib1 to all nodes Signed-off-by: Liang Zhen Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435 Reviewed-on: http://review.whamcloud.com/11314 Reviewed-by: Bobi Jam Reviewed-by: Amir Shehata Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_ioctl.h | 1 + .../staging/lustre/include/linux/lnet/lib-lnet.h | 10 + .../staging/lustre/include/linux/lnet/lib-types.h | 2 + .../staging/lustre/include/linux/lnet/lnetctl.h | 83 ++++ drivers/staging/lustre/lnet/lnet/Makefile | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 6 + drivers/staging/lustre/lnet/lnet/lib-move.c | 8 + drivers/staging/lustre/lnet/lnet/net_fault.c | 434 +++++++++++++++++++++ 8 files changed, 545 insertions(+), 1 deletion(-) commit a95fc9c8e576dc238ad849f65c67e4fd33c01d3b Author: Maciej S. Szmigiero Date: Sat Mar 5 18:35:30 2016 +0100 serial: 8250: describe CONFIG_SERIAL_8250_RSA CONFIG_SERIAL_8250_RSA has waited for a long time to have meaningful help text so let's finally describe what this option actually does. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit aba06e922234c72ac7f98e838b336b20228c232b Author: Youngmin Nam Date: Sat Mar 5 19:36:32 2016 +0900 serial: samsung: optimize UART rx fifo access routine This patch optimizes UART rx fifo access routine by reading UART SFR when necessary. At first, the "fifocnt" variable will be initialized as Rx FIFO count. So we don't need to access UFSTAT(FIFO status) register every time to check FIFO count because we know that count with "fifocnt". After all data were read out from Rx FIFO, the "fifocnt" will be set as 0. Lastly, UFSTAT will be accessed again to check whether the data remains by any chance. Signed-off-by: Youngmin Nam Reviewed-by: Jung-Ick Guack Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit bb70002cb7430252c6c8e3b19ad66957f253e667 Author: Ed Spiridonov Date: Fri Mar 4 08:11:53 2016 +0300 serial: pl011: add mark/space parity support PL011 UART has hardware mark/space parity ability, this trivial patch adds support for it. Tested on Raspberry Pi v1, v2 (BCM2835 and BCM2836) Signed-off-by: Ed Spiridonov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 ++ 1 file changed, 2 insertions(+) commit 0607616d9311096bfd1c325c36ffbfa71ccd40ab Author: Arnd Bergmann Date: Thu Feb 25 15:33:46 2016 +0100 serial: sa1100: make sa1100_register_uart_fns a function Calling sa1100_register_uart_fns() leaves the port structure unused when CONFIG_SERIAL_SA1100 is disabled, and we get a compiler warning about that: arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable] static struct sa1100_port_fns badge4_port_fns __initdata = { This turns the two empty macros into empty inline functions, which has the same effect, but lets the compiler know that the variables are intentionally unused. Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman include/linux/platform_data/sa11x0-serial.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c216c4ad592e30342ab55aface6f928ac16412db Author: Mathieu OTHACEHE Date: Wed Feb 24 20:10:22 2016 +0100 tty: serial: 8250: add MOXA Smartio MUE boards support Add support for : - CP-102E: 2 ports RS232 PCIE card - CP-102EL: 2 ports RS232 PCIE card - CP-132EL: 2 ports RS422/485 PCIE card - CP-114EL: 4 ports RS232/422/485 PCIE card - CP-104EL-A: 4 ports RS232 PCIE card - CP-168EL-A: 8 ports RS232 PCIE card - CP-118EL-A: 8 ports RS232/422/485 PCIE card - CP-118E-A: 8 ports RS422/485 PCIE card - CP-138E-A: 8 ports RS422/485 PCIE card - CP-134EL-A: 4 ports RS422/485 PCIE card - CP-116E-A (A): 8 ports RS232/422/485 PCIE card - CP-116E-A (B): 8 ports RS232/422/485 PCIE card This patch is based on information extracted from vendor mxupcie driver available on MOXA website. I was able to test it on a CP-168EL-A on PC. Signed-off-by: Mathieu OTHACEHE Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_moxa.c | 157 ++++++++++++++++++++++++++++++++++++ drivers/tty/serial/8250/8250_pci.c | 14 ++++ drivers/tty/serial/8250/Kconfig | 10 +++ drivers/tty/serial/8250/Makefile | 1 + 4 files changed, 182 insertions(+) commit 013e3586d84bfe9f6b4b44eecdc3842978644d78 Author: Andy Shevchenko Date: Thu Feb 18 21:22:59 2016 +0200 serial: 8250: convert drivers to use up_to_u8250p() up_to_u8250p() casts struct uart_port * to struct uart_8250_port *. Update code to use it instead of open coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 4 +--- drivers/tty/serial/8250/8250_omap.c | 9 +++------ drivers/tty/serial/8250/8250_port.c | 9 +++------ 3 files changed, 7 insertions(+), 15 deletions(-) commit 3f5921a60f74e3f3ac975884759208cb9497b461 Author: Arnd Bergmann Date: Wed Feb 17 16:02:35 2016 +0100 serial: 8250/mediatek: fix building with SERIAL_8250=m The Mediatek 8250 driver has a 'bool' Kconfig symbol, but that breaks when SERIAL_8250 is a loadable module: drivers/tty/built-in.o: In function `mtk8250_set_termios': :(.text+0x1bee8): undefined reference to `serial8250_do_set_termios' :(.text+0x1bf10): undefined reference to `uart_get_baud_rate' :(.text+0x1c09c): undefined reference to `uart_get_divisor' drivers/tty/built-in.o: In function `mtk8250_do_pm': :(.text+0x1c0d0): undefined reference to `serial8250_do_pm' drivers/tty/built-in.o: In function `mtk8250_probe': :(.text+0x1c2e4): undefined reference to `serial8250_register_8250_port' serial/8250/8250_mtk.c:287:242: error: data definition has no type or storage class [-Werror] serial/8250/8250_mtk.c:287:122: error: 'mtk8250_platform_driver_init' defined but not used [-Werror=unused-function] This changes the symbol to a 'tristate', so the dependency on SERIAL_8250 also works when that is set to 'm'. To actually build the driver, we also need to include . Signed-off-by: Arnd Bergmann Acked-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 2 +- drivers/tty/serial/8250/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7d774fb8ca8c8686413ce847dc74473cc6196e7d Author: Arnd Bergmann Date: Wed Feb 17 16:02:34 2016 +0100 serial: 8250/ingenic: fix building with SERIAL_8250=m The Ingenic 8250 driver has a 'bool' Kconfig symbol, but that breaks when SERIAL_8250 is a loadable module: drivers/tty/built-in.o: In function `ingenic_uart_probe': 8250_ingenic.c:(.text+0x1c1a0): undefined reference to `serial8250_register_8250_port' This changes the symbol to a 'tristate', plus a dependency on SERIAL_8250, which makes it work again. Unlike the other soc-specific backends, this one has no dependency on an architecture or a platform. I'm adding a dependency on MIPS || COMPILE_TEST as well here, to avoid showing the driver on architectures that are not interested in it. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_ingenic.c | 2 +- drivers/tty/serial/8250/Kconfig | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit a2d3ea2f23993df70c9c3740a01be25e6af19a0b Author: Arnd Bergmann Date: Wed Feb 17 16:02:33 2016 +0100 serial: 8250/uniphier: fix modular build The newly added uniphier serial port driver fails to build as a loadable module when the base 8250 driver is built-in and its console support enabled: ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined! This changes the driver to only provide the early console support if it is built-in itself as well. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49c56bfcb7c44ec67c4e2d3a54656335e62bf3b8 Author: Arnd Bergmann Date: Wed Feb 17 16:02:32 2016 +0100 Revert "drivers/tty/serial: make 8250/8250_ingenic.c explicitly non-modular" This reverts commit cafe1ac64023 ("drivers/tty: make serial 8250_ingenic.c explicitly non-modular"), which attempted to remove dead code but did not have the desired effect when the main 8250 driver was a loadable module itself. This would normally result in a link error, but as the entire drivers/tty/serial/8250/ directory is only entered when CONFIG_SERIAL_8250 is set, we never notice that the driver does not get built in this configuration. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_ingenic.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 88725e917d2e54d0c1e1db01f643f085c3b7d1d0 Author: Arnd Bergmann Date: Wed Feb 17 16:02:31 2016 +0100 Revert "drivers/tty/serial: make 8250/8250_mtk.c explicitly non-modular" This reverts commit d72d391c126e ("drivers/tty/serial: make 8250/8250_mtk.c explicitly non-modular"), which intended to remove dead code but did not have the desired effect when the main 8250 driver was a module itself. This would normally result in a link error, but as the entire drivers/tty/serial/8250/ directory is only entered when CONFIG_SERIAL_8250 is set, we never notice that the driver does not get built in this configuration. Signed-off-by: Arnd Bergmann Acked-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) commit 30530791a7a032dc27dbbab56b8afabd5138074c Author: Wilson Ding Date: Tue Feb 16 19:14:53 2016 +0100 serial: mvebu-uart: initial support for Armada-3700 serial port Armada-3700's uart is a simple serial port, which doesn't support. Configuring the modem control lines. The uart port has a 32 bytes Tx FIFO and a 64 bytes Rx FIFO The uart driver implements the uart core operations. It also support the system (early) console based on Armada-3700's serial port. Known Issue: The uart driver currently doesn't support clock programming, which means the baud-rate stays with the default value configured by the bootloader at boot time [gregory.clement@free-electrons.com: Rewrite many part which are too long to enumerate] Signed-off-by: Wilson Ding Signed-off-by: Nadav Haklai Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/tty/serial/mvebu-uart.txt | 13 + Documentation/kernel-parameters.txt | 6 + drivers/tty/serial/Kconfig | 22 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/mvebu-uart.c | 650 +++++++++++++++++++++ include/uapi/linux/serial_core.h | 3 + 6 files changed, 695 insertions(+) commit 82a3f87f6e80e0bf7978152021eb8938976721cb Author: Romain Izard Date: Tue Feb 23 15:54:54 2016 +0100 serial: mctrl_gpio: Add missing module license As the mctrl_gpio driver can be built as a module, it needs to have its license specified with MODULE_LICENSE. Otherwise, it cannot access required symbols exported through EXPORT_SYMBOL_GPL. Signed-off-by: Romain Izard Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_mctrl_gpio.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b8053fef6f71db8e09c7dcdf8fd1b2cd5d53756 Author: Arnd Bergmann Date: Thu Feb 25 21:47:57 2016 +0100 serial: ifx6x60: avoid uninitialized variable use gcc warns about a potential use of an uninitialized variable in this driver: drivers/tty/serial/ifx6x60.c: In function 'ifx_spi_complete': drivers/tty/serial/ifx6x60.c:713:6: warning: 'more' may be used uninitialized in this function [-Wmaybe-uninitialized] if (more || ifx_dev->spi_more || queue_length > 0 || Unlike a lot of other such warnings, this one is correct and describes an actual problem in the handling of the "IFX_SPI_HEADER_F" result code. This appears to be a result from a restructuring of the driver that dates back to before it was merged in the kernel, so it's impossible to know where it went wrong. I also don't know what that result code means, so I have no idea if setting 'more' to zero is the correct solution, but at least it makes the behavior reproducible rather than depending on whatever happens to be on the kernel stack. This patch initializes the 'more' variable to zero in each of the three code paths that could result in undefined behavior before, which is more explicit than initializing it at the start of the function. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ifx6x60.c | 3 +++ 1 file changed, 3 insertions(+) commit 2958ccee3690717f711431b546d7f194d8fa4f8b Author: Ludovic Desroches Date: Mon Feb 22 15:18:55 2016 +0100 tty/serial: at91: fix bad offset for UART timeout register With SAMA5D2, the UART has hw timeout but the offset of the register to define this value is not the same as the one for USART. When using the new UART, the value of this register was 0 so we never get timeout irqs. It involves that when using DMA, we were stuck until the execution of the dma callback which happens when a buffer is full (so after receiving 2048 bytes). Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 19 +++++++++++++------ include/linux/atmel_serial.h | 3 ++- 2 files changed, 15 insertions(+), 7 deletions(-) commit f4a8ab04ddde078a9e9906e1ca8d6821ac91e717 Author: Romain Izard Date: Fri Feb 26 11:15:04 2016 +0100 tty/serial: at91: restore dynamic driver binding In commit c39dfebc7798956fd2140ae6321786ff35da30c3, the modular support code for atmel_serial was removed, as the driver cannot be built as a module. Because no use case was proposed, the dynamic driver binding support was removed as well. The atmel_serial driver can manage up to 7 serial controllers, which are multiplexed with other functions. For example, in the Atmel SAMA5D2, the Flexcom controllers can work as USART, SPI or I2C controllers, and on all Atmel devices serial lines can be reconfigured as GPIOs. My use case uses GPIOs to transfer a firmware update using a custom protocol on the lines used as a serial port during the normal life of the device. If it is not possible to unbind the atmel_serial driver, the GPIO lines remain reserved and prevent this case from working. This patch reinstates the atmel_serial_remove function, and fixes it as it failed to clear the "clk" field on removal, triggering an oops when a device was bound again after being unbound. Acked-by: Nicolas Ferre Signed-off-by: Romain Izard Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 8d2acdb9fc3a544ab0442634531834d6007b5467 Author: Jean Delvare Date: Mon Feb 22 09:00:39 2016 +0100 serial: 8250: Add hardware dependency to RT288X option Kconfig option SERIAL_8250_RT288X seems to be only relevant on MIPS platforms, so do not present it on other architectures, unless build-testing. Signed-off-by: Jean Delvare Cc: Mans Rullgard Cc: Jiri Slaby Acked-by: John Crispin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8b253b07e990ca453f31503aacb29004f2a87364 Author: Konstantin Khlebnikov Date: Sun Feb 21 10:06:14 2016 +0300 TTY, devpts: document pty count limiting Logic has been changed in kernel 3.4 by commit e9aba5158a80 ("tty: rework pty count limiting") but still not documented. Sysctl kernel.pty.max works as global limit, kernel.pty.reserve ptys are reserved for initial devpts instance (mounted without "newinstance"). Per-instance limit also could be set by mount option "max=%d". Signed-off-by: Konstantin Khlebnikov Signed-off-by: Greg Kroah-Hartman Documentation/filesystems/devpts.txt | 9 +++++++++ Documentation/sysctl/kernel.txt | 1 + 2 files changed, 10 insertions(+) commit 465893e18878e119d8d0255439fad8debbd646fd Author: Greg Hackmann Date: Fri Feb 26 19:01:05 2016 +0000 tty: goldfish: support platform_device with id -1 When the platform bus sets the platform_device id to -1 (PLATFORM_DEVID_NONE), use an incrementing counter for the TTY index instead Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/goldfish.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 9b883eea26ccf043b608e398cf6a26231d44f5fb Author: Miodrag Dinic Date: Fri Feb 26 19:00:44 2016 +0000 drivers: tty: goldfish: Add device tree bindings Enable support for registering this device using the device tree. Device tree node example for registering Goldfish TTY device : goldfish_tty@1f004000 { interrupts = <0xc>; reg = <0x1f004000 0x1000>; compatible = "google,goldfish-tty"; }; Signed-off-by: Miodrag Dinic Signed-off-by: Jin Qian Signed-off-by: Alan Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/goldfish/tty.txt | 17 +++++++++++++++++ drivers/tty/goldfish.c | 10 +++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 106020ccee79c7fcf3875c47000525d957c9bcf1 Author: Maarten Brock Date: Tue Feb 16 18:59:04 2016 +0100 serial-uartlite: Configure for rising edge irq trigger. This device generates a short rising pulse on the interrupt request line. Signed-off-by: Maarten Brock Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19606eaf0b7b791fd5ecb61017ce0b367cce74a0 Author: Maarten Brock Date: Tue Feb 16 18:59:03 2016 +0100 serial-uartlite: Spinlock inside the loop. Better to hold the spinlock as short as possible. Signed-off-by: Maarten Brock Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2905697a82eaf20606ced164d853b52d1b94aaa8 Author: Maarten Brock Date: Tue Feb 16 18:59:02 2016 +0100 serial-uartlite: Constify uartlite_be/uartlite_le Made uartlite_be and uartlite_le constants. Signed-off-by: Maarten Brock Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit acf5e6c88914333f8e1b66d9968c65112a97e846 Author: Maarten Brock Date: Tue Feb 16 18:59:01 2016 +0100 serial-uartlite: Enlarge maximum nr of devices to 16. This device is ideal to use when you need a lot of uarts in your FPGA. Try not to force all those users to patch their kernel. Signed-off-by: Maarten Brock Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e78240152bd4490c08a22986c9977fe870fc7c98 Author: Andy Shevchenko Date: Mon Feb 15 18:02:13 2016 +0200 serial: 8250_pci: all known Braswell ports are 1 channel There is no need to have channel offset defined since all BayTrail and Braswell ports are 1 channel. Remove unneeded definition. While here, remove comment which has no value. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 5 ----- 1 file changed, 5 deletions(-) commit 3f64b1d3279afd11b3506f67cb55119b5d9bef8f Author: Andy Shevchenko Date: Mon Feb 15 18:01:51 2016 +0200 serial: 8250_pci: convert to pcim_*() API The managed API provides a better approach to help with acquiring and releasing resources. Besides that error handling becomes simpler. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 31f28cc2a2458708514ec77eac59dd3d19a57a7e Author: Andy Shevchenko Date: Mon Feb 15 17:46:55 2016 +0200 serial: 8250_dw: remove leftover definitions The clocks are managed through clk-fractional-divider.c module, and thus CLK framework takes care about it. Remove letfovers from this driver. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 6 ------ 1 file changed, 6 deletions(-) commit 34eefb595c10eb9a6dc99a82f7333c86dfe61337 Author: Andy Shevchenko Date: Mon Feb 15 17:38:45 2016 +0200 serial: 8250_dw: remove redundant 'else' keyword When the main branch contains return statement the 'else' keyword is not needed. Remove it here. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 93d7bbaa65bb54e55f425ab1d5de92ab630857e2 Author: Michal Simek Date: Thu Feb 18 08:57:20 2016 +0100 serial: xuartps: Enable OF earlycon support Support early console setup via DT for all listed compatible strings. Remove EARLYCON_DECLARE which was done by: "Use common framework for earlycon declarations" (sha1: 2eaa790989e03900298ad24f77f1086dbbc1aebd) when OF_EARLYCON_DECLARE is defined. Signed-off-by: Michal Simek Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 27202f2f1dac95a7892ebeca23531c15c027e9f1 Author: Simon Horman Date: Wed Mar 2 10:35:27 2016 +0900 tty: sh-sci: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a7a6eb6453a0b128ab312442cff0c15a5ab1e3b Author: Geert Uytterhoeven Date: Mon Feb 15 13:36:32 2016 +0100 serial: sh-sci: Remove redundant instances of EARLYCON_DECLARE() As of commit 2eaa790989e03900 ("earlycon: Use common framework for earlycon declarations") it is no longer needer to specify both EARLYCON_DECLARE() and OF_EARLYCON_DECLARE(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 5 ----- 1 file changed, 5 deletions(-) commit d9e105ca601e58feec65cdcef86d9c5748b7e5bb Author: Robin Murphy Date: Thu Mar 3 16:35:35 2016 +0000 tty: amba-pl011: don't dereference NULL platform data When only a TX DMA channel is specified in DT, pl011_dma_probe() falls back to looking for the optional RX channel in platform data. What it doesn't do is check whether that platform data actually exists... Add the missing check to avoid crashing the kernel. Signed-off-by: Robin Murphy Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b18a183eaac25bd8dc51eab85437c7253f5c31d1 Author: Matwey V. Kornilov Date: Fri Feb 19 08:29:10 2016 +0300 tty: serial: Use GFP_ATOMIC instead of GFP_KERNEL in serial8250_em485_init() serial8250_em485_init() is supposed to be protected with p->port.lock spinlock. This may lead to issues when kmalloc sleeps, so it is better to use GFP_ATOMIC in this spinlocked context. Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Reported-by: Ильяс Гасанов Signed-off-by: Matwey V. Kornilov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf2a0be45ffc5ab706f9be71a2cdc3f4600cb444 Author: Matwey V. Kornilov Date: Mon Feb 15 21:42:12 2016 +0300 tty: serial: 8250: Cleanup p->em485 in serial8250_unregister_port Formally, currently there is no memory leak, but if serial8250_ports[line] is reused with other 8250 driver, then em485 will be already activated and it will cause issues. Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Signed-off-by: Matwey V. Kornilov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 54555919e8a1b5881b130ed5dea8023ff009cbe7 Author: Sudip Mukherjee Date: Wed Feb 24 16:45:09 2016 +0530 tty: audit: remove unused variable While building with W=1 we were getting build warning: drivers/tty/tty_audit.c:149:16: warning: variable 'sessionid' set but not used The local variable sessionid was only assigned the value of current->sessionid but was never reused. On further inspection it turned out that there is no need of audit_get_loginuid() also. Signed-off-by: Sudip Mukherjee Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_audit.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5f5357335e2816ec3f9fe62337bc8dc1725992e8 Author: Greg Kroah-Hartman Date: Mon Mar 7 16:10:08 2016 -0800 Revert "sc16is7xx: implemented get_mctrl" This reverts commit a3f0b77f36ca5c5871fb8daf7e66fa409abe1ed5. Maarten writes: It appears to be wrong and I don't have a good idea how to fix it yet. Cc: Maarten Brock Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org drivers/tty/serial/sc16is7xx.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 45c5c6828214605eaefa6755c47bd1a2c7eb203e Author: Benjamin Tissoires Date: Mon Mar 7 11:02:38 2016 +0100 HID: multitouch: force retrieving of Win8 signature blob The Synaptics 0x11e5 over I2C found in the Asus T100-CHI requires to fetch the signature blob to actually start sending events. With this patch, we should be close enough to the Windows driver which checks the content of the blob at plugin to validate or not the touchscreen. Link: https://bugzilla.kernel.org/show_bug.cgi?id=113481 Fixes: 6d4f5440 ("HID: multitouch: Fetch feature reports on demand for Win8 devices") Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9ebfdf5b18493f338237ef9861a555c2f79b0c17 Author: Brian Norris Date: Fri Mar 4 17:19:23 2016 -0800 mtd: nand: check status before reporting timeout In commit b70af9bef49b ("mtd: nand: increase ready wait timeout and report timeouts"), we increased the likelihood of scheduling during nand_wait(). This makes us more likely to hit the time_before(...) condition, since a lot of time may pass before we get scheduled again. Now, the loop was already buggy, since we don't check if the NAND is ready after exiting the loop; we simply print out a timeout warning. Fix this by doing a final status check before printing a timeout message. This isn't actually a critical bug, since the only effect is a false warning print. But too many prints never hurt anyone, did they? :) Side note: perhaps I'm not smart enough, but I'm not sure what the best policy is for this kind of loop; do we busy loop (i.e., no cond_resched()) to keep the lowest I/O latency (it's not great if the resched is delaying Richard's system ~400ms)? Or do we allow rescheduling, to play nice with the rest of the system (since some operations can take quite a while)? Reported-by: Richard Weinberger Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon Reviewed-by: Richard Weinberger Reviewed-by: Harvey Hunt drivers/mtd/nand/nand_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3707b2c3d21f7c9f8c6aadba79ef012f0bbad10c Author: Brian Norris Date: Fri Feb 12 12:26:04 2016 -0800 mtd: bcm63xxpart: give width specifier an 'int', not 'size_t' Fixes this warning: >> drivers/mtd/bcm63xxpart.c:175:4: note: in expansion of macro 'pr_err' pr_err("invalid rootfs address: %*ph\n", ^ >> include/linux/kern_levels.h:4:18: warning: field width specifier '*' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=] Reported-by: kbuild test robot Signed-off-by: Brian Norris drivers/mtd/bcm63xxpart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c67682c5e0a43bdcb049c7775b78200835f12b95 Author: Alexander Stein Date: Wed Mar 2 16:26:59 2016 +0100 mtd: mtdram: Add parameter for setting writebuf size ubifs uses the write buffer size in recovery algorithm. When inspecting an unclean ubifs recovery fails with writebuf size 64 in mtdram while recovery on actual mtd device with writebuf size of 1024 succeeds. So add a parameter for setting this property. Signed-off-by: Alexander Stein Reviewed-by: Richard Weinberger Signed-off-by: Brian Norris drivers/mtd/devices/mtdram.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4cf9339d2036287b734dfdcadcebc9e3daf380b5 Author: Brian Norris Date: Mon Mar 7 10:37:30 2016 -0800 mtd: nand: pxa3xx_nand: kill unused field 'drcmr_cmd' With this removal, we don't need to 'get' the second DMA resource either, as it's also unused. Signed-off-by: Brian Norris Acked-by: Robert Jarzmik Signed-off-by: Brian Norris drivers/mtd/nand/pxa3xx_nand.c | 10 ---------- 1 file changed, 10 deletions(-) commit d66ab51442211158b677c2f12310c314d9587f74 Author: Haiyang Zhang Date: Fri Mar 4 15:07:43 2016 -0800 hv_netvsc: Move subchannel waiting to rndis_filter_device_remove() During hot add, vmbus_device_register() is called from vmbus_onoffer(), on the same workqueue as the subchannel offer message work-queue, so subchannel offer won't be processed until the vmbus_device_register()/... /netvsc_probe() is done. Also, vmbus_device_register() is called with channel_mutex locked, which prevents subchannel processing too. So the "waiting for sub-channel processing" will not success in hot add case. But, in usual module loading, the netvsc_probe() is called from different code path, and doesn't fail. This patch resolves the deadlock during NIC hot-add, and speeds up NIC loading time. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 471c2aa6fa893bafddc150822f3d5ec4c6b68d8e Author: Yao Yuan Date: Tue Jan 26 15:24:01 2016 +0800 Documentation: fsl-quadspi: Add optional properties Add optional properties for QSPI: big-endian if the register is big endian on this platform. Signed-off-by: Yuan Yao Acked-by: Rob Herring Acked-by: Han xu Signed-off-by: Brian Norris Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 1 + 1 file changed, 1 insertion(+) commit 2458fb258b0013777cebf0486e2f7c49949fbc94 Author: Yao Yuan Date: Tue Jan 26 15:23:59 2016 +0800 Documentation: fsl-quadspi: Add fsl, ls2080a-qspi compatible string new compatible string: "fsl,ls2080a-qspi". Signed-off-by: Yuan Yao Acked-by: Rob Herring Acked-by: Han xu Signed-off-by: Brian Norris Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ab825adbaaec14b7bcfd7265da3439e6e96113c1 Merge: 49cc66e 55482ed Author: David S. Miller Date: Mon Mar 7 15:01:40 2016 -0500 Merge branch 'qed_hw_gro' Manish Chopra says: ==================== qed/qede: Add hardware GRO support This patch series enables hardware GRO and add support for handling HW aggregated TCP packets in driver receive flow by skipping software GRO handling in stack. Please consider applying this series to net-next. ==================== Signed-off-by: David S. Miller commit 55482edc25f0606851de42e73618f813f310d009 Author: Manish Chopra Date: Fri Mar 4 12:35:06 2016 -0500 qede: Add slowpath/fastpath support and enable hardware GRO This patch configures hardware to use GRO and adds support for fastpath APIs to handle HW aggregated packets. Signed-off-by: Yuval Mintz Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 22 ++ drivers/net/ethernet/qlogic/qede/qede_main.c | 367 ++++++++++++++++++++++++++- 2 files changed, 388 insertions(+), 1 deletion(-) commit 088c86183012495b53ecc1c734909e5712a40b66 Author: Manish Chopra Date: Fri Mar 4 12:35:05 2016 -0500 qed/qede: Add infrastructure support for hardware GRO This patch adds mainly structures and APIs prototype changes in order to give support for qede slowpath/fastpath support for the same. Signed-off-by: Yuval Mintz Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 14 ++++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 81 +++++++++++++++++++--------- drivers/net/ethernet/qlogic/qede/qede_main.c | 17 +++--- include/linux/qed/qed_eth_if.h | 12 +++-- 4 files changed, 88 insertions(+), 36 deletions(-) commit 49cc66eaee19e772997b63b057ea4b4bf7d48db0 Author: Richard Alpe Date: Fri Mar 4 17:04:42 2016 +0100 tipc: move netlink policies to netlink.c Make the c files less cluttered and enable netlink attributes to be shared between files. Signed-off-by: Richard Alpe Reviewed-by: Jon Maloy Acked-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/bearer.c | 18 +------------- net/tipc/link.c | 8 ------ net/tipc/name_table.c | 6 ----- net/tipc/net.c | 6 +---- net/tipc/netlink.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ net/tipc/netlink.h | 11 ++++++++ net/tipc/node.c | 23 +---------------- net/tipc/socket.c | 9 +------ net/tipc/udp_media.c | 9 +------ 9 files changed, 85 insertions(+), 74 deletions(-) commit 8dfd329fbc240729938d24bf87aca49ea89289c5 Author: Zhang Shengju Date: Fri Mar 4 14:07:54 2016 +0000 arp: correct return value of arp_rcv Currently, arp_rcv() always return zero on a packet delivery upcall. To make its behavior more compliant with the way this API should be used, this patch changes this to let it return NET_RX_SUCCESS when the packet is proper handled, and NET_RX_DROP otherwise. v1->v2: If sanity check is failed, call kfree_skb() instead of consume_skb(), then return the correct return value. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller net/ipv4/arp.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit a578c4f9ebe0ae781a69a68255b06b35aab6e5fe Author: Yao Yuan Date: Tue Jan 26 15:23:57 2016 +0800 mtd: spi-nor: fsl-quadspi: add support for layerscape LS1043a and LS2080A in the Layerscape family also support Freescale Quad SPI, make Quad SPI selectable for these hardwares. Signed-off-by: Yuan Yao Acked-by: Han xu Signed-off-by: Brian Norris drivers/mtd/spi-nor/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8c034b2fbe57f56c3902187f844f41d295b5159 Author: Yao Yuan Date: Tue Jan 26 15:23:56 2016 +0800 mtd: spi-nor: fsl-quadspi: add support for ls1021a LS1021a also support Freescale Quad SPI controller. Add fsl-quadspi support for ls1021a chip and make SPI_FSL_QUADSPI selectable for LS1021A SOC hardwares. Signed-off-by: Yuan Yao Acked-by: Han xu Acked-by: Han xu Signed-off-by: Brian Norris drivers/mtd/spi-nor/Kconfig | 2 +- drivers/mtd/spi-nor/fsl-quadspi.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 2012850be8e3324bf3420ea08e1d0ee75c8d134c Author: Yao Yuan Date: Tue Jan 26 15:23:55 2016 +0800 mtd: spi-nor: fsl-quadspi: add big-endian support Add R/W functions for big- or little-endian registers: The qSPI controller's endian is independent of the CPU core's endian. So far, the qSPI have two versions for big-endian and little-endian. Signed-off-by: Yuan Yao Acked-by: Han xu Acked-by: Han xu Signed-off-by: Brian Norris drivers/mtd/spi-nor/fsl-quadspi.c | 157 +++++++++++++++++++++++--------------- 1 file changed, 97 insertions(+), 60 deletions(-) commit 0f9ce866e0938f2e5f9c77277834b429661844b1 Author: Shaohua Li Date: Mon Mar 7 09:41:09 2016 -0800 Update MD git tree URL Signed-off-by: Shaohua Li MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe537670eab767157eecc50538bd28e8d9b0ce9f Author: Bjorn Helgaas Date: Mon Mar 7 11:39:16 2016 -0600 PCI: Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h Christoph added a generic include/linux/pci-dma-compat.h, so now there's one place with most of the PCI DMA interfaces. Move more PCI DMA-related things there: - The PCI_DMA_* direction constants from linux/pci.h - The pci_set_dma_max_seg_size() and pci_set_dma_seg_boundary() CONFIG_PCI implementations from drivers/pci/pci.c - The pci_set_dma_max_seg_size() and pci_set_dma_seg_boundary() !CONFIG_PCI stubs from linux/pci.h - The pci_set_dma_mask() and pci_set_consistent_dma_mask() !CONFIG_PCI stubs from linux/pci.h Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 12 ------------ include/linux/pci-dma-compat.h | 29 +++++++++++++++++++++++++++++ include/linux/pci.h | 19 +------------------ 3 files changed, 30 insertions(+), 30 deletions(-) commit c97e0602bcfeaabf303b125e07ed7ba35c656495 Author: Eric Engestrom Date: Mon Mar 7 12:01:05 2016 +0000 md/bitmap: remove redundant check daemon_sleep is an unsigned, so testing if it's 0 or less than 1 does the same thing. Signed-off-by: Eric Engestrom Signed-off-by: Shaohua Li drivers/md/bitmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc4b024a8b8bd7dceb2697299aad2bda57d065e0 Author: Christoph Hellwig Date: Mon Mar 7 10:40:02 2016 -0600 PCI: Move pci_dma_* helpers to common code For a long time all architectures implement the pci_dma_* functions using the generic DMA API, and they all use the same header to do so. Move this header, pci-dma-compat.h, to include/linux and include it from the generic pci.h instead of having each arch duplicate this include. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas arch/alpha/include/asm/pci.h | 7 --- arch/arm/include/asm/pci.h | 1 - arch/arm64/include/asm/pci.h | 1 - arch/avr32/include/asm/pci.h | 2 - arch/blackfin/include/asm/pci.h | 1 - arch/cris/include/asm/pci.h | 3 - arch/frv/include/asm/pci.h | 1 - arch/ia64/include/asm/pci.h | 2 - arch/m68k/include/asm/pci.h | 1 - arch/microblaze/include/asm/pci.h | 2 - arch/mips/include/asm/pci.h | 3 - arch/mn10300/include/asm/pci.h | 3 - arch/parisc/include/asm/pci.h | 3 - arch/powerpc/include/asm/pci.h | 2 - arch/s390/include/asm/pci.h | 1 - arch/sh/include/asm/pci.h | 3 - arch/sparc/include/asm/pci.h | 3 - arch/tile/include/asm/pci.h | 3 - arch/unicore32/include/asm/pci.h | 1 - arch/x86/include/asm/pci.h | 3 - arch/xtensa/include/asm/pci.h | 3 - include/asm-generic/pci-dma-compat.h | 118 ----------------------------------- include/linux/pci-dma-compat.h | 118 +++++++++++++++++++++++++++++++++++ include/linux/pci.h | 4 ++ 24 files changed, 122 insertions(+), 167 deletions(-) commit 611609bcf778a5f1aa321e632ac6dae50d507096 Author: Christoph Hellwig Date: Sun Mar 6 16:17:53 2016 +0100 frv/PCI: Remove stray pci_{alloc,free}_consistent() declaration FRV doesn't implement pci_{alloc,free}_consistent(), so remove the declarations for them. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Acked-by: David S. Miller Acked-by: David Howells arch/frv/include/asm/pci.h | 6 ------ 1 file changed, 6 deletions(-) commit 8303394d811ad4e1245b2d72e15c39880ec3d0ff Author: Wei Tang Date: Mon Mar 7 14:29:53 2016 +0800 netlabel: do not initialise statics to NULL This patch fixes the checkpatch.pl error to netlabel_domainhash.c: ERROR: do not initialise statics to NULL Signed-off-by: Wei Tang Signed-off-by: David S. Miller net/netlabel/netlabel_domainhash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 795f3512ca952965dd2546ceed3d9636abcb7920 Author: Wei Tang Date: Mon Mar 7 14:25:10 2016 +0800 netlink: do not initialise statics to 0 or NULL This patch fixes the checkpatch.pl error to netlabel_unlabeled.c: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Wei Tang Signed-off-by: David S. Miller net/netlabel/netlabel_unlabeled.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 988b86e69ded17f0f1209fd3ef1c4c7f1567dcc1 Author: Martin Schwidefsky Date: Wed Jan 13 12:54:28 2016 +0100 s390/pci: add ioctl interface for CLP Provide a user space interface to issue call logical-processor instructions. Only selected CLP commands are allowed, enough to get the full overview of the installed PCI functions. Reviewed-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/include/asm/clp.h | 27 +++++ arch/s390/include/asm/pci_clp.h | 30 +---- arch/s390/include/uapi/asm/clp.h | 28 +++++ arch/s390/pci/pci_clp.c | 247 +++++++++++++++++++++++++++++++++++++-- 4 files changed, 293 insertions(+), 39 deletions(-) commit bb63f726f98bec032c7322a9c36eb4167307d856 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:52 2016 +0530 ALSA: hda - Use snd_hdac namespace prefix for chmap exported APIs Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 14 +++++++------- sound/hda/hdmi_chmap.c | 38 +++++++++++++++++++------------------- sound/pci/hda/hda_eld.c | 4 ++-- sound/pci/hda/patch_hdmi.c | 14 +++++++------- 4 files changed, 35 insertions(+), 35 deletions(-) commit 2f6e8a8518f33b6fac1fb9c79d245e23b6f9b765 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:51 2016 +0530 ALSA: hda - Move chmap support helpers/ops to core Chmap helpers, ops, controls are moved to core. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 15 + sound/hda/hdmi_chmap.c | 742 +++++++++++++++++++++++++++++++++++++++++++++ sound/pci/hda/hda_eld.c | 27 +- sound/pci/hda/patch_hdmi.c | 689 +---------------------------------------- 4 files changed, 759 insertions(+), 714 deletions(-) commit 828cb4edd8074d35f814e03bee3e2ad8b7d8f64b Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:50 2016 +0530 ALSA: hda - chmap helper args modified to use generic hdac objs. Chmap helper arguments are modified to use either hdac_device object or hdac_chmap object instead of codec specific object. With this moving these APIs to core will be easier. Helper added to access a specific channel_allocation object instead of directly accessing. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 10 +++-- sound/pci/hda/patch_hdmi.c | 108 ++++++++++++++++++++++++++++----------------- 2 files changed, 74 insertions(+), 44 deletions(-) commit 739ffee97ed550a2899a925ed3f260fa1e8fa955 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:49 2016 +0530 ALSA: hda - Add hdmi chmap verb programming ops to chmap object Add slot and channel count programming to hdmi_chmap object and move the chmap_ops to core. Use register_chmap_ops API to register for default ops. Override specific chmap ops in the driver. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 10 ++++++ sound/hda/Makefile | 2 +- sound/hda/hdmi_chmap.c | 49 ++++++++++++++++++++++++++ sound/pci/hda/patch_hdmi.c | 87 +++++++++++++++------------------------------- 4 files changed, 88 insertions(+), 60 deletions(-) commit f302240da5d5cfc7366dc6994c523aa2aa17c122 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:48 2016 +0530 ALSA: hda - Use hdac name space for CEA spk alloc structure Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 6 +++--- sound/pci/hda/patch_hdmi.c | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 15 deletions(-) commit 9b3dc8aa3fb1a5f38ca9501f20f6ea4dced10fa0 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:47 2016 +0530 ALSA: hda - Register chmap obj as priv data instead of codec With this chmap object is added as private data and new ops are added to access driver specific chmap. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 6 +++ sound/pci/hda/patch_hdmi.c | 93 +++++++++++++++++++++++++++++----------------- 2 files changed, 65 insertions(+), 34 deletions(-) commit 67b90cb84be8fde0e51f71834e15c32fbec08562 Author: Subhransu S. Prusty Date: Fri Mar 4 19:59:46 2016 +0530 ALSA: hda - Create common chmap object chmap object represents multichannel capability and contains chmap ops. Legacy driver is updated to use this. With next set of patches chmap object is moved to common to be reused by other drivers (ex: skylake ASoC hdmi driver). Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_chmap.h | 41 +++++++++++++++++++++++ sound/pci/hda/patch_hdmi.c | 81 +++++++++++++++++++++++----------------------- 2 files changed, 81 insertions(+), 41 deletions(-) commit 8779aa8f8b7fa397a0abe9e6af3334ea41e15836 Author: Russell King Date: Thu Jan 21 15:20:55 2016 +0000 drm: etnaviv: clean up submit_bo() As we now store the etnaviv_vram_mapping, we no longer need to store the iova itself: we can get this directly from the mapping structure. Arrange for submit_bo() to return a pointer to etnaviv_gem_submit_bo, and directly access mapping->iova when applying relocations. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.h | 13 +++++++------ drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 20 +++++++------------- 2 files changed, 14 insertions(+), 19 deletions(-) commit b6325f409959c7e1065ef1537f2e54cf4d7ab465 Author: Russell King Date: Thu Jan 21 15:20:50 2016 +0000 drm: etnaviv: clean up vram_mapping submission/retire path Currently, we scan the list of mappings each time we want to operate on the vram_mapping struct. Rather than repeatedly scanning these, look them up once in the submission path, and then use _reference and _unreference methods as necessary to manage this object. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.h | 3 -- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 54 ++++++++++++++++------------ drivers/gpu/drm/etnaviv/etnaviv_gem.h | 6 ++++ drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 18 +++++----- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 14 ++++---- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 3 +- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 2 +- 7 files changed, 57 insertions(+), 43 deletions(-) commit 41db12df64ace13c98865340b5c076cdf9a99a93 Author: Russell King Date: Thu Jan 21 15:20:40 2016 +0000 drm: etnaviv: improve readability of command insertion to ring buffer Improve the readibility of the function which inserts command buffers and other maintanence commands into the GPUs ring buffer. We do this by splitting the ring buffer reservation in two: one chunk for any commands that need to be issued prior to the command buffer, and a separate chunk for commands issued after the buffer. The result is a much more obvious code flow in this function, and localisation of the conditional maintanence commands prior to the command buffer. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 95 ++++++++++++++++---------------- 1 file changed, 49 insertions(+), 46 deletions(-) commit 33b1be99fb4cfd0d7d483a9947f9c95d6d17ede9 Author: Russell King Date: Thu Jan 21 15:20:35 2016 +0000 drm: etnaviv: clean up GPU command submission Clean up the GPU command submission path to prepare for the next change. This makes the next change easier to read and understand. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 90747b9511d14a2eb6c7dbd78ea9251e3b2b092a Author: Russell King Date: Thu Jan 21 15:20:30 2016 +0000 drm: etnaviv: use previous GPU pipe state when pipe switching Use the previous GPU pipe state when deciding which GPU caches should be flushed prior to switching the current pipe. This avoids infering what the previously selected pipe was, and potentially flushing the wrong caches. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8581d8149750e19fc363ad93327f4382b26959f9 Author: Russell King Date: Thu Jan 21 15:20:25 2016 +0000 drm: etnaviv: flush all GPU caches when stopping GPU Flush the GPU caches to ensure that any dirty data is pushed out before stopping the front end. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 41 ++++++++++++++++++++++++++++---- drivers/gpu/drm/etnaviv/state_3d.xml.h | 9 +++++++ 2 files changed, 45 insertions(+), 5 deletions(-) commit f60863116b4026713fba1810927f8639bfd6ae80 Author: Russell King Date: Thu Jan 21 15:20:19 2016 +0000 drm: etnaviv: track current execution state Add tracking of the current execution state (iow, active GPU pipe). Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 3 files changed, 5 insertions(+) commit 18060f4d87665e974950cb36133bbbf5e1b350f3 Author: Russell King Date: Thu Jan 21 15:20:14 2016 +0000 drm: etnaviv: extract arming of semaphore Extract out the arming of a semaphore from the pipe select code. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 6e138f76b676b8c6dfa744db183776b0668ec272 Author: Russell King Date: Thu Jan 21 15:20:09 2016 +0000 drm: etnaviv: extract replacement of WAIT command Extract out the replacement of the WAIT command with some other command. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 584a13c6e65d9f986424594e41c6a7114d37391b Author: Russell King Date: Thu Jan 21 15:20:04 2016 +0000 drm: etnaviv: extract command ring reservation Provide a helper etnaviv_buffer_reserve() to ensure that we can fit a set of commands into the ring buffer without wrapping by moving code out of etnaviv_buffer_queue(). Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 471070abd2f53e579ebeb362e78ce62d04287f49 Author: Lucas Stach Date: Mon Jan 25 17:03:09 2016 +0100 drm/etnaviv: move GPU linear window to end of DMA window If the end of the system DMA window is farther away from the start of physical RAM than the size of the GPU linear window, move the linear window so that it ends at the same address than the system DMA window. This allows to map command buffer from CMA, which is likely to reside at the end of the system DMA window, while also overlapping as much RAM as possible, in order to optimize regular buffer mappings through the linear window. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d9fd0c7d259e6e041890764f21f3033d248e0ac8 Author: Lucas Stach Date: Thu Jan 7 12:43:15 2016 +0100 drm/etnaviv: move runtime PM balance into retire worker The retire worker is kicked for each fence, either the normal way by signaling the fence from the event completion interrupt or by the recover worker if the GPU got stuck. Moving the RPM put into the retire worker allows us to have it in a single place for both cases. This also shaves off quite a bit of the CPU time spent in hardirq context, as arming the autosuspend timer when the RPM refcount drops to 0 is a relatively costly operation. Tested-by: Russell King Acked-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 739596b09b01dc972a27d12c4058f7ee2c3c6e40 Merge: 0ea6f0c 53f09e7 Author: Kalle Valo Date: Mon Mar 7 15:48:56 2016 +0200 Merge tag 'iwlwifi-next-for-kalle-2016-03-02' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * add support for thermal device / cooling device (Chaya Rachel) * fixes for 9000 devices data path (Sara Sharon) * improvements in scheduled scan w/o profiles (Luca) * new firmware support (-21.ucode) * add MSIX support for 9000 devices (Haim Dreyfuss) * cleanup in PCIe initialization * enable MU-MIMO and take care of firmware restart(Sara Sharon) ===> This needs mac80211-next * add support for large SKBs in mvm to reach A-MSDU ===> This needs mac80211-next * add support for filtering frames from a BA session (Sara Sharon) ===> This needs mac80211-next * start implementing the new Rx path for 9000 devices (Sara Sharon) * enable the new RRM feature flag (Beni Lev) * fix U-APSD enablement on P2P Client (Avri Altman) * fix beacon abort enablement (Avri Altman) * forbid beacon storing with WoWLAN (Matti Gottlieb) * support unified uSniffer / regular firmware image (Golan Ben-Ami) * fix a race between debugfs hooks and iface up (Chaya Rachel Ivgi) * fixes for runtime PM (Luca) * add a new module paramater to disable VHT (Andrei Otcheretianski) * build infrastructure for Dynamic Queue Allocation (Liad Kaufman) commit 0ea6f0c582c2675285ad094df0137f4f0de47869 Author: Rafał Miłecki Date: Fri Feb 12 10:15:45 2016 +0100 bcma: move flash detection code to ChipCommon core driver Flashes are attached and accessible through ChipCommon core, they aren't connected to MIPS one. Moreover some new ARM devices (e.g. BCM47189) may have serial flash accessibility using ChipCommon registers as well. To support them we can't keep this code in MIPS core driver. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/driver_chipcommon.c | 30 ++++++++++++++++++++++++++++++ drivers/bcma/driver_mips.c | 27 ++------------------------- 2 files changed, 32 insertions(+), 25 deletions(-) commit d6a3b51ada68c2bd3e184f4729ce626a1721cf74 Author: Rafał Miłecki Date: Fri Feb 12 10:15:44 2016 +0100 bcma: move parallel flash support to separated file This follows the way of handling other flashes and cleans code a bit. As next task we will want to move flash code to ChipCommon driver as: 1) Flash controllers are accesible using ChipCommon registers 2) This code isn't MIPS specific This change prepares bcma for that. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/Kconfig | 5 +++ drivers/bcma/Makefile | 1 + drivers/bcma/bcma_private.h | 18 +++++++++-- drivers/bcma/driver_chipcommon_pflash.c | 49 +++++++++++++++++++++++++++++ drivers/bcma/driver_mips.c | 35 +-------------------- drivers/bcma/main.c | 2 +- include/linux/bcma/bcma_driver_chipcommon.h | 8 +++-- 7 files changed, 78 insertions(+), 40 deletions(-) commit 2e62f9b2a41e4ade1a0bb3c1bbda4defe4c67243 Author: Rafał Miłecki Date: Fri Feb 12 10:15:43 2016 +0100 bcma: drop unneeded fields from bcma_pflash struct Most of info stored in this struct wasn't really used anywhere as we put all that data in platform data & resource as well. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/driver_mips.c | 11 ++++------- include/linux/bcma/bcma_driver_chipcommon.h | 3 --- 2 files changed, 4 insertions(+), 10 deletions(-) commit 2b02a36d12192f2a86388913143cd1e399eb971c Author: Colin Ian King Date: Thu Feb 25 23:24:27 2016 +0000 mt7601u: do not free dma_buf when ivp allocation fails If the allocation of ivp fails the error handling attempts to free an uninitialized dma_buf; this data structure just contains garbage on the stack, so the freeing will cause issues when the urb, buf and dma fields are free'd. Fix this by not free'ing the dma_buf if the ivp allocation fails. Signed-off-by: Colin Ian King Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/mcu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 354a1947a02528b19ee326e230cb44399cd31865 Author: Ujjal Roy Date: Thu Feb 25 00:49:56 2016 +0530 mwifiex: Added missing spaces around brackets This patch fixes the missing spaces issue in coding style. Signed-off-by: Ujjal Roy Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a968d766a63267b3d6b7a66b9d7023b7d93eaae Author: Ujjal Roy Date: Thu Feb 25 00:49:43 2016 +0530 mwifiex: Removed extra spaces before commas This patch fixes spaces before commas issue in coding style. Signed-off-by: Ujjal Roy Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 32962d5b43b748c43b9b0b32d02674c1ce6997a9 Author: Ujjal Roy Date: Thu Feb 25 00:49:23 2016 +0530 mwifiex: Fixed incorrect indentation issue This patch fixes the incorrect indentation of the case label. Signed-off-by: Ujjal Roy Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f36f299068794ffc5026f25b6a1b3ed615ea832d Author: Anthony Wong Date: Tue Feb 23 23:09:22 2016 +0800 rt2x00: add new rt2800usb device Buffalo WLI-UC-G450 Add USB ID 0411:01fd for Buffalo WLI-UC-G450 wireless adapter, RT chipset 3593 Signed-off-by: Anthony Wong Cc: stable@vger.kernel.org Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 + 1 file changed, 1 insertion(+) commit 0cb52aac4d19510d13410ee4232c0248fabe750e Author: Xinming Hu Date: Tue Feb 23 05:16:19 2016 -0800 mwifiex: do not set multiport flag for tx/rx single packet multiport address flag(0x1000) should not be set during sdio cmd53, if we have only one packet to read/write. Signed-off-by: Cathy Luo Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8b7ef8b66eb9127b6d2ee46348b3f743bb40facb Author: Xinming Hu Date: Tue Feb 23 05:16:18 2016 -0800 mwifiex: add sdio multiport aggregation debug information This patch sdio multi port aggregation statistics which can be used for debugging. This debug data is collected in /sys/kernel/debug/mwifiex/mlan0/debug. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/ioctl.h | 6 ++++++ drivers/net/wireless/marvell/mwifiex/main.h | 5 +++++ drivers/net/wireless/marvell/mwifiex/sdio.c | 10 ++++++++++ drivers/net/wireless/marvell/mwifiex/util.c | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+) commit a6139b6271f9f95377fe3486aed6120c9142779b Author: Amitkumar Karwar Date: Tue Feb 23 05:16:17 2016 -0800 mwifiex: fix corner case association failure This patch corrects the error case in association path by returning -1. Earlier "media_connected" used to remain on in this error case causing failure for further association attempts. Signed-off-by: Amitkumar Karwar Fixes: b887664d882ee4 ('mwifiex: channel switch handling for station') Signed-off-by: Cathy Luo Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 1 + 1 file changed, 1 insertion(+) commit de651ce3d750c19a7b8b7cef22407ecc496619f4 Author: Xinming Hu Date: Tue Feb 23 05:16:16 2016 -0800 mwifiex: add delay when tdls confirm frame is queued It is observed that driver may send the data packet to tdls peer before tdls peer receives tdls setup confirm frame. Similar race condition exists during tdls teardown procedure also. This patch adds 10 milliseconds delay to resolve the race. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/tdls.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ce2542435aadc9953656e8afddaab0caf0079a3a Author: Colin Ian King Date: Mon Feb 22 11:35:46 2016 +0000 rtlwifi: pass struct rtl_stats by reference as it is more efficient passing rtl_stats by value is inefficient; the structure is over 300 bytes in size and generally just one field (packet_report_type) is being accessed, so the pass by value is a relatively large overhead. This change just affects just the rx_command_packet calls. Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 2 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) commit 064b32f822afd9a578a4ec6bf754cd61cbe0c324 Author: Alexey Khoroshilov Date: Sun Feb 21 01:30:29 2016 +0300 at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe() There is no need in usb_put_dev() if at76_load_internal_fw() succeed. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Kalle Valo drivers/net/wireless/atmel/at76c50x-usb.c | 2 -- 1 file changed, 2 deletions(-) commit 8dd37c7cd442411f52b90e8b556d38324450de46 Author: Amitoj Kaur Chawla Date: Wed Feb 17 18:03:37 2016 +0530 mwifiex: Use to_delayed_work() Introduce the use of to_delayed_work() helper function instead of open coding it with container_of() A simplified version of the Coccinelle semantic patch used to make this change is: // @@ expression a; symbol work; @@ - container_of(a, struct delayed_work, work) + to_delayed_work(a) // Signed-off-by: Amitoj Kaur Chawla Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11h.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 240d61a9ddeb8a77f11369f67f6ef060354b909d Author: Hante Meuleman Date: Wed Feb 17 11:27:10 2016 +0100 brcmfmac: add 802.11w management frame protection support Add full support for both AP and STA for management frame protection. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 272 +++++++++++++++------ .../broadcom/brcm80211/brcmfmac/cfg80211.h | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 + .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 4 + .../broadcom/brcm80211/include/brcmu_wifi.h | 2 + 6 files changed, 211 insertions(+), 75 deletions(-) commit 219e0f747ad6d2b504199dbbaee6b9ad269dde07 Author: Hante Meuleman Date: Wed Feb 17 11:27:09 2016 +0100 brcmfmac: integrate add_keyext in add_key brcmf_add_keyext is called when a key is configured for a specific mac address. This function is very similar to the calling function brcmf_add_key. Integrate this function and also use existing del_key function in case key is to be cleared. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 154 ++++++--------------- 1 file changed, 39 insertions(+), 115 deletions(-) commit af5b5e62f72e08e6e7e3d3cd78ee7e4cec96f7c8 Author: Hante Meuleman Date: Wed Feb 17 11:27:08 2016 +0100 brcmfmac: merge platform data and module paramaters Merge module parameters and platform data in one struct. This is the last step to move to the new platform data per device. Now parameters of platform data will be merged with module parameters per device. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 20 +++---- .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 4 +- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 68 +++++++++++++--------- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 39 +++++-------- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 11 +--- .../net/wireless/broadcom/brcm80211/brcmfmac/of.c | 14 ++--- .../net/wireless/broadcom/brcm80211/brcmfmac/of.h | 5 +- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 24 ++++++-- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 46 ++++++++------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 2 +- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 16 ++++- 11 files changed, 139 insertions(+), 110 deletions(-) commit 4d7928959832ea41f7f91456b76da19cad01bd09 Author: Hante Meuleman Date: Wed Feb 17 11:27:07 2016 +0100 brcmfmac: switch to new platform data Platform data is only available for sdio. With this patch a new platform data structure is being used which allows for platform data for any device and configurable per device. This patch only switches to the new structure and adds support for SDIO devices. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 15 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 43 ++++- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 35 +--- .../net/wireless/broadcom/brcm80211/brcmfmac/of.c | 3 +- .../net/wireless/broadcom/brcm80211/brcmfmac/of.h | 5 +- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 77 +++++---- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 2 +- include/linux/platform_data/brcmfmac-sdio.h | 135 --------------- include/linux/platform_data/brcmfmac.h | 185 +++++++++++++++++++++ 10 files changed, 282 insertions(+), 222 deletions(-) commit 73ef9e640e94ab6205c0bb92dc8bac53a40d952e Author: Hante Meuleman Date: Wed Feb 17 11:27:05 2016 +0100 brcmfmac: keep ARP and ND offload enabled during WOWL Currently ARP and ND (IPv6 Neigbor Discovery) offload get disabled on entering suspend. However when firmwares support the wowl_cap iovar then these offload routines can be kept enabled as they will work during WOWL as well. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 8ea56be0869f8230ed7b2779397225fe45080dd1 Author: Hante Meuleman Date: Wed Feb 17 11:27:04 2016 +0100 brcmfmac: move platform data retrieval code to common In preparation of module parameters for all devices the module platform data retrieval is moved from sdio to common. It is still only used for sdio devices. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 84 +++++----------------- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 53 ++++++++++++-- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 3 + .../net/wireless/broadcom/brcm80211/brcmfmac/of.c | 23 +++--- .../net/wireless/broadcom/brcm80211/brcmfmac/of.h | 6 +- 5 files changed, 84 insertions(+), 85 deletions(-) commit 5c22fb85102a751e5a305d8fd13a1856a725bf01 Author: Hante Meuleman Date: Wed Feb 17 11:27:03 2016 +0100 brcmfmac: add wowl gtk rekeying offload support This patch adds support for gtk rekeying offload and for gtk rekeying failure during wowl mode. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 65 ++++++++++++++++++---- .../broadcom/brcm80211/brcmfmac/cfg80211.h | 2 + .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 12 ++++ .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 6 +- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 21 ++++++- 5 files changed, 93 insertions(+), 13 deletions(-) commit d84d99e007770b4dd9b9e8be99da043c6555e274 Author: Hante Meuleman Date: Wed Feb 17 11:27:02 2016 +0100 brcmfmac: move module init and exit to common In preparation of module parameters for all devices the module init and exit routines are moved to the common file. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/common.c | 36 +++++++++++++++++++++- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 1 - .../wireless/broadcom/brcm80211/brcmfmac/core.c | 15 ++------- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 ++ 4 files changed, 39 insertions(+), 15 deletions(-) commit e9217b4b62a7296b5c008fd607579dbaf40bd754 Author: Hante Meuleman Date: Wed Feb 17 11:27:01 2016 +0100 brcmfmac: increase timeout for tx eapol When keys get set and updated this has to happen after eapol got transmitted (without key or old key) before the key can be updated. To make sure the order of sending eapol and configuring key is done correctly a timeout for tx of eapol is applied. This timeout is set to 50 msec, which is not always enough. Especially in AP mode and key updates the timeout may need to be much longer because client(s) can be in powersave. Increase the timeout from 50 to 950 msec. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d457a44fd85cd766c8bb48d6b542467bf89601b4 Author: Hante Meuleman Date: Wed Feb 17 11:27:00 2016 +0100 brcmfmac: remove pcie gen1 support The PCIE bus driver supports older gen1 (v1) chips, but there is no actual device which is using this older pcie core which is supported by brcmfmac. Remove all gen1 related code. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 135 +++------------------ 1 file changed, 20 insertions(+), 115 deletions(-) commit bc86fdb9ac02c77b9f55325f64fb70decc425962 Author: Hante Meuleman Date: Wed Feb 17 11:26:59 2016 +0100 brcmfmac: add support for the PCIE 4366c0 chip A newer version of the 4366 PCIE chip has been released. Add support for this version of the chip. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9300bf8610fd90a63a04dcc6be8223552321edad Author: Hante Meuleman Date: Wed Feb 17 11:26:58 2016 +0100 brcmfmac: use bar1 window size as provided by pci subsystem The PCIE bar1 window size is specified by chip. Currently the ioremap of bar1 was using a define which always matched the size of bar1, but newer chips can have a different bar1 sizes. With this patch the ioremap will be called with the by chip provided window size. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6ac27689b01e23e21f08d6f55d23a94eb10a8efc Author: Hante Meuleman Date: Wed Feb 17 11:26:57 2016 +0100 brcmfmac: use device memsize config from fw if defined Newer type pcie devices have memory which get shared between fw and hw. The division of this memory is done firmware compile time. As a result the ramsize as used by driver needs to be adjusted for this. This is done by reading the memory size from the firmware. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit cd2bc19c61b2da81ce310edb20f98e51fa7a5889 Author: Franky Lin Date: Wed Feb 17 11:26:56 2016 +0100 brcmfmac: check return for ARP ip setting iovar The return value of iovar set function should be saved and checked. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Hante Meuleman Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 52f22fb21764f083d697b3e35c18f37e471eba76 Author: Franky Lin Date: Wed Feb 17 11:26:55 2016 +0100 brcmfmac: add neighbor discovery offload ip address table configuration Configure ipv6 address for neighbor discovery offload ip table in firmware obtained through ipv6 address notification callback. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 23 ++-- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 138 ++++++++++++++++++--- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 7 ++ 3 files changed, 141 insertions(+), 27 deletions(-) commit 0aedbcaf6f182690790d98d90d5fe1e64c846c34 Author: Hante Meuleman Date: Wed Feb 17 11:26:54 2016 +0100 brcmfmac: Add length checks on firmware events Add additional length checks on firmware events to create more robust code. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Lei Zhang Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 10 ++++ .../wireless/broadcom/brcm80211/brcmfmac/fweh.c | 57 ++++-------------- .../wireless/broadcom/brcm80211/brcmfmac/fweh.h | 68 +++++++++++++++++----- .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 10 ++++ 4 files changed, 87 insertions(+), 58 deletions(-) commit 73345fd212980d2e28a5c6d83801c903bd773680 Author: Hante Meuleman Date: Wed Feb 17 11:26:53 2016 +0100 brcmfmac: Configure country code using device specific settings Country code configuration in a device is a device specific operation. For this the country code as specified by reg notifier (iso3166 alpha2) needs to be translated to a device specific country locale and revision number. This patch adds this translation and puts a placeholder in the device specific settings where the translation table can be stored. Additional patches will be needed to read these tables from for example device platform data. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 75 +++++++++++++++++++--- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 4 +- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 31 +++++++++ .../broadcom/brcm80211/brcmfmac/fwil_types.h | 4 +- 4 files changed, 101 insertions(+), 13 deletions(-) commit 6ea09153b6ccbee79869537ce61f5c16f736d72b Author: Franky Lin Date: Wed Feb 17 11:26:52 2016 +0100 brcmfmac: check for wowl support before enumerating feature flag In some cases wiphy->wowlan could be NULL if firmware doesn't have the support. Driver should check for support before walking down the feature flags. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Hante Meuleman Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d536733442d14664437dc9c3ec993d97b5a4f1b1 Author: Hante Meuleman Date: Wed Feb 17 11:26:51 2016 +0100 brcmfmac: Limit memory allocs to <64K Some systems have problems with allocating memory allocation larger then 64K. Often on unload/load or suspend/resume a failure is reported: Could not allocate wiphy device. This patch makes the escan intermediate storage buf dynamically allocated, and smaller than 64K. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 18 +++++++++--------- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 11 ++++++----- 2 files changed, 15 insertions(+), 14 deletions(-) commit a9eb0c4b73e7287074dfabd84337ea1a49976a3d Author: Arend van Spriel Date: Wed Feb 17 11:26:50 2016 +0100 brcmfmac: change function name for brcmf_cfg80211_wait_vif_event_timeout() Dropping the '_timeout' from the function name as the fact that a timeout value is passed makes it obvious a timeout is used. Also helps to keep code lines a bit shorter and easier to stick to 80 char boundary. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 +++++---- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 16 ++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) commit 49f86ec21c01b654f6ec47f2f4567f4f9ebaa26b Author: Larry Finger Date: Mon Feb 15 16:12:07 2016 -0600 rtlwifi: Change long delays to sleeps Routine rtl_addr_delay() uses delay statements in code that can sleep. To improve system responsiveness, the various delay statements are changed. In addition, routines rtl_rfreg_delay() and rtl_bb_delay() are rewritten to use the code in rtl_addr_delay() for most of their input values. Suggested-by: Byeoungwook Kim Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 44 ++++++++--------------------- 1 file changed, 12 insertions(+), 32 deletions(-) commit baebc70a4db86515d55ff1f226088a8e7f5821a0 Author: Joe Perches Date: Thu Mar 3 20:49:57 2016 -0800 s390: Use pr_warn instead of pr_warning Convert the uses of pr_warning to pr_warn so there are fewer uses of the old pr_warning. Miscellanea: o Align arguments o Coalesce formats Signed-off-by: Joe Perches Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/cpcmd.c | 3 +-- arch/s390/kernel/debug.c | 6 ++---- arch/s390/kernel/time.c | 6 ++---- arch/s390/mm/extmem.c | 16 +++++++--------- drivers/s390/block/dasd_devmap.c | 10 ++++------ drivers/s390/block/dasd_diag.c | 28 +++++++++++++--------------- drivers/s390/block/dasd_genhd.c | 4 ++-- drivers/s390/block/dasd_ioctl.c | 5 ++--- drivers/s390/block/dasd_proc.c | 5 ++--- drivers/s390/block/dcssblk.c | 13 ++++++------- drivers/s390/char/monreader.c | 10 +++++----- drivers/s390/char/sclp_cmd.c | 27 ++++++++++++--------------- drivers/s390/char/sclp_cpi_sys.c | 6 ++---- drivers/s390/char/tape_core.c | 4 ++-- drivers/s390/char/vmlogrdr.c | 6 ++---- drivers/s390/cio/blacklist.c | 9 ++++----- drivers/s390/cio/ccwreq.c | 13 ++++++------- drivers/s390/cio/cio.c | 2 +- drivers/s390/cio/device.c | 23 ++++++++++------------- drivers/s390/net/lcs.c | 4 ++-- drivers/s390/net/qeth_l3_main.c | 2 +- 21 files changed, 88 insertions(+), 114 deletions(-) commit 543691a4e1e040300ce6598a6ce6527d3144e5db Author: Sebastian Ott Date: Fri Mar 4 10:34:05 2016 +0100 s390/dasd: remove casts to dasd_*_private Convert dasd_device.private to be a void pointer to get rid of a lot of explicit casts. Signed-off-by: Sebastian Ott Reviewed-by: Stefan Haberland Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_alias.c | 55 +++++--------- drivers/s390/block/dasd_diag.c | 41 +++++----- drivers/s390/block/dasd_eckd.c | 161 ++++++++++++++-------------------------- drivers/s390/block/dasd_fba.c | 28 +++---- drivers/s390/block/dasd_int.h | 2 +- 5 files changed, 106 insertions(+), 181 deletions(-) commit 570d237c19f8d0f1dfd214767f2d995b8291138a Author: Jan Höppner Date: Wed Aug 19 11:16:35 2015 +0200 s390/dasd: Refactor dasd format functions Prepare for new format checking function by renaming functions and moving reusable code to separate functions: - Move sanity checks into a new function and make it reusable. - Move common format code to a new function called dasd_eckd_format_process_data. - Create the generic function dasd_eckd_format_build_ccw_req, which itself will then decide what ccw request is being built according to the input data. (with upcoming functionality). Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 58 +++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 12 deletions(-) commit 8542885bf5338bfccf779868a5d143620e794ff9 Author: Jan Höppner Date: Mon Sep 21 17:32:11 2015 +0200 s390/dasd: Simplify code in format logic Currently, dasd_format is calling the format logic of a DASD discipline with PAV enabled. If that fails with an error code of -EAGAIN the value of retries is decremented and the discipline function is called with PAV turned off. The loop is supposed to try this up to 255 times until success. However, -EAGAIN can only occur once here and therefore the loop will never reach the 255 retries. So, replace the unnecessarily complicated loop logic and simply try again without PAV enabled in case of an -EAGAIN error. Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_ioctl.c | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) commit 46d1c03c82a717735dddc7a47f321abaccbcec78 Author: Jan Höppner Date: Wed Oct 14 17:01:04 2015 +0200 s390/dasd: Improve dasd format code - Make sure a calling function can rely on data in fdata by resetting to its initial values - Move special treatment for track 0 and 1 to dasd_eckd_build_format - Replace dangerous backward goto with a loop logic - Add define for number that specifies the maximum amount of CCWs per request and is used for format_step calculation - Remove unused variable Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 110 +++++++++++++++++++---------------------- drivers/s390/block/dasd_int.h | 7 +++ 2 files changed, 59 insertions(+), 58 deletions(-) commit 2f10e50e3d284ba2a4e787bfe19e89770f87a8b3 Author: Christian Lamparter Date: Mon Feb 15 21:16:06 2016 +0100 carl9170: import 1.9.9 firmware headers Import new headers from my firmware branch: Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/carl9170/fwcmd.h | 8 ++++ drivers/net/wireless/ath/carl9170/fwdesc.h | 6 +++ drivers/net/wireless/ath/carl9170/hw.h | 73 +++++++++++++++++++++++++++-- drivers/net/wireless/ath/carl9170/version.h | 6 +-- 4 files changed, 87 insertions(+), 6 deletions(-) commit 9cc3fdc86c6006bae878da6d2d14c1633064a12f Author: One Thousand Gnomes Date: Mon Feb 15 19:04:56 2016 +0000 rt2x00: unterminated strlen of user data The buffer needs to be zero terminated in case the user data is not. Otherwise we run off the end of the buffer. Signed-off-by: Alan Cox Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7b5acd11a3ffec027abf4df2b30690a974873174 Author: Larry Finger Date: Thu Feb 11 10:56:22 2016 -0600 rtlwifi: rtl8821ae: Silence useless log output When driver rtl8821ae is loaded but not connected to any AP, it logs a "firmware not ready to run" message roughly once a minute. To eliminate logging this massage under normal debug conditions, the degug level needed to print this message is increased. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c70fee5ae5c4fb542e432599cb85c8031b952a0 Author: Sara Sharon Date: Tue Feb 2 11:55:53 2016 +0200 iwlwifi: mvm: extend time event duration Before authentication, we start a time event during which we wait for a beacon in order to sync our timers. If we didn't hear the beacon during this time - we abandon the connection. However, in congested environment, it was observed we might not hear beacons in that time slot. Extend the time event to give the connection a better chance. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 ++---- drivers/net/wireless/intel/iwlwifi/mvm/time-event.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 30d915c2ecbb60d222f49e8f249d04e208d11ebc Author: Sara Sharon Date: Thu Mar 3 16:49:05 2016 +0200 iwlwifi: mvm: set the correct amsdu enum values The amsdu enum values are off by 1 bit. Fix it. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 04ddc2aacc1c52793c1e30db5073bef6fbc08942 Author: Chaya Rachel Ivgi Date: Thu Mar 3 13:31:39 2016 +0200 iwlwifi: mvm: fix unregistration of thermal in some error flows The call to iwl_mvm_thermal_initialize() was too early in the function. Unregister will be performed when goto out_unregister is called, but as the code was - out_free may be called and leave without unregistering from thermal. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afd5b1704cb15eabc4358b7b0dd7f33099408eaa Author: Sara Sharon Date: Tue Mar 1 12:18:22 2016 +0200 iwlwifi: refactor the code that reads the MAC address from the NVM It makes it slightly easier to follow. Pass the pointer to the transport which allows to read WFMP_MAC_ADDR_X register only when needed and to use IWL_ERR instead of the less commonly used IWL_ERR_DEV logger macro. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 97 ++++++++++++---------- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 11 +-- 3 files changed, 55 insertions(+), 58 deletions(-) commit cc733bc90636118b20aad8ce7421001b679b338a Author: Andreas Färber Date: Tue Feb 9 02:27:49 2016 +0100 ARM64: dts: amlogic: Add Tronsmart Vega S95 configs Add Device Trees for Tronsmart Vega S95 Pro, Meta and Telos TV boxes. Signed-off-by: Andreas Färber Signed-off-by: Carlo Caione arch/arm64/boot/dts/amlogic/Makefile | 4 ++ .../boot/dts/amlogic/meson-gxbb-vega-s95-meta.dts | 55 ++++++++++++++++++++++ .../boot/dts/amlogic/meson-gxbb-vega-s95-pro.dts | 55 ++++++++++++++++++++++ .../boot/dts/amlogic/meson-gxbb-vega-s95-telos.dts | 55 ++++++++++++++++++++++ .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 55 ++++++++++++++++++++++ 5 files changed, 224 insertions(+) commit 3c7bccccd3edd728ef4a2c04a2c7e5a315bec26f Author: Andreas Färber Date: Tue Feb 9 21:01:33 2016 +0100 Documentation: devicetree: amlogic: Document Tronsmart Vega S95 boards Use "tronsmart,vega-s95" as well as "tronsmart,vega-s95-pro", "tronsmart,vega-s95-meta" and "tronsmart,vega-s95-telos" compatible strings. Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Carlo Caione Documentation/devicetree/bindings/arm/amlogic.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4f24eda8401f75eb36bccdb1661c51743cbf993b Author: Andreas Färber Date: Fri Feb 5 19:39:19 2016 +0100 ARM64: dts: Prepare configs for Amlogic Meson GXBaby Signed-off-by: Andreas Färber Signed-off-by: Carlo Caione arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/amlogic/Makefile | 3 + arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 183 ++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) commit 985b81817ce173f033f4d1d4d79fe5923f547e8d Author: Andreas Färber Date: Wed Mar 2 03:34:58 2016 +0100 Documentation: devicetree: amlogic: Document Meson GXBaby Use "amlogic,meson-gxbb" compatible string. Signed-off-by: Andreas Färber Acked-by: Rob Herring Signed-off-by: Carlo Caione Documentation/devicetree/bindings/arm/amlogic.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 1cd6709175789f0c3b404b55e609b11e958b3142 Author: Matthias Brugger Date: Wed Mar 2 03:34:57 2016 +0100 devicetree: bindings: Add vendor prefix for Tronsmart Tronsmart is a China based company building consumer electronic devices. Signed-off-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Andreas Färber Signed-off-by: Carlo Caione Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 451e9e54e259f1f223763e191393c47383674256 Author: Andreas Färber Date: Wed Mar 2 03:34:56 2016 +0100 ARM64: Enable Amlogic Meson GXBaby platform Provide the ARCH_MESON Kconfig symbol to allow enabling existing serial and i2c drivers. Signed-off-by: Andreas Färber Signed-off-by: Carlo Caione arch/arm64/Kconfig.platforms | 5 +++++ 1 file changed, 5 insertions(+) commit ec87e1cf7d8399d81d8965c6d852f8057a8dd687 Merge: 869ae76 f6cede5 Author: Ingo Molnar Date: Mon Mar 7 09:27:30 2016 +0100 Merge tag 'v4.5-rc7' into x86/asm, to pick up SMAP fix Signed-off-by: Ingo Molnar commit 09e59075496517206351cc28226ad7263a1a5c4f Author: Kuninori Morimoto Date: Mon Mar 7 05:09:34 2016 +0000 ASoC: rsnd: CMD TIMSEL support for Capture CMD.out should use same as SRC.out for TIMSEL settings, but it cares Playback case only. This patch fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0102eed57c47371023c03b3b0c564f33d5e94570 Author: Kuninori Morimoto Date: Mon Mar 7 05:09:14 2016 +0000 ASoC: rsnd: SRC TIMSEL support for Capture SRC has Sync/Async mode, and it can't use Sync mode when Capture with CMD. In Async mode, it needs to care about in/out SRC rate for settings, but current driver supporting Playback case only. This patch supports Capture case. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 204 ++++++++++++++++++++++++++--------------------- sound/soc/sh/rcar/rsnd.h | 8 +- sound/soc/sh/rcar/src.c | 26 +++--- 3 files changed, 128 insertions(+), 110 deletions(-) commit cbf1494fbcc80d363477af1efefb2380e7660a24 Author: Kuninori Morimoto Date: Mon Mar 7 05:08:33 2016 +0000 ASoC: rsnd: add rsnd_src_get_in/out_rate() SRC will convert rate, and then, CMD and SSI want to know its rate (= SRC.in / SRC.out) for each purpose. Current driver is supporting only Playback, but SRC+Capture support needs more flexibility. This patch adds rsnd_src_get_in/out_rate() for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/rsnd.h | 10 +++++++--- sound/soc/sh/rcar/src.c | 20 +++++++++++++++++--- sound/soc/sh/rcar/ssi.c | 5 +++-- 3 files changed, 27 insertions(+), 8 deletions(-) commit ab2049f9de72c901c07eec25eff74dae2e82df7e Author: Kuninori Morimoto Date: Mon Mar 7 05:07:57 2016 +0000 ASoC: rsnd: rename rsnd_enable_sync_convert() to rsnd_src_sync_is_enabled() rsnd_enable_sync_convert() is for checking, not for setting. In order to avoid confusion, this patch renamed it to rsnd_src_sync_is_enabled() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 1a9be9ee194131465d945981969b85045f20e6af Author: Kuninori Morimoto Date: Mon Mar 7 05:07:29 2016 +0000 ASoC: rsnd: SRC function parameter uses "mod" instead of "src" To reduce confusion, SRC uses "mod" instead of "src" as function parameter Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit b5ebbb3a16c631c776f6619dff8ee86da21cca6f Author: Kuninori Morimoto Date: Mon Mar 7 05:06:46 2016 +0000 ASoC: rsnd: SRC sync mode is not related to clock master mode SRC sync mode needs to control its clock (= for in/out). 1st but codec side clock Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 7 ------- 1 file changed, 7 deletions(-) commit 61a219fe192412bca6c26657a4b0c99c67a3e7fc Author: Kuninori Morimoto Date: Mon Mar 7 05:06:17 2016 +0000 ASoC: rsnd: don't enable SRC Sync mode when Capture with CMD It can't use SRC Synchronous convert when Capture if it uses CMD, because no one provide out side clocks. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57586fb76471c5fc521b2e9c3a4eae259b06d479 Author: Bard Liao Date: Mon Mar 7 15:09:38 2016 +0800 ASoC: rt5640: add supplys for dac power The DAC1/2 power is for both DACs and related mixer/mux. Add SUPPLY type widgets to support it. Signed-off-by: Jack Yu Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit c467fc0e010b66069c0d5bb3e8e869adf267115f Author: Bard Liao Date: Mon Mar 7 15:09:37 2016 +0800 ASoC: rt5640: Set PLL src according to source rt5640_set_dai_pll set pll source according to given source and dai id. However, the pll source should be set according to given source only. Signed-off-by: Jack Yu Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 623f7b933968b159081559baca56d98ed4b60e33 Author: James Ban Date: Mon Mar 7 16:08:20 2016 +0900 regulator: pv88090: fix incorrect clear of event register This is a patch to fix incorrect clear of event register. Signed-off-by: James Ban Signed-off-by: Mark Brown drivers/regulator/pv88090-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 74e26809fb47e072d0838f74a08a0a5aa428848f Author: Kuninori Morimoto Date: Mon Mar 7 04:57:55 2016 +0000 ASoC: rsrc-card: tidyup convert-channels explain Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7fcd13663fe43ad938fec1acd46ff196dddf914 Author: John Lin Date: Mon Mar 7 12:12:11 2016 +0800 ASoC: rt5616: add missing mute control for HPVOL Add missing kcontrol for HPVOL mute control. Signed-off-by: John Lin Signed-off-by: Mark Brown sound/soc/codecs/rt5616.c | 2 ++ 1 file changed, 2 insertions(+) commit a961f9b472de93e770d53b7340a58dbff64b4075 Author: Bamvor Jian Zhang Date: Fri Feb 26 22:37:14 2016 +0800 gpiolib: rewrite gpiodev_add_to_list The original code of gpiodev_add_to_list is not very clear which lead to bugs or compiling warning, reference the following patches: Bugs: 1. Commit ef7c7553039b ("gpiolib: improve overlap check of range of gpio"). 2. Commit 96098df125c0 ("gpiolib: fix chip order in gpio list") Warning: 1. Commit e28ecca6eac4 ("gpio: fix warning about iterator"). of gpio"). There is a off-list discussion about how to improve it consequently. This commit try to follow this by rewriting the whole functions. Tested pass with my gpio mockup driver and test scripts[1]. [1] http://www.spinics.net/lists/linux-gpio/msg09598.html Suggested-by: Arnd Bergmann Signed-off-by: Bamvor Jian Zhang Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 65 +++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 40 deletions(-) commit 24030d9d9550d1a0b9bfcf6b60da29f7a2bb31cf Author: Axel Lin Date: Fri Feb 26 16:00:50 2016 +0800 gpio: moxart: Allow compile test build There is no build dependency for this driver, so enable COMPILE_TEST to get better build coverage. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c271658aa4b60f5739691e540548aa140e4b3b5 Author: Axel Lin Date: Fri Feb 26 15:59:57 2016 +0800 gpio: moxart: Drop redundant code to set already initialized gpio_chip fields These fields are initialized by bgpio_init() with exactly the same settings so remove the redundant code. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-moxart.c | 3 --- 1 file changed, 3 deletions(-) commit e74a386d70c793ef44678b44b021c99094b28c47 Author: Jon Paul Maloy Date: Thu Mar 3 14:23:21 2016 -0500 tipc: remove pre-allocated message header in link struct Until now, we have kept a pre-allocated protocol message header aggregated into struct tipc_link. Apart from adding unnecessary footprint to the link instances, this requires extra code both to initialize and re-initialize it. We now remove this sub-optimization. This change also makes it possible to clean up the function tipc_build_proto_msg() and remove a couple of small functions that were accessing the mentioned header. In particular, we can replace all occurrences of the local function call link_own_addr(link) with the generic tipc_own_addr(net). Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 5 --- net/tipc/bcast.h | 1 - net/tipc/link.c | 114 ++++++++++++++++++++++--------------------------------- net/tipc/link.h | 1 - net/tipc/net.c | 1 - 5 files changed, 45 insertions(+), 77 deletions(-) commit 34f65dbb6c7572b826d836d62b99de32ecf2af48 Author: Richard Alpe Date: Thu Mar 3 14:20:43 2016 +0100 tipc: make sure required IPv6 addresses are scoped Make sure the user has provided a scope for multicast and link local addresses used locally by a UDP bearer. Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne Signed-off-by: David S. Miller net/tipc/udp_media.c | 5 +++++ 1 file changed, 5 insertions(+) commit ddb3712552c8807c75576fb4fbdbb16f0d48b161 Author: Richard Alpe Date: Thu Mar 3 14:20:42 2016 +0100 tipc: safely copy UDP netlink data from user The netlink policy for TIPC_NLA_UDP_LOCAL and TIPC_NLA_UDP_REMOTE is of type binary with a defined length. This causes the policy framework to threat the defined length as maximum length. There is however no protection against a user sending a smaller amount of data. Prior to this patch this wasn't handled which could result in a partially incomplete sockaddr_storage struct containing uninitialized data. In this patch we use nla_memcpy() when copying the user data. This ensures a potential gap at the end is cleared out properly. This was found by Julia with Coccinelle tool. Reported-by: Daniel Borkmann Reported-by: Julia Lawall Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne Signed-off-by: David S. Miller net/tipc/udp_media.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 2837f39c7cdbd209ab04d1c1f4eca015a40d5cd6 Author: Richard Alpe Date: Thu Mar 3 14:20:41 2016 +0100 tipc: don't check link reset on non existing link Make sure we have a link before checking if it has been reset or not. Prior to this patch tipc_link_is_reset() could be called with a non existing link, resulting in a null pointer dereference. Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne Signed-off-by: David S. Miller net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b3009604b8e305c32125530a3cbcc57d88f3bc1 Author: Richard Alpe Date: Thu Mar 3 14:20:40 2016 +0100 tipc: add net device to skb before UDP xmit Prior to this patch enabling a IPv4 UDP bearer caused a null pointer dereference in iptunnel_xmit_stats(), when it tried to dereference the net device from the skb. To resolve this we now point the skb device to the net device resolved from the routing table. Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit()) Signed-off-by: Richard Alpe Acked-by: Jon Maloy Reviewed-by: Erik Hugne Signed-off-by: David S. Miller net/tipc/udp_media.c | 2 ++ 1 file changed, 2 insertions(+) commit 8c50b72a3b4f1f7cdfdfebd233b1cbd121262e65 Author: Torsten Duwe Date: Thu Mar 3 15:27:00 2016 +1100 powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel Firstly we add logic to Kconfig to allow a user to choose if they want mprofile-kernel. This has to be user-selectable because only some current toolchains support it. If we enabled it unconditionally we would prevent some users from building the kernel entirely. Arguably it would be nice if we could detect if mprofile-kernel was available, and use it then. However that would violate the principle of least surprise because a user having choosen options such as live patching, would then see them quietly disabled at build time. We also make the user selectable option negative, ie. it disables when selected, so that allyesconfig continues to build on old toolchains. Once we've decided we do want to use mprofile-kernel, we then add a script which checks it actually works. That is because there are versions of gcc that accept the flag but don't generate correct code. Due to the way kconfig works, we can't error out when we detect a non-working toolchain. If we did a user would never be able to modify their config and run oldconfig - because the check would block oldconfig from running. Instead we emit a warning and add a bogus flag to CFLAGS so that the build will fail. Signed-off-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 19 +++++++++++++++++++ arch/powerpc/Makefile | 15 +++++++++++++++ arch/powerpc/scripts/gcc-check-mprofile-kernel.sh | 23 +++++++++++++++++++++++ 3 files changed, 57 insertions(+) commit 153086644fd1fb07fb3af84d9f11542a19b1e8b6 Author: Torsten Duwe Date: Thu Mar 3 15:26:59 2016 +1100 powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI The gcc switch -mprofile-kernel defines a new ABI for calling _mcount() very early in the function with minimal overhead. Although mprofile-kernel has been available since GCC 3.4, there were bugs which were only fixed recently. Currently it is known to work in GCC 4.9, 5 and 6. Additionally there are two possible code sequences generated by the flag, the first uses mflr/std/bl and the second is optimised to omit the std. Currently only gcc 6 has the optimised sequence. This patch supports both sequences. Initial work started by Vojtech Pavlik, used with permission. Key changes: - rework _mcount() to work for both the old and new ABIs. - implement new versions of ftrace_caller() and ftrace_graph_caller() which deal with the new ABI. - updates to __ftrace_make_nop() to recognise the new mcount calling sequence. - updates to __ftrace_make_call() to recognise the nop'ed sequence. - implement ftrace_modify_call(). - updates to the module loader to surpress the toc save in the module stub when calling mcount with the new ABI. Reviewed-by: Balbir Singh Signed-off-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/include/asm/code-patching.h | 21 ++++ arch/powerpc/include/asm/ftrace.h | 5 + arch/powerpc/kernel/entry_64.S | 166 ++++++++++++++++++++++++++++++- arch/powerpc/kernel/ftrace.c | 103 ++++++++++++++++--- arch/powerpc/kernel/module_64.c | 49 ++++++++- 5 files changed, 324 insertions(+), 20 deletions(-) commit 9a7841ae8d6ce9b7a7cf879c9968fcf4c9545563 Author: Torsten Duwe Date: Thu Mar 3 15:26:58 2016 +1100 powerpc/ftrace: Use $(CC_FLAGS_FTRACE) when disabling ftrace Rather than open-coding -pg whereever we want to disable ftrace, use the existing $(CC_FLAGS_FTRACE) variable. This has the advantage that it will work in future when we use a different set of flags to enable ftrace. Signed-off-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/kernel/Makefile | 12 ++++++------ arch/powerpc/lib/Makefile | 4 ++-- arch/powerpc/platforms/powermac/Makefile | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit c96f83856f56a66a5d7fd730958bec80c9b5a020 Author: Torsten Duwe Date: Thu Mar 3 15:26:57 2016 +1100 powerpc/ftrace: Use generic ftrace_modify_all_code() Convert powerpc's arch_ftrace_update_code() from its own version to use the generic default functionality (without stop_machine -- our instructions are properly aligned and the replacements atomic). With this we gain error checking and the much-needed function_trace_op handling. Reviewed-by: Balbir Singh Reviewed-by: Kamalesh Babulal Signed-off-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/kernel/ftrace.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 336a7b5dd80a2a7b463dc8ede4862425940edeb5 Author: Michael Ellerman Date: Thu Mar 3 15:26:56 2016 +1100 powerpc/module: Create a special stub for ftrace_caller() In order to support the new -mprofile-kernel ABI, we need to be able to call from the module back to ftrace_caller() (in the kernel) without using the module's r2. That is because the function in this module which is calling ftrace_caller() may not have setup r2, if it doesn't otherwise need it (ie. it accesses no globals). To make that work we add a new stub which is used for calling ftrace_caller(), which uses the kernel toc instead of the module toc. Reviewed-by: Balbir Singh Reviewed-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 69 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) commit f17c4e01e906c568fb03a2e6c2b99e4ee4587fbf Author: Michael Ellerman Date: Thu Mar 3 15:26:55 2016 +1100 powerpc/module: Mark module stubs with a magic value When a module is loaded, calls out to the kernel go via a stub which is generated at runtime. One of these stubs is used to call _mcount(), which is the default target of tracing calls generated by the compiler with -pg. If dynamic ftrace is enabled (which it typically is), another stub is used to call ftrace_caller(), which is the target of tracing calls when ftrace is actually active. ftrace then wants to disable the calls to _mcount() at module startup, and enable/disable the calls to ftrace_caller() when enabling/disabling tracing - all of these it does by patching the code. As part of that code patching, the ftrace code wants to confirm that the branch it is about to modify, is in fact a call to a module stub which calls _mcount() or ftrace_caller(). Currently it does that by inspecting the instructions and confirming they are what it expects. Although that works, the code to do it is pretty intricate because it requires lots of knowledge about the exact format of the stub. We can make that process easier by marking the generated stubs with a magic value, and then looking for that magic value. Altough this is not as rigorous as the current method, I believe it is sufficient in practice. Reviewed-by: Balbir Singh Reviewed-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/include/asm/module.h | 3 +- arch/powerpc/kernel/ftrace.c | 14 ++----- arch/powerpc/kernel/module_64.c | 78 +++++++++++++-------------------------- 3 files changed, 31 insertions(+), 64 deletions(-) commit 136cd3450af8092f30d0e289806f08ac2aeee38f Author: Michael Ellerman Date: Thu Mar 3 15:26:54 2016 +1100 powerpc/module: Only try to generate the ftrace_caller() stub once Currently we generate the module stub for ftrace_caller() at the bottom of apply_relocate_add(). However apply_relocate_add() is potentially called more than once per module, which means we will try to generate the ftrace_caller() stub multiple times. Although the current code deals with that correctly, ie. it only generates a stub the first time, it would be clearer to only try to generate the stub once. Note also on first reading it may appear that we generate a different stub for each section that requires relocation, but that is not the case. The code in stub_for_addr() that searches for an existing stub uses sechdrs[me->arch.stubs_section], ie. the single stub section for this module. A cleaner approach is to only generate the ftrace_caller() stub once, from module_finalize(). Although the original code didn't check to see if the stub was actually generated correctly, it seems prudent to add a check, so do that. And an additional benefit is we can clean the ifdefs up a little. Finally we must propagate the const'ness of some of the pointers passed to module_finalize(), but that is also an improvement. Reviewed-by: Balbir Singh Reviewed-by: Torsten Duwe Signed-off-by: Michael Ellerman arch/powerpc/include/asm/module.h | 9 +++++++++ arch/powerpc/kernel/module.c | 5 +++++ arch/powerpc/kernel/module_32.c | 20 ++++++++++++++------ arch/powerpc/kernel/module_64.c | 22 ++++++++++++++-------- 4 files changed, 42 insertions(+), 14 deletions(-) commit a5cab83cd3d2d75d3893276cb5f27e163484ef04 Author: Michael Ellerman Date: Thu Mar 3 15:26:53 2016 +1100 powerpc: Create a helper for getting the kernel toc value Move the logic to work out the kernel toc pointer into a header. This is a good cleanup, and also means we can use it elsewhere in future. Reviewed-by: Kamalesh Babulal Reviewed-by: Torsten Duwe Reviewed-by: Balbir Singh Signed-off-by: Michael Ellerman Tested-by: Kamalesh Babulal arch/powerpc/include/asm/sections.h | 12 ++++++++++++ arch/powerpc/kernel/paca.c | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) commit 0762ddd73adf7bcb416132ed9814c59ff2319af3 Author: Joachim Eastwood Date: Thu Feb 25 22:44:39 2016 +0100 pinctrl: lpc1850-scu: document nxp,gpio-pin-interrupt Update devicetree documention for lpc1850-scu with the new nxp,gpio-pin-interrupt property. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 962d8cdc3133435aed2928637f73e272128a326c Author: Bernhard Walle Date: Thu Mar 3 10:15:55 2016 +0100 net: fec: Rename "phy-reset-active-low" property is actually "active high". Thanks for Troy Kisky for pointing that out. Since the patch is in linux-next, this patch is incremental and doesn't replace the original patch. Signed-off-by: Bernhard Walle Acked-by: Fugang Duan Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/fsl-fec.txt | 2 +- drivers/net/ethernet/freescale/fec_main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4c3e962df044c34d25403f8f58ff7b34c4966b4a Author: Wu Fengguang Date: Thu Mar 3 09:55:19 2016 +0800 stmmac: fix noderef.cocci warnings drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Giuseppe Cavallaro Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81825b111d316ee0297cd4ab86cd59694dc91e70 Author: Joachim Eastwood Date: Thu Feb 25 22:44:38 2016 +0100 pinctrl: lpc18xx: add nxp,gpio-pin-interrupt property Add support for setting up GPIO pin interrupts in the lpc18xx pinctrl driver. The LPC18xx SCU contain two registers that sets up the signal routing to the GPIO pin interrupt (PINT) block. The routing uses the GPIO namespace and not the pin namespace so a lookup is preformed on the pin. Routing configuration is done in the device tree by using the new nxp,gpio-pin-interrupt property. This property takes single parameter which sets the PINT hwirq for the GPIO. Signed-off-by: Joachim Eastwood Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-lpc18xx.c | 143 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 137 insertions(+), 6 deletions(-) commit d1491fa54ceecfc32147626375e27937cb54b091 Author: WANG Cong Date: Wed Mar 2 11:20:36 2016 -0800 act_ife: fix a typo in kmemdup() parameters 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b18537cd8ec2e5280ba19d24ea8812b80e5b3208 Author: Joachim Eastwood Date: Thu Feb 25 22:44:37 2016 +0100 pinctrl: core: create nolock version of pinctrl_find_gpio_range_from_pin pinctrl_find_gpio_range_from_pin takes the pctldev->mutex but so does pinconf_pins_show and this will cause a deadlock if pinctrl_find_gpio_range_from_pin is used in .pin_config_get callback. Create a nolock version of pinctrl_find_gpio_range_from_pin to allow pin to gpio lookup to be used from pinconf_pins_show. Signed-off-by: Joachim Eastwood Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 35 +++++++++++++++++++++++------------ drivers/pinctrl/core.h | 4 ++++ 2 files changed, 27 insertions(+), 12 deletions(-) commit 5e9a207547079a23c3d4ecb4bad050ba8acc3f59 Author: Colin Ian King Date: Wed Feb 24 17:32:50 2016 +0000 pinctrl: lpc18xx: ensure ngroups is initialized at correct place The initialization of ngroups is occurring at the end of the first iteration of the outer loop, which means that the assignment pins[ngroups++] = i is potentially indexing into a region outside of array pins because ngroups is not initialized. Instead, initialize ngroups in the inner loop before the first inner loop iteration. Signed-off-by: Colin Ian King Reviewed-by: Joachim Eastwood Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-lpc18xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 Author: Marco Angaroni Date: Sat Mar 5 12:10:02 2016 +0100 ipvs: correct initial offset of Call-ID header search in SIP persistence engine The IPVS SIP persistence engine is not able to parse the SIP header "Call-ID" when such header is inserted in the first positions of the SIP message. When IPVS is configured with "--pe sip" option, like for example: ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o some particular messages (see below for details) do not create entries in the connection template table, which can be listed with: ipvsadm -Lcn --persistent-conn Problematic SIP messages are SIP responses having "Call-ID" header positioned just after message first line: SIP/2.0 200 OK [Call-ID header here] [rest of the headers] When "Call-ID" header is positioned down (after a few other headers) it is correctly recognized. This is due to the data offset used in get_callid function call inside ip_vs_pe_sip.c file: since dptr already points to the start of the SIP message, the value of dataoff should be initially 0. Otherwise the header is searched starting from some bytes after the first character of the SIP message. Fixes: 758ff0338722 ("IPVS: sip persistence engine") Signed-off-by: Marco Angaroni Acked-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_pe_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f911b675a06d05211da52cf8267db80c81b6aee4 Author: Julian Anastasov Date: Sat Mar 5 15:03:23 2016 +0200 ipvs: allow rescheduling after RST "RFC 5961, 4.2. Mitigation" describes a mechanism to request client to confirm with RST the restart of TCP connection before resending its SYN. As result, IPVS can see SYNs for existing connection in CLOSE state. Add check to allow rescheduling in this state. Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_core.c | 1 + 1 file changed, 1 insertion(+) commit f719e3754ee2f7275437e61a6afd520181fdd43b Author: Julian Anastasov Date: Sat Mar 5 15:03:22 2016 +0200 ipvs: drop first packet to redirect conntrack Jiri Bohac is reporting for a problem where the attempt to reschedule existing connection to another real server needs proper redirect for the conntrack used by the IPVS connection. For example, when IPVS connection is created to NAT-ed real server we alter the reply direction of conntrack. If we later decide to select different real server we can not alter again the conntrack. And if we expire the old connection, the new connection is left without conntrack. So, the only way to redirect both the IPVS connection and the Netfilter's conntrack is to drop the SYN packet that hits existing connection, to wait for the next jiffie to expire the old connection and its conntrack and to rely on client's retransmission to create new connection as usually. Jiri Bohac provided a fix that drops all SYNs on rescheduling, I extended his patch to do such drops only for connections that use conntrack. Here is the original report from Jiri Bohac: Since commit dc7b3eb900aa ("ipvs: Fix reuse connection if real server is dead"), new connections to dead servers are redistributed immediately to new servers. The old connection is expired using ip_vs_conn_expire_now() which sets the connection timer to expire immediately. However, before the timer callback, ip_vs_conn_expire(), is run to clean the connection's conntrack entry, the new redistributed connection may already be established and its conntrack removed instead. Fix this by dropping the first packet of the new connection instead, like we do when the destination server is not available. The timer will have deleted the old conntrack entry long before the first packet of the new connection is retransmitted. Fixes: dc7b3eb900aa ("ipvs: Fix reuse connection if real server is dead") Signed-off-by: Jiri Bohac Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman include/net/ip_vs.h | 17 +++++++++++++++++ net/netfilter/ipvs/ip_vs_core.c | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 9 deletions(-) commit 3f20efba41916ee17ce82f0fdd02581ada2872b2 Author: Arnd Bergmann Date: Wed Jan 27 14:52:02 2016 +0100 ipvs: handle ip_vs_fill_iph_skb_off failure ip_vs_fill_iph_skb_off() may not find an IP header, and gcc has determined that ip_vs_sip_fill_param() then incorrectly accesses the protocol fields: net/netfilter/ipvs/ip_vs_pe_sip.c: In function 'ip_vs_sip_fill_param': net/netfilter/ipvs/ip_vs_pe_sip.c:76:5: error: 'iph.protocol' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (iph.protocol != IPPROTO_UDP) ^ net/netfilter/ipvs/ip_vs_pe_sip.c:81:10: error: 'iph.len' may be used uninitialized in this function [-Werror=maybe-uninitialized] dataoff = iph.len + sizeof(struct udphdr); ^ This adds a check for the ip_vs_fill_iph_skb_off() return code before looking at the ip header data returned from it. Signed-off-by: Arnd Bergmann Fixes: b0e010c527de ("ipvs: replace ip_vs_fill_ip4hdr with ip_vs_fill_iph_skb_off") Acked-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_pe_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3595962d82495f51a80feb19dcdb135556a9527 Author: Greg Ungerer Date: Thu Feb 25 22:59:13 2016 +1000 m68knommu: remove obsolete 68360 support Remove the obsolete Motorola/Freescale 68360 SoC support. It has been bit rotting for many years with little active use in mainlne. There has been no serial driver support for many years, so it is largely not useful in its current state. Signed-off-by: Greg Ungerer arch/m68k/68360/Makefile | 12 - arch/m68k/68360/commproc.c | 309 ---------------- arch/m68k/68360/config.c | 169 --------- arch/m68k/68360/entry.S | 164 --------- arch/m68k/68360/head-ram.S | 402 --------------------- arch/m68k/68360/head-rom.S | 413 ---------------------- arch/m68k/68360/ints.c | 138 -------- arch/m68k/Kconfig.cpu | 7 - arch/m68k/Kconfig.debug | 2 +- arch/m68k/Kconfig.machine | 6 - arch/m68k/Makefile | 3 - arch/m68k/include/asm/commproc.h | 664 ----------------------------------- arch/m68k/include/asm/m68360.h | 13 - arch/m68k/include/asm/m68360_enet.h | 177 ---------- arch/m68k/include/asm/m68360_pram.h | 431 ----------------------- arch/m68k/include/asm/m68360_quicc.h | 362 ------------------- arch/m68k/include/asm/m68360_regs.h | 408 --------------------- arch/m68k/kernel/early_printk.c | 8 +- arch/m68k/kernel/setup_no.c | 7 - 19 files changed, 5 insertions(+), 3690 deletions(-) commit ca6fafd183d6d687a7957e5328ecefc785f22a5a Author: Greg Ungerer Date: Mon Jan 11 10:07:49 2016 +1000 m68knommu: fix FEC platform device registration when driver is modular The FEC (Fast Ethernet Crontroller) module on many ColdFire parts can be compiled into the kernel, or as a module. Therefore the platform device support for it is required whenever the driver is enabled - not just when built into the kernel. Use IS_ENABLED(CONFIG_FEC) instead of a conditional check on only the driver being built into the kernel. Signed-off-by: Greg Ungerer Acked-by: Geert Uytterhoeven arch/m68k/coldfire/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c1a79f5fff9b5ef653dc8b900ce818860c1f710 Merge: 85a9f38 a7e5d03 Author: Dave Chinner Date: Mon Mar 7 09:34:54 2016 +1100 Merge branch 'xfs-misc-fixes-4.6-2' into for-next commit 85a9f38d382bf06e995f2b1bf114596bac08d14d Merge: 3d93ec0 6448543 Author: Dave Chinner Date: Mon Mar 7 09:34:31 2016 +1100 Merge branch 'xfs-dax-fixes-4.6' into for-next commit 3d93ec03648dfbe0f6772b906c8d27a4feaee75f Merge: 7f0ed54 0df61da Author: Dave Chinner Date: Mon Mar 7 09:34:02 2016 +1100 Merge branch 'xfs-writepage-rework-4.6' into for-next commit 0df61da8ac5b7acb1db6cee142822ebe4724c739 Author: Darrick J. Wong Date: Mon Mar 7 09:32:14 2016 +1100 xfs: ioends require logically contiguous file offsets We need to create a new ioend if the current writepage call isn't logically contiguous with the range contained in the previous ioend. Hopefully writepage gets called in order of increasing file offset. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_aops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f0ed5461a6f5e4ccd2a3ca1047edbe4bbe217fc Merge: a2bbcb6 12877da Author: Dave Chinner Date: Mon Mar 7 09:31:00 2016 +1100 Merge branch 'xfs-buf-macro-cleanup-4.6' into for-next commit a2bbcb60ff9a8e8a4159e11bc3ed84f7221fe79f Merge: 6d247d4 c19b3b05 Author: Dave Chinner Date: Mon Mar 7 09:30:32 2016 +1100 Merge branch 'xfs-gut-icdinode-4.6' into for-next commit 6d247d47fbd6883f7096e0e672afbdba6286dbc4 Merge: acb3e26 af055e3 Author: Dave Chinner Date: Mon Mar 7 09:30:12 2016 +1100 Merge branch 'xfs-misc-fixes-4.6' into for-next commit acb3e26fc3652d43cb5cf07c311ed55f3aecf40e Merge: 1b186d2 74c66bc Author: Dave Chinner Date: Mon Mar 7 09:29:48 2016 +1100 Merge branch 'xfs-dio-fix-4.6' into for-next commit 1b186d25b0dca16671fe9c2c86330a609cf55802 Merge: c53473b be60794 Author: Dave Chinner Date: Mon Mar 7 09:29:25 2016 +1100 Merge branch 'xfs-get-next-dquot-4.6' into for-next commit c53473be45afbbba215fda75bedbb089272e45e0 Merge: 9deed09 bf85e09 Author: Dave Chinner Date: Mon Mar 7 09:29:04 2016 +1100 Merge branch 'xfs-rt-fixes-4.6' into for-next commit 9deed09554f9ce17c8785533a7d6dbcf51471659 Merge: 8e0bd49 7f6aff3 Author: Dave Chinner Date: Mon Mar 7 09:28:36 2016 +1100 Merge branch 'xfs-torn-log-fixes-4.5' into for-next commit 5110cd82ca90e6ce04c1c3264587c183aad1f179 Author: Darrick J. Wong Date: Mon Mar 7 08:40:03 2016 +1100 xfs: use named array initializers for log item dumping Use named array initializers for the string arrays used to dump log items, rather than depending on the order being maintained correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log.c | 132 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 68 insertions(+), 64 deletions(-) commit 49ca9118e6ecca63c78de924801b8b9fe4af44ff Author: Darrick J. Wong Date: Mon Mar 7 08:39:56 2016 +1100 xfs: fix computation of inode btree maxlevels Commit 88740da18[1] introduced a function to compute the maximum height of the inode btree back in 1994. Back then, apparently, the freespace and inode btrees shared the same geometry; however, it has long since been the case that the inode and freespace btrees have different record and key sizes. Therefore, we must use m_inobt_mnr if we want a correct calculation/log reservation/etc. (Yes, this bug has been around for 21 years and ten months.) (Yes, I was in middle school when this bug was committed.) [1] http://oss.sgi.com/cgi-bin/gitweb.cgi?p=archive/xfs-import.git;a=commitdiff;h=88740da18ddd9d7ba3ebaa9502fefc6ef2fd19cd Historical-research-by: Dave Chinner Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_ialloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a798011c8fd4286605b990c1722c16903fc14b7a Author: Dave Chinner Date: Mon Mar 7 08:39:36 2016 +1100 xfs: reinitialise per-AG structures if geometry changes during recovery If a crash occurs immediately after a filesystem grow operation, the updated superblock geometry is found only in the log. After we recover the log, the superblock is reread and re-initialised and so has the new geometry in memory. If the new geometry has more AGs than prior to the grow operation, then the new AGs will not have in-memory xfs_perag structurea associated with them. This will result in an oops when the first metadata buffer from a new AG is looked up in the buffer cache, as the block lies within the new geometry but then fails to find a perag structure on lookup. This is easily fixed by simply re-initialising the perag structure after re-reading the superblock at the conclusion of the first pahse of log recovery. This, however, does not fix the case of log recovery requiring access to metadata in the newly grown space. Fortunately for us, because the in-core superblock has not been updated, this will result in detection of access beyond the end of the filesystem and so recovery will fail at that point. If this proves to be a problem, then we can address it separately to the current reported issue. Reported-by: Alex Lyakas Tested-by: Alex Lyakas Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 335e073faacc9d90bee1527fa2550d6df045df63 Author: Jiri Kosina Date: Sun Mar 6 22:20:25 2016 +0100 klp: remove CONFIG_LIVEPATCH dependency from klp headers There is no need for livepatch.h (generic and arch-specific) to depend on CONFIG_LIVEPATCH. Remove that superfluous dependency. Reported-by: Josh Poimboeuf Signed-off-by: Jiri Kosina arch/s390/include/asm/livepatch.h | 2 -- arch/x86/include/asm/livepatch.h | 2 -- include/linux/livepatch.h | 4 ---- 3 files changed, 8 deletions(-) commit b24b78a113164a84bf242b08ef2165365445ea2b Author: Miroslav Benes Date: Fri Mar 4 10:53:39 2016 +0100 klp: remove superfluous errors in asm/livepatch.h There is an #error in asm/livepatch.h for both x86 and s390 in !CONFIG_LIVEPATCH cases. It does not make much sense as pointed out by Michael Ellerman. One can happily include asm/livepatch.h with CONFIG_LIVEPATCH. Remove it as useless. Suggested-by: Michael Ellerman Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina arch/s390/include/asm/livepatch.h | 2 -- arch/x86/include/asm/livepatch.h | 2 -- 2 files changed, 4 deletions(-) commit 91f66a3c672065a3aca387ca7e0028504bb8f457 Author: Emmanuel Grumbach Date: Sun Feb 28 10:15:08 2016 +0200 iwlwifi: mvm: avoid panics with thermal device usage Thermal zone device registration can fail, and in this case we don't want to remove WiFi functionality. This is why the thermal zone registration function is void, and the flows continue even if the thermal zone device registration failed. Same applies for the cooling device. This means that we at least need to remember that the thermal zone device didn't register properly and take the minimal precautions to avoid panic'ing when we access it. This was missing. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 57 +++++++++++++++------------- 2 files changed, 31 insertions(+), 27 deletions(-) commit e5f91d91ac2e09f93f58ab8f6813d12f2b3afa03 Author: Sara Sharon Date: Wed Mar 2 15:17:28 2016 +0200 iwlwifi: pcie: set RB chunk size back to 64 128 byte chunk size is supported only on PCIe and not on IOSF. For now, change it back to 64 byte. Reported-by: Oren Givon Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d56daea43c5a5d72e67ac60d97734d5823b457d6 Author: Sara Sharon Date: Mon Feb 15 19:30:49 2016 +0200 iwlwifi: pcie: refactor RXBs reclaiming code Change the code to move rxbs directly from the allocator's list to the queue's free list. This makes the code more readable, saves the interim array and the double loop over the free RBs. Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 75 ++++++++++++---------------- 1 file changed, 33 insertions(+), 42 deletions(-) commit 4479a899f75cdbd0406d29701d459be5cadaf00b Author: Luca Coelho Date: Mon Feb 8 11:18:46 2016 +0200 iwlwifi: pcie: forbid RTPM on device removal The pci driver keeps any unbound device in active state and forbids runtime PM. When our driver gets probed, we take control of the state. When the device is released (i.e. during unbind or module removal), we should return the state to what it was before. To do so, we need to forbid RTPM in the driver remove op. Additionally, remove an unnecessary pm_runtime_disable() call, move the initial ref_count setting to a better place and add some comments explaining what is going on. Signed-off-by: Luca Coelho Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 28 +++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 ------ 2 files changed, 28 insertions(+), 6 deletions(-) commit 45f68802f2542a6ad1550dab9c07004de6e0df40 Author: Dan Williams Date: Sun Mar 6 08:04:12 2016 -0800 libnvdimm, pmem: fix ia64 build, use PHYS_PFN drivers/nvdimm/pmem.c: In function 'nvdimm_namespace_attach_pfn': drivers/nvdimm/pmem.c:367:3: error: implicit declaration of function '__phys_to_pfn' [-Werror=implicit-function-declaration] .base_pfn = __phys_to_pfn(nsio->res.start), ia64 does not provide __phys_to_pfn(), just use the PHYS_PFN() alias. Cc: Guenter Roeck Reported-by: kbuild test robot Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5d8eb84253333f8f63ec704276e3f0a8ec8f3189 Author: Thomas Gleixner Date: Thu Mar 3 12:24:10 2016 +0100 cpu/hotplug: Remove redundant state check The check for the AP range in cpuhp_is_ap_state() is redundant after commit 8df3e07e7f21 "cpu/hotplug: Let upcoming cpu bring itself fully up" because all states above CPUHP_BRINGUP_CPU are invoked on the hotplugged cpu. Remove it. Reported-by: Richard Cochran Signed-off-by: Thomas Gleixner kernel/cpu.c | 2 -- 1 file changed, 2 deletions(-) commit 1ae1602de028acaa42a0f6ff18d19756f8e825c6 Author: Christoph Hellwig Date: Fri Feb 26 11:02:14 2016 +0100 configfs: switch ->default groups to a linked list Replace the current NULL-terminated array of default groups with a linked list. This gets rid of lots of nasty code to size and/or dynamically allocate the array. While we're at it also provide a conveniant helper to remove the default groups. Signed-off-by: Christoph Hellwig Acked-by: Felipe Balbi [drivers/usb/gadget] Acked-by: Joel Becker Acked-by: Nicholas Bellinger Reviewed-by: Sagi Grimberg Documentation/filesystems/configfs/configfs.txt | 11 +- drivers/infiniband/core/cma_configfs.c | 31 ++-- drivers/target/iscsi/iscsi_target_configfs.c | 75 +++------ drivers/target/target_core_configfs.c | 203 +++++------------------- drivers/target/target_core_fabric_configfs.c | 194 ++++++---------------- drivers/target/target_core_internal.h | 1 - drivers/target/target_core_stat.c | 41 ++--- drivers/usb/gadget/configfs.c | 36 ++--- drivers/usb/gadget/function/f_mass_storage.c | 6 +- drivers/usb/gadget/function/f_rndis.c | 5 +- drivers/usb/gadget/function/uvc_configfs.c | 198 +++++++++-------------- fs/configfs/dir.c | 44 +++-- fs/configfs/item.c | 1 + fs/dlm/config.c | 38 +---- fs/ocfs2/cluster/nodemanager.c | 22 +-- include/linux/configfs.h | 11 +- include/target/target_core_base.h | 3 - 17 files changed, 286 insertions(+), 634 deletions(-) commit 89ef41bfaa46f24a14b776f1cd78c0e0b39e54ce Merge: 89916cc 00a1f0a Author: Kalle Valo Date: Sun Mar 6 14:57:44 2016 +0200 Merge 'net-next/master' Needed by the upcoming merge of iwlwifi-next-for-kalle-2016-03-02 tag. commit 89916cc90a78fffbc4c3d7cb1f6540fb2e551804 Merge: 0a44b22 25c0f30 Author: Kalle Valo Date: Sun Mar 6 14:41:51 2016 +0200 Merge ath-next from ath.git ath.git patches for 4.6. Major changes: ath10k * dt: add bindings for ipq4019 wifi block * start adding support for qca4019 chip ath9k * add device ID for Toshiba WLM-20U2/GN-1080 * allow more than one interface on DFS channels commit 0277e01aebc8895198a4717ccaf7e4fcf39ada78 Author: Alexander Kochetkov Date: Sun Mar 6 13:04:17 2016 +0300 spi/rockchip: fix endian mode for 16-bit transfers 16-bit transfers must be in big endian mode on wire. Signed-off-by: Alexander Kochetkov Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d4f323672aa63713b7ca26da418f66cc30d3a41a Author: Dan Williams Date: Thu Mar 3 16:08:54 2016 -0800 nfit, libnvdimm: clear poison command support Add the boiler-plate for a 'clear error' command based on section 9.20.7.6 "Function Index 4 - Clear Uncorrectable Error" from the ACPI 6.1 specification, and add a reference implementation in nfit_test. Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit.c | 12 +++++++++++- drivers/nvdimm/bus.c | 19 +++++++++++++++++++ include/uapi/linux/ndctl.h | 13 +++++++++++++ tools/testing/nvdimm/test/nfit.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 1 deletion(-) commit 6c51e513a3aa49db87f238f96714e6cbe2d9efd5 Author: Al Viro Date: Sat Mar 5 20:09:32 2016 -0500 lookup_dcache(): lift d_alloc() into callers ... and kill need_lookup thing Signed-off-by: Al Viro fs/namei.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 6583fe22d1bce3631bc660e5927449690fadafe6 Author: Al Viro Date: Sat Mar 5 18:14:03 2016 -0500 do_last(): reorder and simplify a bit bugger off on negatives a bit earlier, simplify the tests Signed-off-by: Al Viro fs/namei.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 05ef1c50e7c2f796460737a7a7c2d315dd166544 Merge: 97c3160 a528aca Author: Al Viro Date: Sat Mar 5 18:10:51 2016 -0500 Merge branch 'for-linus' into work.lookups for the sake of namei.c fixes commit a921e9bd4e22a792279e46f97a85891a3d5f1b7d Author: Arnd Bergmann Date: Wed Mar 2 20:06:46 2016 +0100 isdn: i4l: move active-isdn drivers to staging The icn, act2000 and pcbit drivers are all for very old hardware, and it is highly unlikely that anyone is actually still using them on modern kernels, if at all. All three drivers apparently are for hardware that predates PCI being the common connector, as they are ISA-only and active PCI ISDN cards were widely available in the 1990s. Looking through the git logs, it I cannot find any indication of a patch to any of these drivers that has been tested on real hardware, only cleanups or global API changes. Signed-off-by: Arnd Bergmann Acked-by: Karsten Keil Signed-off-by: Greg Kroah-Hartman Documentation/isdn/00-INDEX | 8 - Documentation/isdn/README.act2000 | 104 -- Documentation/isdn/README.icn | 148 -- Documentation/isdn/README.pcbit | 40 - Documentation/isdn/README.sc | 281 ---- drivers/isdn/Makefile | 3 - drivers/isdn/act2000/Kconfig | 9 - drivers/isdn/act2000/Makefile | 9 - drivers/isdn/act2000/act2000.h | 202 --- drivers/isdn/act2000/act2000_isa.c | 443 ------ drivers/isdn/act2000/act2000_isa.h | 136 -- drivers/isdn/act2000/capi.c | 1180 --------------- drivers/isdn/act2000/capi.h | 365 ----- drivers/isdn/act2000/module.c | 813 ----------- drivers/isdn/i4l/Kconfig | 10 - drivers/isdn/icn/Kconfig | 12 - drivers/isdn/icn/Makefile | 5 - drivers/isdn/icn/icn.c | 1693 ---------------------- drivers/isdn/icn/icn.h | 253 ---- drivers/isdn/pcbit/Kconfig | 10 - drivers/isdn/pcbit/Makefile | 9 - drivers/isdn/pcbit/callbacks.c | 345 ----- drivers/isdn/pcbit/callbacks.h | 44 - drivers/isdn/pcbit/capi.c | 649 --------- drivers/isdn/pcbit/capi.h | 81 -- drivers/isdn/pcbit/drv.c | 1077 -------------- drivers/isdn/pcbit/edss1.c | 313 ---- drivers/isdn/pcbit/edss1.h | 99 -- drivers/isdn/pcbit/layer2.c | 712 --------- drivers/isdn/pcbit/layer2.h | 281 ---- drivers/isdn/pcbit/module.c | 125 -- drivers/isdn/pcbit/pcbit.h | 177 --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/i4l/Documentation/README.act2000 | 104 ++ drivers/staging/i4l/Documentation/README.icn | 148 ++ drivers/staging/i4l/Documentation/README.pcbit | 40 + drivers/staging/i4l/Documentation/README.sc | 281 ++++ drivers/staging/i4l/Kconfig | 13 + drivers/staging/i4l/Makefile | 5 + drivers/staging/i4l/TODO | 3 + drivers/staging/i4l/act2000/Kconfig | 9 + drivers/staging/i4l/act2000/Makefile | 9 + drivers/staging/i4l/act2000/act2000.h | 202 +++ drivers/staging/i4l/act2000/act2000_isa.c | 443 ++++++ drivers/staging/i4l/act2000/act2000_isa.h | 136 ++ drivers/staging/i4l/act2000/capi.c | 1180 +++++++++++++++ drivers/staging/i4l/act2000/capi.h | 365 +++++ drivers/staging/i4l/act2000/module.c | 813 +++++++++++ drivers/staging/i4l/icn/Kconfig | 12 + drivers/staging/i4l/icn/Makefile | 5 + drivers/staging/i4l/icn/icn.c | 1693 ++++++++++++++++++++++ drivers/staging/i4l/icn/icn.h | 253 ++++ drivers/staging/i4l/pcbit/Kconfig | 10 + drivers/staging/i4l/pcbit/Makefile | 9 + drivers/staging/i4l/pcbit/callbacks.c | 345 +++++ drivers/staging/i4l/pcbit/callbacks.h | 44 + drivers/staging/i4l/pcbit/capi.c | 649 +++++++++ drivers/staging/i4l/pcbit/capi.h | 81 ++ drivers/staging/i4l/pcbit/drv.c | 1077 ++++++++++++++ drivers/staging/i4l/pcbit/edss1.c | 313 ++++ drivers/staging/i4l/pcbit/edss1.h | 99 ++ drivers/staging/i4l/pcbit/layer2.c | 712 +++++++++ drivers/staging/i4l/pcbit/layer2.h | 281 ++++ drivers/staging/i4l/pcbit/module.c | 125 ++ drivers/staging/i4l/pcbit/pcbit.h | 177 +++ 66 files changed, 9639 insertions(+), 9636 deletions(-) commit 01ed1e1504ac83a8b0b365c9f55d3427babbd7d9 Author: Arnd Bergmann Date: Wed Mar 2 20:06:45 2016 +0100 isdn: icn: remove a #warning The icn driver currently produces an unconditional #warning whenever we build it, introduced by Karsten Keil back in 2003: #warning TODO test headroom or use skb->nb to flag ACK Karsten's original commit (from BitKeeper) contains this description: - here are lot of bugs left, so ISDN is not stable yet but I think it's really time to fix it, even if it need some cycles to get it right (normally I'm only send patches if it works 100% for me). - I add some additional #warnings to address places which need fixing (I hope that some of the other ISDN developer jump in) Apparently this has not happened, and it is unlikely that it ever will, given that the driver doesn't seem to work. No substantial bug fixes other than janitorial cleanups have happened in the driver since then, and I see no indication that anyone who patched it had the hardware. We should probably either remove the driver, or remove all of i4l, but for now, this shuts up the distracting #warning by turning it into a comment. Signed-off-by: Arnd Bergmann Link: http://git.meleeweb.net/linux.git/commit/?id=b0deac0886b0056765afd149e9834373b38e096b Signed-off-by: Greg Kroah-Hartman drivers/isdn/icn/icn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d20f8a7c2a9f9bff9f74a30729455bda8a091773 Author: Ian Abbott Date: Wed Mar 2 14:27:38 2016 +0000 staging: comedi: comedi.h: Fix comment for struct comedi_krange The kernel-doc comment for `struct comedi_krange` refers to the macro constant `RF_external`. It should be `RF_EXTERNAL`, so fix it. It also documents the value of the constant as `(1 << 8)`, but the macro now expands to the hexadecimal constant `0x100`, so use that as the documented value. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cee3d40b166cc098ad91bcafe5fccccc31f07e3 Author: Ian Abbott Date: Wed Mar 2 14:27:37 2016 +0000 staging: comedi: comedi.h: Do not use BIT macro The "comedi.h" file is part of the user API for COMEDI devices, and is intended to be migrated to "include/uapi/linux". The `BIT` macro from "include/linux/bitops.h" should not be used there. Replace the use of the `BIT` macro with hexadecimal constants of the same value. The `BIT` macro replaced expressions of the form `(1 << N)` in this file originally, but reverting back to that form would encourage patches changing them back to use the `BIT` macro. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2517cd144e71a76e276092423671c952951b7c10 Author: Rasmus Linusson Date: Sun Feb 28 16:38:12 2016 +0100 staging: comedi: cb_pcimdda: Fix long lines in comments Reorder comments to keep 80 character limit Signed-off-by: Rasmus Linusson Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcimdda.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6434b47dd95fc884313e95e524424fa95961226e Author: Rasmus Linusson Date: Sun Feb 28 16:38:11 2016 +0100 staging: comedi: cb_pcimdda: Fix multi-line comments Add asterisks to multi-line comments currently missing them Signed-off-by: Rasmus Linusson Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcimdda.c | 140 ++++++++++++++-------------- 1 file changed, 70 insertions(+), 70 deletions(-) commit dda68765d757c7da878b093a87f24d6a1d4cfb64 Author: Bhumika Goyal Date: Sun Feb 28 13:28:47 2016 +0530 Staging: comedi: s626.c: Remove unused functions The functions s626_get_clk_mult, s626_get_clk_mult, s626_get_enc_mode, s626_set_index_pol are not used anywhere in the kernel so they can be removed. This also cleans the code. Grepped to find the occurences. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 33 --------------------------------- 1 file changed, 33 deletions(-) commit d2b0fc6e29bb6015f811b7574dde64026179e57a Author: Amitoj Kaur Chawla Date: Wed Feb 24 16:45:34 2016 +0530 staging: comedi: drivers: Remove use of deprecated pci API Replace pci_[alloc|free]_consistent occurences with dma_[alloc|free]_coherent. The Coccinelle semantic patch that was used to make some of these changes is as follows: @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_KERNEL ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_KERNEL ) ) alloc_and_init_dma_members does not affect the interrupt status and is only called by auto_attach, which also does not affect the interrupt status. auto_attach() also contains a call to comedi_alloc_devpriv() which calls kzalloc with GFP_KERNEL flag. Thus, there seems to be no danger that dma_alloc_coherent can be called with interrupts turned off, and GFP_KERNEL can be used. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 64 +++++++++++++++------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 3545bee9b8ec00ba733e17363f494c8761fb5e49 Author: Janani Ravichandran Date: Tue Feb 23 19:36:04 2016 -0500 staging: comedi: drivers: Remove unneeded NULL check before kfree() Remove NULL check before kfree as it is not needed. Signed-off-by: Janani Ravichandran Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci224.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 81c18a9e378c87ed6559a4b0a0c2831c88947373 Author: Philippe Loctaux Date: Tue Feb 23 00:47:59 2016 +0100 Staging: comedi: contec_pci_dio: fixed comment blocks coding style issues Makes the comment blocks start with /* on separate lines, and end with */ on separate lines as well, starting with * for each comment lines. Signed-off-by: Philippe Loctaux Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/contec_pci_dio.c | 47 +++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) commit 1e5a05d57c2a103903e6980c86057870666a9ac8 Author: Bhaktipriya Shridhar Date: Sun Feb 21 16:13:01 2016 +0530 staging: comedi: Use macro DIV_ROUND_CLOSEST Occurences of the computation (x +d/2)/d can be replaced with the macro DIV_ROUND_CLOSEST. This was detected by the following Coccinelle script. @@ expression e1,e2; @@ ( - ((e1) + e2/2) / (e2) + DIV_ROUND_CLOSEST(e1,e2) | - ((e1) + (e2/2)) / (e2) + DIV_ROUND_CLOSEST(e1,e2) ) Since some lines exceeded the 80 character limit, some changes were made by hand. Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_mio_common.c | 28 +++++++++++--------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 5ee5ae02669f3bfc62a28f6cced596a00ca17803 Author: Alan Date: Mon Feb 15 18:59:06 2016 +0000 comedi: note a coverity discovered hole that needs fixing It's not trivial to just post up a fix, so add it to the TODO list and ensure it doesn't get lost. Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/TODO | 1 + 1 file changed, 1 insertion(+) commit 4e4acff7346e87f9d1282b1828198bcb5a6db8bf Author: Bhumika Goyal Date: Wed Mar 2 01:13:22 2016 +0530 Staging: gdm724x: Replace random_ether_addr with eth_random_addr The macro random_ether_addr is calling the function eth_random_addr. Therefore, the call to random_ether_addr can be replaced with eth_random_addr. Done using coccinelle: @@ expression addr; @@ - random_ether_addr(addr); + eth_random_addr(addr); Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c6baa841662e1ab46353fee3c618d9f347ce06e Author: Bhumika Goyal Date: Fri Feb 26 15:34:32 2016 +0530 Staging: gdm724x: Use min instead of ternary operator This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd743442237226ae2a5bf3bd4d7edce71f66788e Author: Amitoj Kaur Chawla Date: Sun Feb 28 19:54:41 2016 +0530 staging: gdm724x: gdm_usb: Remove create_workqueue() With concurrency managed workqueues, use of dedicated workqueues can be replaced by using system_wq. Drop usb_tx_wq and usb_rx_wq by using system_wq. Since there are multiple work items per udev but different udevs do not need to be ordered, increase of concurrency level by switching to system_wq should not break anything. cancel_work_sync() is used to ensure that work is not pending or executing on any CPU. Lastly, since all devices are suspended, which shutdowns the work items before the driver can be unregistered, it is guaranteed that no work item is pending or executing by the time exit path runs. Signed-off-by: Amitoj Kaur Chawla Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_usb.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit a7df59ece7f845dffb354aae8318a30e7650034c Author: Dan Carpenter Date: Mon Feb 22 22:33:33 2016 +0300 Staging: gdm72xx: remove duplicate condition We know "len" is not zero because we tested for that at the beginning of the function so this test can be removed. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/gdm_wimax.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e0aa762cac39d18aa60938a3d1f7f6b42fcb2cdf Author: Dan Carpenter Date: Mon Feb 22 22:33:09 2016 +0300 Staging: gdm72xx: underflow bug in gdm_wimax_ioctl_get_data() "size" here should be unsigned, otherwise we might end up trying to copy negative bytes in gdm_wimax_ioctl_get_data() resulting in an information leak. Reported-by: Alan Cox Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/wm_ioctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit deb0b53bb52a0c53c43bf894b40630b414ec56fa Author: Dan Carpenter Date: Mon Feb 22 22:32:38 2016 +0300 staging: gdm72xx: zero out padding We pad the start of this buffer with 256 bytes of padding. It's not clear to me exactly what's going on or how it's used but let's zero it out. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/usb_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c359f060f47200b1dcdd151edda872a14f62783 Author: Dan Carpenter Date: Mon Feb 22 22:32:21 2016 +0300 Staging: gdm72xx: make "len" unsigned We had an underflow bug here and I think I fixed it but we may as well be proactive and make "len" unsigned to be double sure. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/gdm_usb.c | 6 +++--- drivers/staging/gdm72xx/gdm_usb.h | 2 +- drivers/staging/gdm72xx/gdm_wimax.c | 4 ++-- drivers/staging/gdm72xx/gdm_wimax.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 724dfc25f596668ad361ecd562f1a741114500aa Author: Dan Carpenter Date: Mon Feb 22 22:31:31 2016 +0300 Staging: gdm72xx: silence underflow warning in netlink_send() The value of "group" comes from "idx" in __gdm_wimax_event_send(): if (sscanf(e->dev->name, "wm%d", &idx) == 1) Smatch marks sscanf values as user controlled. It's supposed to be a number in 0-30 range. We cap the upper bound but allow negatives. Fix this by making it type u16 instead. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/netlink_k.c | 2 +- drivers/staging/gdm72xx/netlink_k.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c688671d89785238d0da56ee7b0ba00adaa5e260 Author: Dan Carpenter Date: Mon Feb 22 22:30:46 2016 +0300 staging: gdm72xx: underflow in netlink_rcv_cb() If nlh->nlmsg_len is less than ND_IFINDEX_LEN we end up trying to memcpy a negative size. I also re-ordered slighty the condition to make it more uniform. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm72xx/netlink_k.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7fe8bd047b4eabcd03074356316b68fea52ab243 Author: Tapan Prakash T Date: Tue Feb 23 22:45:48 2016 +0530 drivers: staging: rtl8712: rtl871x_xmit.c: Fix Comparisons should place the constant on the right side of the test warning Fixed checkpatch.pl warning 'Comparisons should place the constant on the right side of the test' Signed-off-by: Tapan Prakash T Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c68423556b59d1ebd65b056e7f24ab7089da401 Author: Alan Date: Mon Feb 15 18:58:10 2016 +0000 rtl871x: avoid running off end of buffer If 32 bytes of non zero are passed in pdata->pointer then the mac_pton function will run off the end of the buffer. Make sure we always have a terminated string kernel side. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6e29ca1f6cf566f67012dce269b5f9ba72a1659 Author: Amitoj Kaur Chawla Date: Wed Feb 24 20:54:28 2016 +0530 staging: speakup: Remove unnecessary test in if condition Remove unnecessary test on synth->alive since it has already been tested previously. This fixes the following smatch warning: drivers/staging/speakup/synth.c:182 spk_synth_is_alive_restart() warn: we tested 'synth->alive' before and it was 'false' Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd95ed989a5dee1bdbbdfe46659d274026f31bb4 Author: Alison Schofield Date: Tue Feb 23 21:38:58 2016 -0800 staging: speakup: remove multiple assignments Remove multiple assignments by factorizing. Coccinelle semantic patch used: @@ identifier x,y; constant z; @@ - x=y=z; + x=z; + y=z; Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit e81e31fb8258cad1f0fc328a72e4e55057537433 Author: Dilek Uzulmez Date: Mon Feb 22 21:56:01 2016 +0200 Staging: speakup: Add space around '|' Add space around operator '|'. Problem found using checkpatch.pl CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Dilek Uzulmez Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 4cd2459c066d2970241284b1fcdc5dca7ce6fbb2 Author: Hannes Reinecke Date: Thu Mar 3 07:54:12 2016 +0100 scsi_sysfs: call 'device_add' after attaching device handler 'device_add' will be evaluating the 'is_visible' callback when creating the sysfs attributes. As by this time the device handler has not been attached the 'access_state' attribute will never be visible. This patch moves the code around so that the device handler is present by the time 'is_visible' is evaluated to correctly display the 'access_state' attribute. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 0323375c8bc5c101c9284856cac19a0b9ece71d4 Author: Hannes Reinecke Date: Thu Mar 3 07:54:11 2016 +0100 scsi_dh_emc: update 'access_state' field Update the 'access_state' field of the SCSI device whenever the path state changes. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_emc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1a5dc166cd8843252169f52cb714b324f6d679ef Author: Hannes Reinecke Date: Thu Mar 3 07:54:10 2016 +0100 scsi_dh_rdac: update 'access_state' field Track attached SCSI devices and update the 'access_state' whenever the path state of the device changes. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_rdac.c | 38 ++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) commit cb0a168cb6b8f77097d69872349278a17383c38e Author: Hannes Reinecke Date: Thu Mar 3 07:54:09 2016 +0100 scsi_dh_alua: update 'access_state' field Track attached SCSI devices and update the 'access_state' field whenever an ALUA state change has been detected. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Ewan Milne Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 48 ++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 5115fc7e2e6be8e082a9ff996cb9f343b0e850fe Author: Hannes Reinecke Date: Thu Mar 3 07:54:08 2016 +0100 scsi_dh_alua: use common definitions for ALUA state scsi_proto.h now contains definitions for the ALUA state, so we don't have to carry them in the device handler. Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 58 +++++++++++++----------------- 1 file changed, 25 insertions(+), 33 deletions(-) commit 77c9df9644d7c35516770a21cb56b413e8547d8f Author: Hannes Reinecke Date: Thu Mar 3 07:54:07 2016 +0100 scsi: Add 'access_state' and 'preferred_path' attribute Add an 'access_state' field to struct scsi_device and display them in sysfs as 'access_state' and 'preferred_path' attribute. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++ include/scsi/scsi_device.h | 1 + include/scsi/scsi_proto.h | 12 ++++++++ 3 files changed, 87 insertions(+) commit 7e47976bcff23cbe011635e8931855cd3fb3aa6f Author: Hannes Reinecke Date: Thu Mar 3 07:41:24 2016 +0100 scsi_sysfs: add 'is_bin_visible' callback Add 'is_bin_visible' callback to blank out unsupported vpd pages. Reviewed-by: Shane Seymour Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit fddbeb80a904aae41c84ed566e2b0d1de55907df Author: Arnd Bergmann Date: Wed Mar 2 16:59:00 2016 +0100 scsi: mvumi: use __maybe_unused to hide pm functions The mvumi scsi hides the references to its suspend/resume functions in an #ifdef but does not hide the implementation the same way: drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function] drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations so the compiler knows it can silently drop them instead of warning, while avoiding the addition of another #ifdef. Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/mvumi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8063d56efa7f7a3e8a2776addfed1874785c74f0 Author: K. Y. Srinivasan Date: Fri Feb 26 17:48:58 2016 -0800 scsi: storvsc: Fix a build issue reported by kbuild test robot tree: https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgit.kernel.org%2fpub%2fscm%2flinux%2fkernel%2fgit%2ftorvalds%2flinux.git&data=01%7c01%7ckys%40microsoft.com%7ce2e0622715844b79ad7108d32796ec3c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ubr4GbBaNS%2ftOz%2buJBk0CL9N0UNG9x2TidLgy6Yovg4%3d master head: 03c21cb775a313f1ff19be59c5d02df3e3526471 commit: dac582417bc449b1f7f572d3f1dd9d23eec15cc9 storvsc: Properly support Fibre Channel devices date: 3 weeks ago config: x86_64-randconfig-s3-01281016 (attached as .config) reproduce: git checkout dac582417bc449b1f7f572d3f1dd9d23eec15cc9 # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/built-in.o: In function `storvsc_remove': >> storvsc_drv.c:(.text+0x213af7): undefined reference to `fc_remove_host' drivers/built-in.o: In function `storvsc_drv_init': >> storvsc_drv.c:(.init.text+0xcbcc): undefined reference to `fc_attach_transport' >> storvsc_drv.c:(.init.text+0xcc06): undefined reference to `fc_release_transport' drivers/built-in.o: In function `storvsc_drv_exit': >> storvsc_drv.c:(.exit.text+0x123c): undefined reference to `fc_release_transport' With this commit, the storvsc driver depends on FC atttributes. Make this dependency explicit. Signed-off-by: K. Y. Srinivasan Reported-by: Fengguang Wu Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 16617535684faf9de30620de83667214297a36b8 Author: Krzysztof Kozlowski Date: Thu Mar 3 17:13:49 2016 +0900 goldfish: Fix build error of missing ioremap on UM Add missing HAS_IOMEM dependency to fix the allyesconfig build error on ARCH=um (for x86_64): drivers/platform/goldfish/pdev_bus.c: In function ‘goldfish_pdev_bus_probe’: drivers/platform/goldfish/pdev_bus.c:191:18: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] pdev_bus_base = ioremap(pdev_bus_addr, pdev_bus_len); Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f6ed58c70d14572d0272ee129579dbfc97b97f50 Author: Dan Williams Date: Thu Mar 3 09:46:04 2016 -0800 libnvdimm, pfn: 'resource'-address and 'size' attributes for pfn devices Currenty with a raw mode pmem namespace the physical memory address range for the device can be obtained via /sys/block/pmemX/device/{resource|size}. Add similar attributes for pfn instances that takes the struct page memmap and section padding into account. Reported-by: Haozhong Zhang Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit cfe30b872058f211630eda7f65fb19d83beaaa3c Author: Dan Williams Date: Thu Mar 3 09:38:00 2016 -0800 libnvdimm, pmem: adjust for section collisions with 'System RAM' On a platform where 'Persistent Memory' and 'System RAM' are mixed within a given sparsemem section, trim the namespace and notify about the sub-optimal alignment. Cc: Toshi Kani Cc: Ross Zwisler Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 7 +++ drivers/nvdimm/pfn.h | 10 +++- drivers/nvdimm/pfn_devs.c | 5 ++ drivers/nvdimm/pmem.c | 125 +++++++++++++++++++++++++++++----------- 4 files changed, 111 insertions(+), 36 deletions(-) commit d9cbe09d39aa13f6924dc5fb88325de7ef01a72e Author: Dan Williams Date: Thu Mar 3 09:14:36 2016 -0800 libnvdimm, pmem: fix 'pfn' support for section-misaligned namespaces The altmap for a section-misaligned namespace needs to arrange for the base_pfn to be section-aligned. As a result the 'reserve' region (pfns from base that do not have a struct page) must be increased. Otherwise we trip the altmap validation check in __add_pages: if (altmap->base_pfn != phys_start_pfn || vmem_altmap_offset(altmap) > nr_pages) { pr_warn_once("memory add fail, invalid altmap\n"); return -EINVAL; } Signed-off-by: Dan Williams drivers/nvdimm/pfn.h | 13 +++++++++++++ drivers/nvdimm/pmem.c | 24 ++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 07accfa9d1a8bac8262f6d24a94a54d2d1f35149 Author: Jerry Hoemann Date: Wed Jan 6 16:03:41 2016 -0700 libnvdimm: Fix security issue with DSM IOCTL. Code attempts to prevent certain IOCTL DSM from being called when device is opened read only. This security feature can be trivially overcome by changing the size portion of the ioctl_command which isn't used. Check only the _IOC_NR (i.e. the command). Cc: Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4dc0e7be884e0f99211107dd75e6e1884b7b3754 Author: Jerry Hoemann Date: Wed Jan 6 16:03:39 2016 -0700 libnvdimm: Clean-up access mode check. Change nd_ioctl and nvdimm_ioctl access mode check to use O_RDONLY. Signed-off-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f471f1a7d0aa58c609e665514010650b2afa24b6 Author: Dan Williams Date: Sat Feb 20 15:12:47 2016 -0800 tools/testing/nvdimm: expand ars unit testing Simulate platform-firmware-initiated and asynchronous scrub results. This injects poison in the middle of all nfit_test pmem address ranges. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 112 +++++++++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 22 deletions(-) commit 87bf572e19a092cc9cc77d5a00d543a2b628c142 Author: Dan Williams Date: Mon Feb 22 21:50:31 2016 -0800 nfit: disable userspace initiated ars during scrub While the nfit driver is issuing address range scrub commands and reaping the results do not permit an ars_start command issued from userspace. The scrub thread assumes that all ars completions are for scrubs initiated by platform firmware at boot, or by the nfit driver. Signed-off-by: Dan Williams drivers/acpi/nfit.c | 23 +++++++++++++++++++++++ drivers/nvdimm/bus.c | 18 +++++++++++++----- include/linux/libnvdimm.h | 2 ++ 3 files changed, 38 insertions(+), 5 deletions(-) commit 1cf03c00e7c17d3cf13a267dac83b3162a16ba8c Author: Dan Williams Date: Wed Feb 17 13:01:23 2016 -0800 nfit: scrub and register regions in a workqueue Address range scrub is a potentially long running process that we want to complete before any pmem regions are registered. Perform this operation asynchronously to allow other drivers to load in the meantime. Platform firmware may have initiated a partial scrub prior to the driver loading, so we must be careful to consume those results before kicking off kernel initiated scrubs on other regions. This rework also makes the registration path more tolerant of scrub errors in that it splits scrubbing into 2 phases. The first phase synchronously waits for a platform-firmware initiated scrub to complete. The second phase scans the remaining address ranges asynchronously and notifies the related driver(s) when the scrub completes. Signed-off-by: Dan Williams drivers/acpi/nfit.c | 537 +++++++++++++++++++++++++++++++++++----------------- drivers/acpi/nfit.h | 8 +- 2 files changed, 371 insertions(+), 174 deletions(-) commit 7ae0fa439faff000744b234d04cb470bfd83593b Author: Dan Williams Date: Fri Feb 19 12:16:34 2016 -0800 nfit, libnvdimm: async region scrub workqueue Introduce a workqueue that will be used to run address range scrub asynchronously with the rest of nvdimm device probing. Userspace still wants notification when probing operations complete, so introduce a new callback to flush this workqueue when userspace is awaiting probe completion. Signed-off-by: Dan Williams drivers/acpi/nfit.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/nfit.h | 3 +++ drivers/nvdimm/core.c | 9 +++++++++ include/linux/libnvdimm.h | 1 + 4 files changed, 62 insertions(+) commit a61fe6f7902ecaa89d5e6c709490fc4324927134 Author: Dan Williams Date: Fri Feb 19 12:29:32 2016 -0800 nfit, tools/testing/nvdimm: unify common init for acpi_nfit_desc The nvdimm unit test infrastructure performs its own initialization of an acpi_nfit_desc to specify test overrides over the native implementation. Make it clear which attributes and operations it is overriding by re-using acpi_nfit_init_desc() as a common starting point. Signed-off-by: Dan Williams drivers/acpi/nfit.c | 44 +++++++++++++++------------------------- drivers/acpi/nfit.h | 2 +- tools/testing/nvdimm/test/nfit.c | 22 +++----------------- 3 files changed, 20 insertions(+), 48 deletions(-) commit 719994660c249a086a7493205c7f1562e30c38cb Author: Dan Williams Date: Thu Feb 18 10:29:49 2016 -0800 libnvdimm: async notification support In preparation for asynchronous address range scrub support add an ability for the pmem driver to dynamically consume address range scrub results. Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 26 ++++++++++++++++++++++++++ drivers/nvdimm/nd.h | 2 ++ drivers/nvdimm/pmem.c | 15 +++++++++++++++ drivers/nvdimm/region.c | 12 ++++++++++++ include/linux/nd.h | 7 +++++++ 5 files changed, 62 insertions(+) commit 5faecf4eb0d7d67e809a4bc9059c764c27670832 Author: Dan Williams Date: Wed Feb 17 15:25:36 2016 -0800 libnvdimm: protect nvdimm_{bus|namespace}_add_poison() with nvdimm_bus_lock() In preparation for making poison list retrieval asynchronus to region registration, add protection for walking and mutating the bus-level poison list. Cc: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/core.c | 101 +++++++++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 38 deletions(-) commit aef25338226660cdd4df908c2eff1abdcfca65e5 Author: Dan Williams Date: Fri Feb 12 17:01:11 2016 -0800 libnvdimm, nfit: centralize command status translation The return value from an 'ndctl_fn' reports the command execution status, i.e. was the command properly formatted and was it successfully submitted to the bus provider. The new 'cmd_rc' parameter allows the bus provider to communicate command specific results, translated into common error codes. Convert the ARS commands to this scheme to: 1/ Consolidate status reporting 2/ Prepare for for expanding ars unit test cases 3/ Make the implementation more generic Cc: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit.c | 179 ++++++++++++++++++++++++++------------- drivers/acpi/nfit.h | 11 ++- drivers/nvdimm/bus.c | 2 +- drivers/nvdimm/dimm_devs.c | 6 +- include/linux/libnvdimm.h | 2 +- tools/testing/nvdimm/test/nfit.c | 5 +- 6 files changed, 138 insertions(+), 67 deletions(-) commit 3b87356f50aa12ae7f9bd60f630eb17fe9b4b253 Author: Dan Williams Date: Mon Feb 1 17:45:54 2016 -0800 nfit, tools/testing/nvdimm: test multiple control regions per-dimm ACPI 6.1 clarifies that "The system shall include an NVDIMM Control Region Structure for every Function Interface in the NVDIMM." Implement this clarification in nfit_test. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 118 +++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 24 deletions(-) commit be26f9ae022ad09967be7a83c58ce605014e939a Author: Dan Williams Date: Mon Feb 1 17:48:42 2016 -0800 nfit, tools/testing/nvdimm: add format interface code definitions ACPI 6.1 and JEDEC Annex L Release 3 formalize the format interface code. Add definitions and update their usage in the unit test. Signed-off-by: Dan Williams drivers/acpi/nfit.h | 6 ++++++ tools/testing/nvdimm/test/nfit.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit a567500598961a487f6c9a78b61d419c8df90c8b Merge: 69bec72 89636ad Author: Greg Kroah-Hartman Date: Sat Mar 5 12:22:41 2016 -0800 Merge tag 'phy-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-testing Kishon writes: phy: for 4.6 *) Add driver for rockchip Display Port PHY *) Add driver for the Rockchip SoC internal eMMC PHY *) Add usb-uart functionality in rockchip-usb *) cleanup rcar usb2 PHY driver *) Fix for randconfig error Signed-off-by: Kishon Vijay Abraham I commit 564e7f87a0806462898bf67112bc602644476c56 Author: Andrew-CT Chen Date: Mon Feb 22 11:24:05 2016 +0000 nvmem: mediatek: Fix later provider initialization Possibly, provider driver initialization is later than consumer driver. Use function subsys_initcall to initialize NVMEM provider early to ensure NVMEM consumer doesn't need to -EPROBE_DEFER. Signed-off-by: Andrew-CT Chen Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mtk-efuse.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit c7e3c5f861f0406aa4bc7ee4af0d789ef4a828db Author: Axel Lin Date: Mon Feb 22 11:23:52 2016 +0000 nvmem: imx-ocotp: Fix return value of imx_ocotp_read imx_ocotp_read() should return 0 on success. Signed-off-by: Axel Lin Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5685e24446ab9aa0a529cf87a69ad73f4775888a Author: Richard Weinberger Date: Mon Feb 22 11:23:44 2016 +0000 nvmem: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit ba6ed7e1ec8624ef21b077272fd0126c95c4e0e0 Author: Arnd Bergmann Date: Wed Mar 2 10:48:51 2016 +0100 char: genrtc: replace blacklist with whitelist Every new architecture has to add itself to the growing list of those that do not support the old "generic" RTC driver. This replaces the long list of architectures that don't support it with a shorter list of those that do. The list is taken from those architectures that have a non-empty asm/rtc.h header file and were not explicitly blacklisted. Signed-off-by: Arnd Bergmann Acked-by: Alexandre Belloni Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/char/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ca48fa22c3ed3b7b062bc6fa7b72493c00571e33 Author: Paul Gortmaker Date: Sat Feb 27 15:21:47 2016 -0500 drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular In commit 941943cf519f7cacbbcecee5c4ef4b77b466bd5c ("drivers/hwtracing: make coresight-* explicitly non-modular") we removed all uses of modular functions/macros in favour of their built-in equivlents in this subsystem. However that commit and commit 0bcbf2e30ff2271b54f54c8697a185f7d86ec6e4 ("coresight: etm-perf: new PMU driver for ETM tracers") were in flight at the same time, and hence one new non-modular user of module_init crept back in. Fix it up like we did all the others. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Cc: Alexander Shishkin Signed-off-by: Paul Gortmaker Acked-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecb63a1b644c77a383b05e44e931602ae5f3d2c6 Author: Andrzej Hajda Date: Mon Feb 15 15:35:21 2016 +0100 drivers: char: mem: fix IS_ERROR_VALUE usage 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 Signed-off-by: Andrzej Hajda Acked-by: Al Viro Signed-off-by: Greg Kroah-Hartman drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba327173ef48c12cf6f326441c74f373fa3be220 Author: Eli Billauer Date: Wed Feb 24 10:40:51 2016 +0200 char: xillybus: Fix internal data structure initialization A couple of fields in a data structure, which is used by the driver only, were not initialized properly during the driver's setup. The primary issue with this bug was that channel->wr_buf_size remained zero, so calls to dma_sync_single_for_cpu() took place with zero size, and consequently did nothing. This had a rather minimal practical impact, because (a) these calls are NOPs on Intel/AMD platforms, as well as other platforms with coherent cache, and (b) it's extremely rare that any cache line would survive between two reads from a given DMA buffer Hence no significant practical difference is expected with this patch. Signed-off-by: Eli Billauer Signed-off-by: Greg Kroah-Hartman drivers/char/xillybus/xillybus_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a75fa128236bc2fdaa5e412145cbd577e42e14c2 Author: Colin Ian King Date: Sat Feb 27 14:52:22 2016 +0000 pch_phub: return -ENODATA if ROM can't be mapped The error return err is not initialized for the case when pci_map_rom fails and no ROM can me mapped. Fix this by setting ret to -ENODATA; (this is the same error value that is returned if the ROM data is successfully mapped but does not match the expected ROM signature.). Issue found from static code analysis using CoverityScan. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/misc/pch_phub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 69bec725985324e79b1c47ea287815ac4ddb0521 Author: Peter Chen Date: Fri Feb 19 17:26:15 2016 +0800 USB: core: let USB device know device node Although most of USB devices are hot-plug's, there are still some devices are hard wired on the board, eg, for HSIC and SSIC interface USB devices. If these kinds of USB devices are multiple functions, and they can supply other interfaces like i2c, gpios for other devices, we may need to describe these at device tree. In this commit, it uses "reg" in dts as physical port number to match the phyiscal port number decided by USB core, if they are the same, then the device node is for the device we are creating for USB core. Signed-off-by: Peter Chen Acked-by: Philipp Zabel Acked-by: Alan Stern Acked-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/usb-device.txt | 28 +++++++++++++ drivers/usb/core/Makefile | 2 +- drivers/usb/core/of.c | 47 ++++++++++++++++++++++ drivers/usb/core/usb.c | 10 +++++ include/linux/usb/of.h | 7 ++++ 5 files changed, 93 insertions(+), 1 deletion(-) commit d883f52e1f6d2eca8378e3795f333c1396943873 Author: Reilly Grant Date: Sun Feb 21 18:38:01 2016 -0300 usb: devio: Add ioctl to disallow detaching kernel USB drivers. The new USBDEVFS_DROP_PRIVILEGES ioctl allows a process to voluntarily relinquish the ability to issue other ioctls that may interfere with other processes and drivers that have claimed an interface on the device. This commit also includes a simple utility to be able to test the ioctl, located at Documentation/usb/usbdevfs-drop-permissions.c Example (with qemu-kvm's input device): $ lsusb ... Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd $ usb-devices ... C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=usbhid $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002 OK: privileges dropped! Available options: [0] Exit now [1] Reset device. Should fail if device is in use [2] Claim 4 interfaces. Should succeed where not in use [3] Narrow interface permission mask Which option shall I run?: 1 ERROR: USBDEVFS_RESET failed! (1 - Operation not permitted) Which test shall I run next?: 2 ERROR claiming if 0 (1 - Operation not permitted) ERROR claiming if 1 (1 - Operation not permitted) ERROR claiming if 2 (1 - Operation not permitted) ERROR claiming if 3 (1 - Operation not permitted) Which test shall I run next?: 0 After unbinding usbhid: $ usb-devices ... I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=(none) $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002 ... Which option shall I run?: 2 OK: claimed if 0 ERROR claiming if 1 (1 - Operation not permitted) ERROR claiming if 2 (1 - Operation not permitted) ERROR claiming if 3 (1 - Operation not permitted) Which test shall I run next?: 1 OK: USBDEVFS_RESET succeeded Which test shall I run next?: 0 After unbinding usbhid and restricting the mask: $ sudo ./usbdevfs-drop-permissions /dev/bus/usb/001/002 ... Which option shall I run?: 3 Insert new mask: 0 OK: privileges dropped! Which test shall I run next?: 2 ERROR claiming if 0 (1 - Operation not permitted) ERROR claiming if 1 (1 - Operation not permitted) ERROR claiming if 2 (1 - Operation not permitted) ERROR claiming if 3 (1 - Operation not permitted) Signed-off-by: Reilly Grant Acked-by: Alan Stern Signed-off-by: Emilio López Signed-off-by: Greg Kroah-Hartman Documentation/DocBook/usb.tmpl | 12 +++ Documentation/usb/usbdevfs-drop-permissions.c | 120 ++++++++++++++++++++++++++ drivers/usb/core/devio.c | 63 ++++++++++++-- include/uapi/linux/usbdevice_fs.h | 2 + 4 files changed, 192 insertions(+), 5 deletions(-) commit 3ad6152d766039cb8ffd8633d971fb79402e5464 Author: James Simmons Date: Thu Mar 3 11:00:58 2016 -0500 staging: lustre: handle complex strings in cfs_str2num_check Originally the function cfs_str2num_check used simple_strtoul but has been updated to kstrtoul. The string passed into cfs_str2num_check can be a very complex, for example we could have 10.37.202.[59-61]. When simple_strtoul was used the first number until we hit a non-digit character could be extracted but testing showed that kstrtoul will not return any value if it detects any non-digit character. Because of this change in behavior a different approach is needed to handle these types of complex strings. The use of sscanf was investigated to see if it could be used to extract numbers from the passed in string but unlike its glibc counterpart the kernel version also just reported a error with no results if a non-digit value in the string was encountered. Another possible approach would be to use __parse_int directly but that class of functions is not exported by the kernel. So the approach in this patch is to scan the string passed in for the first non-digit character and replace that character with a '\0' so kstrtoul can be used. Once completed the original character is restored. We also restore a original behavior that was removed to return 0 when we encounter any non digit character before the nob count. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/libcfs/libcfs_string.c | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit da26bae051b8c4a13c31f2275a4ec4b560c172e6 Author: Rex Zhu Date: Thu Jan 21 19:33:56 2016 +0800 drm/amd/powerplay: refine the dmesg info. this do not mean driver error. Change-Id: If2080eb4b79fc6389280b7c75cb7998d77090739 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 709066acdd12c3312c94ebccc37630932e381949 Author: Guenter Roeck Date: Sun Jul 5 11:04:56 2015 -0700 hwmon: (adm1275) Add support for ADM1278 ADM1278 is mostly compatible to other chips of the same series. Besides the usual difference in coefficients, it supports a temperature sensor, and it can measure both input and output voltage at the same time. Signed-off-by: Guenter Roeck Documentation/hwmon/adm1275 | 27 +++++++++++++++++---- drivers/hwmon/pmbus/Kconfig | 4 ++-- drivers/hwmon/pmbus/adm1275.c | 56 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 8 deletions(-) commit 54ce3a0d801142c96935122736a46c08d15d83b5 Author: Joseph McNally Date: Sun Feb 28 22:31:23 2016 +0000 hwmon: (ntc_thermistor) Add support for ncpXXxh103 This patch adds support for the Murata NCP15XH103 thermistor series. Signed-off-by: Joseph McNally Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/ntc_thermistor.txt | 1 + Documentation/hwmon/ntc_thermistor | 4 +- drivers/hwmon/Kconfig | 2 +- drivers/hwmon/ntc_thermistor.c | 44 ++++++++++++++++++++++ include/linux/platform_data/ntc_thermistor.h | 1 + 5 files changed, 49 insertions(+), 3 deletions(-) commit 92417dad642c4002ae0b888514088a9aa8b6f9d0 Author: Masanari Iida Date: Sun Feb 28 12:57:57 2016 +0900 Doc: hwmon: Fix typo "montoring" in hwmon This patch fix typos found in files within Documentation/hwmon. Signed-off-by: Masanari Iida Signed-off-by: Guenter Roeck Documentation/hwmon/adm1275 | 2 +- Documentation/hwmon/lm25066 | 2 +- Documentation/hwmon/max16064 | 2 +- Documentation/hwmon/max34440 | 2 +- Documentation/hwmon/max8688 | 2 +- Documentation/hwmon/pmbus | 2 +- Documentation/hwmon/zl6100 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 0aa8a99680cf2a7bc216b379a9fc257893e606cb Author: Sanchayan Maity Date: Tue Feb 16 10:30:55 2016 +0530 ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel Add iio-hwmon node to expose the temperature channel on Vybrid as hardware monitor device using the iio_hwmon driver. Signed-off-by: Sanchayan Maity Acked-by: Stefan Agner Signed-off-by: Guenter Roeck arch/arm/boot/dts/vfxxx.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 0b452ccca6f9e55fc727a461f7a778bebbefff0b Author: Sanchayan Maity Date: Tue Feb 16 10:30:54 2016 +0530 ARM: dts: Change iio_hwmon nodes to use hypen in node names Change iio_hwmon nodes to use hypen in node names instead of underscore. Signed-off-by: Sanchayan Maity Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/iio/iio-bindings.txt | 2 +- arch/arm/boot/dts/imx23.dtsi | 2 +- arch/arm/boot/dts/imx28.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b92fe9e3379c8dc885eefb254c3da94c13cc1b6d Author: Sanchayan Maity Date: Tue Feb 16 10:30:53 2016 +0530 hwmon: (iio_hwmon) Allow the driver to accept hypen in device tree node names Currently the driver calls hwmon_device_register_with_groups which does not accept hypen in node name and returns EINVAL. Use of hypen in device tree node name results in probe failure., however use of hypen in device tree node name is perfectly acceptable. Change this by allocating a duplicate managed string, replacing hypen with underscore and then calling hwmon_device_register_with_groups. This allows the use of hypen in device tree node name while maintaining backwards compatibility and preventing any possible regressions with user space. Signed-off-by: Sanchayan Maity Signed-off-by: Guenter Roeck drivers/hwmon/iio_hwmon.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit df922703574ebe9035045f7c7242a0ec0e11b980 Author: Mike Looijmans Date: Fri Jan 15 10:54:59 2016 +0100 hwmon: Add LTC2990 sensor driver This adds support for the Linear Technology LTC2990 I2C System Monitor. The LTC2990 supports a combination of voltage, current and temperature monitoring. This driver currently only supports reading two currents by measuring two differential voltages across series resistors, in addition to the Vcc supply voltage and internal temperature. This is sufficient to support the Topic Miami SOM which uses this chip to monitor the currents flowing into the FPGA and the CPU parts. Signed-off-by: Mike Looijmans Signed-off-by: Guenter Roeck Documentation/hwmon/ltc2990 | 43 ++++++++++++ drivers/hwmon/Kconfig | 14 ++++ drivers/hwmon/Makefile | 1 + drivers/hwmon/ltc2990.c | 161 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+) commit c32f5eff2db51f0126b0a4e42bdefea2d9d2872e Author: Sudeep Holla Date: Fri Jan 29 17:35:52 2016 +0000 hwmon: (vexpress) rename vexpress hwmon implementation The vexpress hwmon implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in regulators. This patch renames the vexpress hwmon implementation to vexpress-hwmon so that there will be no clash in the module namespace. Cc: Liviu Dudau Cc: Lorenzo Pieralisi Cc: Jean Delvare Cc: Guenter Roeck Cc: lm-sensors@lm-sensors.org Reported-by: Rusty Russell Signed-off-by: Sudeep Holla Signed-off-by: Guenter Roeck drivers/hwmon/Makefile | 2 +- drivers/hwmon/vexpress-hwmon.c | 259 +++++++++++++++++++++++++++++++++++++++++ drivers/hwmon/vexpress.c | 259 ----------------------------------------- 3 files changed, 260 insertions(+), 260 deletions(-) commit 49cd53bf14aeb471c4a2682300dfc05ef2fd09f2 Author: Dave Hansen Date: Tue Mar 1 04:54:51 2016 -0800 mm/pkeys: Fix siginfo ABI breakage caused by new u64 field Stephen Rothwell reported this linux-next build failure: http://lkml.kernel.org/r/20160226164406.065a1ffc@canb.auug.org.au ... caused by the Memory Protection Keys patches from the tip tree triggering a newly introduced build-time sanity check on an ARM build, because they changed the ABI of siginfo in an unexpected way. If u64 has a natural alignment of 8 bytes (which is the case on most mainstream platforms, with the notable exception of x86-32), then the leadup to the _sifields union matters: typedef struct siginfo { int si_signo; int si_errno; int si_code; union { ... } _sifields; } __ARCH_SI_ATTRIBUTES siginfo_t; Note how the first 3 fields give us 12 bytes, so _sifields is not 8 naturally bytes aligned. Before the _pkey field addition the largest element of _sifields (on 32-bit platforms) was 32 bits. With the u64 added, the minimum alignment requirement increased to 8 bytes on those (rare) 32-bit platforms. Thus GCC padded the space after si_code with 4 extra bytes, and shifted all _sifields offsets by 4 bytes - breaking the ABI of all of those remaining fields. On 64-bit platforms this problem was hidden due to _sifields already having numerous fields with natural 8 bytes alignment (pointers). To fix this, we replace the u64 with an '__u32'. The __u32 does not increase the minimum alignment requirement of the union, and it is also large enough to store the 16-bit pkey we have today on x86. Reported-by: Stehen Rothwell Signed-off-by: Dave Hansen Acked-by: Stehen Rothwell Cc: Andrew Morton Cc: Dave Hansen Cc: Helge Deller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-next@vger.kernel.org Fixes: cd0ea35ff551 ("signals, pkeys: Notify userspace about protection key faults") Link: http://lkml.kernel.org/r/20160301125451.02C7426D@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/ia64/include/uapi/asm/siginfo.h | 2 +- arch/mips/include/uapi/asm/siginfo.h | 2 +- include/uapi/asm-generic/siginfo.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ca031745fdfc38fed0b9da89bd07e332fce96520 Author: Ingo Molnar Date: Sat Mar 5 14:57:38 2016 +0100 Revert "kbuild: Add option to turn incompatible pointer check into error" This reverts commit ef50c046338948df9f23fb5ef853efda0274c7b3. So adding -Werror=incompatible-pointer-types wasn't a bad idea, but it should really not be done in the scheduler tree: it exposes us to a number of pre-existing warnings (most of them harmless), now upgraded to build failures... This should be done via the kbuild tree. Cc: Daniel Wagner Cc: Thomas Gleixner Cc: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: linux-rt-users@vger.kernel.org Cc: Boqun Feng Cc: Marcelo Tosatti Cc: Steven Rostedt Cc: Paul Gortmaker Cc: Paolo Bonzini Cc: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org Makefile | 3 --- 1 file changed, 3 deletions(-) commit 6cc578df40bd60b791725e4451bc01f8c80abd8b Author: Parav Pandit Date: Sat Mar 5 11:30:56 2016 +0530 cgroup: Trivial correction to reflect controller. Trivial correction in menuconfig help to reflect PIDs as controller instead of subsystem to align to rest of the text and documentation. Signed-off-by: Parav Pandit Signed-off-by: Tejun Heo init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d25263d917caadba52275bf95c9b3400fe77edbe Merge: 0b74f06 b821957 Author: Mark Brown Date: Sat Mar 5 21:30:41 2016 +0900 Merge remote-tracking branch 'regmap/topic/update-bits' into regmap-next commit 0b74f06fcbfd38ebf3c869ae41015cd5b581eb4f Merge: 781aab8 045b984 b429fab 58a5336 ce11020 Author: Mark Brown Date: Sat Mar 5 21:30:32 2016 +0900 Merge remote-tracking branches 'regmap/topic/devm-irq', 'regmap/topic/doc', 'regmap/topic/irq' and 'regmap/topic/stride' into regmap-next commit 781aab8457610d0b4d60cd85bb22e609941be721 Merge: 0e03ae7 aacaaa4 Author: Mark Brown Date: Sat Mar 5 21:30:29 2016 +0900 Merge remote-tracking branch 'regmap/topic/mmio' into regmap-next commit 0e03ae7492271a62f6085c9c7f301ac8a481b001 Merge: fc77dbd d51fe1f Author: Mark Brown Date: Sat Mar 5 21:30:22 2016 +0900 Merge remote-tracking branch 'regmap/fix/raw' into regmap-linus commit cfa52c0cfa4d727aa3e457bf29aeff296c528a08 Author: Karol Herbst Date: Thu Mar 3 02:03:11 2016 +0100 x86/mm/kmmio: Fix mmiotrace for hugepages Because Linux might use bigger pages than the 4K pages to handle those mmio ioremaps, the kmmio code shouldn't rely on the pade id as it currently does. Using the memory address instead of the page id lets us look up how big the page is and what its base address is, so that we won't get a page fault within the same page twice anymore. Tested-by: Pierre Moreau Signed-off-by: Karol Herbst Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: linux-mm@kvack.org Cc: linux-x86_64@vger.kernel.org Cc: nouveau@lists.freedesktop.org Cc: pq@iki.fi Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/1456966991-6861-1-git-send-email-nouveau@karolherbst.de Signed-off-by: Ingo Molnar arch/x86/mm/kmmio.c | 88 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 29 deletions(-) commit de08b5a8be0df1eb7c796b0fe6b30cf1d03d14a6 Author: Laurent Pinchart Date: Tue Mar 1 06:31:53 2016 -0300 [media] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links The driver verifies that the type of the remote entity matches its expectations when setting up fimc-lite links and returns an error if it doesn't. Those checks can never fail as the links are created by the driver in a way that always match its expectations (the SINK and SOURCE_ISP pads are connected to subdevs only and the SOURCE_DMA pad is connected to a video node only). Remove them. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-lite.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 02650ebd2d306b661e6ad000e7981c7d8544f8f6 Author: Laurent Pinchart Date: Tue Mar 1 06:27:10 2016 -0300 [media] v4l: vsp1: Check if an entity is a subdev with the right function Use is_media_entity_v4l2_subdev() instead of is_media_entity_v4l2_io() to check whether the entity is a subdev. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a82edd011f5cd3de1eded8fe1d78cef370b2083 Author: Arnd Bergmann Date: Fri Mar 4 21:06:43 2016 -0300 [media] hide unused functions for !MEDIA_CONTROLLER Some functions in the au0828 driver are only used when CONFIG_MEDIA_CONTROLLER is enabled, and otherwise defined as empty functions: media/usb/au0828/au0828-core.c:208:13: error: 'au0828_media_graph_notify' defined but not used [-Werror=unused-function] media/usb/au0828/au0828-core.c:262:12: error: 'au0828_enable_source' defined but not used [-Werror=unused-function] media/usb/au0828/au0828-core.c:412:13: error: 'au0828_disable_source' defined but not used [-Werror=unused-function] This moves the #ifdef so the entire definitions are hidden in this case. [mchehab@osg.samsung.com: As pointed by Shuah Khan, a return 0 can be removed] Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 0899f62ff93f73860a23a4d4ac6921e3786b41d1 Author: Matthieu Rogez Date: Fri Mar 4 18:33:08 2016 -0300 [media] em28xx: fix Terratec Grabby AC97 codec detection EMP202 chip inside Terratec Grabby (hw rev 2) seems to require some time before accessing reliably its registers. Otherwise it returns some values previously put on the I2C bus. To account for that period, we delay card setup until we have a proof that accessing AC97 registers is reliable. We get this proof by polling AC97_RESET until the expected value is read. We also check that unrelated registers don't return the same value. This second check handles the case where the expected value is constantly returned no matter which register is accessed. Signed-off-by: Matthieu Rogez Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 66c1db1bc5e1a21a358d084835a3eff1cf7d5b78 Author: Shuah Khan Date: Fri Mar 4 18:14:05 2016 -0300 [media] media: add prefixes to interface types Add missing prefixes for DVB, V4L, and ALSA interface types. Signed-off-by: Shuah Khan Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 02212001c95671969d3018691d384db16092eb27 Author: Heiner Kallweit Date: Fri Mar 4 16:11:40 2016 -0300 [media] media: rc: nuvoton: switch attribute wakeup_data to text Switch attribute wakeup_data from binary to a text attribute. This makes it easier to handle in userspace and allows to use the output of tools like mode2 almost as is to set a wakeup sequence. Changing to a text format and values in microseconds also makes the userspace interface independent of the setting of SAMPLE_PERIOD in the driver. In addition document the new sysfs attribute in Documentation/ABI/testing/sysfs-class-rc-nuvoton. Signed-off-by: Heiner Kallweit Signed-off-by: Mauro Carvalho Chehab Documentation/ABI/testing/sysfs-class-rc-nuvoton | 15 +++++ drivers/media/rc/nuvoton-cir.c | 85 +++++++++++++++--------- 2 files changed, 68 insertions(+), 32 deletions(-) commit fcbafafb7da8dbfbb645ee22cc9fbd52d9553c12 Author: Philipp Zabel Date: Fri Mar 4 13:03:00 2016 -0300 [media] v4l2-ioctl: fix YUV422P pixel format description The plane order is YUV, not YVU. Signed-off-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e53898a761d192f0ee3e6d6a5dfef0532212754 Author: Shuah Khan Date: Thu Mar 3 23:24:58 2016 -0300 [media] media: fix null pointer dereference in v4l_vb2q_enable_media_source() Fix the null pointer dereference in v4l_vb2q_enable_media_source(). DVB only drivers don't have valid struct v4l2_fh pointer. [ 548.443272] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 548.452036] IP: [] v4l_vb2q_enable_media_source+0x9/0x50 [videodev] [ 548.460792] PGD b820e067 PUD bb3df067 PMD 0 [ 548.465582] Oops: 0000 [#1] SMP Signed-off-by: Shuah Khan Reported-by: Olli Salonen Tested-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b27a0c85d7068130ed8e3977a2e977ade986841 Author: Josh Poimboeuf Date: Thu Mar 3 11:39:30 2016 -0600 objtool: Detect and warn if libelf is missing and don't break the build With CONFIG_STACK_VALIDATION enabled, if the host system doesn't have a development version of libelf installed, the build fails with errors like: elf.h:22:18: fatal error: gelf.h: No such file or directory compilation terminated. Instead of failing to build, instead just print a warning and disable stack validation. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Sudip Mukherjee Cc: Thomas Gleixner Cc: linux-next@vger.kernel.org Cc: linux@roeck-us.net Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/8c27fe00face60f42e888ddb3142c97e45223165.1457026550.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Makefile | 13 ++++++++++++- scripts/Makefile.build | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) commit e9532e69b8d1d1284e8ecf8d2586de34aec61244 Author: Thomas Gleixner Date: Fri Mar 4 15:59:42 2016 +0100 sched/cputime: Fix steal time accounting vs. CPU hotplug On CPU hotplug the steal time accounting can keep a stale rq->prev_steal_time value over CPU down and up. So after the CPU comes up again the delta calculation in steal_account_process_tick() wreckages itself due to the unsigned math: u64 steal = paravirt_steal_clock(smp_processor_id()); steal -= this_rq()->prev_steal_time; So if steal is smaller than rq->prev_steal_time we end up with an insane large value which then gets added to rq->prev_steal_time, resulting in a permanent wreckage of the accounting. As a consequence the per CPU stats in /proc/stat become stale. Nice trick to tell the world how idle the system is (100%) while the CPU is 100% busy running tasks. Though we prefer realistic numbers. None of the accounting values which use a previous value to account for fractions is reset at CPU hotplug time. update_rq_clock_task() has a sanity check for prev_irq_time and prev_steal_time_rq, but that sanity check solely deals with clock warps and limits the /proc/stat visible wreckage. The prev_time values are still wrong. Solution is simple: Reset rq->prev_*_time when the CPU is plugged in again. Signed-off-by: Thomas Gleixner Acked-by: Rik van Riel Cc: Cc: Frederic Weisbecker Cc: Glauber Costa Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: commit 095c0aa83e52 "sched: adjust scheduler cpu power for stolen time" Fixes: commit aa483808516c "sched: Remove irq time from available CPU power" Fixes: commit e6e6685accfa "KVM guest: Steal time accounting" Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1603041539490.3686@nanos Signed-off-by: Ingo Molnar kernel/sched/core.c | 1 + kernel/sched/sched.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit ea6370d23c919127b2cd204af213223a89457477 Author: Igal Liberman Date: Thu Dec 24 03:42:11 2015 +0200 powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy The FMan contains internal PHY devices used for SGMII connections to external PHYs. When these PHYs are in use a reference is needed for both the external PHY and the internal one. For the external PHY phy-handle provides the reference. For the internal PHY a new handle is required. In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY, the handle used will be tbi-handle. In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY, the handle used will be pcsphy-handle. Signed-off-by: Igal Liberman Signed-off-by: Scott Wood .../devicetree/bindings/powerpc/fsl/fman.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 6becef7ea04a695f64299238fe13d41e41607469 Author: chenhui zhao Date: Fri Nov 20 17:14:02 2015 +0800 powerpc/mpc85xx: Add CPU hotplug support for E6500 Support Freescale E6500 core-based platforms, like t4240. Support disabling/enabling individual CPU thread dynamically. Signed-off-by: Chenhui Zhao arch/powerpc/include/asm/cputhreads.h | 6 +++ arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/head_64.S | 78 +++++++++++++++++++++++++++++++++++ arch/powerpc/platforms/85xx/smp.c | 70 +++++++++++++++++-------------- 4 files changed, 124 insertions(+), 31 deletions(-) commit 2f4f1f815bc6d03ea42d4f67dd1e284525e7524e Author: chenhui zhao Date: Fri Nov 20 17:14:01 2015 +0800 powerpc/mpc85xx: Add hotplug support on E5500 and E500MC cores Freescale E500MC and E5500 core-based platforms, like P4080, T1040, support disabling/enabling CPU dynamically. This patch adds this feature on those platforms. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian [scottwood: removed unused pr_fmt] Signed-off-by: Scott Wood arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/smp.h | 3 + arch/powerpc/kernel/smp.c | 7 +- arch/powerpc/platforms/85xx/smp.c | 196 +++++++++++++++++++++----------------- 4 files changed, 118 insertions(+), 90 deletions(-) commit 56f1ba280719469bffc870b6b2d935f3a3019ea4 Author: chenhui zhao Date: Fri Nov 20 17:14:00 2015 +0800 powerpc/mpc85xx: refactor the PM operations Freescale CoreNet-based and Non-CoreNet-based platforms require different PM operations. This patch extracted existing PM operations on Non-CoreNet-based platforms to a new file which can accommodate both platforms. In this way, PM operation codes are clearer structurally. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-off-by: Scott Wood arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c | 106 +++++++++++++++++++++++++++ arch/powerpc/platforms/85xx/smp.c | 73 +++++------------- arch/powerpc/platforms/85xx/smp.h | 1 + 4 files changed, 127 insertions(+), 54 deletions(-) commit d17799f9c10e283cccd4d598d3416e6fac336ab9 Author: chenhui zhao Date: Fri Nov 20 17:13:59 2015 +0800 powerpc/rcpm: add RCPM driver There is a RCPM (Run Control/Power Management) in Freescale QorIQ series processors. The device performs tasks associated with device run control and power management. The driver implements some features: mask/unmask irq, enter/exit low power states, freeze time base, etc. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian [scottwood: remove __KERNEL__ ifdef] Signed-off-by: Scott Wood arch/powerpc/include/asm/cputhreads.h | 1 + arch/powerpc/include/asm/fsl_pm.h | 51 +++++ arch/powerpc/kernel/head_64.S | 19 ++ arch/powerpc/platforms/85xx/Kconfig | 1 + arch/powerpc/platforms/85xx/common.c | 3 + arch/powerpc/sysdev/Kconfig | 5 + arch/powerpc/sysdev/Makefile | 1 + arch/powerpc/sysdev/fsl_rcpm.c | 385 ++++++++++++++++++++++++++++++++++ include/linux/fsl/guts.h | 105 ++++++++++ 9 files changed, 571 insertions(+) commit e7affb1dba0e9068aeb3978e858f39753e0dc20a Author: chenhui zhao Date: Fri Nov 20 17:13:58 2015 +0800 powerpc/cache: add cache flush operation for various e500 Various e500 core have different cache architecture, so they need different cache flush operations. Therefore, add a callback function cpu_flush_caches to the struct cpu_spec. The cache flush operation for the specific kind of e500 is selected at init time. The callback function will flush all caches inside the current cpu. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-off-by: Scott Wood arch/powerpc/include/asm/cacheflush.h | 2 - arch/powerpc/include/asm/cputable.h | 8 +++ arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/cpu_setup_fsl_booke.S | 112 ++++++++++++++++++++++++++++++ arch/powerpc/kernel/cputable.c | 4 ++ arch/powerpc/kernel/head_fsl_booke.S | 74 -------------------- arch/powerpc/platforms/85xx/smp.c | 5 +- 7 files changed, 128 insertions(+), 78 deletions(-) commit ebb9d30a6a74f4ced5b7d35446ebb6362a724393 Author: chenhui zhao Date: Thu Dec 24 08:39:57 2015 +0800 powerpc/mm: any thread in one core can be the first to setup TLB1 On e6500, in the case of cpu hotplug, either thread in one core may be the first thread initilzing the TLB1. The subsequent threads must not setup it again. The code is derived from the comment of Scott Wood. Signed-off-by: Chenhui Zhao Signed-off-by: Scott Wood arch/powerpc/include/asm/cputhreads.h | 8 ++++++++ arch/powerpc/mm/tlb_nohash.c | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) commit d64716caf7724dbacd6d79249b90973bf6a9852a Author: Wang Dongsheng Date: Mon Oct 26 14:44:12 2015 +0800 Documentation: dt: binding: fsl: add devicetree binding for describing RCPM RCPM is the Run Control and Power Management module performs all device-level tasks associated with device run control and power management. Add this for freescale powerpc platform and layerscape platform. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-off-by: Wang Dongsheng [scottwood: s/pointer/phandle and "disabled" status from example] Signed-off-by: Scott Wood Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit e066ea2214f77e13e24344313243f9b3a182d3c4 Author: Rajan Vaja Date: Thu Feb 11 11:23:35 2016 +0530 ASoC: dapm: Remove unneeded variable ret returning 0 This patch fixes coccicheck report: Unneeded variable: "ret". Return "0" on line 2817 Remove unneccesary variable ret created to return zero. Signed-off-by: Rajan Vaja Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 045b98480cbe9d8dfe80983013591769f8a112cc Author: Laxman Dewangan Date: Wed Feb 10 14:29:50 2016 +0530 regmap: irq: add devm apis for regmap_{add,del}_irq_chip Add device managed APIs for regmap_add_irq_chip() and regmap_del_irq_chip() so that it can be managed by device framework for freeing it. This helps on following: 1. Maintaining the sequence of resource allocation and deallocation regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq) On free path: regmap_del_irq_chip(d); and then removing the irq registration. On this case, regmap irq is deleted before the irq is free. This force to use normal irq registration. By using devm apis, the sequence can be maintain properly: devm_regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq); and resource deallocation will be done in reverse order by device framework. 2. No need to delete the regmap_irq_chip in error path or remove callback and hence there is less code on this path. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 82 ++++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 8 ++++ 2 files changed, 90 insertions(+) commit 5a8847c83ce6072d6fdf0d15d9aa060c0b83537f Author: Christophe Leroy Date: Tue Sep 22 16:34:34 2015 +0200 powerpc: simplify csum_add(a, b) in case a or b is constant 0 Simplify csum_add(a, b) in case a or b is constant 0 Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/checksum.h | 6 ++++++ 1 file changed, 6 insertions(+) commit f867d556dd8525fe6ff0d22a34249528e590f994 Author: Christophe Leroy Date: Tue Sep 22 16:34:32 2015 +0200 powerpc32: optimise csum_partial() loop On the 8xx, load latency is 2 cycles and taking branches also takes 2 cycles. So let's unroll the loop. This patch improves csum_partial() speed by around 10% on both: * 8xx (single issue processor with parallel execution) * 83xx (superscalar 6xx processor with dual instruction fetch and parallel execution) Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/lib/checksum_32.S | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 4f2bf0ace0f96cc693002e1bbde967fa2356bc43 Author: Florian Vaussard Date: Fri Feb 5 16:32:14 2016 +0100 ASoC: ads117x: Add device tree compatible string This patch adds the necessary device tree compatible string to allow DT probing. Signed-off-by: Florian Vaussard Signed-off-by: Mark Brown sound/soc/codecs/ads117x.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c9146fae4e88fa9864c4a7087289523b96cdbf2d Author: Florian Vaussard Date: Fri Feb 5 16:32:13 2016 +0100 ASoC: ads117x: Add bindings documentation for TI ADS117x ADC Currently the binding is only made of the compatible string. Signed-off-by: Florian Vaussard Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/ti,ads117x.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 48821a34b1bdc5d89505cb814b3f7c166940f200 Author: Christophe Leroy Date: Tue Sep 22 16:34:29 2015 +0200 powerpc32: optimise a few instructions in csum_partial() r5 does contain the value to be updated, so lets use r5 all way long for that. It makes the code more readable. To avoid confusion, it is better to use adde instead of addc The first addition is useless. Its only purpose is to clear carry. As r4 is a signed int that is always positive, this can be done by using srawi instead of srwi Let's also remove the comment about bdnz having no overhead as it is not correct on all powerpc, at least on MPC8xx In the last part, in our situation, the remaining quantity of bytes to be proceeded is between 0 and 3. Therefore, we can base that part on the value of bit 31 and bit 30 of r4 instead of anding r4 with 3 then proceding on comparisons and substractions. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/lib/checksum_32.S | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 7aef4136566b0539a1a98391181e188905e33401 Author: Christophe Leroy Date: Tue Sep 22 16:34:27 2015 +0200 powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user() csum_partial_copy_generic() does the same as copy_tofrom_user and also calculates the checksum during the copy. Unlike copy_tofrom_user(), the existing version of csum_partial_copy_generic() doesn't take benefit of the cache. This patch is a rewrite of csum_partial_copy_generic() based on copy_tofrom_user(). The previous version of csum_partial_copy_generic() was handling errors. Now we have the checksum wrapper functions to handle the error case like in powerpc64 so we can make the error case simple: just return -EFAULT. copy_tofrom_user() only has r12 available => we use it for the checksum r7 and r8 which contains pointers to error feedback are used, so we stack them. On a TCP benchmark using socklib on the loopback interface on which checksum offload and scatter/gather have been deactivated, we get about 20% performance increase. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/lib/checksum_32.S | 320 +++++++++++++++++++++++++++-------------- 1 file changed, 209 insertions(+), 111 deletions(-) commit 05f5afd3f0d915537b67d3cfcb464e6836a65caf Author: Philipp Zabel Date: Wed Mar 2 15:49:06 2016 +0100 ASoC: mediatek: address dai link array entries by enum This should be more robust to future changes than adressing array entries by index number. Signed-off-by: Philipp Zabel Signed-off-by: Mark Brown sound/soc/mediatek/mt8173-rt5650-rt5676.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit b920cc3191d7612f26f36ee494e05b5ffd9044c0 Author: Huibin Hong Date: Wed Feb 24 18:00:04 2016 +0800 spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs Rockchip_spi_set_cs could be called by spi_setup, but spi_setup may be called by device driver after runtime suspend. Then the spi clock is closed, rockchip_spi_set_cs may access the spi registers, which causes cpu block in some socs. Fixes: 64e36824b32 ("spi/rockchip: add driver for Rockchip RK3xxx") Signed-off-by: Huibin Hong Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ec2ac01afe001360b911e27c915579fd003339e8 Author: Kuninori Morimoto Date: Thu Feb 25 05:55:23 2016 +0000 ASoC: rsnd: add CTU support This patch adds CTU (= Channel Transfer Unit) support on Renesas R-Car sound driver. It can Down/Up mixing and splitter. You need to check R-Car datasheet especially CTUn_CPMDR/CTUn_SV0xR/CTUn_SV1xR/CTUn_SV2xR/CTUn_SV3xR for setting parameter. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ctu.c | 234 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 197 insertions(+), 37 deletions(-) commit eed76bb811cd143119b4bdeca88606685222e687 Author: Kuninori Morimoto Date: Thu Feb 25 05:54:58 2016 +0000 ASoC: rsnd: add rsnd_runtime_channel_xxx() Current SSI is supporting Normal SSI/Multi mode SSI/TDM mode SSI and its behavior is based on input channels. This input channel might be converted by CTU, and SSI needs to be Multi SSI mode / TDM SSI mode if 6ch input EX) 6ch input, CTU for 2ch, playback 6ch 6ch 2ch 2ch 2ch 2ch -> SRC -> CTU -> MIX -> DVC -> SSIU -> SSI EX) 6ch input, no CTU, Multi SSI, playback 6ch 6ch 6ch 6ch 6ch 2ch -> SRC -> CTU -> MIX -> DVC -> SSIU -> SSI0/SSI1/SSI2 Current driver is using rsnd_get_adinr_chan() / rsnd_get_slot_width() for this purpose, but it is complicated enough without meaning. This patch adds new rsnd_runtime_channel_xxx() which is caring CTU/Multi SSI. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 69 +++++++++++++++++++++++++++++------------------- sound/soc/sh/rcar/ctu.c | 2 +- sound/soc/sh/rcar/dvc.c | 2 +- sound/soc/sh/rcar/mix.c | 2 +- sound/soc/sh/rcar/rsnd.h | 8 ++++-- sound/soc/sh/rcar/src.c | 2 +- sound/soc/sh/rcar/ssi.c | 15 +++++------ sound/soc/sh/rcar/ssiu.c | 6 +++-- 8 files changed, 62 insertions(+), 44 deletions(-) commit 8a3a2211e97395694827f12552bbad7f2caf11ef Author: Kuninori Morimoto Date: Thu Feb 25 05:53:00 2016 +0000 ASoC: rsnd: add CTU basic support This patch adds Renesas R-Car sound CTU (= Channel Transfer Unit) very basic support, but not yet enough feature at this point. Because CTU support needs more complex channel function for each modules. To avoid complex patch reviewing, this patch picked up very basic part only. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ctu.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/sh/rcar/rsnd.h | 1 + 2 files changed, 50 insertions(+) commit 135bb7d5c7b3fa40cd0559b5500a50d4e3663f6e Author: Kuninori Morimoto Date: Thu Feb 25 05:52:13 2016 +0000 ASoC: rsnd: tidyup rsnd_ssiu_init_gen2() remove unnecessary variable Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f90432fc6ec41c5bb1d7b75edc1f2bc58799ece3 Author: Kuninori Morimoto Date: Thu Feb 25 05:51:44 2016 +0000 ASoC: rsrc-card: add convert channels support Renesas sound device has CTU (= Channel Transfer Unit), and sound card needs its support. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../bindings/sound/renesas,rsrc-card.txt | 1 + sound/soc/sh/rcar/rsrc-card.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) commit d7289565483c65094d0473555625a4acd89567d3 Author: Kuninori Morimoto Date: Thu Feb 25 05:51:12 2016 +0000 ASoC: rsnd: don't call update callback if it was NULL Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdf841937e4fa08e767dbe83f1c65696cfec67c9 Author: Pierre-Louis Bossart Date: Thu Mar 3 21:36:39 2016 -0600 ASoC: Intel: Atom: add support for CHT w/ RT5640 Some CHT-T platforms make use of the Realtek RT5640 codec. Make use of the machine driver developed for Baytrail. Tested on Tronsmart Ara X5. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 4 ++++ 1 file changed, 4 insertions(+) commit a232b96dcece4761793d39b8fb2c9d050df30357 Author: Pierre-Louis Bossart Date: Thu Mar 3 21:36:38 2016 -0600 ASoC: Intel: bytcr_rt5640: use HID translation util Remove hard-coded generation of codec name, use translation routine to avoid issues with codec name not matching what the ACPI subsystem registered Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit ab738e4e3040b0985ab45780a688705f334e609b Author: Pierre-Louis Bossart Date: Thu Mar 3 21:36:37 2016 -0600 ASoC: Intel: bytcr_rt5640: change quirk position No added functionality Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 1fdb7c14a24689e9c7ec51aa16a3970a7ec0fdde Author: Pierre-Louis Bossart Date: Thu Mar 3 21:36:36 2016 -0600 ASoC: Intel: common: add translation from HID to codec-name BIOS vendors sometimes declare multiple devices in the DSDT table that all refer to the same HID. This is not very smart but not illegal as long as only one device reports present with the _STA method. The ACPI subsystem tracks each device with an extension, e.g. 10EC5640:00 and 10EC5640:01 In the ASoC machine driver, the DAI codec name needs to refer to the ACPI device that reported present, e.g. "i2c-10EC5640:01". The extension will vary depending on how the BIOS is written and which ACPI device is activated. This patch adds a translation function that provides the codec name from the ACPI HID to avoid any hard-coded values in the machine driver. Suggested-by: Mika Westerberg Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/common/sst-acpi.h | 3 +++ sound/soc/intel/common/sst-match-acpi.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit cab473850226c3e41823453b5b80eb294dae6e0c Author: Pierre-Louis Bossart Date: Thu Mar 3 21:36:34 2016 -0600 ASoC: Intel: common: filter ACPI devices with _STA return value BIOS vendors typically list multiple audio codecs in the DSDT table and enable the relevant one by changing the return value of the _STA method. With the current code, all devices are reported by acpi_dev_present(), regardless of the _STA return values. This causes errors on probe with the wrong machine driver being loaded. This patch essentially reverts 'commit 6f08cbdaac5a ("ASoC: Intel: Use acpi_dev_present()")' and adds code to force the evaluation of the _STA method. A better solution might be to make sure the ACPI subsystem only reports devices with a _STA value of 0xf but apparently it's problematic so dealing with this in the audio subsystem directly. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/common/sst-match-acpi.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit ab8773943ab3126d39eb41531c8e06aea2107aa1 Author: Sugar Zhang Date: Fri Mar 4 18:31:54 2016 +0800 ASoC: rockchip: add bindings for spdif controller this patch add compatible for rk3366/rk3368/rk3399 spdif, these three spdifs share the same type. Signed-off-by: Sugar Zhang Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 8 ++++++-- sound/soc/rockchip/rockchip_spdif.c | 13 ++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) commit e7a508f2b137092500fbad09d9713d3a1c5d4826 Author: Sudip Mukherjee Date: Fri Mar 4 16:27:14 2016 +0530 ASoC: pcm3168a: remove unused variable While building we were getting build warning about: sound/soc/codecs/pcm3168a.c:403:21: warning: variable 'channels' set but not used The variable channels were being assigned some value but that was never reused. Signed-off-by: Sudip Mukherjee Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b821957a5ae76994eebf9eed3247be0ba5775c30 Author: Kuninori Morimoto Date: Thu Mar 3 00:48:30 2016 +0000 regmap: replace regmap_write_bits() commit 23b92e4cf5fd ("regmap: remove regmap_write_bits()") removed regmap_write_bits(), but MFD driver was using it. So, commit e30fccd6771d ("regmap: Keep regmap_write_bits()") turns out it, but it is using original style. This patch uses regmap_update_bits_base() for regmap_write_bits() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 23 ----------------------- include/linux/regmap.h | 12 +++--------- 2 files changed, 3 insertions(+), 32 deletions(-) commit d8fc2198aab117a4bc16ee305caef19c4c7e7f5c Author: Arnd Bergmann Date: Wed Mar 2 16:59:06 2016 +0100 ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume The rockchip spdif driver uses SIMPLE_DEV_PM_OPS to conditionally set its power management functions, but we get a warning about rk_spdif_runtime_resume being unused when CONFIG_PM is not set: sound/soc/rockchip/rockchip_spdif.c:67:12: error: 'rk_spdif_runtime_resume' defined but not used [-Werror=unused-function] This adds a __maybe_unused annotation so the compiler knows it can silently drop it instead of warning. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_spdif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 37e08cad8f177f7bf6226a9b3724234ac3d3c81d Author: Christophe Leroy Date: Tue Sep 22 16:34:25 2015 +0200 powerpc: inline ip_fast_csum() In several architectures, ip_fast_csum() is inlined There are functions like ip_send_check() which do nothing much more than calling ip_fast_csum(). Inlining ip_fast_csum() allows the compiler to optimise better Suggested-by: Eric Dumazet Signed-off-by: Christophe Leroy [scottwood: whitespace and cast fixes] Signed-off-by: Scott Wood arch/powerpc/include/asm/checksum.h | 45 +++++++++++++++++++++++++++++++------ arch/powerpc/lib/checksum_32.S | 21 ----------------- arch/powerpc/lib/checksum_64.S | 27 ---------------------- arch/powerpc/lib/ppc_ksyms.c | 1 - 4 files changed, 38 insertions(+), 56 deletions(-) commit 03bc8b0fc87616c75c6dd060a2191e7fc8faacb6 Author: Christophe Leroy Date: Tue Sep 22 16:34:23 2015 +0200 powerpc32: checksum_wrappers_64 becomes checksum_wrappers The powerpc64 checksum wrapper functions adds csum_and_copy_to_user() which otherwise is implemented in include/net/checksum.h by using csum_partial() then copy_to_user() Those two wrapper fonctions are also applicable to powerpc32 as it is based on the use of csum_partial_copy_generic() which also exists on powerpc32 This patch renames arch/powerpc/lib/checksum_wrappers_64.c to arch/powerpc/lib/checksum_wrappers.c and makes it non-conditional to CONFIG_WORD_SIZE Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/checksum.h | 9 --- arch/powerpc/lib/Makefile | 3 +- arch/powerpc/lib/checksum_wrappers.c | 102 ++++++++++++++++++++++++++++++++ arch/powerpc/lib/checksum_wrappers_64.c | 102 -------------------------------- 4 files changed, 103 insertions(+), 113 deletions(-) commit 11dfbf588ae697bc5362c24294c2605f09c2d3d4 Author: Christophe Leroy Date: Tue Sep 22 16:34:21 2015 +0200 powerpc: mark xer clobbered in csum_add() addc uses carry so xer is clobbered in csum_add() Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0f82bdf2dd04c08a167b5e9b47d65834ac84ba9 Author: Christophe Leroy Date: Tue Sep 22 16:34:19 2015 +0200 powerpc: unexport csum_tcpudp_magic csum_tcpudp_magic is now an inline function, so there is nothing to export Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood arch/powerpc/lib/ppc_ksyms.c | 1 - 1 file changed, 1 deletion(-) commit 00a1f0a93dea3cf1c141df79bfd06e7c9ee54162 Merge: 94f7153 3ef523a Author: David S. Miller Date: Fri Mar 4 22:45:14 2016 -0500 Merge branch 'reset_mac_header' Zhang Shengju says: ==================== use reset to set header pointers This patch series replace set function with reset when offset is zero. ==================== Signed-off-by: David S. Miller commit 3ef523aeeee88130e5de10adac719dbd6fa266e5 Author: Zhang Shengju Date: Thu Mar 3 01:16:57 2016 +0000 wireless: use reset to set mac header Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller net/wireless/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d57a544d71092a81c2064ff242009a38e7b1a631 Author: Zhang Shengju Date: Thu Mar 3 01:16:56 2016 +0000 mac80211: use reset to set header pointer Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller net/mac80211/mesh_hwmp.c | 6 +++--- net/mac80211/rx.c | 2 +- net/mac80211/status.c | 2 +- net/mac80211/tx.c | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) commit 6b163a85478b27748bad219fe3ead7ac87217265 Author: Zhang Shengju Date: Thu Mar 3 01:16:55 2016 +0000 mac80211_hwsim: use reset to set mac header Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/wireless/mac80211_hwsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6297b91c7fb530d3f2543a8e25d68ccf75bfb139 Author: Zhang Shengju Date: Thu Mar 3 01:16:54 2016 +0000 vxlan: use reset to set header pointers Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/vxlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 288bc356a881fcdce05f9782736a6a3d9db359a9 Author: Caesar Wang Date: Fri Mar 4 14:54:50 2016 +0800 ASoC: rt5616: allow to build with CONFIG_SND_SOC_RT5616 This patch fixes that hasn't built the rt5616 driver with 'CONFIG_SND_SOC_RT5616=y' in .config. The tristate is the prompt on the 'make menuconfig', in other words, that can't show the prompt and select it if we don't say what's the tristate. Signed-off-by: Caesar Wang Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4607777c71be52c4e7c9cbcf8ecac4a452090d7d Author: Ezequiel García Date: Sun Feb 28 16:09:18 2016 -0300 mtd: spi-nor: add subsector flag to n25q128a Micron n25q128axx support subsector (4K) erase so let's update the flags. Tested on n25q128a13. Signed-off-by: Ezequiel Garcia Signed-off-by: Brian Norris drivers/mtd/spi-nor/spi-nor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9097103f06332d099c5ab06d1e7f22f4bcaca6e2 Author: Robert Jarzmik Date: Fri Feb 12 23:29:04 2016 +0100 mtd: nand: pxa3xx_nand: fix dmaengine initialization When the driver is initialized in a pure device-tree platform, the driver's probe fails allocating the dma channel : [ 525.624435] pxa3xx-nand 43100000.nand: no resource defined for data DMA [ 525.632088] pxa3xx-nand 43100000.nand: alloc nand resource failed The reason is that the DMA IO resource is not acquired through platform resources but by OF bindings. Fix this by ensuring that DMA IO resources are only queried in the non device-tree case. Fixes: 8f5ba31aa565 ("mtd: nand: pxa3xx-nand: switch to dmaengine") Signed-off-by: Robert Jarzmik Acked-by: Ezequiel Garcia Signed-off-by: Brian Norris drivers/mtd/nand/pxa3xx_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d0712deb0a416021e55febc7ec7f6c24f460e06 Merge: 83253b3 0561f77 Author: Greg Kroah-Hartman Date: Fri Mar 4 18:43:07 2016 -0800 Merge tag 'usb-for-v4.6' of http://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb changes for v4.6 merge window This is almost all under drivers/usb/dwc2/. Many changes to the host side implementation of dwc2 have been done by Douglas Anderson. We also have USB 3.1 support added to the Gadget Framework and, because of that work, dwc3 got support to Synopsys new DWC_usb31 IP core. Other than these 2 important series, we also have the usual collection of non-critical fixes, Documentation updates, and minor changes all over the place. commit 5e454c67fc594150e6c0da32b388a43d40200759 Author: Arnd Bergmann Date: Sat Mar 5 00:49:31 2016 +0100 nbd: use correct div_s64 helper The do_div() macro now checks its arguments for the correct type, and refuses anything other than u64, so we get a warning about nbd_ioctl passing in an loff_t: drivers/block/nbd.c: In function '__nbd_ioctl': drivers/block/nbd.c:757:77: error: comparison of distinct pointer types lacks a cast [-Werror] This changes the nbd code to use div_s64() instead, which takes a signed argument. Signed-off-by: Arnd Bergmann Fixes: 37091fdd831f ("nbd: Create size change events for userspace") Signed-off-by: Jens Axboe drivers/block/nbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f671a1f3803428b01272b056d6dc0e09e0df6fd4 Author: Boris BREZILLON Date: Sat Mar 5 00:21:20 2016 +0100 mtd: nand: sunxi: remove direct mtd->priv accesses mtd->priv is no longer pointing to the struct nand_chip it is attached to. Replace those accesses by mtd_to_nand() calls. Signed-off-by: Boris Brezillon Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support") Signed-off-by: Brian Norris drivers/mtd/nand/sunxi_nand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1b3bf847977c2e5974012ddd4b25fef50967d785 Merge: 18558ca 656b803 f474c8c b426867 1d93ba2 Author: Russell King Date: Fri Mar 4 23:36:02 2016 +0000 Merge branches 'amba', 'fixes', 'misc' and 'tauros2' into for-next commit b42686761219036ace45192476d8ab64d86a4ece Author: Rabin Vincent Date: Thu Mar 3 15:58:01 2016 +0100 ARM: 8546/1: dma-mapping: refactor to fix coherent+cma+gfp=0 Given a device which uses arm_coherent_dma_ops and on which dev_get_cma_area(dev) returns non-NULL, the following usage of the DMA API with gfp=0 results in memory corruption and a memory leak. p = dma_alloc_coherent(dev, sz, &dma, 0); if (p) dma_free_coherent(dev, sz, p, dma); The memory leak is because the alloc allocates using __alloc_simple_buffer() but the free attempts dma_release_from_contiguous() which does not do free anything since the page is not in the CMA area. The memory corruption is because the free calls __dma_remap() on a page which is backed by only first level page tables. The apply_to_page_range() + __dma_update_pte() loop ends up interpreting the section mapping as an addresses to a second level page table and writing the new PTE to memory which is not used by page tables. We don't have access to the GFP flags used for allocation in the free function. Fix this by adding allocator backends and using this information in the free function so that we always use the correct release routine. Fixes: 21caf3a7 ("ARM: 8398/1: arm DMA: Fix allocation from CMA for coherent DMA") Signed-off-by: Rabin Vincent Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 165 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 128 insertions(+), 37 deletions(-) commit 19e6e5e5392bd646c93d9e2c7b2b58c8558cb041 Author: Rabin Vincent Date: Thu Mar 3 15:58:00 2016 +0100 ARM: 8547/1: dma-mapping: store buffer information Keep a list of allocated DMA buffers so that we can store metadata in alloc() which we later need in free(). Signed-off-by: Rabin Vincent Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit d3781a74bcc98c9c833d181676975075a50eb946 Author: Stephen Boyd Date: Tue Mar 1 11:00:12 2016 -0800 clk: fixed-rate: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Signed-off-by: Stephen Boyd drivers/clk/clk-fixed-rate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2aedcd098a9448b11eab895ee79acf519686555a Author: Masahiro Yamada Date: Thu Mar 3 17:36:30 2016 +0900 kbuild: suppress annoying "... is up to date." message Under certain conditions, Kbuild shows "... is up to date" where if_changed or friends are used. For example, the incremental build of ARM64 Linux shows this message when the kernel image has not been updated. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h CHK kernel/config_data.h make[1]: `arch/arm64/boot/Image.gz' is up to date. Building modules, stage 2. MODPOST 0 modules The following is the build rule in arch/arm64/boot/Makefile: $(obj)/Image.gz: $(obj)/Image FORCE $(call if_changed,gzip) If the Image.gz is newer than the Image and the command line has not changed (i.e., $(any-prereq) and $(arg-check) are both empty), the build rule $(call if_changed,gzip) is evaluated to be empty, then GNU Make reports the target is up to date. In order to make GNU Make quiet, we need to give it something to do, for example, "@:". This should be fixed in the Kbuild core part rather than in each Makefile. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Marek scripts/Kbuild.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 94f7153e41d834824f4108d832f1935603e73105 Merge: 3d1c6df a4373a4 Author: David S. Miller Date: Fri Mar 4 17:19:16 2016 -0500 Merge tag 'rxrpc-rewrite-20160304' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== RxRPC: Rewrite part 1 Here's the first set of patches from my RxRPC rewrite, aimed at net-next. These do some clean ups and bug fixes. Most of the changes are small, but there are a couple of bigger changes: (*) Convert call flag numbers and event numbers into enums. Then rename the event numbers to all have _EV_ in their name to stop confusion. Fix one instance of an event bit being used instead of a flag bit. (*) A copy of the Rx protocol header is kept in the sk_buff private data. Keep this in host byte order rather than network byte order as it makes more sense. A number of other fields then get converted into host byte order too. Conversion between host and network byte order is then done at the packet reception/generation stage. This is based on net-next/master ==================== Signed-off-by: David S. Miller commit a90cc3f25065e5e8d5e336c75b04d5882912871f Merge: 912b330 1c278e5 Author: Dave Airlie Date: Sat Mar 5 08:07:58 2016 +1000 Merge tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for v4.6 * HDMI interlace output support * DMAbuf import support * Big refactoring leading to removal of legacy code * Various non-critical fixes * tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (76 commits) drm/omap: no need to select OMAP2_DSS drm/omap: gem: Fix omap_gem_new() error path drm/omap: remove -Werror from Makefile drm/omap: remove dispc_ovl_check() drm/omap: remove dss compat code drm/omap: remove last uses of omap_overlay_manager drm/omap: DSI: remove uses of omap_overlay_manager drm/omap: VENC: remove uses of omap_overlay_manager drm/omap: SDI: remove uses of omap_overlay_manager drm/omap: HDMI4: remove uses of omap_overlay_manager drm/omap: HDMI5: remove uses of omap_overlay_manager drm/omap: DPI: remove uses of omap_overlay_manager drm/omap: remove extra manager checks on disconnect drm/omap: remove extra check in dpi and sdi drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel drm/omap: convert dss_mgr_start_update to accept omap_channel drm/omap: convert dss_mgr_disable to accept omap_channel drm/omap: convert dss_mgr_enable to accept omap_channel drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel ... commit 6ef41e22a320d95a246d45b673aa7247cc1bbf7b Author: Paolo Abeni Date: Wed Mar 2 15:28:00 2016 +0100 kbuild/mkspec: clean boot loader configuration on rpm removal This patch add a rpm preuninstall scriptlet to cleanup the boot loader configuration on kernel package uninstall. The initrd for the to-be-removed kernel is deleted, too. Signed-off-by: Paolo Abeni Signed-off-by: Michal Marek scripts/package/mkspec | 5 +++++ 1 file changed, 5 insertions(+) commit 0e4d44151af7c8fca3d15c27d9b97d4ac41c102b Author: Paolo Bonzini Date: Fri Mar 4 09:28:41 2016 +0100 KVM: i8254: drop local copy of mul_u64_u32_div A function that does the same as i8254.c's muldiv64 has been added (for KVM's own use, in fact!) in include/linux/math64.h. Use it instead of muldiv64. Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 3d1c6df8cb06b999fdf72c17966c30d7a21484d0 Merge: 9b2f8f6 14e2037 Author: David S. Miller Date: Fri Mar 4 16:10:37 2016 -0500 Merge branch 'DIV_ROUND_UP-uapi' Nicolas Dichtel says: ==================== uapi: consolidate DIV_ROUND_UP definition The inital goal was to consolidate ethtool.h uapi header. But I took the opportunity to remove all duplicate definitions of DIV_ROUND_UP. v3: add patch #2 and #3 v2: split the patch define DIV_ROUND_UP in uapi ==================== Signed-off-by: David S. Miller commit 14e2037902d65213842b4e40305ff54a64abbcb6 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:19 2016 +0100 ethtool.h: define INT_MAX for userland INT_MAX needs limits.h in userland. When ethtool.h is included by a userland app, we got the following error: .../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed': .../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function) return speed <= INT_MAX || speed == SPEED_UNKNOWN ^ Fixes: e02564ee334a ("ethtool: make validate_speed accept all speeds between 0 and INT_MAX") CC: Nikolay Aleksandrov Signed-off-by: Nicolas Dichtel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 4 ++++ 1 file changed, 4 insertions(+) commit 166cc7136752192bb6e1f2be2e56614762292a00 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:18 2016 +0100 drm/vmwgfx: remove userland definition of DIV_ROUND_UP Let's use __KERNEL_DIV_ROUND_UP, which is defined in uapi/linux/kernel.h. Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 28466e0f2463a1084781c9312cd9148b2530eea7 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:17 2016 +0100 cxgb4i: don't redefine DIV_ROUND_UP let's use the common definition to avoid the following warning during the compilation: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:161:0: warning: "DIV_ROUND_UP" redefined #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ In file included from include/linux/list.h:8:0, from include/linux/module.h:9, from drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:16: include/linux/kernel.h:67:0: note: this is the location of the previous definition #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5d3755a22e0cc4c369c0985aef0c52c2477c1e7 Author: Nicolas Dichtel Date: Fri Mar 4 11:52:16 2016 +0100 uapi: define DIV_ROUND_UP for userland DIV_ROUND_UP is defined in linux/kernel.h only for the kernel. When ethtool.h is included by a userland app, we got the following error: include/linux/ethtool.h:1218:8: error: variably modified 'queue_mask' at file scope __u32 queue_mask[DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; ^ Let's add a common definition in uapi and use it everywhere. Fixes: ac2c7ad0e5d6 ("net/ethtool: introduce a new ioctl for per queue setting") CC: Kan Liang Suggested-by: Ben Hutchings Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller include/linux/kernel.h | 2 +- include/uapi/linux/ethtool.h | 3 ++- include/uapi/linux/kernel.h | 1 + include/uapi/linux/mroute6.h | 9 ++------- 4 files changed, 6 insertions(+), 9 deletions(-) commit cdb1ee3f6c55b028cebc6af0280851bf89dbce2d Author: Vinod Koul Date: Fri Mar 4 23:59:29 2016 +0530 ALSA: compress: fix more typos More inspection of code revealed few more typos so fix them as well Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81925c5eaad1c9eb33f0a0458612dcdfd05379bb Author: Stephen Boyd Date: Tue Mar 1 10:59:57 2016 -0800 clk: qcom: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Signed-off-by: Stephen Boyd drivers/clk/qcom/common.c | 1 - drivers/clk/qcom/gcc-ipq806x.c | 37 ------------------------------------ drivers/clk/qcom/gcc-msm8660.c | 32 ------------------------------- drivers/clk/qcom/gcc-msm8960.c | 42 ----------------------------------------- drivers/clk/qcom/gcc-msm8974.c | 1 - drivers/clk/qcom/gcc-msm8996.c | 6 ++---- drivers/clk/qcom/mmcc-msm8960.c | 35 ---------------------------------- 7 files changed, 2 insertions(+), 152 deletions(-) commit 782fa5201a660874951a515190530c1b200ca904 Author: Joachim Eastwood Date: Thu Mar 3 22:47:05 2016 +0100 doc: dt: add documentation for lpc1850-creg-clk driver Add DT binding documentation for lpc1850-creg-clk driver. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/lpc1850-creg-clk.txt | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 378523d1500314637ae07bb604475a98f01bfa4c Author: Joachim Eastwood Date: Thu Mar 3 22:47:04 2016 +0100 clk: add lpc18xx creg clk driver The CREG block on lpc18xx contains configuration register for two low power clocks. Support enabling of these two clocks with a clk driver that access CREG trough the syscon regmap interface. These clocks are needed to support peripherals like the internal RTC on lpc18xx. Signed-off-by: Joachim Eastwood Signed-off-by: Stephen Boyd drivers/clk/nxp/Makefile | 1 + drivers/clk/nxp/clk-lpc18xx-creg.c | 226 +++++++++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) commit cd1480ae4dd0bbfd3d7339d00c3573e4c64ebbd5 Author: Jean Delvare Date: Fri Mar 4 11:41:43 2016 -0800 Input: ts4800 - add hardware dependency The Technologic Systems TS-4800 is an i.MX515 board, so its drivers are useless unless building a SOC_IMX51 kernel, except for build testing purposes. Signed-off-by: Jean Delvare Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 35b90a2939a563df4b1f57f18dd925d6aa7cb38a Author: Adam Buchbinder Date: Fri Mar 4 11:22:24 2016 -0800 tile: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Signed-off-by: Chris Metcalf [plus "uninitalization"] arch/tile/include/hv/drv_mpipe_intf.h | 26 +++++++++++++------------- arch/tile/kernel/kgdb.c | 8 ++++---- arch/tile/kernel/pci_gx.c | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) commit 52cdce8adb635746f53306ab2599ca64902bb1dc Merge: 3cd4786 7dde4e7 Author: Dmitry Torokhov Date: Fri Mar 4 11:32:40 2016 -0800 Merge branch 'rotary-encoder' into next Bring in updates to roraty encoder driver switching it away from legacy platform data and over to generic device properties and adding support for encoders using more than 2 GPIOs. commit 3cd47869431d7402d0613cf0f7fbb392f2b97565 Author: Dudley Du Date: Fri Mar 4 11:23:09 2016 -0800 Input: cyapa - fix for losing events during device power transitions When changing the scan rate as part of runtime-resume process we may lose some of the events, because: 1) for gen3 trackpads, the driver must msleep() some time to ensure that the device is ready to accept next command; 2) for gen5 and later trackpads, the queue dumping function will simply ignore the events when waiting for the set power mode command response. The solution is to keep polling and report those valid events when the set power mode command is in progress. Signed-off-by: Dudley Du Tested-by: Jeremiah Mahler Signed-off-by: Dmitry Torokhov drivers/input/mouse/cyapa.c | 22 ++++---- drivers/input/mouse/cyapa.h | 14 ++++- drivers/input/mouse/cyapa_gen3.c | 108 ++++++++++++++++++++++++++++----------- drivers/input/mouse/cyapa_gen5.c | 99 +++++++++++++++++++++++++++++------ drivers/input/mouse/cyapa_gen6.c | 4 +- 5 files changed, 188 insertions(+), 59 deletions(-) commit 5186b8c41a89fd071f8d036b41ec4b68fbcf2e4d Author: Simon Horman Date: Fri Mar 4 11:21:18 2016 -0800 Input: sh_keysc - remove dependency on SUPERH A dependency on ARCH_SHMOBILE seems to be the best option for sh_keysc: * For Super H based SoCs: sh_keysc is used on SH_MIGOR, SH_ECOVEC, SH_KFR2R09, SH_7722_SOLUTION_ENGINE, and SH_7724_SOLUTION_ENGINE, which depend on either CPU_SUBTYPE_SH7722 or CPU_SUBTYPE_SH7724, and both select ARCH_SHMOBILE. * For ARM Based SoCs: Since the removal of legacy (non-multiplatform) support this driver has not been used by any Renesas ARM based SoCs. The Renesas ARM based SoCs currently select ARCH_SHMOBILE, however, it is planned that this will no longer be the case. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a3ed686f9f16d10202eefd00afbd607782da2e4 Author: Sangwon Jee Date: Fri Mar 4 11:13:37 2016 -0800 Input: melfas_mip4 - add resolution reporting Add support for retrieving device resolution (pixels per mm) from firmware and using it when setting up input device. Signed-off-by: Sangwon Jee Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 2fc94b5f229a5d9d1db7fd91d0a4808cfeb915f5 Author: Fu Wei Date: Mon Feb 29 16:46:47 2016 +0800 Documentation: add sbsa-gwdt driver documentation The sbsa-gwdt.txt documentation in devicetree/bindings/watchdog is for introducing SBSA(Server Base System Architecture) Generic Watchdog device node info into FDT. Also add sbsa-gwdt introduction in watchdog-parameters.txt Acked-by: Arnd Bergmann Acked-by: Rob Herring Signed-off-by: Fu Wei Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/sbsa-gwdt.txt | 31 ++++++++++++++++++++++ Documentation/watchdog/watchdog-parameters.txt | 7 +++++ 2 files changed, 38 insertions(+) commit 9b2f8f616a8d992243be31ff47d3f64031bf168a Author: Simon Horman Date: Fri Mar 4 15:58:07 2016 +0900 nfp: remove Rolf Neugebauer as co-maintainer Rolf is no longer in his previous role at Netronome and as far as I know no longer working on the NFP driver. Thus it does not seem appropriate for him to be a co-maintainer anymore. Reviewed-by: Dinan Gunawardena Signed-off-by: Simon Horman Signed-off-by: David S. Miller MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit ef769e320863a186e489e3f66ed8df60487fe9bf Author: Adam Buchbinder Date: Wed Feb 24 09:52:41 2016 -0800 arm64: Fix misspellings in comments. Signed-off-by: Adam Buchbinder Signed-off-by: Catalin Marinas arch/arm64/boot/dts/nvidia/tegra132.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 +- arch/arm64/include/asm/ftrace.h | 2 +- arch/arm64/include/asm/kvm_arm.h | 2 +- arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/kernel/kgdb.c | 4 ++-- arch/arm64/kernel/signal32.c | 2 +- arch/arm64/lib/memcmp.S | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) commit cd1b76bb73d0f735cc9aa076c121fd172752445b Author: Ard Biesheuvel Date: Thu Mar 3 17:31:32 2016 +0100 arm64: efi: add missing frame pointer assignment The prologue of the EFI entry point pushes x29 and x30 onto the stack but fails to create the stack frame correctly by omitting the assignment of x29 to the new value of the stack pointer. So fix that. Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-entry.S | 1 + 1 file changed, 1 insertion(+) commit 37655fae0c579315624189a7708d0b688d473876 Merge: 8626556 7af8a26 Author: Stephen Boyd Date: Fri Mar 4 09:36:29 2016 -0800 Merge tag 'v4.6-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull second batch of rockchip clk updates from Heiko Stuebner: Inclusion of the rk3368 fractional dividers into our handling scheme, fixes for missing error-handling in mmc-phase, inverters and cpu-clocks and some more clock-ids. * tag 'v4.6-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: include downstream muxes into fractional dividers on rk3368 clk: rockchip: set the clock ids for RK3228 HDMI clk: rockchip: set the clock ids for RK3228 VOP clk: rockchip: add the tsadc clocks found on rk3228 SoCs clk: rockchip: add the new clock ids for RK3228 HDMI clk: rockchip: add the new clock ids for RK3228 VOP clk: rockchip: add id of the tsadc clock found on rk3228 SoCs clk: rockchip: fix coding style for clk-cpu.c clk: rockchip: don't return NULL when registering mmc branch fails clk: rockchip: don't return NULL when registering inverter fails clk: rockchip: check grf when waiting pll lock clk: rockchip: disable alt_parent clk in err cases when registering cpuclk commit 8e0b60b96ba06d826a2b26e23b1986853a4e5291 Author: Christoph Hellwig Date: Thu Mar 3 16:04:03 2016 +0100 blk-mq: enable polling support by default Now that applications need to explicitly ask for polling we can enable it by default in blk-mq drivers. Note that this will only have an affect on driver that supply a poll function, which currently only includes nvme. Signed-off-by: Christoph Hellwig Reviewed-by: Stephen Bates Tested-by: Stephen Bates Reviewed-by: Jeff Moyer Signed-off-by: Al Viro include/linux/blkdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c43c83a294e8dc25072ca9e6fca4cdbc5564f3d4 Author: Christoph Hellwig Date: Thu Mar 3 16:04:02 2016 +0100 direct-io: only use block polling if explicitly requested Signed-off-by: Christoph Hellwig Reviewed-by: Stephen Bates Tested-by: Stephen Bates Acked-by: Jeff Moyer Signed-off-by: Al Viro fs/direct-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 97be7ebe53915af504fb491fb99f064c7cf3cb09 Author: Christoph Hellwig Date: Thu Mar 3 16:04:01 2016 +0100 vfs: add the RWF_HIPRI flag for preadv2/pwritev2 This adds a flag that tells the file system that this is a high priority request for which it's worth to poll the hardware. The flag is purely advisory and can be ignored if not supported. Signed-off-by: Christoph Hellwig Reviewed-by: Stephen Bates Tested-by: Stephen Bates Acked-by: Jeff Moyer Signed-off-by: Al Viro fs/read_write.c | 6 ++++-- include/linux/fs.h | 1 + include/uapi/linux/fs.h | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) commit 4babf2c5efb79be778d45ebe95d9c9b3c880c83b Author: Christoph Hellwig Date: Thu Mar 3 16:04:00 2016 +0100 x86: wire up preadv2 and pwritev2 Signed-off-by: Milosz Tanski [hch: rebased due to newly added syscalls] Reviewed-by: Stephen Bates Tested-by: Stephen Bates Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro arch/x86/entry/syscalls/syscall_32.tbl | 2 ++ arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 4 insertions(+) commit f17d8b35452cab31a70d224964cd583fb2845449 Author: Milosz Tanski Date: Thu Mar 3 16:03:59 2016 +0100 vfs: vfs: Define new syscalls preadv2,pwritev2 New syscalls that take an flag argument. No flags are added yet in this patch. Signed-off-by: Milosz Tanski [hch: rebased on top of my kiocb changes] Signed-off-by: Christoph Hellwig Reviewed-by: Stephen Bates Tested-by: Stephen Bates Acked-by: Jeff Moyer Signed-off-by: Al Viro fs/read_write.c | 161 ++++++++++++++++++++++++++++++++++++----------- include/linux/compat.h | 6 ++ include/linux/syscalls.h | 6 ++ 3 files changed, 138 insertions(+), 35 deletions(-) commit 793b80ef14af56d20c998265287648ad34239b6f Author: Christoph Hellwig Date: Thu Mar 3 16:03:58 2016 +0100 vfs: pass a flags argument to vfs_readv/vfs_writev This way we can set kiocb flags also from the sync read/write path for the read_iter/write_iter operations. For now there is no way to pass flags to plain read/write operations as there is no real need for that, and all flags passed are explicitly rejected for these files. Signed-off-by: Milosz Tanski [hch: rebased on top of my kiocb changes] Signed-off-by: Christoph Hellwig Reviewed-by: Stephen Bates Tested-by: Stephen Bates Acked-by: Jeff Moyer Signed-off-by: Al Viro fs/nfsd/vfs.c | 4 ++-- fs/read_write.c | 44 ++++++++++++++++++++++++++------------------ fs/splice.c | 2 +- include/linux/fs.h | 4 ++-- 4 files changed, 31 insertions(+), 23 deletions(-) commit b282e969b19997c8ff03f8ef9a6e765e7199093a Author: Carlos Palminha Date: Tue Feb 16 14:20:14 2016 +0000 drm/ast: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/0f8f948babd93fce8523253b0f525446e2f565db.1455630967.git.palminha@synopsys.com drivers/gpu/drm/ast/ast_mode.c | 8 -------- 1 file changed, 8 deletions(-) commit 7e1f9e890317ed91c860889d7a3668ba5ef37e64 Author: Carlos Palminha Date: Tue Feb 16 14:20:02 2016 +0000 drm/bochs: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/40a78cafba2cd5b391d244e806613192b3a31413.1455630967.git.palminha@synopsys.com drivers/gpu/drm/bochs/bochs_kms.c | 8 -------- 1 file changed, 8 deletions(-) commit de3aa0aae639560dfe394aecdcb1f10c79c96b7a Author: Carlos Palminha Date: Tue Feb 16 14:19:46 2016 +0000 drm/fsl-dcu: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/a9827a57b25509dae29c0e8d09a9063a11970647.1455630967.git.palminha@synopsys.com drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 8 -------- 1 file changed, 8 deletions(-) commit f40f917a87daf13c7b494910c0af4c686b0a65eb Author: Carlos Palminha Date: Tue Feb 16 14:19:32 2016 +0000 drm/virtio: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/ae865f0deca4e64a0f47f2d2d14b54ff00c0672e.1455630967.git.palminha@synopsys.com drivers/gpu/drm/virtio/virtgpu_display.c | 8 -------- 1 file changed, 8 deletions(-) commit c57d860f4c863cc7b3e62e21adf17f2c7055a767 Author: Carlos Palminha Date: Tue Feb 16 14:19:19 2016 +0000 drm/nouveau/dispnv04: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/897eae438eec566078b1872d7654c4863e4e4e57.1455630967.git.palminha@synopsys.com drivers/gpu/drm/nouveau/dispnv04/crtc.c | 8 -------- 1 file changed, 8 deletions(-) commit 074b962428d4280176dfd7c3a957b94a08b092af Author: Carlos Palminha Date: Tue Feb 16 14:19:06 2016 +0000 drm/atmel-hlcdc: remove optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Acked-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/e4bdb8552c245f8b73084b93da60460a00f7798c.1455630967.git.palminha@synopsys.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 9 --------- 1 file changed, 9 deletions(-) commit 8a2fa38fddd33a5a22a430545720f7f81d88e8db Author: Carlos Palminha Date: Tue Feb 16 14:18:53 2016 +0000 drm/sti: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/08d27e27582fb2daa48555ab542245c6cf0a2268.1455630967.git.palminha@synopsys.com drivers/gpu/drm/sti/sti_crtc.c | 9 --------- 1 file changed, 9 deletions(-) commit 4676be11e0b83376f2e3f4799479176a876c569e Author: Carlos Palminha Date: Tue Feb 16 14:18:40 2016 +0000 drm/shmobile: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 -------- 1 file changed, 8 deletions(-) commit 318d311e8f016dbbf22160d7b1c19a290a95ad9d Author: Sagi Grimberg Date: Mon Feb 29 19:07:34 2016 +0200 iser: Accept arbitrary sg lists mapping if the device supports it If the device support arbitrary sg list mapping (device cap IB_DEVICE_SG_GAPS_REG set) we allocate the memory regions with IB_MR_TYPE_SG_GAPS and allow the block layer to pass us gaps by skip setting the queue virt_boundary. Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iscsi_iser.c | 11 ++++++++++- drivers/infiniband/ulp/iser/iser_verbs.c | 23 +++++++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) commit b005d316471374b1ff26df8c8460cc1ea9186647 Author: Sagi Grimberg Date: Mon Feb 29 19:07:33 2016 +0200 mlx5: Add arbitrary sg list support Allocate proper context for arbitrary scatterlist registration If ib_alloc_mr is called with IB_MR_MAP_ARB_SG, the driver allocate a private klm list instead of a private page list. Set the UMR wqe correctly when posting the fast registration. Also, expose device cap IB_DEVICE_MAP_ARB_SG according to the device id (until we have a FW bit that correctly exposes it). Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 ++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 50 +++++++++++++++++++++++++++++++----- drivers/infiniband/hw/mlx5/qp.c | 15 +++++++++-- 4 files changed, 60 insertions(+), 8 deletions(-) commit f5aa9159a418726d74b67c8815ffd2739afb4c7a Author: Sagi Grimberg Date: Mon Feb 29 19:07:32 2016 +0200 IB/core: Add arbitrary sg_list support Devices that are capable in registering SG lists with gaps can now expose it in the core to ULPs using a new device capability IB_DEVICE_SG_GAPS_REG (in a new field device_cap_flags_ex in the device attributes as we ran out of bits), and a new mr_type IB_MR_TYPE_SG_GAPS_REG which allocates a memory region which is capable of handling SG lists with gaps. Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 2 ++ include/rdma/ib_verbs.h | 6 ++++++ 2 files changed, 8 insertions(+) commit 911f4331bc87f4589b9096f4fb24b335d4c2967d Author: Sagi Grimberg Date: Thu Mar 3 13:37:51 2016 +0200 IB/mlx5: Expose correct max_fast_reg_page_list_len While documentation indicates that the number of translation entries per memory key is unlimited, in practice, we can only fit a finite amount of translation entries in a single registration wqe (which is log_max_klm_list_size). Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0025b0bdeae7c13b8ab1dce64b0108ed9c071e2e Author: Doug Ledford Date: Thu Mar 3 11:23:37 2016 -0500 IB/mlx5: Make coding style more consistent These three related functions can't agree whether to put the umrwr on the stack dirty and then memset it, or to initialize it on the stack. Make them all agree. Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b205b8ebc56cdee75239399cd4dd880d6919c35b Author: Carlos Palminha Date: Tue Feb 16 14:18:26 2016 +0000 drm/msm/mdp: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 8 -------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 -------- 2 files changed, 16 deletions(-) commit 4091e54e846c4813ef93f2471a0f358d07ca9510 Author: Carlos Palminha Date: Tue Feb 16 14:18:12 2016 +0000 drm/omapdrm: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/101f043d5fa747291c09ae765bac4d55c6e39988.1455630967.git.palminha@synopsys.com drivers/gpu/drm/omapdrm/omap_crtc.c | 8 -------- 1 file changed, 8 deletions(-) commit 1ed3b5730afc7d59bb7594a8e218af4534419939 Author: Carlos Palminha Date: Tue Feb 16 14:18:00 2016 +0000 drm/rcar-du: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/becab4ff666eca77162e5cd978087f2d3fb3e308.1455630967.git.palminha@synopsys.com drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 9 --------- 1 file changed, 9 deletions(-) commit add08d765e942eab8eb15a592baeb372a3dd6831 Author: Christoph Hellwig Date: Thu Mar 3 09:38:22 2016 +0100 IB/mlx5: Convert UMR CQ to new CQ API Simplifies the code, and makes it more fair vs other users by using a softirq for polling. Signed-off-by: Christoph Hellwig Reviewed-by: Haggai Eran Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 10 +++----- drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 +----- drivers/infiniband/hw/mlx5/mr.c | 49 +++++++++++++++++------------------- 3 files changed, 27 insertions(+), 40 deletions(-) commit afe7ef916652ec34fb35a038f6faeafef98c988a Author: Carlos Palminha Date: Tue Feb 16 14:17:45 2016 +0000 drm/gma: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter drivers/gpu/drm/gma500/cdv_intel_display.c | 13 ++++++------- drivers/gpu/drm/gma500/gma_display.c | 7 ------- drivers/gpu/drm/gma500/gma_display.h | 3 --- drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 -- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 - drivers/gpu/drm/gma500/psb_intel_display.c | 1 - 6 files changed, 6 insertions(+), 21 deletions(-) commit 1323963f96d30e15fa6972511048fe90bc15c958 Author: Carlos Palminha Date: Tue Feb 16 14:17:33 2016 +0000 drm/udl: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/11327d1a3c3b6623064f6d82efa96e7993f77f38.1455630967.git.palminha@synopsys.com drivers/gpu/drm/udl/udl_modeset.c | 9 --------- 1 file changed, 9 deletions(-) commit 2a1dc26bdb68b0694409fbf375612a43dd255074 Author: Carlos Palminha Date: Tue Feb 16 14:17:20 2016 +0000 drm/mgag200: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/3d089c84bcb1aafd485d4944ad472f9843c38eaf.1455630967.git.palminha@synopsys.com drivers/gpu/drm/mgag200/mgag200_mode.c | 13 ------------- 1 file changed, 13 deletions(-) commit 3382553d504c322d10b791d6a964413b215cccfc Author: Carlos Palminha Date: Tue Feb 16 14:16:51 2016 +0000 drm/cirrus: removed optional dummy crtc mode_fixup function. This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/5a3c41fed15847549f9bdeae89b72705b4756cc4.1455630967.git.palminha@synopsys.com drivers/gpu/drm/cirrus/cirrus_mode.c | 13 ------------- 1 file changed, 13 deletions(-) commit 41eb94fd26f6c150b0460e01ecc84d643355f9b6 Author: Vinod Koul Date: Fri Mar 4 20:25:30 2016 +0530 ALSA: compress: fix some typos Found few typos while looking at code, so fix them Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 862bca5d16c631d0a5d39a6f24857a5148970afb Author: Vinod Koul Date: Fri Mar 4 20:25:29 2016 +0530 ALSA: compress: Add SNDRV_PCM_STATE_PREPARED state explanation Stream states were explained in the code comments but SNDRV_PCM_STATE_PREPARED was missed so add it Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 3 +++ 1 file changed, 3 insertions(+) commit 9459545b9c966bd221e6e3129b635a4b0a9cf6c2 Author: Maarten Lankhorst Date: Wed Feb 24 09:37:29 2016 +0100 drm/atomic: Pass connector and state to update_connector_routing. Minor cleanup, connector and connector_state are always non-NULL here. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456303053-28806-3-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 6ab520a2a105abbd275c4814ac0d61d36b1db4fe Author: Maarten Lankhorst Date: Wed Feb 24 09:37:28 2016 +0100 drm/atomic: Clean up update_output_state. With the addition of crtc_state->connector_mask other connectors from different crtc's aren't needed any more to determine if a crtc has connectors, so only call add_affected_connectors on the target crtc. This allows a cleanup to first remove all current connectors, then add all set->connectors to the target crtc. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1456303053-28806-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 41 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 24 deletions(-) commit 8c34d8d9bec0b2a38e8beab46a643e9b323c8310 Author: Chris Metcalf Date: Fri Mar 4 11:12:28 2016 -0500 MAINTAINERS: update web link for tile architecture We have integrated the tile open-source overview information into the Mellanox web server, so update the tile architecture pointer. Signed-off-by: Chris Metcalf MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4373a489e87e2bf8794194bc275b6c05f1af2f7 Author: David Howells Date: Fri Mar 4 16:02:03 2016 +0000 rxrpc: Don't try to map ICMP to error as the lower layer already did that In the ICMP message processing code, don't try to map ICMP codes to UNIX error codes as the caller (IPv4/IPv6) already did that for us (ee_errno). Signed-off-by: David Howells net/rxrpc/ar-error.c | 10 ---------- 1 file changed, 10 deletions(-) commit ab802ee0ab5f4e1e7ee17632627726fbd7881e6c Author: David Howells Date: Fri Mar 4 15:59:49 2016 +0000 rxrpc: Clear the unused part of a sockaddr_rxrpc for memcmp() use Clear the unused part of a sockaddr_rxrpc structs so that memcmp() can be used to compare them. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2b15ef15bca689d60be27f6ffdaa2c92a59ae6e7 Author: David Howells Date: Fri Mar 4 15:59:13 2016 +0000 rxrpc: rxkad: Casts are needed when comparing be32 values Forced casts are needed to avoid sparse warning when directly comparing be32 values. Signed-off-by: David Howells net/rxrpc/rxkad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 098a20991d15b76a7e6835b95bd58269e10e3a60 Author: David Howells Date: Fri Mar 4 15:59:00 2016 +0000 rxrpc: rxkad: The version number in the response should be net byte order The version number rxkad places in the response should be network byte order. Whilst we're at it, rearrange the code to be more readable. Signed-off-by: David Howells net/rxrpc/rxkad.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ee72b9fddb41a2087b4a7aa74791ef1700f3f6cc Author: David Howells Date: Fri Mar 4 15:58:06 2016 +0000 rxrpc: Use ACCESS_ONCE() when accessing circular buffer pointers Use ACCESS_ONCE() when accessing the other-end pointer into a circular buffer as it's possible the other-end pointer might change whilst we're doing this, and if we access it twice, we might get some weird things happening. Signed-off-by: David Howells net/rxrpc/ar-output.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b4f1342f915201ee15ef6890857b5469879ee402 Author: David Howells Date: Fri Mar 4 15:56:19 2016 +0000 rxrpc: Adjust some whitespace and comments Remove some excess whitespace, insert some missing spaces and adjust a couple of comments. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 9 +++------ net/rxrpc/ar-accept.c | 4 +--- net/rxrpc/ar-error.c | 1 - net/rxrpc/ar-internal.h | 22 +++++++++++----------- net/rxrpc/ar-security.c | 2 +- net/rxrpc/ar-skbuff.c | 1 - net/rxrpc/rxkad.c | 12 ++++++------ 7 files changed, 22 insertions(+), 29 deletions(-) commit 351c1e648623b742fe1687636117306adc8b561c Author: David Howells Date: Fri Mar 4 15:56:06 2016 +0000 rxrpc: Be more selective about the types of received packets we accept Currently, received RxRPC packets outside the range 1-13 are rejected. There are, however, holes in the range that should also be rejected - plus at least one type we don't yet support - so reject these also. Signed-off-by: David Howells include/rxrpc/packet.h | 11 +++++++++++ net/rxrpc/ar-input.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) commit ee6fe085a992d40d2b5d3e7e2b9e0eec1cdacaac Author: David Howells Date: Fri Mar 4 15:55:32 2016 +0000 rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtu The upper bound of the defined range for rx_mtu is being set in the same member as the lower bound (extra1) rather than the correct place (extra2). I'm not entirely sure why this compiles. Signed-off-by: David Howells net/rxrpc/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e33b3d97bc443aa330f086ca90a209a0d35dfa86 Author: David Howells Date: Fri Mar 4 15:54:27 2016 +0000 rxrpc: The protocol family should be set to PF_RXRPC not PF_UNIX Fix the protocol family set in the proto_ops for rxrpc to be PF_RXRPC not PF_UNIX. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d12f8a4027d021c9cc942f09f38d28288020c5d Author: David Howells Date: Fri Mar 4 15:53:46 2016 +0000 rxrpc: Keep the skb private record of the Rx header in host byte order Currently, a copy of the Rx packet header is copied into the the sk_buff private data so that we can advance the pointer into the buffer, potentially discarding the original. At the moment, this copy is held in network byte order, but this means we're doing a lot of unnecessary translations. The reasons it was done this way are that we need the values in network byte order occasionally and we can use the copy, slightly modified, as part of an iov array when sending an ack or an abort packet. However, it seems more reasonable on review that it would be better kept in host byte order and that we make up a new header when we want to send another packet. To this end, rename the original header struct to rxrpc_wire_header (with BE fields) and institute a variant called rxrpc_host_header that has host order fields. Change the struct in the sk_buff private data into an rxrpc_host_header and translate the values when filling it in. This further allows us to keep values kept in various structures in host byte order rather than network byte order and allows removal of some fields that are byteswapped duplicates. Signed-off-by: David Howells include/rxrpc/packet.h | 4 +- net/rxrpc/af_rxrpc.c | 20 +++---- net/rxrpc/ar-accept.c | 40 ++++++++------ net/rxrpc/ar-ack.c | 108 +++++++++++++++++------------------- net/rxrpc/ar-call.c | 68 +++++++++++------------ net/rxrpc/ar-connection.c | 83 ++++++++++++++-------------- net/rxrpc/ar-connevent.c | 73 ++++++++++++------------ net/rxrpc/ar-input.c | 95 +++++++++++++++++-------------- net/rxrpc/ar-internal.h | 65 +++++++++++++--------- net/rxrpc/ar-local.c | 29 ++++++---- net/rxrpc/ar-output.c | 54 ++++++++++++------ net/rxrpc/ar-peer.c | 2 +- net/rxrpc/ar-proc.c | 10 ++-- net/rxrpc/ar-recvmsg.c | 18 +++--- net/rxrpc/ar-security.c | 4 +- net/rxrpc/ar-skbuff.c | 4 +- net/rxrpc/ar-transport.c | 1 + net/rxrpc/rxkad.c | 138 +++++++++++++++++++++++----------------------- 18 files changed, 432 insertions(+), 384 deletions(-) commit 4c198ad17a7253cc8ef3ff39bfe73d6b5e65ceef Author: David Howells Date: Fri Mar 4 15:53:46 2016 +0000 rxrpc: Rename call events to begin RXRPC_CALL_EV_ Rename call event names to begin RXRPC_CALL_EV_ to distinguish them from the flags. Signed-off-by: David Howells net/rxrpc/ar-accept.c | 10 ++--- net/rxrpc/ar-ack.c | 102 +++++++++++++++++++++++------------------------ net/rxrpc/ar-call.c | 14 +++---- net/rxrpc/ar-connevent.c | 6 +-- net/rxrpc/ar-error.c | 2 +- net/rxrpc/ar-input.c | 20 +++++----- net/rxrpc/ar-internal.h | 36 ++++++++--------- net/rxrpc/ar-output.c | 8 ++-- net/rxrpc/ar-recvmsg.c | 2 +- net/rxrpc/ar-skbuff.c | 2 +- 10 files changed, 101 insertions(+), 101 deletions(-) commit 5b8848d14912d5e9974d5d83d71ed6cba2b49345 Author: David Howells Date: Fri Mar 4 15:53:46 2016 +0000 rxrpc: Convert call flag and event numbers into enums Convert call flag and event numbers into enums and move their definitions outside of the struct. Also move the call state enum outside of the struct and add an extra element to count the number of states. Signed-off-by: David Howells net/rxrpc/ar-ack.c | 3 +- net/rxrpc/ar-call.c | 2 +- net/rxrpc/ar-internal.h | 107 ++++++++++++++++++++++++++++-------------------- 3 files changed, 65 insertions(+), 47 deletions(-) commit e721498a63147618283d2a8093664809f300778c Author: David Howells Date: Fri Mar 4 15:53:46 2016 +0000 rxrpc: Fix a case where a call event bit is being used as a flag bit Fix a case where RXRPC_CALL_RELEASE (an event) is being used to specify a flag bit. RXRPC_CALL_RELEASED should be used instead. Signed-off-by: David Howells net/rxrpc/ar-accept.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90beb2e7a0c5143a904be04c9c03afff436e7915 Author: Jens Axboe Date: Fri Mar 4 08:15:48 2016 -0700 mtip32xx: remove unneeded variable in mtip_cmd_timeout() We always return BLK_EH_RESET_TIMER, so no point in storing that in an integer. Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 242637bac7cd6e9e112d4d119e1ee19eafec3f2a Author: Laxman Dewangan Date: Fri Mar 4 15:55:11 2016 +0530 dmaengine: tegra: Move of_device_id table near to its user After using the function of_device_get_match_data(), the of_device_id table for tegra20 dma is not used by probe() and hence moving it near to place where platform driver is defined as this table used only on this data structure. Signed-off-by: Laxman Dewangan Signed-off-by: Vinod Koul drivers/dma/tegra20-apb-dma.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 694906348d0c3a0975a0d75f14ceb3239cfeb4e0 Author: Kedareswara rao Appana Date: Thu Mar 3 23:02:42 2016 +0530 dmaengine: xilinx_vdma: Remove unnecessary variable initializations This patch removes the unnecessary variable initializations in the driver. Signed-off-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6ff1cb88a7253ee33116626537a231da528bc57c Author: Arnd Bergmann Date: Wed Mar 2 16:58:58 2016 +0100 dmaengine: sirf: use __maybe_unused to hide pm functions The sirf dma driver uses #ifdef to check for CONFIG_PM_SLEEP for its suspend/resume code but then has no #ifdef for the respective runtime PM code, so we get a warning if CONFIG_PM is disabled altogether: drivers/dma/sirf-dma.c:1000:12: error: 'sirfsoc_dma_runtime_resume' defined but not used [-Werror=unused-function] This removes the existing #ifdef and instead uses __maybe_unused annotations for all four functions to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/sirf-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 1cc6ed90dd7313055dec0174e2cda745ebadd6b0 Author: Mark Rutland Date: Fri Mar 4 12:54:05 2016 +0000 arm64: make mrs_s prefixing implicit in read_cpuid Commit 0f54b14e76f5302a ("arm64: cpufeature: Change read_cpuid() to use sysreg's mrs_s macro") changed read_cpuid to require a SYS_ prefix on register names, to allow manual assembly of registers unknown by the toolchain, using tables in sysreg.h. This interacts poorly with commit 42b55734030c1f72 ("efi/arm64: Check for h/w support before booting a >4 KB granular kernel"), which is curretly queued via the tip tree, and uses read_cpuid without a SYS_ prefix. Due to this, a build of next-20160304 fails if EFI and 64K pages are selected. To avoid this issue when trees are merged, move the required SYS_ prefixing into read_cpuid, and revert all of the updated callsites to pass plain register names. This effectively reverts the bulk of commit 0f54b14e76f5302a. Signed-off-by: Mark Rutland Cc: James Morse Signed-off-by: Catalin Marinas arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/cputype.h | 8 ++--- arch/arm64/kernel/cpufeature.c | 60 ++++++++++++++++++------------------- arch/arm64/kernel/cpuinfo.c | 56 +++++++++++++++++----------------- arch/arm64/mm/context.c | 2 +- 5 files changed, 64 insertions(+), 64 deletions(-) commit 35383a24129a47a0b8365ed17d3dcd2f75175929 Author: Eric Laurent Date: Wed Mar 2 09:54:57 2016 -0800 ALSA: compress: allow writes in SNDRV_PCM_STATE_PREPARED state Allow writes in SNDRV_PCM_STATE_PREPARED state so that more than one buffer fragment can be written from user space before calling SNDRV_COMPRESS_START. Signed-off-by: Eric Laurent Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 1 + 1 file changed, 1 insertion(+) commit 0561f77e2db9e72dc32e4f82b56fca8ba6b31171 Author: Krzysztof Opasiak Date: Tue Mar 1 12:47:11 2016 +0100 usb: gadget: f_acm: Fix configfs attr name Correct attribute name is port_num not num. Fixes: ea6bd6b ("usb-gadget/f_acm: use per-attribute show and store methods") Reviewed-by: Christoph Hellwig Signed-off-by: Krzysztof Opasiak Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_acm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59e052727e8fc197f344d4d5ec10814247049972 Author: Vladimir Zapolskiy Date: Thu Mar 3 06:52:59 2016 +0200 usb: udc: lpc32xx: remove USB PLL and USB OTG clock management LPC32xx common clock framework driver correctly manages parent clocks of USB device clock, so there is no need to manually enable and disable them from the driver, which now depends only on a single USB device clock. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/lpc32xx_udc.c | 64 +++--------------------------------- 1 file changed, 5 insertions(+), 59 deletions(-) commit c9083dd34a9f0b39ee343d6f3d115b42e2034bfe Author: Vladimir Zapolskiy Date: Thu Mar 3 06:52:58 2016 +0200 usb: udc: lpc32xx: remove direct access to clock controller registers Direct access to clock control registers can be safely removed, the task of clock management is done by platform clock driver based on common clock framework. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/lpc32xx_udc.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 68726e772d3d2a65a4ea593a6cbde21a9700985a Author: Vladimir Zapolskiy Date: Thu Mar 3 06:52:57 2016 +0200 usb: udc: lpc32xx: switch to clock prepare/unprepare model The driver requires to prepare/unprepare clocks to work properly on a platform with enabled common clock framework, otherwise unprepared clocks are not enabled: WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:728 clk_core_enable+0x2c/0xf0() Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.0-rc2+ #284 Hardware name: LPC32XX SoC (Flattened Device Tree) Backtrace: [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c) [<>] (show_stack) from [<>] (dump_stack+0x20/0x28) [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8) [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c) [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xf0) [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38) [<>] (clk_enable) from [<>] (lpc32xx_udc_probe+0x284/0x924) [<>] (lpc32xx_udc_probe) from [<>] (platform_drv_probe+0x50/0xa0) [<>] (platform_drv_probe) from [<>] (driver_probe_device+0x18c/0x408) [<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94) [<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98) [<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28) [<>] (driver_attach) from [<>] (bus_add_driver+0x11c/0x248) [<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8) [<>] (driver_register) from [<>] (__platform_driver_register+0x50/0x64) [<>] (__platform_driver_register) from [<>] (__platform_driver_probe+0x54/0x100) [<>] (__platform_driver_probe) from [<>] (lpc32xx_udc_driver_init+0x1c/0x28) [<>] (lpc32xx_udc_driver_init) from [<>] (do_one_initcall+0x11c/0x1dc) [<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4) [<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec) [<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24) Signed-off-by: Vladimir Zapolskiy Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/lpc32xx_udc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 11ebf3ad3b871d262491790e3b273e963d4c3c28 Author: Yoshihiro Shimoda Date: Thu Mar 3 18:35:51 2016 +0900 usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() A udc driver should set the giveback status to -ESHUTDOWN in usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might request next data wrongly and it is possible to cause kernel panic. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/mod_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd9fee67985882fd05fcf252fb4500265cb3fdcb Author: Simon Horman Date: Wed Mar 2 11:17:17 2016 +0900 usb: gadget: renesas_usb3: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Acked-by: Geert Uytterhoeven Acked-by: Yoshihiro Shimoda Signed-off-by: Simon Horman Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fc659894994c7faa67e51a4b5a981ab4cf0f3a5 Author: John Youn Date: Mon Feb 29 17:53:35 2016 -0800 usb: dwc2: Fix issues in dwc2_complete_non_isoc_xfer_ddma() Fixes a static analysis issue in dwc2_complete_non_isoc_xfer_ddma(). The qtd was being passed to a function after being freed. It was not being used in the function so this doesn't fix any bugs. But it fixes up the warning and makes the code safer by setting qtd to NULL and not using it at all. Reported-by: Felipe Balbi Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_ddma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Author: Antti Seppälä Date: Sat Feb 27 12:31:24 2016 +0200 usb: dwc2: Add support for Lantiq ARX and XRX SoCs Add support for Lantiq ARX and XRX SoC families to the dwc2 driver. Acked-by: John Youn Signed-off-by: Antti Seppälä Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ drivers/usb/dwc2/platform.c | 34 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 2eafe93b92921308b624466b4c8a99bd1ace6e4f Author: Maarten ter Huurne Date: Sun Feb 28 16:34:16 2016 +0100 usb: phy: generic: Handle late registration of gadget It is possible for the VBUS detect GPIO interrupt to occur before nop_set_peripheral() is called, in which case otg->gadget is NULL. Signed-off-by: Maarten ter Huurne Signed-off-by: Felipe Balbi drivers/usb/phy/phy-generic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit cff5638ef7852196879f9687e70d49ea291bbb33 Author: Alexey Khoroshilov Date: Sat Feb 27 01:33:14 2016 +0300 usb: gadget: bdc_udc: fix race condition in bdc_udc_exit() bdc_ep_disable() expects to be called with bdc->lock held. The assumption is met in all the cases except for call from bdc_udc_exit(), that is called from bdc_remove(). As a result a race can happen or unheld bdc->lock can be unlocked in bdc_req_complete(). The patch proposes to acquire-release bdc->lock around bdc_ep_disable() in bdc_udc_exit(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/bdc/bdc_udc.c | 5 +++++ 1 file changed, 5 insertions(+) commit ead22caf8507c0533aab6b89e26776414b477b6f Author: Petr Kulhavy Date: Wed Feb 24 16:27:16 2016 +0100 usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config The musb_hdrc_platform_data::config was defined as a non-const pointer. However some drivers (e.g. the ux500) set up this pointer to point to a static structure, which is potentially dangerous. Since the musb core uses the pointer in a read-only manner the const qualifier was added to protect the content of the config. Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu Signed-off-by: Felipe Balbi drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b02038faa7f1b228983d05633c8345f826b20042 Author: John Youn Date: Tue Feb 23 19:55:00 2016 -0800 usb: dwc2: Move host-specific core functions into hcd.c Move host core initialization and host channel routines into hcd.c. This allows these functions to only be compiled in host-enabled driver configurations (DRD or host-only). Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 1776 -------------------------------------------- drivers/usb/dwc2/core.h | 24 - drivers/usb/dwc2/hcd.c | 1893 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/usb/dwc2/hcd.h | 8 + 4 files changed, 1853 insertions(+), 1848 deletions(-) commit 58e52ff6a6c3ce964c71b2dd9f06be426f993524 Author: John Youn Date: Tue Feb 23 19:54:57 2016 -0800 usb: dwc2: Move register save and restore functions Move the register save and restore functions into the host and gadget specific files. Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 183 ---------------------------------------------- drivers/usb/dwc2/core.h | 13 ++++ drivers/usb/dwc2/gadget.c | 102 ++++++++++++++++++++++++++ drivers/usb/dwc2/hcd.c | 64 ++++++++++++++++ 4 files changed, 179 insertions(+), 183 deletions(-) commit 9bbe91a1ea4cae20ff9f8f175c92e1e49b4296d9 Author: Amitoj Kaur Chawla Date: Mon Feb 22 13:40:32 2016 +0530 usb: dwc2: Use kmem_cache_free() Here, free memory is allocated using kmem_cache_zalloc. So, use kmem_cache_free instead of kfree. This is done using Coccinelle and semantic patch used is as follows: // @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...) ... when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) // Acked-by: John Youn Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_ddma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1479cb698ac07d5dc4cc2b7de3588d38484267e9 Author: Douglas Anderson Date: Thu Jan 28 18:20:13 2016 -0800 usb: dwc2: host: If using uframe scheduler, end splits better The microframe scheduler figured out exactly how many transfers we need for a split transaction. Let's use this knowledge to know when to end things. Without this I found that certain devices would just keep responding with tons of NYET resonses on their INT_IN endpoint. These would just keep going and going and eventually we'd decide to terminate the transfer (because the whole frame changed), but by that time the scheduler would decide that we "missed" the start of the next transfer. I can also imagine that if we blow past the end of our scheduled time we may mess up other things that were scheduled to happen. No known test cases are improved by this patch except that the scheduler code doesn't yell about MISSES constantly anymore. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_intr.c | 48 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) commit 9f9f09b048f5fdfded26149defd61b737b314ba0 Author: Douglas Anderson Date: Thu Jan 28 18:20:12 2016 -0800 usb: dwc2: host: Totally redo the microframe scheduler This totally reimplements the microframe scheduler in dwc2 to attempt to handle periodic splits properly. The old code didn't even try, so this was a significant effort since periodic splits are one of the most complicated things in USB. I've attempted to keep the old "don't use the microframe" schduler around for now, but not sure it's needed. It has also only been lightly tested. I think it's pretty certain that this scheduler isn't perfect and might have some bugs, but it seems much better than what was there before. With this change my stressful USB test (USB webcam + USB audio + some keyboards) crackles less. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 85 ++- drivers/usb/dwc2/hcd.c | 87 +++- drivers/usb/dwc2/hcd.h | 79 ++- drivers/usb/dwc2/hcd_queue.c | 1170 ++++++++++++++++++++++++++++++++++++------ 4 files changed, 1250 insertions(+), 171 deletions(-) commit 9cf1a601d2affe9c2633ac47ac875c035dd1eb69 Author: Douglas Anderson Date: Thu Jan 28 18:20:11 2016 -0800 usb: dwc2: host: Properly set even/odd frame When setting up ISO and INT transfers dwc2 needs to specify whether the transfer is for an even or an odd frame (or microframe if the controller is running in high speed mode). The controller appears to use this as a simple way to figure out if a transfer should happen right away (in the current microframe) or should happen at the start of the next microframe. Said another way: - If you set "odd" and the current frame number is odd it appears that the controller will try to transfer right away. Same thing if you set "even" and the current frame number is even. - If the oddness you set and the oddness of the frame number are _different_, the transfer will be delayed until the frame number changes. As I understand it, the above technique allows you to plan ahead of time where possible by always working on the next frame. ...but it still allows you to properly respond immediately to things that happened in the previous frame. The old dwc2_hc_set_even_odd_frame() didn't really handle this concept. It always looked at the frame number and setup the transfer to happen in the next frame. In some cases that meant that certain transactions would be transferred in the wrong frame. We'll try our best to set the even / odd to do the transfer in the scheduled frame. If that fails then we'll do an ugly "schedule ASAP". We'll also modify the scheduler code to handle this and not try to schedule a second transfer for the same frame. Note that this change relies on the work to redo the microframe scheduler. It can work atop ("usb: dwc2: host: Manage frame nums better in scheduler") but it works even better after ("usb: dwc2: host: Totally redo the microframe scheduler"). With this change my stressful USB test (USB webcam + USB audio + keyboards) has less audio crackling than before. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 92 +++++++++++++++++++++++++++++++++++++++++++- drivers/usb/dwc2/hcd_queue.c | 11 +++++- 2 files changed, 100 insertions(+), 3 deletions(-) commit fae4e82609b0887d6d675170d0c20b6af45d83ba Author: Douglas Anderson Date: Thu Jan 28 18:20:10 2016 -0800 usb: dwc2: host: Add dwc2_hcd_get_future_frame_number() call As we start getting more exact about our scheduling it's becoming more and more important to know exactly how far through the current frame we are. This lets us make decisions about whether there's still time left to start a new transaction in the current frame. We'll add dwc2_hcd_get_future_frame_number() which will tell you what the frame number will be a certain number of microseconds (us) from now. We can use this information to help decide if there's enough time left in the frame for a transaction that will take a certain duration. This is expected to be used by a future change ("usb: dwc2: host: Properly set even/odd frame"). Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 ++++ drivers/usb/dwc2/hcd.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit fb616e3f837eee20cc0c6d5866983f7d2730d5a3 Author: Douglas Anderson Date: Thu Jan 28 18:20:08 2016 -0800 usb: dwc2: host: Manage frame nums better in scheduler The dwc2 scheduler (contained in hcd_queue.c) was a bit confusing in the way it initted / kept track of which frames a QH was going to be active in. Let's clean things up a little bit in preparation for a rewrite of the microframe scheduler. Specifically: * Old code would pick a frame number in dwc2_qh_init() and would try to pick it "in a slightly future (micro)frame". As far as I can tell the reason for this was that there was a delay between dwc2_qh_init() and when we actually wanted to dwc2_hcd_qh_add(). ...but apparently this attempt to be slightly in the future wasn't enough because dwc2_hcd_qh_add() then had code to reset things if the frame _wasn't_ in the future. There's no reason not to just pick the frame later. For non-periodic QH we now pick the frame in dwc2_hcd_qh_add(). For periodic QH we pick the frame at dwc2_schedule_periodic() time. * The old "dwc2_qh_init() actually assigned to "hsotg->frame_number". This doesn't seem like a great idea since that variable is supposed to be used to keep track of which SOF the interrupt handler has seen. Let's be clean: anyone who wants the current frame number (instead of the one as of the last interrupt) should ask for it. * The old code wasn't terribly consistent about trying to use the frame that the microframe scheduler assigned to it. In dwc2_sched_periodic_split() when it was scheduling the first frame it always "ORed" in 0x7 (!). Since the frame goes on the wire 1 uFrame after next_active_frame it meant that the SSPLIT would always try for uFrame 0 and the transaction would happen on the low speed bus during uFrame 1. This is irregardless of what the microframe scheduler said. * The old code assumed it would get called to schedule the next in a periodic split very quickly. That is if next_active_frame was 0 (transfer on wire in uFrame 1) it assumed it was getting called to schedule the next uFrame during uFrame 1 too (so it could queue something up for uFrame 2). It should be possible to actually queue something up for uFrame 2 while in uFrame 2 (AKA queue up ASAP). To do this, code needs to look at the previously scheduled frame when deciding when to next be active, not look at the current frame number. * If there was no microframe scheduler, the old code would check for whether we should be active using "qh->next_active_frame == frame_number". This seemed like a race waiting to happen. ...plus there's no way that you wouldn't want to schedule if next_active_frame was actually less than frame number. Note that this change doesn't make 100% sense on its own since it's expecting some sanity in the frame numbers assigned by the microframe scheduler and (as per the future patch which rewries it) I think that the current microframe scheduler is quite insane. However, it seems like splitting this up from the microframe scheduler patch makes things into smaller chunks and hopefully adds to clarity rather than reduces it. The two patches could certainly be squashed. Not that in the very least, I don't see any obvious bad behavior introduced with just this patch. I've attempted to keep the config parameter to disable the microframe scheduler in tact in this change, though I'm not sure it's worth it. Obviously the code is touched a lot so it's possible I regressed something when the microframe scheduler is disabled, though I did some basic testing and it seemed to work OK. I'm still not 100% sure why you wouldn't want the microframe scheduler (presuming it works), so maybe a future patch (or a future version of this patch?) could remove that parameter. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.h | 10 +- drivers/usb/dwc2/hcd_queue.c | 351 ++++++++++++++++++++++++++++++++----------- 2 files changed, 272 insertions(+), 89 deletions(-) commit 483bb2544c470aebdcc41199c0b145d05058a3bd Author: Douglas Anderson Date: Thu Jan 28 18:20:07 2016 -0800 usb: dwc2: host: Add scheduler logging for missed SOFs We'll use the new "scheduler verbose debugging" macro to log missed SOFs. This is fast enough (assuming you configure it to use the ftrace buffer) that we can do it without worrying about the speed hit. The overhead hit if the scheduler tracing is set to "no_printk" should be near zero. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 3 ++- drivers/usb/dwc2/hcd.c | 2 +- drivers/usb/dwc2/hcd_intr.c | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) commit 2d3f139810cd5d491d8dc8c3332c9d32b9b8e1f1 Author: Douglas Anderson Date: Thu Jan 28 18:20:06 2016 -0800 usb: dwc2: host: Split code out to make dwc2_do_reserve() This no-op change splits code out of dwc2_schedule_periodic() into a dwc2_do_reserve() function. This makes it a little easier to follow the logic. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_queue.c | 112 ++++++++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 45 deletions(-) commit b951c6c7f875d2c72c6e16a4d5fa810cbb33ae32 Author: Douglas Anderson Date: Thu Jan 28 18:20:05 2016 -0800 usb: dwc2: host: Reorder things in hcd_queue.c This no-op change just reorders a few functions in hcd_queue.c in order to prepare for future changes. Motivations here: The functions dwc2_hcd_qh_free() and dwc2_hcd_qh_create() are exported functions. They are not called within the file. That means that they should be near the bottom so that they can easily call static helpers. The function dwc2_qh_init() is only called by dwc2_hcd_qh_create() and should move near the bottom with it. The only reason that the dwc2_unreserve_timer_fn() timer function (and its subroutine dwc2_do_unreserve()) were so high in the file was that they needed to be above dwc2_qh_init(). Now that dwc2_qh_init() has been moved down it can be moved down a bit. A later patch will split the reserve code out of dwc2_schedule_periodic() and the reserve function should be near the unreserve function. The reserve function needs to be below dwc2_find_uframe() since it calls that. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_queue.c | 600 +++++++++++++++++++++---------------------- 1 file changed, 300 insertions(+), 300 deletions(-) commit ced9eee1229db3bbe683ae17e0a91a8642382a39 Author: Douglas Anderson Date: Thu Jan 28 18:20:04 2016 -0800 usb: dwc2: host: Rename some fields in struct dwc2_qh This no-op change just does some renames to simplify a future patch. 1. The "interval" field is renamed to "host_interval" to make it more obvious that this interval may be 8 times the interval that the device sees (if we're doing split transactions). A future patch will also add the "device_interval" field. 2. The "usecs" field is renamed to "host_us" again to make it more obvious that this is the time for the transaction as seen by the host. For split transactions the device may see a much longer transaction time. A future patch will also add "device_us". 3. The "sched_frame" field is renamed to "next_active_frame". The name "sched_frame" kept confusing me because it felt like something more permament (the QH's reservation or something). The name "next_active_frame" makes it more obvious that this field is constantly changing. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.h | 20 ++++---- drivers/usb/dwc2/hcd_ddma.c | 37 ++++++++------- drivers/usb/dwc2/hcd_intr.c | 10 ++-- drivers/usb/dwc2/hcd_queue.c | 107 ++++++++++++++++++++++--------------------- 4 files changed, 92 insertions(+), 82 deletions(-) commit 4e50e0110c5cdc6d361b813692857e09ec918c9d Author: Douglas Anderson Date: Thu Jan 28 18:20:03 2016 -0800 usb: dwc2: host: Use periodic interrupt even with DMA The old code in dwc2_process_periodic_channels() would only enable the "periodic empty" interrupt if we weren't using DMA. That wasn't right since we can still get into cases where we have small FIFOs even on systems that have DMA (the rk3288 is a prime example). Let's always enable/disable the "periodic empty" when appropriate. As part of this: * Always call dwc2_process_periodic_channels() even if there's nothing in periodic_sched_assigned (we move the queue empty check so we still avoid the extra work). That will make extra certain that we will properly disable the "periodic empty" interrupt even if there's nothing queued up. * Move the enable of "periodic empty" due to non-empty periodic_sched_assigned to be for slave mode (non-DMA mode) only. Presumably this was the original intention of the check for DMA since it seems to match the comments above where in slave mode we leave things on the assigned queue. Note that even before this change slave mode didn't work for me, so I can't say for sure that my understanding of slave mode is correct. However, this shouldn't change anything for slave mode so if slave mode worked for someone in the past it ought to still work. With this change, I no longer get constant misses reported by my other debugging code (and with future patches) when I've got: * Rockchip rk3288 Chromebook, using port ff540000 -> Pluggable 7-port Hub with Charging (powered) -> Microsoft Wireless Keyboard 2000 in port 1. -> Das Keyboard in port 2. -> Jabra Speaker in port 3 -> Logitech, Inc. Webcam C600 in port 4 -> Microsoft Sidewinder X6 Keyboard in port 5 ...and I'm playing music on the USB speaker and capturing video from the webcam. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 71 +++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 39 deletions(-) commit d82a810eede9c324d8353edde79b7e316f145f87 Author: Douglas Anderson Date: Thu Jan 28 18:20:02 2016 -0800 usb: dwc2: host: There's not really a TT for the root hub I find that when I plug a full speed (NOT high speed) hub into a dwc2 port and then I plug a bunch of devices into that full speed hub that dwc2 goes bat guano crazy. Specifically, it just spews errors like this in the console: usb usb1: clear tt 1 (9043) error -22 The specific test case I used looks like this: /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M |__ Port 1: Dev 17, If 0, Class=Hub, Driver=hub/4p, 12M |__ Port 2: Dev 19, If 0, ..., Driver=usbhid, 1.5M |__ Port 4: Dev 20, If 0, ..., Driver=usbhid, 12M |__ Port 4: Dev 20, If 1, ..., Driver=usbhid, 12M |__ Port 4: Dev 20, If 2, ..., Driver=usbhid, 12M Showing VID/PID: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 017: ID 03eb:3301 Atmel Corp. at43301 4-Port Hub Bus 001 Device 020: ID 045e:0745 Microsoft Corp. Nano Transceiver ... Bus 001 Device 019: ID 046d:c404 Logitech, Inc. TrackMan Wheel I spent a bunch of time trying to figure out why there are errors to begin with. I believe that the issue may be a hardware issue where the transceiver sometimes accidentally sends a PREAMBLE packet if you send a packet to a full speed device right after one to a low speed device. Luckily the USB driver retries and the second time things work OK. In any case, things kinda seem work despite the errors, except for the "clear tt" spew mucking up my console. Chalk it up for a win for retries and robust protocols. So getting back to the "clear tt" problem, it appears that we get those because there's not actually a TT here to clear. It's my understanding that when dwc2 operates in low speed or full speed mode that there's no real TT out there. That makes all these attempts to "clear the TT" somewhat meaningless and also causes the spew in the log. Let's just skip all the useless TT clears. Eventually we should root cause the errors, but even if we do this is still a proper fix and is likely to avoid the "clear tt" error in the future. Note that hooking up a Full Speed USB Audio Device (Jabra 510) to this same hub with the keyboard / trackball shows that even audio works over this janky connection. As a point to note, this particular change (skip bogus TT clears) compared to just commenting out the dev_err() in hub_tt_work() actually produces better audio. Note: don't ask me where I got a full speed USB hub or whether the massive amount of dust that accumulated on it while it was in my junk box affected its funtionality. Just smile and nod. Acked-by: John Youn Reviewed-by: Kever Yang Signed-off-by: Douglas Anderson Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_intr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9ed04d976146cf10dfa4c71171434af7c0348747 Author: Douglas Anderson Date: Thu Jan 28 18:20:01 2016 -0800 usb: dwc2: host: Properly set the HFIR According to the most up to date version of the dwc2 databook, the FRINT field of the HFIR register should be programmed to: * 125 us * (PHY clock freq for HS) - 1 * 1000 us * (PHY clock freq for FS/LS) - 1 This is opposed to older versions of the doc that claimed it should be: * 125 us * (PHY clock freq for HS) * 1000 us * (PHY clock freq for FS/LS) In case you didn't spot it, the difference is the "- 1". Let's add the "- 1" to match the newest user manual. It's presumed that the "- 1" should have always been there and that this was always a documentation error. If some hardware needs the "- 1" and other hardware doesn't, we'll have to add a configuration parameter for it in the future. I checked things before and after this patch on rk3288 using a Total Phase Beagle 5000 analyzer. Before this patch, a low speed mouse shows constant Frame Timing Jitter errors. After this patch errors have gone away. Before this patch SOF packets move forward about 1 us per 4 ms. After this patch the SOF packets move backward about 1 us per 255 ms. Some specific SOF timestamps from the analyzer are below. Before: 6.603.790 6.603.916 6.604.041 6.604.166 ... 6.607.541 6.607.667 6.607.792 6.607.917 ... 6.611.417 6.611.543 6.611.668 6.611.793 After: 6.215.159 6.215.284 6.215.408 6.215.533 6.215.658 ... 6.470.658 6.470.783 6.470.907 ... 6.726.032 6.726.157 6.725.281 6.725.406 Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8add17cf8e4c55c8c4342ed42c8cdc1649ce0ab8 Author: Douglas Anderson Date: Thu Jan 28 18:20:00 2016 -0800 usb: dwc2: host: Giveback URB in tasklet context In commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context") support was added to give back the URB in tasklet context. Let's take advantage of this in dwc2. This speeds up the dwc2 interrupt handler considerably. Note that this requires the change ("usb: dwc2: host: Add a delay before releasing periodic bandwidth") to come first. Note that, as per Alan Stern in , we also need to make sure that the extra delay before the device drivers submit more data doesn't break the scheduler. At the moment the scheduler is pretty broken (see future patches) so it's hard to be 100% certain, but I have yet to see any new breakage introduced by this delay. ...and speeding up interrupt processing for dwc2 is a huge deal because it means we've got a better chance of not missing SOF interrupts. That means we've got an overall win here. Note that when playing USB audio and using a USB webcam and having several USB keyboards plugged in, the crackling on the USB audio device is noticably reduced with this patch. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 17dd5b642d836ff7e12a780c2ec71a4be9bf9546 Author: Douglas Anderson Date: Thu Jan 28 18:19:59 2016 -0800 usb: dwc2: host: Add a delay before releasing periodic bandwidth We'd like to be able to use HCD_BH in order to speed up the dwc2 host interrupt handler quite a bit. However, according to the kernel doc for usb_submit_urb() (specifically the part about "Reserved Bandwidth Transfers"), we need to keep a reservation active as long as a device driver keeps submitting. That was easy to do when we gave back the URB in the interrupt context: we just looked at when our queue was empty and released the reserved bandwidth then. ...but now we need a little more complexity. We'll follow EHCI's lead in commit 9118f9eb4f1e ("USB: EHCI: improve interrupt qh unlink") and add a 5ms delay. Since we don't have a whole timer infrastructure in dwc2, we'll just add a timer per QH. The overhead for this is very small. Note that the dwc2 scheduler is pretty broken (see future patches to fix it). This patch attempts to replicate all old behavior and just add the proper delay. Acked-by: John Youn Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.h | 6 ++ drivers/usb/dwc2/hcd_queue.c | 237 +++++++++++++++++++++++++++++++++---------- 2 files changed, 187 insertions(+), 56 deletions(-) commit 74fc4a7558f859e89b849cc87afed38f517ded9a Author: Douglas Anderson Date: Thu Jan 28 18:19:58 2016 -0800 usb: dwc2: host: Add scheduler tracing In preparation for future changes to the scheduler let's add some tracing that makes it easy for us to see what's happening. By default this tracing will be off. By changing "core.h" you can easily trace to ftrace, the console, or nowhere. Acked-by: John Youn Signed-off-by: Douglas Anderson Reviewed-by: Kever Yang Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 20 ++++++++++++++++++++ drivers/usb/dwc2/hcd.h | 5 +++++ drivers/usb/dwc2/hcd_intr.c | 6 +++++- drivers/usb/dwc2/hcd_queue.c | 24 +++++++++++++++++++++++- 4 files changed, 53 insertions(+), 2 deletions(-) commit c9c8ac0150df2b75b25683cd3df3cb56877e4e52 Author: Douglas Anderson Date: Thu Jan 28 18:19:57 2016 -0800 usb: dwc2: host: fix split transfer schedule sequence We're supposed to keep outstanding splits in order. Keep track of a list of the order of splits and process channel interrupts in that order. Without this change and the following setup: * Rockchip rk3288 Chromebook, using port ff540000 -> Pluggable 7-port Hub with Charging (powered) -> Microsoft Wireless Keyboard 2000 in port 1. -> Das Keyboard in port 2. ...I find that I get dropped keys on the Microsoft keyboard (I'm sure there are other combinations that fail, but this documents my test). Specifically I've been typing "hahahahahahaha" on the keyboard and often see keys dropped or repeated. After this change the above setup works properly. This patch is based on a previous patch proposed by Yunzhi Li ("usb: dwc2: hcd: fix periodic transfer schedule sequence") Acked-by: John Youn Signed-off-by: Douglas Anderson Signed-off-by: Yunzhi Li Reviewed-by: Kever Yang Tested-by: Heiko Stuebner Tested-by: Kever Yang Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 ++ drivers/usb/dwc2/core.h | 2 ++ drivers/usb/dwc2/hcd.c | 8 ++++++++ drivers/usb/dwc2/hcd.h | 2 ++ drivers/usb/dwc2/hcd_intr.c | 17 +++++++++++++++++ 5 files changed, 31 insertions(+) commit 94ef7aee11c26e79441276ca43f0c25a04bd1303 Author: Douglas Anderson Date: Thu Jan 28 18:19:56 2016 -0800 usb: dwc2: host: Always add to the tail of queues The queues the the dwc2 host controller used are truly queues. That means FIFO or first in first out. Unfortunately though the code was iterating through these queues starting from the head, some places in the code was adding things to the queue by adding at the head instead of the tail. That means last in first out. Doh. Go through and just always add to the tail. Doing this makes things much happier when I've got: * 7-port USB 2.0 Single-TT hub * - Microsoft 2.4 GHz Transceiver v7.0 dongle * - Jabra speakerphone playing music Acked-by: John Youn Signed-off-by: Douglas Anderson Reviewed-by: Kever Yang Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 11 ++++++----- drivers/usb/dwc2/hcd_ddma.c | 4 ++-- drivers/usb/dwc2/hcd_intr.c | 4 ++-- drivers/usb/dwc2/hcd_queue.c | 6 ++++-- 4 files changed, 14 insertions(+), 11 deletions(-) commit 16e80218816488f016418717d23c660abe073a67 Author: Douglas Anderson Date: Thu Jan 28 18:19:55 2016 -0800 usb: dwc2: host: Avoid use of chan->qh after qh freed When poking around with USB devices with slub_debug enabled, I found another obvious use after free. Turns out that in dwc2_hc_n_intr() I was in a state when the contents of chan->qh was filled with 0x6b, indicating that chan->qh was freed but chan still had a reference to it. Let's make sure that whenever we free qh we also make sure we remove a reference from its channel. The bug fixed here doesn't appear to be new--I believe I just got lucky and happened to see it while stress testing. Acked-by: John Youn Signed-off-by: Douglas Anderson Reviewed-by: Kever Yang Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 10 ++++++++++ drivers/usb/dwc2/hcd_intr.c | 10 ++++++++++ 2 files changed, 20 insertions(+) commit 098c1ef8fe6bcdfed7905cea1debdd3a0ff9a16f Author: Douglas Anderson Date: Thu Jan 28 18:19:54 2016 -0800 usb: dwc2: host: Set host_rx_fifo_size to 525 for rk3066 As documented in dwc2_calculate_dynamic_fifo(), host_rx_fifo_size should really be: 2 * ((Largest Packet size / 4) + 1 + 1) + n with n = number of host channel. We have 9 host channels, so 2 * ((1024/4) + 2) + 9 = 516 + 9 = 525 We've got 960 / 972 total_fifo_size on rk3288 (and presumably on rk3066) and 525 + 128 + 256 = 909 so we're still under on both ports even when we increment by 5. In the future, it would be nice if dwc2_calculate_dynamic_fifo() could handle the "too small" FIFO case and come up with something more dynamically. When we do that we can figure out how to allocate the extra 48 / 60 bytes of FIFO that we're currently wasting. NOTE: no known bugs are fixed by this patch, but it seems like a simple fix and ought to fix someone. Acked-by: John Youn Signed-off-by: Douglas Anderson Reviewed-by: Kever Yang Tested-by: Heiko Stuebner Signed-off-by: Felipe Balbi drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bc04e28a030a8b7dfa2227a7eaf748ada5e2c94 Author: Douglas Anderson Date: Thu Jan 28 18:19:53 2016 -0800 usb: dwc2: host: Get aligned DMA in a more supported way All other host controllers who want aligned buffers for DMA do it a certain way. Let's do that too instead of working behind the USB core's back. This makes our interrupt handler not take forever and also rips out a lot of code, simplifying things a bunch. This also has the side effect of removing the 65535 max transfer size limit. NOTE: The actual code to allocate the aligned buffers is ripped almost completely from the tegra EHCI driver. At some point in the future we may want to add this functionality to the USB core to share more code everywhere. Signed-off-by: Douglas Anderson Acked-by: John Youn Tested-by: Heiko Stuebner Tested-by: John Youn Tested-by: Stefan Wahren Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 21 +----- drivers/usb/dwc2/hcd.c | 170 +++++++++++++++++++++---------------------- drivers/usb/dwc2/hcd.h | 10 --- drivers/usb/dwc2/hcd_intr.c | 65 ----------------- drivers/usb/dwc2/hcd_queue.c | 7 +- 5 files changed, 87 insertions(+), 186 deletions(-) commit 40eed7d78378f1f609680a8a891a50cce12ed612 Author: Douglas Anderson Date: Thu Jan 28 18:19:52 2016 -0800 usb: dwc2: rockchip: Make the max_transfer_size automatic Previously we needed to set the max_transfer_size to explicitly be 65535 because the old driver would detect that our hardware could support much bigger transfers and then would try to do them. This wouldn't work since the DMA alignment code couldn't support it. Later in commit e8f8c14d9da7 ("usb: dwc2: clip max_transfer_size to 65535") upstream added support for clipping this automatically. Since that commit it has been OK to just use "-1" (default), but nobody bothered to change it. Let's change it to default now for two reasons: - It's nice to use autodetected params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson Acked-by: John Youn Tested-by: Heiko Stuebner Signed-off-by: Felipe Balbi drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77966eb85e6d988a6daaf8ac14ac33026ceb3ab7 Author: John Youn Date: Fri Feb 19 17:31:01 2016 -0800 usb: dwc3: Validate the maximum_speed parameter Check that dwc->maximum_speed is set to a valid value. Also add an error when we use it later if we encounter an invalid value. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 18 ++++++++++++++++-- drivers/usb/dwc3/gadget.c | 9 ++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) commit 5266a7603faa036f6707623ba76f054349050c85 Author: Emilio López Date: Sun Feb 21 22:26:36 2016 -0300 usb: musb: sunxi: support module autoloading MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on sunxi systems using the OTG controller. This commit adds the missing line so it loads automatically when building it as a module and running on a system with an USB OTG port. Signed-off-by: Emilio López Signed-off-by: Felipe Balbi drivers/usb/musb/sunxi.c | 1 + 1 file changed, 1 insertion(+) commit 4a75754751a02cd12cd598e02ded226c3ea2fc23 Author: Li Jun Date: Fri Feb 19 10:04:49 2016 +0800 usb: chipidea: otg: add A idle to B disconnect timer B-device detects that bus is idle for more than TB_AIDL_BDIS min and begins HNP by turning off pullup on DP, this allows the bus to discharge to the SE0 state. This timer was missed and failed with PET test: 6.8.5 B-UUT HNP of USB OTG and EH automated compliance plan v1.2, this patch is to fix this timing issue. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/chipidea/otg_fsm.c | 12 ++++++++++-- drivers/usb/chipidea/otg_fsm.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 9c527f49a7312450923222941ff50e5940004e97 Author: Li Jun Date: Fri Feb 19 10:04:48 2016 +0800 usb: otg-fsm: add B_AIDL_BDIS timer Add A-idle to B-disconnect timer, B-device detects that bus is idle for more than TB_AIDL_BDIS min and begins HNP by turning off pullup on D+. This allows the bus to discharge to the SE0 state. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi include/linux/usb/otg-fsm.h | 1 + 1 file changed, 1 insertion(+) commit dfbae3309568f296e5dccfe1ec10db0f6804b756 Author: Li Jun Date: Fri Feb 19 10:04:47 2016 +0800 Documentation: usb: chipidea: Update test procedure for HNP polling Update HNP test procedure as HNP polling is supported. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi Documentation/usb/chipidea.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 75d2f754e2d8937890336803ae27e3503f192705 Author: Li Jun Date: Fri Feb 19 10:04:46 2016 +0800 usb: chipidea: otg: enable HNP polling support for gadget and host Enable HNP polling support for chipidea gadget and allocate memory for host request flag when otg fsm init. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/chipidea/otg_fsm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2dfb46be1a231888e8d51b97573f592e408d5199 Author: Li Jun Date: Fri Feb 19 10:04:45 2016 +0800 usb: chipidea: otg: set host_request_flag for gadget Set host_request_flag if the current peripheral wants to take host role via changing a_bus_req or b_bus_req by user application. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/chipidea/otg_fsm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c5348b621bd8a61fab3de9f69bf14c8545d7d642 Author: Li Jun Date: Fri Feb 19 10:04:44 2016 +0800 usb: gadget: composite: handle otg status selector request from OTG host If gadget with HNP polling support receives GetStatus request of otg status selector, it feedback to host with host request flag to indicate if it wants to take host role. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit d6da40af0ead4dc6cb69071c1ec44a823144927d Author: Li Jun Date: Fri Feb 19 10:04:43 2016 +0800 usb: chipidea: udc: bypass otg status selector handling to gadget driver Since gadget driver will handle this request, so controller driver bypass it. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/chipidea/udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae57e97a95211397b46a40f8cb0a23966c054bc5 Author: Li Jun Date: Fri Feb 19 10:04:42 2016 +0800 usb: common: otg-fsm: add HNP polling support Adds HNP polling timer when transits to host state, the OTG status request will be sent to peripheral after timeout, if host request flag is set, it will switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and maintain the current session. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/common/usb-otg-fsm.c | 87 ++++++++++++++++++++++++++++++++++++++++ include/linux/usb/otg-fsm.h | 14 +++++++ 2 files changed, 101 insertions(+) commit 346dbc69933086312d9e76bb68ba04e2c82c9b13 Author: Li Jun Date: Fri Feb 19 10:04:41 2016 +0800 usb: add OTG status selector definition for HNP polling A host is required to use the GetStatus command, with wIndex set to the OTG status selector(F000H) to request the Host request flag from the peripheral. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) commit 75a9c82ab9638c13ce0964ed8d89d910597f03b4 Author: Li Jun Date: Fri Feb 19 10:04:40 2016 +0800 usb: gadget: add hnp_polling_support and host_request_flag in usb_gadget Add 2 flags for USB OTG HNP polling, hnp_polling_support is to indicate if the gadget can support HNP polling, host_request_flag is used for gadget to store host request information from application, which can be used to respond to HNP polling from host. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Felipe Balbi include/linux/usb/gadget.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 175f712119c57c0f2a9b553211d3edcfc460b484 Author: Marek Szyprowski Date: Thu Feb 18 11:34:43 2016 +0100 usb: gadget: provide interface for legacy gadgets to get UDC name Since commit 855ed04a3758b205e84b269f92d26ab36ed8e2f7 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") gadget drivers can not assume that UDC drivers are already available on their initialization. This broke the HACK, which was used in gadgetfs driver, to get UDC controller name. This patch removes this hack and replaces it by additional function in the UDC core (which is usefully only for legacy drivers, please don't use it in the new code). Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski Tested-by: Vegard Nossum Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/inode.c | 28 +++------------------------- drivers/usb/gadget/udc/udc-core.c | 30 ++++++++++++++++++++++++++++++ include/linux/usb/gadget.h | 1 + 3 files changed, 34 insertions(+), 25 deletions(-) commit 4111d4943a369136b3d9f7ddaff1359f187cf94a Author: Michal Nazarewicz Date: Sat Jan 9 04:20:37 2016 +0100 usb: gadget: f_midi: stash substream in gmidi_in_port structure For every in_substream, there must be a corresponding gmidi_in_port structure so it is perfectly viable and some might argue sensible to stash pointer to the input substream in the gmidi_in_port structure. This has an added benefit that if in_ports < MAX_PORTS, the whole f_midi structure takes up less space because only in_ports number of pointers for in_substream are allocated instead of MAX_PORTS lots of them. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 413489c8337bf86b7787248484b1e845111809be Author: Dan Carpenter Date: Tue Jan 5 13:28:09 2016 +0300 usb: gadget: f_midi: missing unlock on error path We added a new error path to this function and we forgot to drop the lock. Fixes: e1e3d7ec5da3 ('usb: gadget: f_midi: pre-allocate IN requests') Signed-off-by: Dan Carpenter [mina86@mina86.com: rebased on top of refactoring commit] Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bf0028f8cb44a65ddc57b805ef43bd37dfa8a6ce Author: Michal Nazarewicz Date: Tue Jan 5 14:43:42 2016 +0100 usb: gadget: f_midi: use flexible array member for gmidi_in_port elements Reduce number of allocations, simplify memory management and reduce memory usage by stacking the gmidi_in_port elements at the end of the f_midi structure using a flexible array. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 55 ++++++++++++------------------------ 1 file changed, 18 insertions(+), 37 deletions(-) commit 06cd928b0cfc79e9e17e0d36e39329e20238b185 Author: Michal Nazarewicz Date: Mon Jan 18 18:30:15 2016 +0100 usb: gadget: f_midi: fix in_last_port looping logic In general case, all of midi->in_port pointers may be non-NULL which implies that the ‘if (\!port)’ condition will never execute thus never zeroing midi->in_last_port. Fix by rewriting the loop such that the field is set to zero if \!port or end of loop has been reached. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit 9a71eb563441a42effe11d9a8cc1e6be068b7446 Author: Michal Nazarewicz Date: Mon Jan 18 17:54:14 2016 +0100 usb: gadget: f_midi: move some of f_midi_transmit to separate func Move some of the f_midi_transmit to a separate f_midi_do_transmit function so the massive indention levels are not so jarring. This introduces no changes in behaviour. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 137 +++++++++++++++++++---------------- 1 file changed, 76 insertions(+), 61 deletions(-) commit f297e86c7f017430816b27e6cf29bf81246d897e Author: Felipe F. Tonello Date: Tue Jan 26 14:52:36 2016 +0100 usb: gadget: f_midi: remove useless midi reference from port struct remove a field which is unnecessary. No functional changes. Signed-off-by: Felipe F. Tonello Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_midi.c | 2 -- 1 file changed, 2 deletions(-) commit ef15088440e2b34441a6c99e44405b05171792a7 Author: Du, Changbin Date: Tue Dec 29 14:36:58 2015 +0800 usb: f_fs: avoid race condition with ffs_epfile_io_complete ffs_epfile_io and ffs_epfile_io_complete runs in different context, but there is no synchronization between them. consider the following scenario: 1) ffs_epfile_io interrupted by sigal while wait_for_completion_interruptible 2) then ffs_epfile_io set ret to -EINTR 3) just before or during usb_ep_dequeue, the request completed 4) ffs_epfile_io return with -EINTR In this case, ffs_epfile_io tell caller no transfer success but actually it may has been done. This break the caller's pipe. Below script can help test it (adbd is the process which lies on f_fs). while true do pkill -19 adbd #SIGSTOP pkill -18 adbd #SIGCONT sleep 0.1 done To avoid this, just dequeue the request first. After usb_ep_dequeue, the request must be done or canceled. With this change, we can ensure no race condition in f_fs driver. But actually I found some of the udc driver has analogical issue in its dequeue implementation. For example, 1) the dequeue function hold the controller's lock. 2) before driver request controller to stop transfer, a request completed. 3) the controller trigger a interrupt, but its irq handler need wait dequeue function to release the lock. 4) dequeue function give back the request with negative status, and release lock. 5) irq handler get lock but the request has already been given back. So, the dequeue implementation should take care of this case. IMO, it can be done as below steps to dequeue a already started request, 1) request controller to stop transfer on the given ep. HW know the actual transfer status. 2) after hw stop transfer, driver scan if there are any completed one. 3) if found, process it with real status. if no, the request can canceled. Signed-off-by: "Du, Changbin" [mina86@mina86.com: rebased on top of refactoring commits] Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit ae76e13477d8de0065cddbb6714e6b027562eaec Author: Michal Nazarewicz Date: Mon Jan 4 21:05:59 2016 +0100 usb: f_fs: refactor ffs_epfile_io Eliminate one of the return paths by using a ‘goto error_mutex’ and rearrange some if-bodies which results in reduction of the indention level and thus hopefully makes the function easier to read and reason about. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 127 +++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 69 deletions(-) commit b3591f67b9f9607fea5d854f9d481f44696d8ddc Author: Michal Nazarewicz Date: Mon Jan 4 20:58:12 2016 +0100 usb: f_fs: replace unnecessary goto with a return In ffs_epfile_io error label points to a return path which includes a kfree(data) call. However, at the beginning of the function data is always NULL so some of the early ‘goto error’ can safely be replaced with a trivial return statement. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 3163c79efa653ea9832acb8efe55efd34a5f4ae6 Author: Michal Nazarewicz Date: Mon Jan 4 21:28:34 2016 +0100 usb: f_fs: fix ffs_epfile_io returning success on req alloc failure In the AIO path, if allocating of a request failse, the function simply goes to the error_lock path whose end result is returning value of ret. However, at this point ret’s value is zero (assigned as return value from ffs_mutex_lock). Fix by adding ‘ret = -ENOMEM’ statement. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3de4e20568171f542adb8d54a47c46ff025ca942 Author: Michal Nazarewicz Date: Mon Jan 4 20:42:43 2016 +0100 usb: f_fs: fix memory leak when ep changes during transfer In the ffs_epfile_io function, data buffer is allocated for non-halt requests. Later, after grabing a mutex, the function checks that epfile->ep is still ep and if it’s not, it set ret to -ESHUTDOWN and follow a path including spin_unlock_irq (just after ‘ret = -ESHUTDOWN’), mutex_unlock (after if-else-if-else chain) and returns ret. Noticeably, this does not include freeing of the data buffer. Fix by introducing a goto which moves control flow to the the end of the function where spin_unlock_irq, mutex_unlock and kfree are all called. Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12496785a414593ff25fd271f37d3a95d2a8058b Author: Bjorn Helgaas Date: Tue Feb 2 14:02:51 2016 -0600 usb: phy: phy-am335x: remove include of regulator/consumer.h phy-am335x.c doesn't use any interfaces from linux/regulator/consumer.h, so stop including it. Signed-off-by: Bjorn Helgaas CC: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi drivers/usb/phy/phy-am335x.c | 1 - 1 file changed, 1 deletion(-) commit a9458a3b33ea1a00fc9d1beb3c0bb1c2d18855c9 Author: Arnd Bergmann Date: Wed Feb 17 16:51:40 2016 +0100 usb: gadget: pxa25x_udc: document endianess better When I wrote the cleanup patch series, it was not clear how exactly big-endian mode works on ixp4xx, and whether the driver was doing this correctly. After discussing with Krzysztof Hałasa, this has been clarified, so I can update the comment let pxa25x big-endian (which we don't support) work the same way as ixp4xx. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa25x_udc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 62a6abdd427b5fc4d8aad5dac874904e96273e6d Author: Arnd Bergmann Date: Thu Jan 28 17:23:15 2016 +0100 usb: musb/ux500: remove duplicate check for dma_is_compatible When dma_addr_t is 64-bit, we get a warning about an invalid cast in the call to ux500_dma_is_compatible() from ux500_dma_channel_program(): drivers/usb/musb/ux500_dma.c: In function 'ux500_dma_channel_program': drivers/usb/musb/ux500_dma.c:210:51: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] if (!ux500_dma_is_compatible(channel, packet_sz, (void *)dma_addr, len)) The problem is that ux500_dma_is_compatible() is called from the main musb driver on the virtual address, but here we pass in a DMA address, so the types are fundamentally different but it works because the function only checks the alignment of the buffer and that is the same. We could work around this by adding another cast, but I have checked that the buffer we get passed here is already checked before it gets mapped, so the second check seems completely unnecessary and removing it must be the cleanest solution. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/musb/ux500_dma.c | 3 --- 1 file changed, 3 deletions(-) commit 3ec08ddf13d50ad188ac5122d74284df67beb02e Author: Arnd Bergmann Date: Thu Jan 28 17:23:14 2016 +0100 usb: musb: use %pad format string from dma_addr_t The musb driver prints DMA addresses in a few places, using the 0x%x format string. This is wrong on 64-bit architectures (which need %lx) and 32-bit ARM with CONFIG_LPAE set (which needs %llx), otherwise we print the wrong data, as gcc warns: musb/musbhsdma.c: In function 'configure_channel': musb/musbhsdma.c:120:53: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] dev_dbg(musb->controller, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n", musb/musbhsdma.c: In function 'dma_channel_program': musb/musbhsdma.c:155:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] dev_dbg(musb->controller, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n", musb/tusb6010_omap.c: In function 'tusb_omap_dma_program': musb/tusb6010_omap.c:313:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] dev_dbg(musb->controller, "ep%i %s dma ch%i dma: %08x len: %u(%u) packet_sz: %i(%i)\n", This uses the %pad format string, which prints a dma_addr_t that gets passed by reference, which works for all combinations. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/musb/musbhsdma.c | 8 ++++---- drivers/usb/musb/tusb6010_omap.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 5b35becce78fd0640c16e66a4741e3441d257d11 Author: Arnd Bergmann Date: Thu Jan 28 17:23:13 2016 +0100 usb: isp1301-omap: mark power_up as __maybe_unused The power_up function is used for otg or udc mode, but nost when the driver is only configured for host mode: drivers/usb/phy/phy-isp1301-omap.c:261:13: error: 'power_up' defined but not used [-Werror=unused-function] This marks the function __maybe_unused to avoid the warning and silently drop the definition when it is unused. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/phy/phy-isp1301-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0fc35bc0889c7157527ed5758f54101ec015839 Author: Arnd Bergmann Date: Thu Jan 28 17:20:54 2016 +0100 usb: fsl: drop USB_FSL_MPH_DR_OF Kconfig symbol The USB_FSL_MPH_DR_OF symbol is used to ensure the code that interprets the DR device node is built whenever one of the two drivers (EHCI or UDC) for the platform is enabled. However, if CONFIG_USB is disabled and we only support gadget mode, this causes a Kconfig warning: warning: (USB_FSL_USB2) selects USB_FSL_MPH_DR_OF which has unmet direct dependencies (USB_SUPPORT && USB) We can avoid this warning by simply no longer using the symbol, and making sure we enter the drivers/usb/host/ directory when the UDC driver is enabled that needs the file, and then we use Makefile syntax to ensure the file is built-in if needed. There is currently a dependency on CONFIG_OF, but this is redundant, as we already know that this is set unconditionally for the platforms that use this driver. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/Makefile | 2 +- drivers/usb/gadget/udc/Kconfig | 1 - drivers/usb/host/Kconfig | 4 ---- drivers/usb/host/Makefile | 3 ++- 4 files changed, 3 insertions(+), 7 deletions(-) commit 65bc0fba4ed6e2ea7d89539985feb576ae2f84b9 Author: Arnd Bergmann Date: Thu Jan 28 17:17:04 2016 +0100 usb: gadget: pxa25x_udc: use readl/writel for mmio This converts the pxa25x udc driver to use readl/writel as normal driver should do, rather than dereferencing __iomem pointers themselves. Based on the earlier preparation work, we can now also pass the register start in the device pointer so we no longer need the global variable. The unclear part here is for IXP4xx, which supports both big-endian and little-endian configurations. So far, the driver has done no byteswap in either case. I suspect that is wrong and it would actually need to swap in one or the other case, but I don't know which. It's also possible that there is some magic setting in the chip that makes the endianess of the MMIO register match the CPU, and in that case, the code actually does the right thing for all configurations, both before and after this patch. Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa25x_udc.c | 61 ++++++++++++++++++++++++------------- drivers/usb/gadget/udc/pxa25x_udc.h | 1 + 2 files changed, 40 insertions(+), 22 deletions(-) commit a77af20e9e67caf79bd961c3d12938051b2c560e Author: Arnd Bergmann Date: Thu Jan 28 17:17:03 2016 +0100 usb: gadget: pxa25x_udc cleanup This removes the dependency on the mach/hardware.h header file from the pxa25x_udc driver after the register definitions were already unified in the previous patch. Following the model of pxa27x_udc (and basically all other drivers in the kernel), we define the register numbers as offsets from the register base address and use accessor functions to read/write them. For the moment, this still leaves the direct pointer dereference in place, instead of using readl/writel, so this patch should not be changing the behavior of the driver, other than using ioremap() on the platform resource to replace the hardcoded virtual address pointers. Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa25x_udc.c | 468 +++++++++++++++++++++--------------- drivers/usb/gadget/udc/pxa25x_udc.h | 10 +- 2 files changed, 275 insertions(+), 203 deletions(-) commit c5418a0b98c1ff7ae6f3d0b248d9120368156f4a Author: Arnd Bergmann Date: Thu Jan 28 17:17:02 2016 +0100 usb: gadget: pxa25x_udc: move register definitions from arch ixp4xx and pxa25x both use this driver and provide a slightly different set of register definitions for it. Aside from that, the definition in the ixp4xx-regs.h header conflicts with the on in the pxa27x device driver when compile-testing that: In file included from ../drivers/usb/gadget/udc/pxa27x_udc.c:37:0: ../drivers/usb/gadget/udc/pxa27x_udc.h:26:0: warning: "UDCCR" redefined #define UDCCR 0x0000 /* UDC Control Register */ ^ In file included from ../arch/arm/mach-ixp4xx/include/mach/hardware.h:27:0, from ../arch/arm/mach-ixp4xx/include/mach/io.h:18, from ../arch/arm/include/asm/io.h:194, from ../include/linux/io.h:25, from ../include/linux/irq.h:24, from ../drivers/usb/gadget/udc/pxa27x_udc.c:23: ../arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h:415:0: note: this is the location of the previous definition #define UDCCR IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000) This addresses both issues by moving all the definitions into the pxa25x_udc driver itself. It turns out the only difference between them was 'UDCCS_IO_ROF', and that could well be a mistake when it was incorrectly copied from pxa25x to ixp4xx. Acked-by: Krzysztof Halasa Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | 198 ------------------------ arch/arm/mach-pxa/include/mach/pxa25x-udc.h | 163 ------------------- drivers/usb/gadget/udc/pxa25x_udc.c | 161 ++++++++++++++++++- 3 files changed, 155 insertions(+), 367 deletions(-) commit 21a596c17b2738fc0f13dd4cdfb6f42c397109ac Author: Yoshihiro Shimoda Date: Fri Feb 5 13:57:11 2016 +0900 usb: renesas_usbhs: Don't check CSSTS bit if peripheral mode Since Some SoCs (e.g. R-Car Gen2) don't have the CSSTS bit in the pipectrl registers ({DCP,PIPEn}CTR) because such SoCs have peripheral mode only. So, this driver should not check the CSSTS bit if peripheral mode is running. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/pipe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit de18757e272d0e948bfa3e083a1771887f719c05 Author: Yoshihiro Shimoda Date: Thu Jan 7 18:18:13 2016 +0900 usb: renesas_usbhs: add R-Car Gen3 power control Since the usb2 phy driver for gen3 (phy-rcar-gen3-usb2) cannot access LPSTS and UGCTRL2 registers in the HSUSB module, this driver have to initialize the registers. So, this patch adds such handling code into rcar3.c. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/Makefile | 2 +- drivers/usb/renesas_usbhs/common.c | 14 +++++++--- drivers/usb/renesas_usbhs/rcar3.c | 54 ++++++++++++++++++++++++++++++++++++++ drivers/usb/renesas_usbhs/rcar3.h | 3 +++ include/linux/usb/renesas_usbhs.h | 1 + 5 files changed, 69 insertions(+), 5 deletions(-) commit 7580862b3e80af9b90dd12daeedee63e3f5683c2 Author: John Youn Date: Fri Feb 5 17:09:13 2016 -0800 usb: dwc3: Enable SuperSpeedPlus Enable SuperSpeedPlus by programming the DCFG.speed and after enumerating, set gadget->speed appropriately. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2c7f1bd9127a1a49ee25d9c2b2ce17b11c7fb05f Author: John Youn Date: Fri Feb 5 17:08:59 2016 -0800 usb: dwc3: Update maximum_speed for SuperSpeedPlus If the maximum_speed is not set, set it to a known value, either SuperSpeed or SuperSpeedPlus based on the type of controller we are using. If we are on DWC_usb31 controller, check the PHY interface to see if it is capable of SuperSpeedPlus. Also this check is moved after dwc3_core_init() so that we can check dwc->revision. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit ee5cd41c9117df7b6ceae454a0354601cad155b5 Author: John Youn Date: Fri Feb 5 17:08:45 2016 -0800 usb: dwc3: Update speed checks for SuperSpeedPlus Update various places where the speed is checked so that it takes into account SuperSpeedPlus properly. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 9 ++++++--- drivers/usb/dwc3/gadget.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) commit 1f38f88a24c86d46cf47782ffabd5457f231f8ca Author: John Youn Date: Fri Feb 5 17:08:31 2016 -0800 usb: dwc3: Update register fields for SuperSpeedPlus Update various registers fields definitions for the DWC_usb31 controller for SuperSpeedPlus support. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c4137a9c841ec7fb300782d211f2d6907f4d6e20 Author: John Youn Date: Fri Feb 5 17:08:18 2016 -0800 usb: dwc3: DWC_usb31 controller check Add a convenience function to check if the controller is DWC_usb31. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 59a3cedf910da4f73296172481f72c6f292b2b3a Author: John Youn Date: Fri Feb 5 17:07:58 2016 -0800 usb: gadget: f_mass_storage: Enable SuperSpeedPlus Enable superspeed plus configuration for the mass storage gadget. The mass storage function doesn't do anything special for SuperSpeedPlus. Just pass in the same SuperSpeed descriptors for SuperSpeedPlus. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd69cbeb6977bbe5747b99b380007d7ec28f8095 Author: John Youn Date: Fri Feb 5 17:07:44 2016 -0800 usb: gadget: composite: Update debug message for SuperSpeedPlus Update the debug message reporting the speeds that a configuration supports for SuperSpeedPlus. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4eb8e32dabef701e481ae18d7f5a4a6b850cccc9 Author: John Youn Date: Fri Feb 5 17:07:30 2016 -0800 usb: gadget: composite: Configure the usb_ep for SuperSpeedPlus Configure the usb_ep using the SuperSpeedPlus descriptors if connected in SuperSpeedPlus. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit eae5820b852f2b434fc7734b5b1226bcc4ae9b92 Author: John Youn Date: Fri Feb 5 17:07:17 2016 -0800 usb: gadget: composite: Write SuperSpeedPlus config descriptors Enable writing of SuperSpeedPlus descriptors for any SuperSpeedPlus capable configuration when connected in SuperSpeedPlus. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f3bdbe36682631d5e13ef933670ef0b47d9aaa87 Author: John Youn Date: Fri Feb 5 17:07:03 2016 -0800 usb: gadget: composite: Add function to get descriptors There are a couple places in the code that get the function descriptors based on the speed. Move this lookup into a function call and add support to handle the SuperSpeedPlus descriptors as well. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-) commit a4afd012f400b5b41e2db2b0bf7e384f738411ae Author: John Youn Date: Fri Feb 5 17:06:49 2016 -0800 usb: gadget: composite: Count configs for SuperSpeedPlus If enumerated in SuperSpeedPlus, count the configurations that support it. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 554eead5436401ae3cfdb7d79fca24c14ebab143 Author: John Youn Date: Fri Feb 5 17:06:35 2016 -0800 usb: gadget: Update config for SuperSpeedPlus When a function is added to a configuration with usb_add_function(), the configuration speed flags are updated. These flags indicate for which speeds the configuration is valid for. This patch adds a flag in the configuration for SuperSpeedPlus and also updates this based on the existence of ssp_descriptors. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 2 ++ drivers/usb/gadget/configfs.c | 1 + include/linux/usb/composite.h | 1 + 3 files changed, 4 insertions(+) commit f5c61225cf29c4f97e544ad7bd088256303acf97 Author: John Youn Date: Fri Feb 5 17:06:21 2016 -0800 usb: gadget: Update function for SuperSpeedPlus Add a ssp_descriptors member to struct usb_function and handle the initialization and cleanup of it. This holds the SuperSpeedPlus descriptors for a function that supports SuperSpeedPlus. This is added by usb_assign_descriptors(). Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/config.c | 6 ++++++ include/linux/usb/composite.h | 5 +++++ 2 files changed, 11 insertions(+) commit eaef50c760576bca70b87fdc26eb87a3660529f8 Author: John Youn Date: Fri Feb 5 17:06:07 2016 -0800 usb: gadget: Update usb_assign_descriptors for SuperSpeedPlus Add the 'ssp_descriptors' parameter to the usb_assign_descriptors() function. This allows a function driver to add descriptors for SuperSpeedPlus speeds if it supports it. Also update all uses of this function in the gadget subsystem so that they pass NULL for the ssp_descriptors parameters. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/config.c | 3 ++- drivers/usb/gadget/function/f_acm.c | 2 +- drivers/usb/gadget/function/f_ecm.c | 2 +- drivers/usb/gadget/function/f_eem.c | 2 +- drivers/usb/gadget/function/f_hid.c | 2 +- drivers/usb/gadget/function/f_loopback.c | 2 +- drivers/usb/gadget/function/f_mass_storage.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 2 +- drivers/usb/gadget/function/f_obex.c | 3 ++- drivers/usb/gadget/function/f_phonet.c | 2 +- drivers/usb/gadget/function/f_printer.c | 2 +- drivers/usb/gadget/function/f_rndis.c | 2 +- drivers/usb/gadget/function/f_serial.c | 2 +- drivers/usb/gadget/function/f_sourcesink.c | 2 +- drivers/usb/gadget/function/f_subset.c | 2 +- drivers/usb/gadget/function/f_tcm.c | 2 +- drivers/usb/gadget/function/f_uac1.c | 3 ++- drivers/usb/gadget/function/f_uac2.c | 3 ++- include/linux/usb/gadget.h | 3 ++- 19 files changed, 24 insertions(+), 19 deletions(-) commit f228a8de242a85659d9c86f2b9ff862775f015c2 Author: John Youn Date: Fri Feb 5 17:05:53 2016 -0800 usb: gadget: composite: Return SSP Dev Cap descriptor If a gadget supports SuperSpeedPlus or higher speeds, return a SuperSpeedPlus USB Device Capability descriptor. Currently this implementation returns a fixed descriptor with typical values set. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 1a85329171094951956a37acc8abb7e51c1e742e Author: John Youn Date: Fri Feb 5 17:05:40 2016 -0800 usb: gadget: composite: Return bcdUSB 0x0310 The USB 3.1 specification replaces the USB 3.0 specification and all new devices that are running at SuperSpeed or higher speeds must report a bcdUSB of 0x0310. Refer to USB 3.1 Specification, Revision 1.0, Section 9.6. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca1b6a65ba7771ab8d16971b5fc40f9ba7a0e53 Author: John Youn Date: Fri Feb 5 17:05:26 2016 -0800 usb: gadget: Add gadget_is_superspeed_plus() Add a function to check for SuperSpeedPlus capable gadgets. Signed-off-by: John Youn Signed-off-by: Felipe Balbi include/linux/usb/gadget.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 446fa3a95df1e8b78f25e1babc41e46edd200821 Author: John Youn Date: Fri Feb 5 17:05:12 2016 -0800 usb: ch9: Add size macro for SSP dev cap descriptor The SuperspeedPlus Device Capability Descriptor has a variable size depending on the number of sublink speed attributes. This patch adds a macro to calculate that size. The macro takes one argument, the Sublink Speed Attribute Count (SSAC) as reported by the descriptor in bmAttributes[4:0]. See USB 3.1 9.6.2.5, Table 9-19. Signed-off-by: John Youn Signed-off-by: Felipe Balbi include/uapi/linux/usb/ch9.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 88bcf65e66e9037cdc25be4185a1929cc5009c99 Author: Haosdent Huang Date: Fri Mar 4 20:55:52 2016 +0800 cgroup: remove stale item in cgroup-v1 document INDEX file. Signed-off-by: Haosdent Huang Signed-off-by: Tejun Heo Documentation/cgroup-v1/00-INDEX | 2 -- 1 file changed, 2 deletions(-) commit 51b1b2867b81450bd198b691c70dccb582e961ff Author: Simon Horman Date: Thu Mar 3 10:28:50 2016 +0900 ata: sata_rcar: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Signed-off-by: Tejun Heo Acked-by: Geert Uytterhoeven drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e23d3fef83df8e303fded0ab55b379beec0dd604 Author: Xiao Guangrong Date: Wed Feb 24 09:46:06 2016 +0100 KVM: MMU: check kvm_mmu_pages and mmu_page_path indices Give a special invalid index to the root of the walk, so that we can check the consistency of kvm_mmu_pages and mmu_page_path. Signed-off-by: Xiao Guangrong [Extracted from a bigger patch proposed by Guangrong. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0a47cd85833e56574a926cad309726f4f7859544 Author: Paolo Bonzini Date: Tue Feb 23 13:54:25 2016 +0100 KVM: MMU: Fix ubsan warnings kvm_mmu_pages_init is doing some really yucky stuff. It is setting up a sentinel for mmu_page_clear_parents; however, because of a) the way levels are numbered starting from 1 and b) the way mmu_page_path sizes its arrays with PT64_ROOT_LEVEL-1 elements, the access can be out of bounds. This is harmless because the code overwrites up to the first two elements of parents->idx and these are initialized, and because the sentinel is not needed in this case---mmu_page_clear_parents exits anyway when it gets to the end of the array. However ubsan complains, and everyone else should too. This fix does three things. First it makes the mmu_page_path arrays PT64_ROOT_LEVEL elements in size, so that we can write to them without checking the level in advance. Second it disintegrates kvm_mmu_pages_init between mmu_unsync_walk (to reset the struct kvm_mmu_pages) and for_each_sp (to place the NULL sentinel at the end of the current path). This is okay because the mmu_page_path is only used in mmu_pages_clear_parents; mmu_pages_clear_parents itself is called within a for_each_sp iterator, and hence always after a call to mmu_pages_next. Third it changes mmu_pages_clear_parents to just use the sentinel to stop iteration, without checking the bounds on level. Reported-by: Sasha Levin Reported-by: Mike Krinkin Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 57 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 798e88b31fbe9863163054feb8432e62e77f539c Author: Paolo Bonzini Date: Tue Feb 23 15:28:51 2016 +0100 KVM: MMU: cleanup handle_abnormal_pfn The goto and temporary variable are unnecessary, just use return statements. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8f22372f85476bfe612136133d5883b28d163c23 Author: Paolo Bonzini Date: Fri Feb 26 12:09:49 2016 +0100 KVM: VMX: use vmcs_clear/set_bits for debug register exits Reviewed-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit b2740d3533a3f4aeb9553e872ce471ff73200a7f Author: Paolo Bonzini Date: Tue Feb 23 15:36:01 2016 +0100 KVM: ensure __gfn_to_pfn_memslot initializes *writable For the kvm_is_error_hva, ubsan complains if the uninitialized writable is passed to __direct_map, even though the value itself is not used (__direct_map goes to mmu_set_spte->set_spte->set_mmio_spte but never looks at that argument). Ensuring that __gfn_to_pfn_memslot initializes *writable is cheap and avoids this kind of issue. Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 009668520ae00d52026ccdb3884864e3473c6b65 Merge: 6f6e151 fb4605b Author: Ingo Molnar Date: Fri Mar 4 12:19:21 2016 +0100 Merge tag 'perf-core-for-mingo-20160303' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes: User visible changes: - Check existence of frontend/backed stalled cycles in 'perf stat' (Andi Kleen) - Implement CSV metrics output in 'perf stat' (Andi Kleen) - Support metrics in 'perf stat' --per-core/socket mode (Andi Kleen) - Avoid installing .o files from tools/lib/ into the python extension (Jiri Olsa) - Rename the tracepoint '/format' field that carries the syscall ID from 'nr', that is also the name of some syscalls arguments, to "__syscall_nr", to avoid having multiple fields with the same name, that was breaking the python script skeleton generator from perf.data files (Taeung Song) - Support converting data from bpf events in 'perf data' (Wang Nan) - Fix segfault in 'perf test' hists related entries (Arnaldo Carvalho de Melo) - Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt) - Fix time stamp rounding issue in libtraceevent (Chaos.Chen) Infrastructure changes: - Fix setlocale() breakage in the pmu parsing code (Jiri Olsa) - Split libtraceevent's pevent_print_event() (Steven Rostedt) - Librarize some 'perf record' bits to allow handling multiple perf.data files per session (Wang Nan) - Ensure return non-zero rc when mmap fails in 'perf record' (Wang Nan) - Fix double free on 'command_line' in a error path in 'perf script' (Colin Ian King) - Initialize struct sigaction 'sa_flags' field in a 'perf test' entry (Colin Ian King) - Fix various build warnings in turbostat, detected with gcc6 (Colin Ian King) - Use .s extension for preprocessed assembler code (Masahiro Yamada) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit bc94b99636dc7bcccce439a9fb9c00065e2e2627 Merge: 4650bac fc77dbd Author: Ingo Molnar Date: Fri Mar 4 12:12:08 2016 +0100 Merge tag 'v4.5-rc6' into core/resources, to resolve conflict Signed-off-by: Ingo Molnar commit 1e89f58499f3351a3b3c61dae8213fe3cd24a476 Author: Hans Verkuil Date: Fri Mar 4 05:46:58 2016 -0300 [media] v4l2-mc.h: fix yet more compiler errors The newly added functions have an extra semicolon, which prevents compilation, and they need to be marked inline: In file included from ../include/media/tuner.h:23:0, from ../drivers/media/tuners/tuner-simple.c:10: ../include/media/v4l2-mc.h:233:1: error: expected identifier or '(' before '{' token Remove spurious return, remove copy-and-pasted semi-colons, add static inline. Fixes: a77bf7048add ("v4l2-mc.h: Add stubs for the V4L2 PM/pipeline routines") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mc.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 59e4282717cb2adbfd12314ff484669a85827412 Author: Thomas Klausner Date: Thu Mar 3 16:28:22 2016 +0100 ALSA: uapi: Make alsa asound.h header more portable This header is used as-is in the alsa-lib userland library, which is portable to other operating systems. For this reason, include linux/types.h only on Linux systems. Add sys/ioctl.h for _IOR/_IOW/etc. (works at least on *BSD and Solaris). Signed-off-by: Thomas Klausner Signed-off-by: Takashi Iwai include/uapi/sound/asound.h | 4 ++++ 1 file changed, 4 insertions(+) commit 107d44a2c5bf08f221cb406b776310f12084e4de Author: Radim Krčmář Date: Wed Mar 2 22:56:53 2016 +0100 KVM: document KVM_REINJECT_CONTROL ioctl Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a0aace5ac0efdb2bcb71e10d9c9ca6a851fa59f9 Author: Radim Krčmář Date: Wed Mar 2 22:56:52 2016 +0100 KVM: i8254: turn kvm_kpit_state.reinject into atomic_t Document possible races between readers and concurrent update to the ioctl. Suggested-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 8 ++++---- arch/x86/kvm/i8254.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit ab4c14763b434d48bc7732e475ff4d5b6b9d3e3b Author: Radim Krčmář Date: Wed Mar 2 22:56:51 2016 +0100 KVM: i8254: move PIT timer function initialization We can do it just once. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 34f3941c42e22217e39f442e15401ae53a23f8cb Author: Radim Krčmář Date: Wed Mar 2 22:56:50 2016 +0100 KVM: i8254: don't assume layout of kvm_kpit_state channels has offset 0 and correct size now, but that can change. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4a2095df8ab1671078c46d988e1b83baf42db4f6 Author: Radim Krčmář Date: Wed Mar 2 22:56:49 2016 +0100 KVM: i8254: remove pointless dereference of PIT PIT is known at that point. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3e1311549593692d98cba1ceb479f070dcd9873 Author: Radim Krčmář Date: Wed Mar 2 22:56:48 2016 +0100 KVM: i8254: remove pit and kvm from kvm_kpit_state kvm isn't ever used and pit can be accessed with container_of. If you *really* need kvm, pit_state_to_pit(ps)->kvm. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 14 +++++++++----- arch/x86/kvm/i8254.h | 2 -- 2 files changed, 9 insertions(+), 7 deletions(-) commit 08e5ccf3ae8f2c5c8319fec521e312f7e775cb84 Author: Radim Krčmář Date: Wed Mar 2 22:56:47 2016 +0100 KVM: i8254: refactor kvm_free_pit Could be easier to read, but git history will become deeper. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 10d2482126d02682d5d21aa5ecdf76d5f49c6740 Author: Radim Krčmář Date: Wed Mar 2 22:56:46 2016 +0100 KVM: i8254: refactor kvm_create_pit Locks are gone, so we don't need to duplicate error paths. Use goto everywhere. Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 71474e2f0f439b83b7b53ee6e9cf4f44c15b5806 Author: Radim Krčmář Date: Wed Mar 2 22:56:45 2016 +0100 KVM: i8254: remove notifiers from PIT discard policy Discard policy doesn't rely on information from notifiers, so we don't need to register notifiers unconditionally. We kept correct counts in case userspace switched between policies during runtime, but that can be avoided by reseting the state. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 38 +++++++++++++++++++++++++++----------- arch/x86/kvm/i8254.h | 1 + arch/x86/kvm/x86.c | 12 ++++++++++-- 3 files changed, 38 insertions(+), 13 deletions(-) commit b39c90b6560c4458d46cb243abea0dcb7bc126d1 Author: Radim Krčmář Date: Wed Mar 2 22:56:44 2016 +0100 KVM: i8254: remove unnecessary uses of PIT state lock - kvm_create_pit had to lock only because it exposed kvm->arch.vpit very early, but initialization doesn't use kvm->arch.vpit since the last patch, so we can drop locking. - kvm_free_pit is only run after there are no users of KVM and therefore is the sole actor. - Locking in kvm_vm_ioctl_reinject doesn't do anything, because reinject is only protected at that place. - kvm_pit_reset isn't used anywhere and its locking can be dropped if we hide it. Removing useless locking allows to see what actually is being protected by PIT state lock (values accessible from the guest). Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 9 +-------- arch/x86/kvm/i8254.h | 9 +++++---- arch/x86/kvm/x86.c | 4 ++-- 3 files changed, 8 insertions(+), 14 deletions(-) commit 09edea72b7f9fd8a8d26c1f7504d989b9773ee5e Author: Radim Krčmář Date: Wed Mar 2 22:56:43 2016 +0100 KVM: i8254: pass struct kvm_pit instead of kvm in PIT This patch passes struct kvm_pit into internal PIT functions. Those functions used to get PIT through kvm->arch.vpit, even though most of them never used *kvm for other purposes. Another benefit is that we don't need to set kvm->arch.vpit during initialization. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 112 ++++++++++++++++++++++++--------------------------- arch/x86/kvm/i8254.h | 4 +- arch/x86/kvm/x86.c | 26 +++++++----- 3 files changed, 70 insertions(+), 72 deletions(-) commit b69d920f68b119bdc0483f0c33d34fd0c57724f5 Author: Radim Krčmář Date: Wed Mar 2 22:56:42 2016 +0100 KVM: i8254: tone down WARN_ON pit.state_lock If the guest could hit this, it would hang the host kernel, bacause of sheer number of those reports. Internal callers have to be sensible anyway, so we now only check for it in an API function. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit ddf54503e2bbed01958cf5fb16ad6378971d2468 Author: Radim Krčmář Date: Wed Mar 2 22:56:41 2016 +0100 KVM: i8254: use atomic_t instead of pit.inject_lock The lock was an overkill, the same can be done with atomics. A mb() was added in kvm_pit_ack_irq, to pair with implicit barrier between pit_timer_fn and pit_do_work. The mb() prevents a race that could happen if pending == 0 and irq_ack == 0: kvm_pit_ack_irq: | pit_timer_fn: p = atomic_read(&ps->pending); | | atomic_inc(&ps->pending); | queue_work(pit_do_work); | pit_do_work: | atomic_xchg(&ps->irq_ack, 0); | return; atomic_set(&ps->irq_ack, 1); | if (p == 0) return; | where the interrupt would not be delivered in this tick of pit_timer_fn. PIT would have eventually delivered the interrupt, but we sacrifice perofmance to make sure that interrupts are not needlessly delayed. sfence isn't enough: atomic_dec_if_positive does atomic_read first and x86 can reorder loads before stores. lfence isn't enough: store can pass lfence, turning it into a nop. A compiler barrier would be more than enough as CPU needs to stall for unbelievably long to use fences. This patch doesn't do anything in kvm_pit_reset_reinject, because any order of resets can race, but the result differs by at most one interrupt, which is ok, because it's the same result as if the reset happened at a slightly different time. (Original code didn't protect the reset path with a proper lock, so users have to be robust.) Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 56 +++++++++++++++++++++------------------------------- arch/x86/kvm/i8254.h | 3 +-- 2 files changed, 24 insertions(+), 35 deletions(-) commit fd700a00dc2e821be92b0b56fd5d8ebf8c63f9ba Author: Radim Krčmář Date: Wed Mar 2 22:56:40 2016 +0100 KVM: i8254: add kvm_pit_reset_reinject pit_state.pending and pit_state.irq_ack are always reset at the same time. Create a function for them. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit f6e0a0c113f78a0e13c69762b2ab342d6c69220d Author: Radim Krčmář Date: Wed Mar 2 22:56:39 2016 +0100 KVM: i8254: simplify atomics in kvm_pit_ack_irq We already have a helper that does the same thing. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 7dd0fdff145c5be7146d0ac06732ae3613412ac1 Author: Radim Krčmář Date: Wed Mar 2 22:56:38 2016 +0100 KVM: i8254: change PIT discard tick policy Discard policy uses ack_notifiers to prevent injection of PIT interrupts before EOI from the last one. This patch changes the policy to always try to deliver the interrupt, which makes a difference when its vector is in ISR. Old implementation would drop the interrupt, but proposed one injects to IRR, like real hardware would. The old policy breaks legacy NMI watchdogs, where PIT is used through virtual wire (LVT0): PIT never sends an interrupt before receiving EOI, thus a guest deadlock with disabled interrupts will stop NMIs. Note that NMI doesn't do EOI, so PIT also had to send a normal interrupt through IOAPIC. (KVM's PIT is deeply rotten and luckily not used much in modern systems.) Even though there is a chance of regressions, I think we can fix the LVT0 NMI bug without introducing a new tick policy. Cc: Reported-by: Yuki Shibuya Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/i8254.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 6defb60ae4ffe92c29291ed49695daa255b8f559 Merge: 03367bf 790b415 Author: Takashi Iwai Date: Fri Mar 4 08:41:41 2016 +0100 Merge branch 'for-linus' into for-next Resolved the conflicts with the latest HDA HDMI fixes. Signed-off-by: Takashi Iwai commit 69365272332a5cbef778c97b2337b4f79c509293 Merge: 82e88ff 01d7ada Author: Thomas Gleixner Date: Fri Mar 4 08:12:27 2016 +0100 Merge branch 'fortglx/4.6/time' of https://git.linaro.org/people/john.stultz/linux into timers/core Pull the cross-timestamp infrastructure from John Stultz. Allows precise correlation of device timestamps with system time. Primary use cases being PTP and audio. commit 14d653af4e32b1ae2964e5b2847ef6be191fee64 Author: Dan Carpenter Date: Fri Feb 26 00:32:21 2016 +0300 mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL devm_ioremap() returns NULL, it never returns an ERR_PTR. Fixes: f700e84f417b ('mailbox: Add support for APM X-Gene platform mailbox driver') Signed-off-by: Dan Carpenter Signed-off-by: Jassi Brar drivers/mailbox/mailbox-xgene-slimpro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c384189f5407565141f1a950d8350e56d86b4dd Author: Leo Yan Date: Mon Feb 15 21:50:24 2016 +0800 mailbox: Hi6220: add mailbox driver Add driver for Hi6220 mailbox, the mailbox communicates with MCU; for sending data, it can support two methods for low level implementation: one is to use interrupt as acknowledge, another is automatic mode which without any acknowledge. These two methods have been supported in the driver. For receiving data, it will depend on the interrupt to notify the channel has incoming message. Now mailbox driver is used to send message to MCU to control dynamic voltage and frequency scaling for CPU, GPU and DDR. Signed-off-by: Leo Yan Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 8 + drivers/mailbox/Makefile | 2 + drivers/mailbox/hi6220-mailbox.c | 395 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 405 insertions(+) commit 1cb17866f04cb48aa55459e7f5cb632a9c007fb4 Author: Leo Yan Date: Mon Feb 15 21:50:23 2016 +0800 dt-bindings: mailbox: Document Hi6220 mailbox driver Document DT binding for Hisilicon Hi6220 mailbox driver. Acked-by: Rob Herring Signed-off-by: Leo Yan Signed-off-by: Jassi Brar .../bindings/mailbox/hisilicon,hi6220-mailbox.txt | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 2d74ffdc910e06c407f0a3ace9795f77cc07d05b Author: Sudeep Holla Date: Fri Feb 19 16:01:18 2016 +0000 mailbox: mailbox-test: add support for separate tx/rx buffer with single channel This patch adds support for different MMIO region for Tx and Rx paths. If only one region is specified, it's assumed to be shared between Rx and Tx, thereby retaining backward compatibility. Also in order to support single channel dealing with both Tx and Rx with dedicated MMIO regions, Tx channel itself is assigned to Rx if MMIO regions are different and Rx is not specified. Acked-by: Lee Jones Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 27fa680f7f4143f1d04945dbcded0f52e26e5d56 Author: Sudeep Holla Date: Fri Feb 19 16:01:17 2016 +0000 mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk Reduce the logging from info to debug. Also use print_hex_dump_bytes instead as it has support for dynamic printk providing options to conditionally enable/disable these logs. Cc: Lee Jones Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit c428013783dc969d9d298e81b2d276a9dc0003ab Author: Sudeep Holla Date: Fri Feb 19 16:01:16 2016 +0000 mailbox: mailbox-test: fix the compatible string Underscores are usually forbidden in the compatible strings. So lets remove it before the first users of this is seen. Acked-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/sti-mailbox.txt | 2 +- drivers/mailbox/mailbox-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit adf06ba9b363c05eaf4da8afb02f5e99dd5caac9 Author: Sudeep Holla Date: Fri Feb 19 16:01:15 2016 +0000 mailbox: mailbox-test: rename driver as generic test driver This mailbox-test driver was designed to be generic, so let's remove ST tag on it and make it generic. Acked-by: Lee Jones Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83253b3b0286ab6111e0266da74fb10b7b92746b Author: Vladimir Zapolskiy Date: Thu Mar 3 06:19:36 2016 +0200 usb: ohci: nxp: remove USB PLL and USB OTG clock management LPC32xx common clock framework driver correctly manages parent clocks of USB OHCI clock, so there is no need to manually enable and disable them from the driver, which now depends only on a single USB host clock. Signed-off-by: Vladimir Zapolskiy Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-nxp.c | 62 ++++++++------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) commit fe54d9ba44da41aaa3096be37dd968efacf37134 Author: Vladimir Zapolskiy Date: Thu Mar 3 06:19:35 2016 +0200 usb: ohci: nxp: remove direct access to clock controller registers Direct access to clock control registers can be safely removed, the task of clock management is done by platform clock driver based on common clock framework. Signed-off-by: Vladimir Zapolskiy Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-nxp.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 8073fb828310d5af5597b3059f0523c0e0dd5a22 Author: Arnd Bergmann Date: Wed Mar 2 16:24:08 2016 +0100 phy: twl4030: use __maybe_unused to hide pm functions The twl4030 USB PHY driver uses UNIVERSAL_DEV_PM_OPS to access its suspend/resume functions, which causes a warning about unused symbols when CONFIG_PM is disabled: drivers/phy/phy-twl4030-usb.c:394:12: error: 'twl4030_usb_runtime_suspend' defined but not used [-Werror=unused-function] drivers/phy/phy-twl4030-usb.c:408:12: error: 'twl4030_usb_runtime_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/phy/phy-twl4030-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cea322ec98d1bb94aaaa939508bb98dd0d30a2f Author: Arnd Bergmann Date: Wed Mar 2 16:24:07 2016 +0100 phy: dm816x: use __maybe_unused to hide pm functions The dm816x USB PHY driver uses UNIVERSAL_DEV_PM_OPS to access its suspend/resume functions, which causes a warning about unused symbols when CONFIG_PM is disabled: drivers/phy/phy-dm816x-usb.c:121:12: error: 'dm816x_usb_phy_runtime_suspend' defined but not used [-Werror=unused-function] drivers/phy/phy-dm816x-usb.c:139:12: error: 'dm816x_usb_phy_runtime_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/phy/phy-dm816x-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9fc7c85dc49116cb8209321ae343a26b82b37d2f Author: Arnd Bergmann Date: Wed Mar 2 16:24:06 2016 +0100 usb: ehci-atmel: use __maybe_unused to hide pm functions The ehci-atmel driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/usb/host/ehci-atmel.c:189:12: error: 'ehci_atmel_drv_suspend' defined but not used [-Werror=unused-function] drivers/usb/host/ehci-atmel.c:203:12: error: 'ehci_atmel_drv_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-atmel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d29051930becb9c63a9b13409722090e701cdacc Author: Arnd Bergmann Date: Wed Mar 2 16:24:05 2016 +0100 usb: ohci-at91: use __maybe_unused to hide pm functions The ohci-at91 driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/usb/host/ohci-at91.c:587:1: error: 'ohci_hcd_at91_drv_suspend' defined but not used [-Werror=unused-function] drivers/usb/host/ohci-at91.c:631:12: error: 'ohci_hcd_at91_drv_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-at91.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8dac5300c251263cc91f49713d64b5ca85a76d53 Author: Arnd Bergmann Date: Wed Mar 2 16:24:04 2016 +0100 usb: xhci-mtk: use __maybe_unused to hide pm functions The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to conditionally set the correct suspend/resume options, and also puts both the dev_pm_ops and the functions inside of an #ifdef testing for CONFIG_PM_SLEEP, but those functions then call other code that becomes unused: drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function] drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function] drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function] This replaces the #ifdef with __maybe_unused annotations so the compiler knows it can silently drop them instead of warning. For the DEV_PM_OPS definition, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit c88d4df217f9a32415d63c1259a45da7f50ac38e Author: Arnd Bergmann Date: Wed Mar 2 16:24:03 2016 +0100 usb: host: unhide suspend/resume declarations There is no need to hide function declarations, and making these visible to the SoC specific host drivers lets us use __maybe_unused and IS_ENABLED() checks to control their use, rather than having to use #ifdef to hide all callers. Signed-off-by: Arnd Bergmann Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci.h | 2 -- drivers/usb/host/ohci.h | 2 -- 2 files changed, 4 deletions(-) commit cf34be7a223b7702e61668e0e3e64ceab4fdd06e Author: Geert Uytterhoeven Date: Sun Feb 21 22:48:47 2016 +0100 usb: host: Host drivers relying on DMA should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/usb/host/xhci-plat-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/xhci-mtk.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/ohci-platform.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/host/ohci-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/ohci-hcd.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/host/ohci-hcd.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/host/ohci-hcd.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/host/ohci-hcd.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/host/fotg210-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/fotg210-hcd.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/host/fotg210-hcd.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/host/fotg210-hcd.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/host/fotg210-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/ehci-platform.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/host/ehci-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/ehci-hcd.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/host/ehci-hcd.ko] undefined! ERROR: "dma_pool_alloc" [drivers/usb/host/ehci-hcd.ko] undefined! ERROR: "dma_pool_create" [drivers/usb/host/ehci-hcd.ko] undefined! Add dependencies on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 590745017ef3658b33a581fe0c6d60b70e92df85 Author: Jarkko Nikula Date: Thu Mar 3 13:02:14 2016 +0200 spi: pxa2xx: Use newer more explicit DMAengine terminate API Commit b36f09c3c441 ("dmaengine: Add transfer termination synchronization support") marked dmaengine_terminate_all() as deprecated and is being replaced by explicit synchronous and asynchronous terminate functions. Here DMA termination are done in two cases: FIFO overrun and module removal. FIFO overrun is handled in interrupt context and converting dmaengine_terminate_all() to dmaengine_terminate_async() does the same than before. Using synchronous termination in module removal however adds a bit more robustness as it waits all completion callbacks have finished. Although it looks all known DMA engines used with spi-pxa2xx don't implement device_synchronize() callback so this too appears to be a no-op in practice. Signed-off-by: Jarkko Nikula Reviewed-by: Mika Westerberg Acked-by: Robert Jarzmik Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx-dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a6d6fc2b671aba52da2ca0ca4f3cdd25e03e90cf Author: Christian Lamparter Date: Wed Feb 24 19:30:35 2016 +0100 usbip: move usbip_protocol.txt to Documentation The usbip_protocol.txt, a document which describes usbip's inner workings is currently located in the projects source directory (drivers/usb/usbip/...). This patch moves it to Documentation/usb. This discussion was brought up by Guy Harris [0] during the review of the USBIP dissector I wrote. For anyone interested: support is available with the latest wireshark master/dev tree. Simply select a packet from the usbip's tcp-stream you are intrested on and select the USBIP as the protocol in the "Decode As" dialog box [1]. Signed-off-by: Christian Lamparter [0] [1] Signed-off-by: Greg Kroah-Hartman Documentation/usb/usbip_protocol.txt | 358 +++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + drivers/usb/usbip/usbip_protocol.txt | 358 ----------------------------------- 3 files changed, 359 insertions(+), 358 deletions(-) commit 0b41d35058468cb9cab3f856b3446a68416213e4 Author: Junjie Mao Date: Mon Feb 22 10:48:45 2016 +0800 USB: idmouse.c: Put the interface on error usb_autopm_put_interface() should be called regardless of what idmouse_create_image() returns. Signed-off-by: Junjie Mao Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/idmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d5ce778c43bf888328231bcdce05d5c860655aa Author: Oliver Neukum Date: Wed Feb 17 11:52:43 2016 +0100 usb: hub: fix a typo in hub_port_init() leading to wrong logic A typo of j for i led to a logic bug. To rule out future confusion, the variable names are made meaningful. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ff075d670cbee4aa969d98298eaa23bc035d201a Author: Julia Lawall Date: Thu Feb 18 17:55:50 2016 +0200 usb: host: xhci-plat: fix of_table.cocci warnings Make sure (of/i2c/platform)_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) commit f1bbdc3b0402061ac52fc1b34cc018b0c227f4a4 Author: Simon Horman Date: Thu Feb 18 17:55:49 2016 +0200 usb: host: xhci-plat: add R-Car Gen2 and Gen3 fallback compatibility strings Add fallback compatibility strings for R-Car Gen2 and Gen3. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Acked-by: Gregory CLEMENT Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-xhci.txt | 21 +++++++++++++++++---- drivers/usb/host/xhci-plat.c | 5 +++++ 2 files changed, 22 insertions(+), 4 deletions(-) commit 912b330c20096a9b579ec151ec1d2225eb93b38f Merge: 42e8560 fcda50c Author: Dave Airlie Date: Fri Mar 4 13:37:39 2016 +1000 Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next Big ticket items are hdmi support for 8996 (aka snapdragon 820), and adreno 430 support. Also one more small uapi addition to support timestamp queries. * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (29 commits) drm/msm: rename hdmi symbols drm/msm/adreno: remove duplicate adreno_hw_init() call drm/msm: add timestamp param drm/msm: fix small typo drm/msm: grab struct_mutex after allocating submit drm/msm: reject submit ioctl if no gpu drm/msm/adreno: print details in case of a protect fault interrupt drm/msm/adreno: get CP_RPTR from register instead of shadow memory drm/msm/adreno: add adreno430 power control drm/msm/adreno: support for adreno 430. drm/msm: update generated headers drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init() drm/msm/dsi: Parse DSI lanes via DT drm/msm/dsi: Drop VDD regulator for MSM8916 drm/msm/dsi: Remove incorrect warning on host attach drm/msm: Free fb helper resources in msm_unload drm/msm/mdp: Detach iommu in mdp4_destroy drm/msm: make iommu port names const'ier drm/msm/mdp: Use atomic helper to set crtc property dt-bindings: msm/hdmi: Add HDMI PHY bindings ... commit 9bad1d0a5a0313b69597269474fd15849414cfae Author: Chaehyun Lim Date: Thu Mar 3 21:05:22 2016 +0900 staging: wilc1000: use switch statement instead of multiple if statement It is more readable than multiple if-else statement. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 9e58c36c7796736362bf1a3fbc7a8376e07e9357 Author: Chaehyun Lim Date: Thu Mar 3 21:05:21 2016 +0900 staging: wilc1000: remove unnecessary comments This patch removes unnecessary comments because enum cfg_cmd_type shows each command type without it. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7cc386e9def8f99bb7bbe8ca06a07a7b17198684 Author: Chaehyun Lim Date: Thu Mar 3 21:05:20 2016 +0900 staging: wilc1000: add enum cfg_type_cmd This patch adds a new enum cfg_type_cmd to change hard-coded command type. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 76e6121c90c046c75ae06ece9081d874d1570d20 Author: Chaehyun Lim Date: Thu Mar 3 21:05:19 2016 +0900 staging: wilc1000: rename hardwareProductVersion in struct wilc_mac_cfg This patch renames hardwareProductVersion to hw_product_version to avoid camelcase. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9d24b9e885f9184f46f1131a87d0c7e868be3e9 Author: Chaehyun Lim Date: Thu Mar 3 21:05:18 2016 +0900 staging: wilc1000: remove commented codes This patch removes commented codes in struct wilc_cfg_str. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 3 --- 1 file changed, 3 deletions(-) commit 7902451cb9f643b245d0e5cbb7ed8a703d9a980a Author: Chaehyun Lim Date: Thu Mar 3 21:05:17 2016 +0900 staging: wilc1000: use TAG_PARAM_OFFSET define TAG_PARAM_OFFSET is defined at top of this file so that it is used to simplify codes. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 63f803518c08e9e9a0eb753f2ac0326e3050967d Author: Anchal Jain Date: Wed Mar 2 21:12:19 2016 +0530 staging: wilc1000: Remove a whitespace before parenthesis Remove a whitespace before parenthesis "(" Signed-off-by: Anchal Jain Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1d296b3fd05f14a4c22deab00570090e3c310e0 Author: Chaehyun Lim Date: Thu Mar 3 14:28:24 2016 +0900 staging: wilc1000: remove typedef from enum tenuConnectSts This patch removes typedef from enum tenuConnectSts and renames it to connect_status to avoid camelcase. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09db529cb52f84865b754e944d584972a1665098 Author: Chaehyun Lim Date: Thu Mar 3 14:28:23 2016 +0900 staging: wilc1000: remove unused define This patch removes INFINITE_SLEEP_TIME that is not used in the driver, so just remove it. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_if.h | 2 -- 1 file changed, 2 deletions(-) commit fc17eaa1edc0b6a9e19abf3bb7375ec45c1894cc Author: Chaehyun Lim Date: Thu Mar 3 14:28:22 2016 +0900 staging: wilc1000: remove typedef from sdio_cmd53_t This patch removes typedef from struct sdio_cmd53_t and renames it to sdio_cmd53. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 10 +++++----- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit c44e80bc6a041858c74f18b62f1a1606ea19cc45 Author: Chaehyun Lim Date: Thu Mar 3 14:28:21 2016 +0900 staging: wilc1000: remove unnecessary comment codes This patch removes unnecessary comment code in struct sdio_cmd53_t. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_if.h | 2 -- 1 file changed, 2 deletions(-) commit a91632fac9adaf24ee861c9a568a70b5bdafaeda Author: Chaehyun Lim Date: Thu Mar 3 14:28:20 2016 +0900 staging: wilc1000: remove typedef from struct sdio_cmd52_t This patch removes typedef from struct sdio_cmd52_t and renames it to sdio_cmd52. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 26 +++++++++++++------------- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) commit 88a1b564a20e371e6be41b39b85673e9c1959491 Merge: 5804602 4e8ae72 Author: James Morris Date: Fri Mar 4 11:39:53 2016 +1100 Merge tag 'keys-next-20160303' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next commit 5804602536649bccc907cbdd7e31b8797bdb6c45 Merge: d991284 9090a2d Author: James Morris Date: Fri Mar 4 11:39:05 2016 +1100 Merge branch 'stable-4.6' of git://git.infradead.org/users/pcmoore/selinux into next commit 299b207dbce8d19cafdc57f50e79883319ba962e Author: Alexander Stein Date: Mon Feb 29 08:06:35 2016 +0100 Input: ads7846: Add description how to use internal reference (ADS7846) By simply setting vref-mv to 0 the internal reference will be used. Document that! Signed-off-by: Alexander Stein Signed-off-by: Rob Herring Documentation/devicetree/bindings/input/ads7846.txt | 2 ++ 1 file changed, 2 insertions(+) commit 8fe420da36fe1f8863e3f6829316db86398e4f69 Author: Linus Walleij Date: Tue Feb 23 10:10:06 2016 +0100 ARM: realview: add EB syscon variants to bindings There are two distinct RealView EB system controller that we need to detect and handle because their register layout differ slightly. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/arm-boards | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 46f1296fb7d234a3d218428d6c3a22dea52a7d59 Author: Geert Uytterhoeven Date: Mon Feb 15 13:44:42 2016 +0100 devicetree: bindings: ARM: Use "uV" for micro-volt The binding documentation uses both "uVolt" and "uV" for micro-volt. Improve consistency by settling on "uV". Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/cpus.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29626043c493a26d319a2b8c225fdc0c70e326bd Author: Fabio Estevam Date: Fri Feb 5 17:44:22 2016 -0200 serial: fsl-imx-uart: Fix typo in fsl,dte-mode description We should say "The uart works in DCE mode". Signed-off-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe99c707fc7bb0baba75b26ed585ee3464612dbe Author: David Rivshin Date: Wed Mar 2 16:35:51 2016 -0500 of: add 'const' for of_property_*_string*() parameter '*np' The of_property_{read,count,match}_string* family of functions never modify the struct device_node pointer that is passed in, so there is no reason for it to be non-const. Equivalent functions for all other types already take a 'const struct device_node *np'. Signed-off-by: David Rivshin Signed-off-by: Rob Herring drivers/of/base.c | 15 ++++++++------- include/linux/of.h | 18 +++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 815d74b35e3366261ac2519af64b53f76fb0c0e1 Author: Sergey Senozhatsky Date: Wed Mar 2 20:24:49 2016 +0900 of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() of_overlay_destroy() can return `-ENODEV' error code once it failed to find the requested overlay in `ov_idr'. However, of_unittest_destroy_tracked_overlays() does not handle this error code correctly and continues to call of_overlay_destroy() on the 'missing' overlay over and over again. This results in a printk flood [..] [ 33.497583] of_overlay_destroy: Could not find overlay #6 [ 33.497583] of_overlay_destroy: Could not find overlay #6 [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6 [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6 [ 33.497586] of_overlay_destroy: Could not find overlay #6 [ 33.497586] of_overlay_destroy: Could not find overlay #6 [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6 [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6 [..] which is not really good due to printk design, and can lead to soft lockups, hard lockups, etc. (depending on the context console_unlock() is being called from). The problem has bee observed in real life and reported by Ying Huang. This patch does not address the root cause of missing overlay in `ov_idr', it fixes the endless loop only. Signed-off-by: Sergey Senozhatsky Reported-by: kernel test robot Link: lkml.kernel.org/r/87fuwk1c0o.fsf@yhuang-dev.intel.com Signed-off-by: Rob Herring drivers/of/unittest.c | 5 +++++ 1 file changed, 5 insertions(+) commit e53b50c0cbe392c946807abf7d07615a3c588642 Author: Vinayak Menon Date: Mon Feb 22 19:15:44 2016 +0530 of: alloc anywhere from memblock if range not specified early_init_dt_alloc_reserved_memory_arch passes end as 0 to __memblock_alloc_base, when limits are not specified. But __memblock_alloc_base takes end value of 0 as MEMBLOCK_ALLOC_ACCESSIBLE and limits the end to memblock.current_limit. This results in regions never being placed in HIGHMEM area, for e.g. CMA. Let __memblock_alloc_base allocate from anywhere in memory if limits are not specified. Acked-by: Marek Szyprowski Signed-off-by: Vinayak Menon Cc: stable@vger.kernel.org Signed-off-by: Rob Herring drivers/of/of_reserved_mem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1f27cde313d72d6b44a73ba89c8b2c6a99c628cf Author: Eric Dumazet Date: Wed Mar 2 08:21:43 2016 -0800 net: sched: use pfifo_fast for non real queues Some devices declare a high number of TX queues, then set a much lower real_num_tx_queues This cause setups using fq_codel, sfq or fq as the default qdisc to consume more memory than really needed. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sch_generic.h | 6 ++++++ net/sched/sch_generic.c | 1 + net/sched/sch_mq.c | 2 +- net/sched/sch_mqprio.c | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) commit 01d7ada57ee9c735bd71fbe44ec0bcb70847afd4 Author: Christopher S. Hall Date: Mon Feb 22 03:15:26 2016 -0800 e1000e: Adds hardware supported cross timestamp on e1000e nic Modern Intel systems supports cross timestamping of the network device clock and Always Running Timer (ART) in hardware. This allows the device time and system time to be precisely correlated. The timestamp pair is returned through e1000e_phc_get_syncdevicetime() used by get_system_device_crosststamp(). The hardware cross-timestamp result is made available to applications through the PTP_SYS_OFFSET_PRECISE ioctl which calls e1000e_phc_getcrosststamp(). Cc: Prarit Bhargava Cc: Richard Cochran Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Jeff Kirsher Cc: kevin.b.stanton@intel.com Cc: kevin.j.clarke@intel.com Cc: hpa@zytor.com Cc: jeffrey.t.kirsher@intel.com Cc: netdev@vger.kernel.org Acked-by: Jeff Kirsher Signed-off-by: Christopher S. Hall [jstultz: Reworked to use new interface, commit message tweaks] Signed-off-by: John Stultz drivers/net/ethernet/intel/Kconfig | 9 +++ drivers/net/ethernet/intel/e1000e/defines.h | 5 ++ drivers/net/ethernet/intel/e1000e/ptp.c | 85 +++++++++++++++++++++++++++++ drivers/net/ethernet/intel/e1000e/regs.h | 4 ++ 4 files changed, 103 insertions(+) commit 799977d9aafbf0ca0b9c39b04cbfb16db71302c9 Author: David Ahern Date: Wed Mar 2 11:30:07 2016 -0800 net: ipv6: Fix refcnt on host routes Andrew and Ying Huang's test robot both reported usage count problems that trace back to the 'keep address on ifdown' patch. >From Andrew: We execute CRIU test on linux-next. On the current linux-next kernel they hangs on creating a network namespace. The kernel log contains many massages like this: [ 1036.122108] unregister_netdevice: waiting for lo to become free. Usage count = 2 [ 1046.165156] unregister_netdevice: waiting for lo to become free. Usage count = 2 [ 1056.210287] unregister_netdevice: waiting for lo to become free. Usage count = 2 I tried to revert this patch and the bug disappeared. Here is a set of commands to reproduce this bug: [root@linux-next-test linux-next]# uname -a Linux linux-next-test 4.5.0-rc6-next-20160301+ #3 SMP Wed Mar 2 17:32:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux [root@linux-next-test ~]# unshare -n [root@linux-next-test ~]# ip link set up dev lo [root@linux-next-test ~]# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever [root@linux-next-test ~]# logout [root@linux-next-test ~]# unshare -n ----- The problem is a change made to RTM_DELADDR case in __ipv6_ifa_notify that was added in an early version of the offending patch and is no longer needed. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Cc: Andrey Wagin Cc: Ying Huang Signed-off-by: David Ahern Tested-by: Jeremiah Mahler Signed-off-by: David S. Miller net/ipv6/addrconf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 719f1aa4a67199a3c4c68a03f94e5ec44d9d5f82 Author: Christopher S. Hall Date: Mon Feb 22 03:15:25 2016 -0800 ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping Currently, network /system cross-timestamping is performed in the PTP_SYS_OFFSET ioctl. The PTP clock driver reads gettimeofday() and the gettime64() callback provided by the driver. The cross-timestamp is best effort where the latency between the capture of system time (getnstimeofday()) and the device time (driver callback) may be significant. The getcrosststamp() callback and corresponding PTP_SYS_OFFSET_PRECISE ioctl allows the driver to perform this device/system correlation when for example cross timestamp hardware is available. Modern Intel systems can do this for onboard Ethernet controllers using the ART counter. There is virtually zero latency between captures of the ART and network device clock. The capabilities ioctl (PTP_CLOCK_GETCAPS), is augmented allowing applications to query whether or not drivers implement the getcrosststamp callback, providing more precise cross timestamping. Cc: Prarit Bhargava Cc: Richard Cochran Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andy Lutomirski Cc: kevin.b.stanton@intel.com Cc: kevin.j.clarke@intel.com Cc: hpa@zytor.com Cc: jeffrey.t.kirsher@intel.com Cc: netdev@vger.kernel.org Acked-by: Richard Cochran Signed-off-by: Christopher S. Hall [jstultz: Commit subject tweaks] Signed-off-by: John Stultz Documentation/ptp/testptp.c | 6 ++++-- drivers/ptp/ptp_chardev.c | 27 +++++++++++++++++++++++++++ include/linux/ptp_clock_kernel.h | 8 ++++++++ include/uapi/linux/ptp_clock.h | 13 ++++++++++++- 4 files changed, 51 insertions(+), 3 deletions(-) commit f9677e0f83080bb4186865868c359e72e1fac1ea Author: Christopher S. Hall Date: Mon Feb 29 06:33:47 2016 -0800 x86/tsc: Always Running Timer (ART) correlated clocksource On modern Intel systems TSC is derived from the new Always Running Timer (ART). ART can be captured simultaneous to the capture of audio and network device clocks, allowing a correlation between timebases to be constructed. Upon capture, the driver converts the captured ART value to the appropriate system clock using the correlated clocksource mechanism. On systems that support ART a new CPUID leaf (0x15) returns parameters “m” and “n” such that: TSC_value = (ART_value * m) / n + k [n >= 1] [k is an offset that can adjusted by a privileged agent. The IA32_TSC_ADJUST MSR is an example of an interface to adjust k. See 17.14.4 of the Intel SDM for more details] Cc: Prarit Bhargava Cc: Richard Cochran Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andy Lutomirski Cc: kevin.b.stanton@intel.com Cc: kevin.j.clarke@intel.com Cc: hpa@zytor.com Cc: jeffrey.t.kirsher@intel.com Cc: netdev@vger.kernel.org Reviewed-by: Thomas Gleixner Signed-off-by: Christopher S. Hall [jstultz: Tweaked to fix build issue, also reworked math for 64bit division on 32bit systems, as well as !CONFIG_CPU_FREQ build fixes] Signed-off-by: John Stultz arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/tsc.h | 2 ++ arch/x86/kernel/tsc.c | 59 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) commit b54b8c2d6e3cd1db17405a402ba42da5a9c8bf1d Author: Lada Trimasova Date: Thu Mar 3 17:07:46 2016 +0300 net: ezchip: adapt driver to little endian architecture Since ezchip network driver is written with big endian EZChip platform it is necessary to add support for little endian architecture. The first issue is that the order of the bits in a bit field is implementation specific. So all the bit fields are removed. Named constants are used to access necessary fields. And the second one is that network byte order is big endian. For example, data on ethernet is transmitted with most-significant octet (byte) first. So in case of little endian architecture it is important to swap data byte order when we read it from register. In case of unaligned access we can use "get_unaligned_be32" and in other case we can use function "ioread32_rep" which reads all data from register and works either with little endian or big endian architecture. And then when we are going to write data to register we need to restore byte order using the function "put_unaligned_be32" in case of unaligned access and in other case "iowrite32_rep". The last little fix is a space between type and pointer to observe coding style. Signed-off-by: Lada Trimasova Cc: Alexey Brodkin Cc: Noam Camus Cc: Tal Zilcer Cc: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 222 +++++++++++---------- drivers/net/ethernet/ezchip/nps_enet.h | 348 +++++++++++---------------------- 2 files changed, 238 insertions(+), 332 deletions(-) commit 274ba628a32ee15bb8e08b8a9240c354066ed24a Author: Simon Horman Date: Wed Mar 2 10:28:13 2016 +0900 sh_eth, ravb: Use ARCH_RENESAS Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d1cbe839ac3aa7b23a274b691092c90f9bf1b8e Author: Arnd Bergmann Date: Wed Mar 2 10:40:54 2016 +0100 net: mellanox: add DEVLINK dependencies The new NET_DEVLINK infrastructure can be a loadable module, but the drivers using it might be built-in, which causes link errors like: drivers/net/built-in.o: In function `mlx4_load_one': :(.text+0x2fbfda): undefined reference to `devlink_port_register' :(.text+0x2fc084): undefined reference to `devlink_port_unregister' drivers/net/built-in.o: In function `mlxsw_sx_port_remove': :(.text+0x33a03a): undefined reference to `devlink_port_type_clear' :(.text+0x33a04e): undefined reference to `devlink_port_unregister' There are multiple ways to avoid this: a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies for each user b) use 'select NET_DEVLINK' from each driver that uses it and hide the symbol in Kconfig. c) make NET_DEVLINK a 'bool' option so we don't have to list it as a dependency, and rely on the APIs to be stubbed out when it is disabled d) use IS_REACHABLE() rather than IS_ENABLED() to check for NET_DEVLINK in include/net/devlink.h This implements a variation of approach a) by adding an intermediate symbol that drivers can depend on, and changes the three drivers using it. Signed-off-by: Arnd Bergmann Fixes: 09d4d087cd48 ("mlx4: Implement devlink interface") Fixes: c4745500e988 ("mlxsw: Implement devlink interface") Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/infiniband/hw/mlx4/Kconfig | 1 + drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + net/Kconfig | 9 +++++++++ 4 files changed, 12 insertions(+) commit 3684aa7099e0ab1038a1a1bf717ae60ffc3018d1 Author: Shaohua Li Date: Mon Feb 22 15:27:40 2016 -0700 block-dev: enable writeback cgroup support block_dev's .writepages/.writepage already handles wbc_init_bio/wbc_account_io. We only set the SB_I_CGROUPWB bit to suppport writeback cgroup support. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe fs/block_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4e8ae72a75aae285ec5b93518b9680da198afd0d Author: David Howells Date: Thu Mar 3 21:49:27 2016 +0000 X.509: Make algo identifiers text instead of enum Make the identifier public key and digest algorithm fields text instead of enum. Signed-off-by: David Howells Acked-by: Herbert Xu crypto/asymmetric_keys/mscode_parser.c | 14 +++++++------- crypto/asymmetric_keys/pkcs7_parser.c | 18 ++++++++---------- crypto/asymmetric_keys/pkcs7_verify.c | 8 +++----- crypto/asymmetric_keys/public_key.c | 24 ++++-------------------- crypto/asymmetric_keys/verify_pefile.c | 4 ++-- crypto/asymmetric_keys/verify_pefile.h | 2 +- crypto/asymmetric_keys/x509_cert_parser.c | 26 +++++++++++++------------- crypto/asymmetric_keys/x509_public_key.c | 17 ++++++++--------- include/crypto/public_key.h | 30 ++++-------------------------- kernel/module_signing.c | 6 ++++++ security/integrity/digsig_asymmetric.c | 7 ++++--- security/integrity/integrity.h | 2 +- 12 files changed, 61 insertions(+), 97 deletions(-) commit d43de6c780a84def056afaf4fb3e66bdaa1efc00 Author: David Howells Date: Thu Mar 3 21:49:27 2016 +0000 akcipher: Move the RSA DER encoding check to the crypto layer Move the RSA EMSA-PKCS1-v1_5 encoding from the asymmetric-key public_key subtype to the rsa crypto module's pkcs1pad template. This means that the public_key subtype no longer has any dependencies on public key type. To make this work, the following changes have been made: (1) The rsa pkcs1pad template is now used for RSA keys. This strips off the padding and returns just the message hash. (2) In a previous patch, the pkcs1pad template gained an optional second parameter that, if given, specifies the hash used. We now give this, and pkcs1pad checks the encoded message E(M) for the EMSA-PKCS1-v1_5 encoding and verifies that the correct digest OID is present. (3) The crypto driver in crypto/asymmetric_keys/rsa.c is now reduced to something that doesn't care about what the encryption actually does and and has been merged into public_key.c. (4) CONFIG_PUBLIC_KEY_ALGO_RSA is gone. Module signing must set CONFIG_CRYPTO_RSA=y instead. Thoughts: (*) Should the encoding style (eg. raw, EMSA-PKCS1-v1_5) also be passed to the padding template? Should there be multiple padding templates registered that share most of the code? Signed-off-by: David Howells Signed-off-by: Tadeusz Struk Acked-by: Herbert Xu crypto/asymmetric_keys/Kconfig | 7 -- crypto/asymmetric_keys/Makefile | 1 - crypto/asymmetric_keys/public_key.c | 104 +++++++++++++-- crypto/asymmetric_keys/rsa.c | 224 --------------------------------- include/crypto/public_key.h | 2 - init/Kconfig | 2 +- security/integrity/digsig_asymmetric.c | 1 + 7 files changed, 95 insertions(+), 246 deletions(-) commit a49de377e051eac5bc50a3b838614a05671da4e7 Author: Tadeusz Struk Date: Thu Mar 3 21:49:26 2016 +0000 crypto: Add hash param to pkcs1pad This adds hash param to pkcs1pad. The pkcs1pad template can work with or without the hash. When hash param is provided then the verify operation will also verify the output against the known digest. Signed-off-by: Tadeusz Struk Signed-off-by: David Howells Acked-by: Herbert Xu crypto/rsa-pkcs1pad.c | 182 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 156 insertions(+), 26 deletions(-) commit afb18e0ed862fae05aa41be278c1ddb87473c7b1 Author: Javier González Date: Thu Mar 3 14:47:53 2016 -0700 lightnvm: generalize rrpc ppa calculations In rrpc, some calculations assume a certain configuration (e.g., 1 LUN, 1 sector per page). The reason behind this was that LightNVM used a simple configuration with QEMU to test core features in the beginning. This patch relaxes these assumptions and generalizes calculation, allowing multiple luns to be used. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 48 +++++++++++++++++++++++++++++++----------------- drivers/lightnvm/rrpc.h | 9 +++++++++ 2 files changed, 40 insertions(+), 17 deletions(-) commit ed2a92a6b4b8453a0c3a20da641ec79e4b3d7ca4 Author: Matias Bjørling Date: Sat Feb 20 08:52:42 2016 +0100 lightnvm: remove struct nvm_dev->total_blocks The struct nvm_dev->total_blocks was only used for calculating total sectors. Remove and instead calculate total sectors from the number of luns and its sectors. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 4ece44af733ff63a7cd12aaa8c85afb6d9fdc664 Author: Matias Bjørling Date: Sat Feb 20 08:52:41 2016 +0100 lightnvm: rename ->nr_pages to ->nr_sects The struct rrpc->nr_pages can easily be interpreted as the number of flash pages allocated to rrpc, while it is the nr_sects. Make sure that this is reflected from the variable name. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 +- drivers/lightnvm/gennvm.c | 7 +++---- drivers/lightnvm/rrpc.c | 29 ++++++++++++++--------------- drivers/lightnvm/rrpc.h | 6 +++--- include/linux/lightnvm.h | 2 +- 5 files changed, 22 insertions(+), 24 deletions(-) commit 6adb03de406e8c92579c2e4b11640841fa908277 Author: Javier González Date: Sat Feb 20 08:52:40 2016 +0100 lightnvm: update closed list outside of intr context When an I/O finishes, full blocks are moved from the open to the closed list - a lock is taken to protect the list. This happens at the moment in the interrupt context, which is not correct. This patch moves this logic to the block workqueue instead, avoiding holding a spinlock without interrupt save in an interrupt context. Signed-off-by: Javier González Fixes: ff0e498bfa18 ("lightnvm: manage open and closed blocks sepa...") Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit e9137d4b93078b6a9965acfb18a2a2ad91cf8405 Author: Keith Busch Date: Thu Feb 18 14:56:35 2016 -0700 blk-mq: Fix NULL pointer updating nr_requests A h/w context's tags are freed if it was not assigned a CPU. Check if the context has tags before updating the depth. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) commit fa3184b898717d696242241541b8cbcb65c5d497 Author: Konrad Rzeszutek Wilk Date: Wed Feb 3 16:40:05 2016 -0500 xen/blback: Fit the important information of the thread in 17 characters The processes names are truncated to 17, while we had the length of the process as name 20 - which meant that while we filled it out with various details - the last 3 characters (which had the queue number) never surfaced to the user-space. To simplify this and be able to fit the device name, domain id, and the queue number we remove the 'blkback' from the name. Prior to this patch the device name is "blkback.." for example: blkback.8.xvda, blkback.11.hda. With the multiqueue block backend we add "-%d" for the queue. But sadly this is already way past the limit so it gets stripped. Possible solution had been identified by Ian: http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg03516.html " If you are pressed for space then the "xvd" is probably a bit redundant in a string which starts blkbk. The guest may not even call the device xvdN (iirc BSD has another prefix) any how, so having blkback say so seems of limited use anyway. Since this seems to not include a partition number how does this work in the split partition scheme? (i.e. one where the guest is given xvda1 and xvda2 rather than xvda with a partition table) [It will be 'blkback.8.xvda1', and 'blkback.11.xvda2'] Perhaps something derived from one of the schemes in http://xenbits.xen.org/docs/unstable/misc/vbd-interface.txt might be a better fit? After a bit of discussion (see http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg01588.html) we settled on dropping the "blback" part. This will make it possible to have the .-: [1.xvda-0] [1.xvda-1] And we enough space to make it go up to: [32100.xvdfg9-5] Acked-by: Roger Pau Monné Reported-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d5bdec8ddb9f5fac3b351bed463a7132f6ba907b Author: Matias Bjørling Date: Fri Feb 19 13:56:58 2016 +0100 lightnvm: fold get bb tbl when using dual/quad plane mode When the media manager runs in dual or quad plane mode, lightnvm abstracts away plane specific commands. This poses a problem for get bad block table, as it reports bad blocks per plane, making the table either two or four times bigger than expected. Fold the bad block list before returning. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 +- drivers/nvme/host/lightnvm.c | 46 +++++++++++++++++++++++++++++++++++++++----- include/linux/lightnvm.h | 6 +++--- 3 files changed, 45 insertions(+), 9 deletions(-) commit 5e422cffe822874cefc1657cd287c8647b2782dd Author: Alan Date: Fri Feb 19 13:56:57 2016 +0100 lightnvm: fix up nonsensical configure overrun checking Instead of checking a constant 0 actually check the space available. Even better remember to allow for the header and also check the right amount of space is needed. Signed-off-by: Alan Cox Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5a7058450cbc8702f976d1f444974485c70cb525 Author: Jan Beulich Date: Wed Feb 10 04:18:10 2016 -0700 xen-blkback: advertise indirect segment support earlier There's no reason to defer this until the connect phase, and in fact there are frontend implementations expecting this to be available earlier. Move it into the probe function. Acked-by: Roger Pau Monné Signed-off-by: Jan Beulich Cc: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 14e710fe7897e37762512d336ab081c57de579a4 Author: Jan Beulich Date: Wed Feb 10 04:21:15 2016 -0700 xen-blkfront: rename indirect descriptor parameter "max" is rather ambiguous and carries pretty little meaning, the more that there are also "max_queues" and "max_ring_page_order". Make this "max_indirect_segments" instead, and at once change the type from int to uint (to match the respective variable's type). Acked-by: Roger Pau Monné Signed-off-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3bf58bb5da86d0a9e20f108a2f5163c4ce1a60dc Author: Dmitriy Baranov Date: Mon Jan 25 15:48:32 2016 +0300 i2c: imx: remove extra spaces. Signed-off-by: Dmitriy Baranov Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1913722808e79ded46b3bd9ab5de5657faecc8d9 Author: Hans Verkuil Date: Thu Mar 3 08:24:40 2016 -0300 [media] staging/media: add missing TODO files Add TODO files for mx2/mx3/omap1 to explain the status of these drivers and what needs to be done in order to keep them from being removed soon. Also a small fix for the mx2/Kconfig that mistakingly mentioned a vb2 conversion. That's not needed for that driver. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/mx2/Kconfig | 9 ++++++--- drivers/staging/media/mx2/TODO | 10 ++++++++++ drivers/staging/media/mx3/TODO | 10 ++++++++++ drivers/staging/media/omap1/TODO | 8 ++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) commit aefd3fb26ed28ee21ad658b3f326cd090c111eb3 Merge: 5eb4dce 34bf191 Author: David S. Miller Date: Thu Mar 3 16:27:23 2016 -0500 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2016-03-01 Here's our main set of Bluetooth & 802.15.4 patches for the 4.6 kernel. - New Bluetooth HCI driver for Intel/AG6xx controllers - New Broadcom ACPI IDs - LED trigger support for indicating Bluetooth powered state - Various fixes in mac802154, 6lowpan and related drivers - New USB IDs for AR3012 Bluetooth controllers Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 69e558fa35418664eba9dd8e5330ad56544c9b71 Author: Wolfram Sang Date: Tue Mar 1 17:36:43 2016 +0100 i2c: rcar: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52db223e4cf414e216890643cda33e2626554471 Author: Sricharan R Date: Fri Feb 26 21:28:54 2016 +0530 i2c: qup: Fix fifo handling after adding V2 support After the addition of V2 support, there was a regression observed when testing it on MSM8996. The reason is driver puts the controller in to RUN state and writes the data to be 'tx' ed in fifo. But controller has to be put in to 'PAUSE' state and data has to written to fifo. Then should be put in to 'RUN' state separately. Signed-off-by: Sricharan R Tested-by: Pramod Gurav Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qup.c | 46 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) commit 36ecbcab84d02381ab40363546616c0719adafdb Author: Shubhrajyoti Datta Date: Wed Mar 2 17:34:06 2016 +0530 i2c: xiic: Implement power management Enable power management. This patch enables the clocks before transfer and disables after the transfer. It also adds the clock description. Signed-off-by: Shubhrajyoti Datta Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-xiic.txt | 3 + drivers/i2c/busses/i2c-xiic.c | 88 ++++++++++++++++++++-- 2 files changed, 84 insertions(+), 7 deletions(-) commit 5eb4dce3b3471ec9d1ea2945fa3d2bab4ac7e100 Author: John Fastabend Date: Mon Feb 29 11:26:13 2016 -0800 net: relax setup_tc ndo op handle restriction I added this check in setup_tc to multiple drivers, if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO) Unfortunately restricting to TC_H_ROOT like this breaks the old instantiation of mqprio to setup a hardware qdisc. This patch relaxes the test to only check the type to make it equivalent to the check before I broke it. With this the old instantiation continues to work. A good smoke test is to setup mqprio with, # tc qdisc add dev eth4 root mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 \ queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7 Fixes: e4c6734eaab9 ("net: rework ndo tc op to consume additional qdisc handle paramete") Reported-by: Singh Krishneil Reported-by: Jake Keller CC: Murali Karicheri CC: Shradha Shah CC: Or Gerlitz CC: Ariel Elior CC: Jeff Kirsher CC: Bruce Allan CC: Jesse Brandeburg CC: Don Skidmore Signed-off-by: John Fastabend Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/sfc/tx.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 64bd1971decc2c2f81ca16370f8ee09bdcb1b49d Author: Hans Verkuil Date: Thu Mar 3 10:47:33 2016 -0300 [media] media.h: always start with 1 for the audio entities Start the audio defines with BASE + 0x03001 instead of 0x03000. This is consistent with the other defines, and I think it is good practice not to start with 0, just in case we want to do something like (id & 0xfff) in the future and treat the value 0 as a special case. Signed-off-by: Hans Verkuil Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0fd9cdf940b5a2b5ffd118831bddf88afe922e4 Author: Shuah Khan Date: Thu Mar 3 13:51:26 2016 -0300 [media] sound/usb: Use meaninful names for goto labels Fix to use meaningful names instead of numbered goto labels Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab sound/usb/media.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8626556f259331aac23c0e274aed24420f0e5403 Author: Sylvain Lemieux Date: Tue Feb 23 14:56:09 2016 -0500 clk: lpc32xx: fix compilation warning Remove the following false positives compilation warning: - drivers/clk/nxp/clk-lpc32xx.c: In function 'lpc32xx_clk_register': warning: 'hw' may be used uninitialized in this function [-Wmaybe-uninitialized] - drivers/clk/nxp/clk-lpc32xx.c: In function 'clk_hclk_pll_round_rate': warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized] warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized] warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] Tested using gcc version 4.7.3. Signed-off-by: Sylvain Lemieux [sboyd@codeaurora.org: Drop assignment of hw to NULL as return silences it and is less likely to lead to hiding problems later] Signed-off-by: Stephen Boyd drivers/clk/nxp/clk-lpc32xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0f4c7a138dfefb0ebdbaf56e3ba2acd2958a6605 Author: Loc Ho Date: Mon Feb 29 14:15:43 2016 -0700 clk: xgene: Add missing parenthesis when clearing divider value In the initial fix for non-zero divider shift value, the parenthesis was missing after the negate operation. This patch adds the required parenthesis. Otherwise, lower bits may be cleared unintentionally. Signed-off-by: Loc Ho Acked-by: Toan Le Fixes: 1382ea631ddd ("clk: xgene: Fix divider with non-zero shift value") Signed-off-by: Stephen Boyd drivers/clk/clk-xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d9967fe4ba6fc3a57d946a54bcba2d0b3ef8e0b Author: Stephen Boyd Date: Tue Mar 1 11:00:15 2016 -0800 clk: mb86s7x: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Acked-by: Jassi Brar Signed-off-by: Stephen Boyd drivers/clk/clk-mb86s7x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4106684e114d07cdb0d7803963fa6e45aedc0ff4 Author: Stephen Boyd Date: Tue Mar 1 11:00:07 2016 -0800 clk: x86: Remove clkdev.h and clk.h includes This driver is a clk provider and not a clk consumer, so remove the clk.h include. Also, drop clkdev.h because there's not clkdev usage here either. Acked-by: Mika Westerberg Signed-off-by: Stephen Boyd drivers/clk/x86/clk-lpt.c | 2 -- 1 file changed, 2 deletions(-) commit 553b4858177d62a4969925ade1ea894c2a07b235 Author: Stephen Boyd Date: Tue Mar 1 11:00:06 2016 -0800 clk: x86: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Acked-by: Mika Westerberg Signed-off-by: Stephen Boyd drivers/clk/x86/clk-lpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2969f6ee37d1cb10a5be2f8d4621e979652448da Author: Stephen Boyd Date: Tue Mar 1 10:59:53 2016 -0800 clk: mvebu: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Acked-by: Gregory CLEMENT Signed-off-by: Stephen Boyd drivers/clk/mvebu/common.c | 11 +++++------ drivers/clk/mvebu/dove-divider.c | 3 +-- 2 files changed, 6 insertions(+), 8 deletions(-) commit b3a33077c0ddb9819398091c70e5999afa8a4526 Author: Simon Horman Date: Thu Mar 3 11:18:06 2016 +0900 clk: renesas: move drivers to renesas directory This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Along with the above mentioned Kconfig changes it seems appropriate to also rename directories that only hold drivers for such SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/Makefile | 2 +- drivers/clk/renesas/Makefile | 13 + drivers/clk/renesas/clk-div6.c | 318 ++++++++++++++++ drivers/clk/renesas/clk-div6.h | 7 + drivers/clk/renesas/clk-emev2.c | 110 ++++++ drivers/clk/renesas/clk-mstp.c | 329 ++++++++++++++++ drivers/clk/renesas/clk-r8a73a4.c | 241 ++++++++++++ drivers/clk/renesas/clk-r8a7740.c | 199 ++++++++++ drivers/clk/renesas/clk-r8a7778.c | 145 ++++++++ drivers/clk/renesas/clk-r8a7779.c | 182 +++++++++ drivers/clk/renesas/clk-rcar-gen2.c | 429 +++++++++++++++++++++ drivers/clk/renesas/clk-rz.c | 106 ++++++ drivers/clk/renesas/clk-sh73a0.c | 218 +++++++++++ drivers/clk/renesas/r8a7795-cpg-mssr.c | 638 ++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 601 ++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.h | 134 +++++++ drivers/clk/shmobile/Makefile | 13 - drivers/clk/shmobile/clk-div6.c | 318 ---------------- drivers/clk/shmobile/clk-div6.h | 7 - drivers/clk/shmobile/clk-emev2.c | 110 ------ drivers/clk/shmobile/clk-mstp.c | 329 ---------------- drivers/clk/shmobile/clk-r8a73a4.c | 241 ------------ drivers/clk/shmobile/clk-r8a7740.c | 199 ---------- drivers/clk/shmobile/clk-r8a7778.c | 145 -------- drivers/clk/shmobile/clk-r8a7779.c | 182 --------- drivers/clk/shmobile/clk-rcar-gen2.c | 429 --------------------- drivers/clk/shmobile/clk-rz.c | 106 ------ drivers/clk/shmobile/clk-sh73a0.c | 218 ----------- drivers/clk/shmobile/r8a7795-cpg-mssr.c | 638 -------------------------------- drivers/clk/shmobile/renesas-cpg-mssr.c | 601 ------------------------------ drivers/clk/shmobile/renesas-cpg-mssr.h | 134 ------- 31 files changed, 3671 insertions(+), 3671 deletions(-) commit 27fbd266de34af6eb2759249696bd2b4da7c8434 Merge: 803c433 a080c8c Author: Stephen Boyd Date: Thu Mar 3 11:17:23 2016 -0800 Merge branch 'clk-shmobile-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull shmobile clk updates from Geert Uytterhoeven: - Fix a bug in the div6 clock driver that was exposed by CAN support on R-Car H3, - Add more module clocks for R-Car H3. * 'clk-shmobile-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: shmobile: r8a7795: Add CAN FD peripheral clock clk: shmobile: r8a7795: Add CANFD clock clk: shmobile: r8a7795: Add CAN peripheral clock clk: shmobile: div6: Fix .recalc_rate() using a stale divisor clk: shmobile: r8a7795: Add LVDS module clock clk: shmobile: r8a7795: Add FCP clocks commit 9d9e7ba9ee8f304c4608f3c81aa5e7fb3bddd251 Author: Mike Marshall Date: Thu Mar 3 13:46:48 2016 -0500 Orangefs: improve gossip statements Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 18 ++++++++++++++++++ fs/orangefs/file.c | 8 ++------ fs/orangefs/orangefs-mod.c | 11 ++++++----- fs/orangefs/waitqueue.c | 33 +++++++++++++++++++++++---------- 4 files changed, 49 insertions(+), 21 deletions(-) commit 95f60bb8118c1fc368d7414409d555f050aea7f2 Author: Markus Elfring Date: Sat Dec 26 18:40:43 2015 +0100 IB/ocrdma: Skip using unneeded intermediate variable Return the value from a call of the ocrdma_mbx_modify_qp() function without using an extra assignment for the local variable "status". Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d1c95b0e6526fc2a1841cc0b6b3bcb46c31cc038 Author: Markus Elfring Date: Sat Dec 26 18:28:35 2015 +0100 IB/ocrdma: Skip using unneeded intermediate variable Return zero at the end without using the local variable "status". Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ca4c39f32cd3fad57c18cd8df49d6b4e7bc2411 Author: Markus Elfring Date: Sat Dec 26 18:18:18 2015 +0100 IB/ocrdma: Delete unnecessary variable initialisations in 11 functions The variable "status" will be set to an appropriate value a bit later. Thus let us omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) commit 9532e6bbef87149f35de7f980f8bd61195936a78 Author: Hans Verkuil Date: Thu Mar 3 04:37:14 2016 -0300 [media] v4l2-mc.h: fix compiler warnings Fix these warnings when CONFIG_MEDIA_CONTROLLER is not defined: In file included from drivers/media/v4l2-core/v4l2-fh.c:32:0: include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function] static int v4l_enable_media_source(struct video_device *vdev) ^ include/media/v4l2-mc.h:183:12: warning: 'v4l_vb2q_enable_media_source' defined but not used [-Wunused-function] static int v4l_vb2q_enable_media_source(struct vb2_queue *q) ^ In file included from include/media/tuner.h:23:0, from drivers/media/tuners/tuner-types.c:9: include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function] static int v4l_enable_media_source(struct video_device *vdev) ^ include/media/v4l2-mc.h:178:13: warning: 'v4l_disable_media_source' defined but not used [-Wunused-function] static void v4l_disable_media_source(struct video_device *vdev) ^ Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57efac2f7108e3255d0dfe512290c9896f4ed55f Author: Ard Biesheuvel Date: Thu Mar 3 15:10:59 2016 +0100 arm64: enable CONFIG_DEBUG_RODATA by default In spite of its name, CONFIG_DEBUG_RODATA is an important hardening feature for production kernels, and distros all enable it by default in their kernel configs. However, since enabling it used to result in more granular, and thus less efficient kernel mappings, it is not enabled by default for performance reasons. However, since commit 2f39b5f91eb4 ("arm64: mm: Mark .rodata as RO"), the various kernel segments (.text, .rodata, .init and .data) are already mapped individually, and the only effect of setting CONFIG_DEBUG_RODATA is that the existing .text and .rodata mappings are updated late in the boot sequence to have their read-only attributes set, which means that any performance concerns related to enabling CONFIG_DEBUG_RODATA are no longer valid. So from now on, make CONFIG_DEBUG_RODATA default to 'y' Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Acked-by: Kees Cook Signed-off-by: Catalin Marinas arch/arm64/Kconfig.debug | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a30247bf09eeffaa46c00d59a62359aeb7d0462 Author: Hal Rosenstock Date: Tue Jan 5 13:52:55 2016 -0500 IB/core: Documentation fix in the MAD header file In ib_mad.h, ib_mad_snoop_handler uses send_buf rather than send_wr Signed-off-by: Hal Rosenstock Reviewed-by: Ira Weiny Signed-off-by: Doug Ledford include/rdma/ib_mad.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9096cae18130b4e8e289df36259a828d0c026fe8 Author: Shuah Khan Date: Thu Mar 3 00:38:19 2016 -0300 [media] media: au0828 audio mixer isn't connected to decoder When snd_usb_audio gets probed first, audio mixer doesn't get linked to the decoder. Change au0828_media_graph_notify() to handle the mixer entity getting registered before the decoder. Change au0828_media_device_register() to invoke au0828_media_graph_notify() to connect entites that were created prior to registering the notify handler. Signed-off-by: Shuah Khan Reported-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 54 ++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 9 deletions(-) commit aebb2b89bff0fdeb4e7ddd73dcbccde1a0f27554 Author: Shuah Khan Date: Wed Mar 2 13:50:31 2016 -0300 [media] sound/usb: Use Media Controller API to share media resources Change ALSA driver to use Media Controller API to share media resources with DVB and V4L2 drivers on a AU0828 media device. Media Controller specific initialization is done after sound card is registered. ALSA creates Media interface and entity function graph nodes for Control, Mixer, PCM Playback, and PCM Capture devices. snd_usb_hw_params() will call Media Controller enable source handler interface to request the media resource. If resource request is granted, it will release it from snd_usb_hw_free(). If resource is busy, -EBUSY is returned. Media specific cleanup is done in usb_audio_disconnect(). Signed-off-by: Shuah Khan Acked-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab sound/usb/Kconfig | 4 + sound/usb/Makefile | 2 + sound/usb/card.c | 14 +++ sound/usb/card.h | 3 + sound/usb/media.c | 318 +++++++++++++++++++++++++++++++++++++++++++++++ sound/usb/media.h | 72 +++++++++++ sound/usb/mixer.h | 3 + sound/usb/pcm.c | 28 ++++- sound/usb/quirks-table.h | 1 + sound/usb/stream.c | 2 + sound/usb/usbaudio.h | 6 + 11 files changed, 448 insertions(+), 5 deletions(-) commit 6ede20f9683c55dac8281b63d80b5cc669640252 Author: Olli Salonen Date: Wed Mar 2 08:06:06 2016 -0300 [media] dw2102: add support for TeVii S662 TeVii S662 is a USB 2.0 DVB-S2 tuner that's identical to TechnoTrend S2-4600 tuner. Add the USB ID to dw2102 driver. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 6060421368c6efdc974f8d6d5435c166ccc0dc63 Author: Olli Salonen Date: Wed Mar 2 08:06:05 2016 -0300 [media] dw2102: ts2020 included twice ts2020.h was already included a few lines earlier. Remove the unnecessary entry. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 1 - 1 file changed, 1 deletion(-) commit 711f3fba6ffd3914fd1b5ed9faf8d22bab6f2203 Author: Olli Salonen Date: Tue Mar 1 16:28:54 2016 -0300 [media] dvb-core: fix return code checking for devices with CA The test for the return code was mistakenly inverted. This caused DVB devices with CA module to fail on modprobe. Tested with TechnoTrend CT2-4650 CI USB tuner. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34f0693d7d772469f94d663c33ac18bc52080704 Author: RitwikGopi Date: Tue Mar 1 15:47:00 2016 -0300 [media] Staging: media/lirc: lirc_zilog.c : fixed a string split in multi-line issue Fixed a quoted string split in to multiple line issue(Actually fixed 2 warnings since it was split in to 3 lines.) Signed-off-by: Ritwik G Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 25c0f301425cecdc51d7cc6eb4fb163d464236bc Author: Miaoqing Pan Date: Thu Feb 18 17:20:02 2016 +0800 ath9k: clear bb filter calibration power threshold JP WiFi certification for bandwidth of channel 14 failed, the OBW is lower than the requirement. Clear the bb filter calibration power threshold to increase OBW(+2). The fix only for qca9531 chip now. Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_phy.c | 7 ++++++- drivers/net/wireless/ath/ath9k/ar9003_phy.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) commit e9a26010f607621597f25e55d94faf85a2d0d5a4 Author: Arnd Bergmann Date: Fri Feb 12 12:55:21 2016 +0100 ath9k: reduce stack usage in ar9003_aic_cal_post_process In some configurations, this function uses more than the warning limit of 1024 bytes: drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process': drivers/net/wireless/ath/ath9k/ar9003_aic.c:434:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] It turns out that there are two large arrays on the stack here, but almost all the data in them is never used outside of the loop in which it gets written, so we can replace the array with a single instance. The .valid flag is used later, so I'm replacing the array of structures with an array of bools. An obvious follow-up optimization would be to replace it with a bitmask and set_bit()/find_first_bit()/ find_last_bit()/... operations. However, I have not tested this patch, so I sticked to the simpler transformation that does the job of reducing the stack usage to a harmless level. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_aic.c | 79 +++++++++++++++-------------- drivers/net/wireless/ath/ath9k/ar9003_aic.h | 1 - 2 files changed, 40 insertions(+), 40 deletions(-) commit 82def495d118c6d36300c1cf2448c276273be603 Author: Miaoqing Pan Date: Fri Feb 5 09:45:50 2016 +0800 ath9k: make NF load complete quickly and reliably Make NF load complete quickly and reliably. NF load execution is delayed by HW to end of frame if frame Rx or Tx is ongoing. Increasing timeout to max frame duration. If NF cal is ongoing before NF load, stop it before load, and restart it afterwards. Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/calib.c | 38 ++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit c28e6f06ff401ce8f37d58ff6d8123664cd65a51 Author: Mohammed Shafi Shajakhan Date: Tue Feb 23 12:58:36 2016 +0530 ath10k: fix sanity check on enabling btcoex via debugfs First check for the device state before enabling / disabling btcoex, also return a proper error value. Enabling / disabling btcoex ideally does a f/w + ath10k_core_restart so the checks that are applicable for 'simulate_fw_crash' shall be applicable for this as well Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 035cad576d4e8c472a97b8913f92f73c93205fd3 Author: Jemma Denson Date: Sun Feb 28 15:29:50 2016 -0300 [media] cx24120: make sure tuner is locked at get_frontend Change get_frontend to re-check current lock status rather than relying on a cached value from get_status. Removes potential for tuning failure if get_frontend is called during tuning. Probably not too essential as other changes work around this: https://patchwork.linuxtv.org/patch/32845/ Signed-off-by: Jemma Denson Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cx24120.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 565e37d168ee842c5f6349a5530f8e85651ec8e5 Author: Matthieu Rogez Date: Sun Feb 28 08:26:22 2016 -0300 [media] em28xx: add support for Terratec Grabby Record led Terratec Grabby (hw rev 2) Record led is connected to GPIO 3 and its logic is inverted: (PIO3 = 0: on, PIO3 = 1: off). Signed-off-by: Matthieu Rogez Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dd837fb9a5092b10ebd75a1770257204ba20c872 Author: Matthieu Rogez Date: Sun Feb 28 08:26:21 2016 -0300 [media] em28xx: add support for Terratec Grabby REC button Terratec Grabby (hw rev 2) REC button uses the standard snapshot button configuration. Signed-off-by: Matthieu Rogez Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 1 + 1 file changed, 1 insertion(+) commit af9a6a3ad04cb042fe1b723335c411c1ab9b7959 Author: Anilkumar Kolli Date: Tue Feb 23 12:19:57 2016 +0530 ath10k: reduce number of peers to support peer stats feature To enable per peer stats feature we are reducing the number of peers. Firmware has introduced tx stats feature. We have memory limitation in firmware to add these additional bytes. These are the new variables introduced in the firmware. ======== ======================= Variable Bytes required/per rate ======== ======================= TX success packets 1 TX failed packets 1 Retry packets 1 Success bytes 2 TX failed bytes 2 Retry bytes 2 Tx duration 4 Rate 1 Bw and AMPDU flags 1 Total 16 (because of allocation in word pattern) Firmware sends these tx_stats in pktlog. If we consider 4 feedbacks at a time, Frimware need about ~1K memory for coding and 8192 bytes required / per rate [ 4*16*128(peers)]. To accommodate this firmware needs to reduce 10 peers. This fixes a firmware crash with firmware-5.bin_10.2.4.70.22-2. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 9 +++++++-- drivers/net/wireless/ath/ath10k/hw.h | 5 +++++ drivers/net/wireless/ath/ath10k/wmi.c | 10 ++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) commit da6416cac6b9439167964cae1302d9cfe764bf1d Author: Rajkumar Manoharan Date: Fri Feb 12 11:40:59 2016 +0530 ath10k: process htt rx indication as batch mode On multicore systems, it is possible that txrx tasket can run in parallel with pci tasklet (i.e smp affinity of ath10k irq is assigned to multiple CPUs). Feeding and consuming from the same rx completion list leads to txrx tasklet runs for longer period. Prevent this by processing a snapshot of rx queue by moving list into temporary list. Consecutive received frames will be processed in next batch. Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit e7827e512af01c6220e2f1cc53853f11cd742eef Author: Rajkumar Manoharan Date: Fri Feb 12 11:40:58 2016 +0530 ath10k: reduce rx_lock contention for htt rx indication Received frame indications are queued into a skb list and latest processed by txrx tasklet. This skb queue is protected by htt rx lock. Since the entire rx processing till delivering frame to mac80211 and replenish tasks are processed under rx_lock protection, there might be some delay in queuing newly received rx frame into that list on multicore systems. Optimize this by using skb list lock while accessing rx completion queue instead of htt rx lock. Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 22baa98097df3eb92a51e8661fda5dd7c0f1eb93 Author: Anton Protopopov Date: Wed Feb 10 11:58:55 2016 -0500 ath10k: fix erroneous return value The ath10k_pci_hif_exchange_bmi_msg() function may return the positive value EIO instead of -EIO in case of error. Signed-off-by: Anton Protopopov Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18353749170033405790ed62a3ae2aa2d3d8a82a Author: Ashok Raj Nagarajan Date: Fri Feb 5 21:12:49 2016 +0530 ath10k: add hw_rev to trace events to support pktlog pktlog data is different between firmware variants (eg. 10.2 vs 10.4). To have a unified user space script to decode pktlog trace events generated, it is desirable to know which firmware variant has provided the events and thereby decode the pktlogs appropriately. Hardware revision (hw_rev) helps to determine the firmware variant sending these trace events. So add hw_rev to trace events. Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/trace.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 53a5c9bc53ce51f65699a43c67ab167436d28083 Author: Ashok Raj Nagarajan Date: Fri Feb 5 21:12:48 2016 +0530 ath10k: fix pktlog in QCA99X0 Currently, we are providing wrong payload data of pktlog to trace points. Data we receive from FW through copy engine 8 contains pktlog data alone. We don't need to parse anything in driver before handing it to trace points. Fixes: afb0bf7f530b ("ath10k: add support for pktlog in QCA99X0") Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e0b6ce00b1ec0434e96629ab64f3e16dcb4f33b7 Author: Mohammed Shafi Shajakhan Date: Wed Feb 3 21:07:43 2016 +0530 ath10k: fix pointless update of peer stats list We periodically receive f/w stats event for updating the rx duration and there is no reason to keep on appending the f/w stats peer list, as this gets completely cleaned up when the user polls for f/w stats {pdev, vdev, peer stats}. Only don't print the warning message in the case PEER_STATS service is enabled Fixes: 856e7c3 ("ath10k: add debugfs support for Per STA total rx duration") Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 363bdb114434d021360c770871c2410df3965308 Author: Arnd Bergmann Date: Fri Feb 26 12:25:17 2016 -0300 [media] saa7134: fix warning with !MEDIA_CONTROLLER When CONFIG_MEDIA_CONTROLLER is disabled, we get a warning about an unused function: drivers/media/pci/saa7134/saa7134-core.c:832:13: error: 'saa7134_create_entities' defined but not used [-Werror=unused-function] This moves the #ifdef outside of the function, as it is never called here. Fixes: ac90aa02d5b9 ("[media] saa7134: add media controller support") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d37ba6250d3b412796ee69169655f0eb2ada279 Author: Arnd Bergmann Date: Fri Feb 26 08:53:22 2016 -0300 [media] em28xx: restore lost #ifdef The cleanup that changed the em28xx driver to use v4l2_mc_create_media_graph instead of its own implementation causes a build error when CONFIG_MEDIA_CONTROLLER is disabled: drivers/media/usb/em28xx/em28xx-video.c: In function 'em28xx_v4l2_init': drivers/media/usb/em28xx/em28xx-video.c:2717:38: error: 'struct em28xx' has no member named 'media_dev' This puts the new code inside the same #ifdef that controls the presence of the 'media_dev' member, and that the old code was in. Fixes: de39078779cb ("[media] em2xx: use v4l2_mc_create_media_graph()") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-video.c | 2 ++ 1 file changed, 2 insertions(+) commit bc717d5e92c8c079280eb4acbe335c6f25041aa2 Author: Philipp Zabel Date: Fri Feb 26 08:21:35 2016 -0300 [media] coda: fix error path in case of missing pdata on non-DT platform If we bail out this early, v4l2_device_register() has not been called yet, so no need to call v4l2_device_unregister(). Fixes: b7bd660a51f0 ("[media] coda: Call v4l2_device_unregister() from a single location") Reported-by: Michael Olbrich Signed-off-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 31e717dba1e18cc67f90124f326d8cf7a3725923 Author: Javier Martinez Canillas Date: Tue Feb 23 15:48:08 2016 -0300 [media] Revert "[media] tvp5150: document input connectors DT bindings" This reverts commit 82c2ffeb217a ("[media] tvp5150: document input connectors DT bindings") since the DT binding is too device driver specific and should instead be more generic and use the bindings in Documentation/devicetree/bindings/display/connector/ and linked to the tvp5150 using the OF graph port and endpoints. There are still ongoing discussions about how the input connectors will be supported by the Media Controller framework so until that is settled, it is better to revert the connectors portion of the bindings to avoid known to be broken bindings docs to hit mainline. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/tvp5150.txt | 43 ---------------------- 1 file changed, 43 deletions(-) commit fcda50c8f484cf1140232c8444470449f0619db9 Author: Arnd Bergmann Date: Mon Feb 22 22:08:35 2016 +0100 drm/msm: rename hdmi symbols Global symbols in the kernel should be prefixed by the name of the subsystem and/or driver to avoid conflicts when all code is built-in. In this case, function names like 'hdmi_register' or 'hdmi_set_mode' are way too generic for an MSM specific DRM driver, so I'm renaming them all to msm_hdmi_* here. I also rename a lot of the 'static' symbols along with the global names for consistency, even though those are relatively harmless; they might only be slightly confusing when they show up in backtraces. Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi.c | 98 +++++++++--------- drivers/gpu/drm/msm/hdmi/hdmi.h | 60 +++++------ drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 10 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 56 +++++----- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 34 +++--- drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c | 166 +++++++++++++++--------------- drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 20 ++-- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 58 +++++------ drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 4 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 4 +- drivers/gpu/drm/msm/msm_drv.h | 6 +- 17 files changed, 264 insertions(+), 264 deletions(-) commit 7977f4426c44da95c5dba91a62f099411e029de8 Author: Rob Clark Date: Wed Feb 24 18:56:24 2016 -0500 drm/msm/adreno: remove duplicate adreno_hw_init() call Not sure where it came from, but seem unintentional. And also not needed on a420, so let's just drop it. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 ------ 1 file changed, 6 deletions(-) commit 6c77d1abe61797239533918d7a0336fc84f4aef1 Author: Rob Clark Date: Mon Feb 22 06:26:21 2016 -0500 drm/msm: add timestamp param We need this for GL_TIMESTAMP queries. Note: currently only supported on a4xx.. a3xx doesn't have this always-on counter. I think we could emulate it with the one CP counter that is available, but for now it is of limited usefulness on a3xx (since we can't seem to do time-elapsed queries in any sane way with the existing firmware on a3xx, and if you are trying to do profiling on a tiler you want time-elapsed). We can add that later if it becomes useful. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 ++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 + include/uapi/drm/msm_drm.h | 1 + 4 files changed, 29 insertions(+) commit 4313c744d99314f84a7a98771a17c0c1adfb4de6 Author: Rob Clark Date: Wed Feb 3 14:02:04 2016 -0500 drm/msm: fix small typo Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 687f084a3bd01d932bb870a21fe92496055697d6 Author: Rob Clark Date: Wed Feb 3 13:24:35 2016 -0500 drm/msm: grab struct_mutex after allocating submit No real need to hold the lock over allocation, and simplifies things slightly if we change the order. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit c01a958eca6e7f23bc49058feb66942ebcacb277 Author: Rob Clark Date: Wed Feb 3 13:12:31 2016 -0500 drm/msm: reject submit ioctl if no gpu Existing userspace wouldn't get this far, since getparam ioctl would have failed and it would have bailed out creating a screen/context. But all the same, we shouldn't let evil or confused userspace cause a null ptr deref. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1e2c8e7a2f3f5b339a7bd972ad09c66ea52acea8 Author: Craig Stout Date: Thu Feb 18 16:50:03 2016 -0800 drm/msm/adreno: print details in case of a protect fault interrupt Signed-off-by: Craig Stout Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7d0c5ee9f07779ab29ac291748060a0a6f1d66db Author: Craig Stout Date: Thu Feb 18 16:50:02 2016 -0800 drm/msm/adreno: get CP_RPTR from register instead of shadow memory As described in the downstream/kgsl driver: Sometimes the RPTR shadow memory is unreliable causing timeouts in adreno_idle(). Read it directly from the register instead. Signed-off-by: Craig Stout Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 34 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 38bbc55ef5858301f5da6f6261434033a30058f6 Author: Craig Stout Date: Thu Feb 18 16:50:01 2016 -0800 drm/msm/adreno: add adreno430 power control Signed-off-by: Craig Stout Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 39 +++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit 357ff00b08d67cfb489f2e306bda7d3ef45a1306 Author: Craig Stout Date: Thu Feb 18 16:50:00 2016 -0800 drm/msm/adreno: support for adreno 430. Signed-off-by: Craig Stout Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 43 +++++++++++++++++++++++++----- drivers/gpu/drm/msm/adreno/adreno_device.c | 8 ++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 ++- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 ++++ 4 files changed, 52 insertions(+), 7 deletions(-) commit a2272e48eef02869dc3fa031720f36dd4cb05e4f Author: Rob Clark Date: Sat Feb 20 13:37:58 2016 -0500 drm/msm: update generated headers Pull in additional regs needed for a430, etc. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a2xx.xml.h | 11 +- drivers/gpu/drm/msm/adreno/a3xx.xml.h | 493 +++++++-- drivers/gpu/drm/msm/adreno/a4xx.xml.h | 1267 ++++++++++++++++++++++-- drivers/gpu/drm/msm/adreno/adreno_common.xml.h | 30 +- drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h | 48 +- drivers/gpu/drm/msm/dsi/dsi.xml.h | 5 +- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 5 +- drivers/gpu/drm/msm/dsi/sfpb.xml.h | 5 +- drivers/gpu/drm/msm/edp/edp.xml.h | 5 +- drivers/gpu/drm/msm/hdmi/hdmi.xml.h | 14 +- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 5 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4.xml.h | 5 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h | 5 +- drivers/gpu/drm/msm/mdp/mdp_common.xml.h | 5 +- 14 files changed, 1740 insertions(+), 163 deletions(-) commit 61965d3d5793f610bb44db04412d7d100612fc8e Author: Luis Henriques Date: Wed Feb 3 14:25:15 2016 +0000 drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init() This fixes the following build failure: drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm.o: In function `msm_dsi_pll_28nm_8960_init': dsi_pll_28nm.c:(.text+0x1198): multiple definition of `msm_dsi_pll_28nm_8960_init' drivers/gpu/drm/msm/dsi/pll/dsi_pll.o:dsi_pll.c:(.text+0x0): first defined here Signed-off-by: Luis Henriques Acked-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/pll/dsi_pll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26f7d1f4d9ab108b28b8d0f340b98941073c6f4d Author: Archit Taneja Date: Thu Feb 25 11:19:48 2016 +0530 drm/msm/dsi: Parse DSI lanes via DT The DSI driver is currently unaware of how the DSI physical data lanes are mapped to the logical lanes provided by the DSI controller. Create a DT binding "qcom,data-lane-map" that provides this information on a given platform. The MSM DSI controller is restricted in terms of what all mappings it can support. The lane polarity is fixed for all the lanes, the clock lanes are fixed, and the data lanes can be swapped among each other only for a few combinations. Apply these restrictions when we parse the DT data. Cc: devicetree@vger.kernel.org Cc: Rob Herring Cc: Tomi Valkeinen Signed-off-by: Archit Taneja Signed-off-by: Rob Clark Acked-by: Rob Herring .../devicetree/bindings/display/msm/dsi.txt | 32 +++++- drivers/gpu/drm/msm/dsi/dsi_host.c | 116 +++++++++++++++++---- 2 files changed, 125 insertions(+), 23 deletions(-) commit 20c169aceb459575681c4f4578d0e312bd1436c1 Author: Kuninori Morimoto Date: Thu Mar 3 17:25:53 2016 +0900 dmaengine: rcar-dmac: clear pertinence number of channels DMACHCLR clears each channels, but its channel number is based on its SoC or IP. Current driver is using fixed 0x7fff (= for 15ch), it is not good match for Gen3 or Gen2 Audio DMAC. This patch fixes it Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4478c407ea3810aad300ef8d4cee23b3d708461b Author: Boris Ostrovsky Date: Fri Feb 26 14:02:37 2016 -0500 xen/x86: Drop mode-selecting ifdefs in startup_xen() Use asm/asm.h macros instead. Signed-off-by: Boris Ostrovsky Signed-off-by: David Vrabel arch/x86/xen/xen-head.S | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 04b6b4a56884327c1648c517f1f46a2638f04c9d Author: Boris Ostrovsky Date: Fri Feb 26 14:02:36 2016 -0500 xen/x86: Zero out .bss for PV guests ELF spec is unclear about whether .bss must me cleared by the loader. Currently the domain builder does it when loading the guest but because it is not (or rather may not be) guaranteed we should zero it out explicitly. Signed-off-by: Boris Ostrovsky Signed-off-by: David Vrabel arch/x86/xen/xen-head.S | 9 +++++++++ 1 file changed, 9 insertions(+) commit 008e56d200225321371748d95908e6222436f06d Author: Asai Thambi SP Date: Wed Feb 24 21:21:20 2016 -0800 mtip32xx: Cleanup queued requests after surprise removal Fail all pending requests after surprise removal of a drive. Signed-off-by: Vignesh Gunasekaran Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 78 ++++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) commit abb0ccd185c9e31847709b86192e6c815d1f57ad Author: Asai Thambi SP Date: Wed Feb 24 21:21:13 2016 -0800 mtip32xx: Implement timeout handler Added timeout handler. Replaced blk_mq_end_request() with blk_mq_complete_request() to avoid double completion of a request. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 95 +++++++++++++++++++++++++++++++++++---- drivers/block/mtip32xx/mtip32xx.h | 7 ++- 2 files changed, 92 insertions(+), 10 deletions(-) commit aae4a033868c496adae86fc6f9c3e0c405bbf360 Author: Asai Thambi SP Date: Wed Feb 24 21:18:20 2016 -0800 mtip32xx: Handle FTL rebuild failure state during device initialization Allow device initialization to finish gracefully when it is in FTL rebuild failure state. Also, recover device out of this state after successfully secure erasing it. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 51c6570eb922146470c2fe660c34585414679bd6 Author: Asai Thambi SP Date: Wed Feb 24 21:18:10 2016 -0800 mtip32xx: Handle safe removal during IO Flush inflight IOs using fsync_bdev() when the device is safely removed. Also, block further IOs in device open function. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 34 ++++++++++++++++++++++++++++++++-- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 33 insertions(+), 2 deletions(-) commit 59cf70e236c96594d9f1e065755d8fce9df5356b Author: Asai Thambi SP Date: Wed Feb 24 21:17:47 2016 -0800 mtip32xx: Fix for rmmod crash when drive is in FTL rebuild When FTL rebuild is in progress, alloc_disk() initializes the disk but device node will be created by add_disk() only after successful completion of FTL rebuild. So, skip deletion of device node in removal path when FTL rebuild is in progress. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d8a18d2d8f5de55666c6011ed175939d22c8e3d8 Author: Asai Thambi SP Date: Wed Feb 24 21:17:32 2016 -0800 mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild Prevent standby immediate command from being issued in remove, suspend and shutdown paths, while drive is in FTL rebuild process. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 5b7e0a8ac85e2dfd83830dc9e0b3554d153a37e3 Author: Asai Thambi SP Date: Wed Feb 24 21:16:38 2016 -0800 mtip32xx: Print exact time when an internal command is interrupted Print exact time when an internal command is interrupted. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e35b94738a2f7caa12017f69ef385cb6b8028965 Author: Asai Thambi SP Date: Wed Feb 24 21:16:21 2016 -0800 mtip32xx: Remove unwanted code from taskfile error handler Remove setting and clearing MTIP_PF_EH_ACTIVE_BIT flag in mtip_handle_tfe() as they are redundant. Also avoid waking up service thread from mtip_handle_tfe() because it is already woken up in case of taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit cfc05bd31384c4898bf2437a4de5557f3cf9803a Author: Asai Thambi SP Date: Wed Feb 24 21:16:00 2016 -0800 mtip32xx: Fix broken service thread handling Service thread does not detect the need for taskfile error hanlding. Fixed the flag condition to process taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 6 +++--- drivers/block/mtip32xx/mtip32xx.h | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) commit d37410c27299fab8c7f17041f71ca5c2046d1f6f Author: Sakari Ailus Date: Mon Feb 22 17:47:03 2016 -0300 [media] media: Properly handle user pointers Mark pointers containing user pointers as such. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6fb5629987239c6a8438fab8fd324b7724e49453 Author: Wolfram Sang Date: Tue Mar 1 17:37:07 2016 +0100 dmaengine: sh: shdmac: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/shdmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0629e991a25a9b56a70f9f0c327aad8ae1471dbf Author: Sakari Ailus Date: Mon Feb 22 17:47:04 2016 -0300 [media] media: Move media_get_uptr() macro out of the media.h user space header The media_get_uptr() macro is mostly useful only for the IOCTL handling code in media-device.c so move it there. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 5 +++++ include/uapi/linux/media.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 333f16ec68f6fc6b208130de22717b585e6f3242 Author: Laxman Dewangan Date: Tue Mar 1 18:54:40 2016 +0530 dmaengine: tegra: don't open code of_device_get_match_data() Use of_device_get_match_data() for getting matched data instead of implementing this locally. Signed-off-by: Laxman Dewangan Acked-by: Thierry Reding Signed-off-by: Vinod Koul drivers/dma/tegra20-apb-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 458f5884a1972f26c5260539822b0d158dd85e92 Author: Andy Gross Date: Mon Feb 29 17:15:19 2016 -0600 dmaengine: qcom_bam_dma: Make driver work for BE This patch fixes the Qualcomm BAM dmaenging driver to work with big endian kernels. Signed-off-by: Andy Gross Signed-off-by: Vinod Koul drivers/dma/qcom_bam_dma.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 94c622b2a742c6793d74a71280df0c3a5365a156 Author: Emilio López Date: Sun Feb 21 22:26:35 2016 -0300 dmaengine: sun4i: support module autoloading MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on supported systems. This commit adds the missing line so it loads automatically when building it as a module and running on a system with the early sunxi DMA engine. Signed-off-by: Emilio López Reviewed-by: Javier Martinez Canillas Signed-off-by: Vinod Koul drivers/dma/sun4i-dma.c | 1 + 1 file changed, 1 insertion(+) commit 76485d8e04c337bcab90f62975a3db740c8c2dd4 Author: Emilio López Date: Sun Feb 21 22:26:36 2016 -0300 [media] usb: musb: sunxi: support module autoloading MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on sunxi systems using the OTG controller. This commit adds the missing line so it loads automatically when building it as a module and running on a system with an USB OTG port. Signed-off-by: Emilio López Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/usb/musb/sunxi.c | 1 + 1 file changed, 1 insertion(+) commit d387ef021a218ee66fe6b64cf447da09cac5c53b Author: Dan Carpenter Date: Mon Feb 29 12:51:07 2016 +0300 dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo This is harmless because the caller only cares about zero vs non-zero but we should be returning PTR_ERR() here. Signed-off-by: Dan Carpenter Signed-off-by: Vinod Koul drivers/dma/mic_x100_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea05e8b4ec91a562bbd26ae2e1d0fc434b8d5d27 Author: Emilio López Date: Sun Feb 21 22:26:34 2016 -0300 [media] rc: sunxi-cir: support module autoloading MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on systems supporting infrared. This commit adds the missing line so it works out of the box when built as a module and running on a sunxi system with an infrared receiver. Signed-off-by: Emilio López Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sunxi-cir.c | 1 + 1 file changed, 1 insertion(+) commit 1c278e5e3718d15475ec08ee2135f37a6b13361c Author: Tomi Valkeinen Date: Tue Feb 23 17:34:34 2016 +0200 drm/omap: no need to select OMAP2_DSS omapdss driver now depends on omapdrm, so we no longer should select OMAP2_DSS from omapdrm's Kconfig. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/Kconfig | 1 - 1 file changed, 1 deletion(-) commit c2eb77ff717c3aa403f5807425a7f2b2cb67b6b3 Author: Laurent Pinchart Date: Wed Mar 2 12:51:19 2016 +0200 drm/omap: gem: Fix omap_gem_new() error path When an error occurs in omap_gem_new() the function calls omap_gem_free_object() to clean up. However, that function expects to be called on a fully initialized GEM object and thus crashes. Replace it by manual cleanup. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 39cd66209db9c0e8e80e24321d9f47de8ac5c52e Author: Tomi Valkeinen Date: Tue Mar 1 11:09:36 2016 +0200 drm/omap: remove -Werror from Makefile Having -Werror in the omapdrm Makefile makes development and debugging a PITA. Let's remove it. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bce5f4310dcec379e0b33cd1404456fda6f548e Author: Tomi Valkeinen Date: Mon Feb 22 18:22:30 2016 +0200 drm/omap: remove dispc_ovl_check() dispc_ovl_check() is not used anywhere, so it can be removed. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 41 ----------------------------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 ----- 2 files changed, 46 deletions(-) commit 9198891b4e1d336a77137a9327de05acc10896e2 Author: Tomi Valkeinen Date: Mon Feb 22 16:11:45 2016 +0200 drm/omap: remove dss compat code We have removed all the uses of compat code from omapdrm and the non-compat parts of omapdss, so now we can remove all the compat code itself. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/Makefile | 3 - drivers/gpu/drm/omapdrm/dss/apply.c | 1711 --------------------------- drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 667 ----------- drivers/gpu/drm/omapdrm/dss/dispc-compat.h | 30 - drivers/gpu/drm/omapdrm/dss/dispc.c | 4 - drivers/gpu/drm/omapdrm/dss/display-sysfs.c | 356 ------ drivers/gpu/drm/omapdrm/dss/dss.h | 37 - drivers/gpu/drm/omapdrm/dss/manager-sysfs.c | 531 --------- drivers/gpu/drm/omapdrm/dss/manager.c | 263 ---- drivers/gpu/drm/omapdrm/dss/overlay-sysfs.c | 456 ------- drivers/gpu/drm/omapdrm/dss/overlay.c | 202 ---- 11 files changed, 4260 deletions(-) commit 751d2e18b0859ec3edc1c61bfcc09affdbd9b323 Author: Tomi Valkeinen Date: Thu Nov 5 10:02:43 2015 +0200 drm/omap: remove last uses of omap_overlay_manager We have now removed all uses of 'struct omap_overlay_manager', so we can now remove the last places where it is set. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 10 ---------- 1 file changed, 10 deletions(-) commit 0674d38627abb02e0caa9f2344a73688bdf30014 Author: Tomi Valkeinen Date: Thu Nov 5 10:01:02 2015 +0200 drm/omap: DSI: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes DSI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 58 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit 532a2cba7a7c23c87b4407f889b949a61816b3d1 Author: Tomi Valkeinen Date: Thu Nov 5 09:57:35 2015 +0200 drm/omap: VENC: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes VENC driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/venc.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit c64b79c80a10cce0f99222b42dca39ae3c6219bb Author: Tomi Valkeinen Date: Thu Nov 5 09:57:04 2015 +0200 drm/omap: SDI: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes SDI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/sdi.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 46e1ef3b6f522acd2d4e295b346180c793a713e8 Author: Tomi Valkeinen Date: Thu Nov 5 09:56:21 2015 +0200 drm/omap: HDMI4: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI4 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 86e95f92f9f85ae3207382cca7ba4fc86fd2ddd0 Author: Tomi Valkeinen Date: Thu Nov 5 09:55:01 2015 +0200 drm/omap: HDMI5: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI5 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi5.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit a070ba6cea0e454f06bec8ecbf2f207c0a94a061 Author: Tomi Valkeinen Date: Thu Nov 5 09:52:00 2015 +0200 drm/omap: DPI: remove uses of omap_overlay_manager We are removing the uses of 'struct omap_overlay_manager'. This patch changes DPI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit a0e53bfe9f41689d337955814bdc2e5c0f373009 Author: Tomi Valkeinen Date: Thu Nov 5 09:44:53 2015 +0200 drm/omap: remove extra manager checks on disconnect The DSS output drivers check 'dssdev->manager' in disconnect() functions. This check is not needed as the manager must always be set if the output device was connected. Remove the check. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +-- drivers/gpu/drm/omapdrm/dss/sdi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/venc.c | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) commit 98df844806869d09d9fb06ec69411f0378373360 Author: Tomi Valkeinen Date: Thu Nov 5 09:41:12 2015 +0200 drm/omap: remove extra check in dpi and sdi Both dpi and sdi check for 'mgr != NULL' in check_timings. This check is not necessary, as mgr must always be set before check_timings. Remove the check. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3421899893d9c430635b909e1ba0287ba6319e34 Author: Tomi Valkeinen Date: Thu Nov 5 09:23:47 2015 +0200 drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_unregister_framedone_handler() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit af235e31e922d97f093e27f5218bfa097447104b Author: Tomi Valkeinen Date: Thu Nov 5 09:23:03 2015 +0200 drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_register_framedone_handler() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 1f03f93480c59bff7afcc61977aa4060d3d6fb20 Author: Tomi Valkeinen Date: Thu Nov 5 09:20:46 2015 +0200 drm/omap: convert dss_mgr_start_update to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_start_update() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 705fd454a909ab652954c04352bc9f2753523d7b Author: Tomi Valkeinen Date: Wed Nov 4 20:28:45 2015 +0200 drm/omap: convert dss_mgr_disable to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) commit 85a8c62250d7e31ded7a45c312b6860fb87e1a13 Author: Tomi Valkeinen Date: Wed Nov 4 20:27:31 2015 +0200 drm/omap: convert dss_mgr_enable to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_enable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc-compat.c | 2 +- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) commit bb772e1abfa58f8812fabfea16775c17d15daade Author: Tomi Valkeinen Date: Wed Nov 4 20:26:15 2015 +0200 drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_lcd_config() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 5c6ff3cd4546dea0a7a70cef6c9b656b8b022217 Author: Tomi Valkeinen Date: Wed Nov 4 20:25:05 2015 +0200 drm/omap: convert dss_mgr_set_timings to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) commit bdac3bb946f1bb9a38eb15df755b579b6dc56834 Author: Tomi Valkeinen Date: Wed Nov 4 20:23:37 2015 +0200 drm/omap: convert dss_mgr_disconnect to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/venc.c | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) commit 1b07b0664aa9f36e5a79c82cff46722e587ab647 Author: Tomi Valkeinen Date: Wed Nov 4 20:21:48 2015 +0200 drm/omap: convert dss_mgr_connect to accept omap_channel We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_connect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/dss/output.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit f1504ad00daeeb301936f8695be28edb61613b76 Author: Tomi Valkeinen Date: Thu Nov 5 09:34:51 2015 +0200 drm/omap: use dispc_channel_connected in output drivers Use 'out->dispc_channel_connected' to check if the device is connected to an overlay manager or not, instead of using 'out->manager'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- drivers/gpu/drm/omapdrm/dss/rfbi.c | 2 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 49239503a364bf09845d03536b28ea434b92184d Author: Tomi Valkeinen Date: Thu Nov 5 09:34:31 2015 +0200 drm/omap: add dispc_channel_connected field to omap_dss_device We want to remove the 'struct omap_overlay_manager' from omap_dss_device. At the moment that field is used, among some other uses, to see if the omap_dss_device is connected to an overlay manager. To make it possible to remove the 'struct omap_overlay_manager' field, this patch adds 'bool dispc_channel_connected' field to track the connected-or-not status. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 2 ++ include/video/omapdss.h | 1 + 2 files changed, 3 insertions(+) commit e5cbb6e8eaa6d4ae8b4acafd59e2e058105c8177 Author: Tomi Valkeinen Date: Wed Nov 4 19:36:26 2015 +0200 drm/omap: convert dss_mgr_ops to use omap_channel We are removing the use of 'struct omap_overlay_manager' from omapdrm. This patch changes the function pointers in 'dss_mgr_ops' to get 'enum omap_channel' parameter instead of 'struct omap_overlay_manager'. The change is very straightforward, as we still use 'struct omap_overlay_manager' inside the function implementations where needed. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/apply.c | 27 ++++++++++++++++--------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 18 ++++++++--------- drivers/gpu/drm/omapdrm/dss/output.c | 18 ++++++++--------- drivers/gpu/drm/omapdrm/omap_crtc.c | 38 +++++++++++++++++++---------------- 4 files changed, 57 insertions(+), 44 deletions(-) commit 179df15fc54118fc5c949138eeccc24c54f758a1 Author: Tomi Valkeinen Date: Wed Oct 21 16:17:23 2015 +0300 drm/omap: remove use of omapdss_find_mgr_from_display() In order to remove uses of 'struct omap_overlay_manager' we need to get rid of using omapdss_find_mgr_from_display() when initializing omapdrm. Instead of using omapdss_find_mgr_from_display() and mgr->id to find the dispc channel used for the given display, we can instead use omapdss_find_output_from_display(), and get the output->dispc_channel from there. We can also remove omapdss_find_mgr_from_display() as it's no longer used. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/output.c | 18 ------------------ drivers/gpu/drm/omapdrm/omap_drv.c | 8 +++++--- 2 files changed, 5 insertions(+), 21 deletions(-) commit 3a9241386494ed5797e4c7244b944ac312d35515 Author: Tomi Valkeinen Date: Wed Oct 21 16:34:08 2015 +0300 drm/omap: remove crtc->mgr field In order to remove uses of 'struct omap_overlay_manager' from omapdrm, this patch removes the crtc->mgr field. To accomplish that, a new static array is added along the current 'omap_crtcs' static array, which is used to store the output device connected to a crtc. Optimally we'd use the struct omap_crtc to store this information, but at the time when omap_crtc_dss_connect() is called, we don't yet have the omap_crtc instances. This might possibly be fixed later, but for now the static array does the job. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 7b9cb5eeb4d0b1db63e198dfd02aadddaf245de4 Author: Tomi Valkeinen Date: Wed Nov 4 15:11:25 2015 +0200 drm/omap: Add dispc_mgr_get_supported_outputs() We are removing the use of the 'struct omap_overlay_manager' from omapdrm, and one part of that is removing the use of mgr->supported_outputs field. This patch adds dispc_mgr_get_supported_outputs() function which can be used instead of mgr->supported_outputs. omap_crtc.c is changed to use the new function. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 ++ drivers/gpu/drm/omapdrm/omap_crtc.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) commit caaecd9abe6c67a52fa6fd444d8dffb4ca3833c9 Author: Tomi Valkeinen Date: Fri Feb 19 17:37:09 2016 +0200 drm/omap: move dss_mgr_* declarations to omapdrm/omapfb This patch continues the work to create private versions of the omapdss.h header for omapdrm and omapfb. This one moves the dss_mgr_* function declarations. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/omapdss.h | 16 ++++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dss.h | 16 ++++++++++++++++ include/video/omapdss.h | 16 ---------------- 3 files changed, 32 insertions(+), 16 deletions(-) commit 564c7c7510b119d3a6295f9e159202636cbf3bbe Author: Tomi Valkeinen Date: Fri Feb 19 17:19:41 2016 +0200 drm/omap: move struct dss_mgr_ops to omapdrm/omapfb This patch continues the work to create private versions of the omapdss.h header for omapdrm and omapfb. This one moves 'struct dss_mgr_ops'. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/omapdss.h | 22 ++++++++++++++++++++++ drivers/video/fbdev/omap2/omapfb/dss/dss.h | 24 ++++++++++++++++++++++++ include/video/omapdss.h | 22 ---------------------- 3 files changed, 46 insertions(+), 22 deletions(-) commit 35a339acca695126b57ef7b7d2d3aaa208c93967 Author: Tomi Valkeinen Date: Fri Feb 19 16:54:36 2016 +0200 drm/omap, omapfb: move exported dispc function declarations to omapdrm/omapfb omapdrm and omapfb still share the same include/video/omapdss.h. We need to change that so that we can proceed with omapdrm work. However, it's not trivial to make separate omapfb and omapdrm versions of omapdss.h, as that file is also included in other places like arch code, audio code and omap_vout code. So we'll do it piece by piece. This patch makes private versions of all the dispc function declarations that are in omapdss.h. For omapdrm we create a new file, drivers/gpu/drm/omapdrm/dss/omapdss.h, which will contain headers meant to be visible outside omapdss. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dss.h | 2 + drivers/gpu/drm/omapdrm/dss/omapdss.h | 61 ++++++++++++++++++++++++++++ drivers/gpu/drm/omapdrm/omap_drv.h | 2 + drivers/video/fbdev/omap2/omapfb/dss/dispc.h | 1 + drivers/video/fbdev/omap2/omapfb/dss/dss.h | 38 +++++++++++++++++ include/video/omapdss.h | 38 ----------------- 6 files changed, 104 insertions(+), 38 deletions(-) commit 33c06b6f7ebdc3443e8030353d21b21f2b721387 Author: Tomi Valkeinen Date: Mon Feb 22 18:14:52 2016 +0200 drm/omap: panel-tpo-td043mtea1: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen .../drm/omapdrm/displays/panel-tpo-td043mtea1.c | 43 +++------------------- 1 file changed, 5 insertions(+), 38 deletions(-) commit b34da247a8c9707487ce15cdfcf94cd26a2d5d6d Author: Tomi Valkeinen Date: Mon Feb 22 18:14:33 2016 +0200 drm/omap: panel-tpo-td028ttec1: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen .../drm/omapdrm/displays/panel-tpo-td028ttec1.c | 41 +++------------------- 1 file changed, 5 insertions(+), 36 deletions(-) commit 367aa94c611b054756cf7118f695aa7b1b8523e6 Author: Tomi Valkeinen Date: Thu Feb 18 17:27:55 2016 +0200 drm/omap: panel-nec-nl8048hl11: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen .../drm/omapdrm/displays/panel-nec-nl8048hl11.c | 44 +++------------------- 1 file changed, 5 insertions(+), 39 deletions(-) commit 393c2698d678d04cc702308f070306c4a2045d4f Author: Tomi Valkeinen Date: Mon Feb 22 18:13:36 2016 +0200 drm/omap: panel-sharp-ls037v7dw01: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen .../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 83 ++-------------------- 1 file changed, 5 insertions(+), 78 deletions(-) commit 4e040ec70baa7a9710670366cb75f5fb1a13f3af Author: Tomi Valkeinen Date: Thu Feb 18 17:22:54 2016 +0200 drm/omap: panel-lgphilips-lb035q02: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen .../omapdrm/displays/panel-lgphilips-lb035q02.c | 53 ++-------------------- 1 file changed, 5 insertions(+), 48 deletions(-) commit 7f7642b5b9bb029918cb5deb70a6e3fb4d7212e0 Author: Tomi Valkeinen Date: Thu Feb 18 17:20:54 2016 +0200 drm/omap: connector-hdmi: remove pdata support We no longer have any boards that require the platform data support from the connector, so we can remove the related code. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 39 +++-------------------- 1 file changed, 5 insertions(+), 34 deletions(-) commit a0d56d7ea5afd9c11381e30169b2884a43a9ff20 Author: Tomi Valkeinen Date: Thu Feb 18 17:18:41 2016 +0200 drm/omap: connector-dvi: remove pdata support We no longer have any boards that require the platform data support from the connector, so we can remove the related code. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 55 +++--------------------- 1 file changed, 5 insertions(+), 50 deletions(-) commit f4487e35854ba9d2ebc656210898d953c58ca391 Author: Tomi Valkeinen Date: Thu Feb 18 17:14:54 2016 +0200 drm/omap: encoder-tfp410: remove pdata support We no longer have any boards that require the platform data support from the encoder, so we can remove the related code. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 41 +++-------------------- 1 file changed, 5 insertions(+), 36 deletions(-) commit 3d1f0f593e1e367798166c7e92bdc718593e5583 Author: Tomi Valkeinen Date: Thu Feb 18 17:12:46 2016 +0200 drm/omap: panel-dsi-cm: remove pdata support We no longer have any boards that require the platform data support from the panel, so we can remove the related code. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 49 +++---------------------- 1 file changed, 5 insertions(+), 44 deletions(-) commit e41e9b25d3f774b9e933e786d8da07db25e1d2cb Author: Tomi Valkeinen Date: Thu Feb 18 16:27:53 2016 +0200 drm/omap: omapdss.h: remove omap_hdmi_init omap_hdmi_init() function does not exist anymore, so we can remove the declaration. Signed-off-by: Tomi Valkeinen include/video/omapdss.h | 2 -- 1 file changed, 2 deletions(-) commit febfd1b92ca5559d495839d54e4a72044553a739 Author: Tomi Valkeinen Date: Fri Feb 19 16:59:38 2016 +0200 drm/omap: omapdss.h: remove unused struct omap_dss_hdmi_data 'struct omap_dss_hdmi_data' is not used anywhere, so we can remove it. Signed-off-by: Tomi Valkeinen include/video/omapdss.h | 7 ------- 1 file changed, 7 deletions(-) commit 18840d3fbd9037ae8557354ea9d020314a168540 Author: Tomi Valkeinen Date: Fri Feb 19 18:05:14 2016 +0200 drm/omap: move dss_suspend/resume_all to core.c core.c is the only caller of dss_disable_all_devices(). We can thus move the function from display.c to core.c and make it static. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 13 +++++++++++++ drivers/gpu/drm/omapdrm/dss/display.c | 13 ------------- drivers/gpu/drm/omapdrm/dss/dss.h | 2 -- 3 files changed, 13 insertions(+), 15 deletions(-) commit 92bf0f9e2a9f1ea99d86ab6b0c3a87183a67e63c Author: Tomi Valkeinen Date: Fri Oct 2 11:10:42 2015 +0300 drm/omap: fix suspend/resume handling For legacy reasons omapdss handles system suspend/resume via PM notifier callback, where the driver disables/resumes all the outputs. This doesn't work well with omapdrm. What happens on suspend is that the omapdss disables the displays while omapdrm is still happily continuing its work, possibly waiting for an vsync irq, which will never come if the display output is disabled, leading to timeouts and errors sent to userspace. This patch moves the suspend/resume handling to omapdrm, and the suspend/resume is now done safely inside modeset lock. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/core.c | 29 ----------------------- drivers/gpu/drm/omapdrm/dss/display.c | 36 ---------------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 2 -- drivers/gpu/drm/omapdrm/omap_drv.c | 44 +++++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 67 deletions(-) commit bfeece553335f9b9bf0d4dc9ea8a602a2248dfd6 Author: Tomi Valkeinen Date: Thu Aug 27 13:09:22 2015 +0300 drm/omap: check if rotation is supported before commit omapdrm is missing a check on the validity of the rotation property. This leads to omapdrm possibly trying to use rotation on non-rotateable framebuffer, which causes the overlay setup to fail. This patch adds the necessary check to omap_plane_atomic_check(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 8 ++++++++ drivers/gpu/drm/omapdrm/omap_plane.c | 6 ++++++ 3 files changed, 15 insertions(+) commit 6bdad6cf98844e76f678da35dea09193bfb78be1 Author: Tomi Valkeinen Date: Thu Feb 18 18:47:14 2016 +0200 drm/omap: fix crtc->plane property delegation Before universal planes we had to have plane specific properties for the crtc too, as on the hardware level a crtc uses a plane. In other words, e.g. 'zorder' property was added to both planes and crtcs, and omap_crtc.c would delegate the property set/get to the primary plane. However, the delegation was a bit too generic, delegating all property set/get calls to planes. Thus it's possible to set, say, FB_ID, on a crtc, which gets redirected to the primary plane. This is not standard, and shouldn't be allowed. To keep backward compatibility, we still need to redirect the properties we supported earlier for crtcs, namely 'zorder' and 'rotation'. This patch redirects only the allowed properties from crtcs to planes. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_crtc.c | 58 +++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 18 deletions(-) commit e1d4ee0f2b8dd77f67798544f58ce4bee4fdddf9 Author: Rob Clark Date: Sun Oct 20 12:07:42 2013 -0400 drm/omap: EBUSY status handling in omap_gem_fault() Subsequent threads returning EBUSY from vm_insert_pfn() was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS. See e79e0fe380847493266fba557217e2773c61bd1b ("drm/i915: EBUSY status handling added to i915_gem_fault()"). Signed-off-by: Rob Clark Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem.c | 5 +++++ 1 file changed, 5 insertions(+) commit be4f235c43f06ae749b8f99b04f899d1e9bd561e Author: Tomi Valkeinen Date: Fri Jan 8 15:51:02 2016 +0200 drm/omap: verify that fb plane pitches are the same The DSS hardware uses the same ROW_INC value for both Y and UV planes for NV12 format. This means that the pitches of the Y and UV planes have to match. omapdrm doesn't check this at the moment, and this can lead into a broken NV12 fb on the screen. This patch adds the check. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_fb.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2158f2c7fe7638040034135e934f89cb2e018625 Author: Tomi Valkeinen Date: Tue Jan 5 11:43:18 2016 +0200 drm/omap: verify that display x-res is divisible by 8 DISPC requires the x resolution to be divisible by 8 when stall mode is not used. Add a check to the DPI driver to verify this. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dpi.c | 3 +++ 1 file changed, 3 insertions(+) commit d31966ffd123e4bc3426af26855f77c2d3a70d2b Author: Tomi Valkeinen Date: Wed Jan 13 18:41:40 2016 +0200 drm/omap: HDMI5: allow interlace Now that interlace support has been added, we can remove the check that prevents interlace. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 ---- 1 file changed, 4 deletions(-) commit 14ac59349c04caedb53a75c85d19cf7d68992748 Author: Tomi Valkeinen Date: Wed Jan 13 18:41:39 2016 +0200 drm/omap: HDMI5: Add interlace support Add the missing bits for interlace: * Set VBLANK_OSC if the videomode's vblank is fractional * Halve the vertical timings for interlace * Double the horizontal timings for double-pixel mode * Set FC_PRCONF properly for double-pixel mode Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 711445cfe4be8b3b7203f7634452787f48165aff Author: Tomi Valkeinen Date: Wed Jan 13 18:41:38 2016 +0200 drm/omap: HDMI5: clean up timings copy The HDMI driver copies the timing values one by one. Instead we can just copy the whole struct. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 48b207d2698b77ddb0395de5c16190f2a0eb3a48 Author: Tomi Valkeinen Date: Wed Jan 13 18:41:37 2016 +0200 drm/omap: HDMI5: Fix FC HSW value For some reason the HDMI FC's HSW value is programmed to hsw-1. There's no indication in the documentation that this would be correct, and no other blanking value needs -1 either. So remove the -1. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7536d674575248fb8a7b09992496cf7110a875b Author: Tomi Valkeinen Date: Wed Jan 13 18:41:36 2016 +0200 drm/omap: DISPC: Fix field order for HDMI Interlace field order is different between VENC and HDMI. The driver currently sets the field order for VENC. This patch adds the code to set the field order for HDMI. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b2af809241ac60a8728f76817bfa7a7e4d83c401 Author: Tomi Valkeinen Date: Wed Jan 13 18:41:35 2016 +0200 drm/omap: HDMI: fix WP timings for ilace The HDMI WP timings are not programmed correctly for interlace. We need to halve the vertical timings when interlace is used, and double the horizontal timings when pixel doubling is used. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit c92e87276c83eae1c92c6edaec0a6f3bf9b8f795 Author: Tomi Valkeinen Date: Wed Jan 13 18:41:34 2016 +0200 drm/omap: HDMI: Fix HSW value On OMAP4 and OMAP5 ES1.0 the HDMI_WP_VIDEO_TIMING_H:HSW field is set directly to the HSW value. On later SoCs the field needs to be programmed with the value of HSW-1. Currently the driver always programs the field with the HSW value. Most videomodes seem to work fine with that, but at least low resolution interlaced modes don't work at all. This patch fixes the HSW for OMAP5 ES2.0+ SoCs. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 67d8ffdd688e4ddc4fac25e338f748000128b3ce Author: Tomi Valkeinen Date: Wed Jan 13 18:41:33 2016 +0200 drm/omap: HDMI: support double-pixel pixel clock We need double-pixel mode (pixel repetition) for interlace modes. This patch adds the necessary support to HDMI to double the pixel clock when double-pixel mode is used. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi4.c | 7 ++++++- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 253589589587ccbc575c8dfdc43bf2c8c2a66a5b Author: Tomi Valkeinen Date: Wed Jan 13 18:41:32 2016 +0200 drm/omap: support double-pixel We need double-pixel mode (pixel repetition) for interlace modes. This patch adds the necessary support to omapdrm to output double-pixel mode. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_connector.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3a38ed53bebd1c14925a711123c911e07dd11adf Author: Tomi Valkeinen Date: Wed Jan 13 18:41:31 2016 +0200 drm/omap: DISPC: support double-pixel mode We need double-pixel mode (pixel repetition) for interlace modes. This patch adds the necessary support to DISPC to output double-pixel mode. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++++++ include/video/omapdss.h | 2 ++ 2 files changed, 10 insertions(+) commit 61f3c40b489c7f3ca2f844e6513c1abd08e66a93 Author: Tomi Valkeinen Date: Thu Nov 19 17:31:25 2015 +0200 drm/omap: increase vblank wait timeout omap_crtc_wait_pending() waits until the config changes have been taken into use, usually at next vblank. The wait-timeout used is 50ms, which usually is enough, but in some rare cases not. As time wait-timeout is just a safety measure for cases where something is broken, we can just as well increase the timeout considerably. This patch makes the timeout 250ms. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_crtc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3f50effdb835c1563bb4d5afb4cd0de8ce6ced68 Author: Tomi Valkeinen Date: Wed Jan 27 10:58:43 2016 +0200 drm/omap: remove support for ext mem & sync We no longer have the omapdrm plugin system for SGX, and we can thus remove the support for external memory and sync objects from omap_gem.c. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem.c | 105 +++++++------------------------------ 1 file changed, 18 insertions(+), 87 deletions(-) commit b22e6690a3f656e3adb821ab4859e02932048066 Author: Laurent Pinchart Date: Mon Dec 14 22:39:44 2015 +0200 drm/omap: gem: Implement dma_buf import OMAP GEM objects backed by dma_buf reuse the current OMAP GEM object support as much as possible. If the imported buffer is physically contiguous its physical address will be used directly, reusing the OMAP_BO_MEM_DMA_API code paths. Otherwise it will be mapped through the TILER using a pages list created from the scatterlist instead of the shmem backing storage. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 2 + drivers/gpu/drm/omapdrm/omap_gem.c | 138 ++++++++++++++++++++++++------ drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 53 +++++++++--- 3 files changed, 159 insertions(+), 34 deletions(-) commit 9cba3b9945d0dd8df9629768f04e23f933e4b0d0 Author: Laurent Pinchart Date: Mon Dec 14 22:39:43 2015 +0200 drm/omap: gem: Refactor GEM object allocation Split the individual steps of GEM object allocation and initialization clearly. This improves readability and prepares for dma_buf import support. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 75 ++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 32 deletions(-) commit cdb0381d2f19974dc092d5aac672978d0f771eb6 Author: Laurent Pinchart Date: Mon Dec 14 22:39:37 2015 +0200 drm/omap: gem: Clean up GEM objects memory flags The driver assumes that only objects backed by shmem need to be mapped through DMM. While this is true with the current code, the assumption won't hold with dma_buf import support. Condition the mapping based on whether the buffer has been allocated using the DMA mapping API instead and clean up the flags to avoid having to check both flags and GEM object filp field to decide how to process buffers. Flags are not the authoritative source of information regarding where the buffer memory comes from, and are renamed to make that clearer. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_gem.c | 57 +++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 32 deletions(-) commit 8d83bbd1198d7d0de2968ec0bde85810b26341e1 Author: Tomi Valkeinen Date: Tue Jan 5 11:43:16 2016 +0200 drm/omap: print an error if display enable fails If the panel's enable fails, omap_encoder silently ignores the failure. omapdrm should really handle the failure, but unfortunately the whole encoder enable codepath is expected to always succeed. So for now, catch the enable failure and print an error. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_encoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a3d6345d31545c418acb6d71730fa02ae9c455f7 Author: Tomi Valkeinen Date: Tue Jan 5 11:43:15 2016 +0200 drm/omap: use dma_mapping_error in omap_gem_dma_sync omap_gem_dma_sync() calls dma_map_page() but does not check the possible error with dma_mapping_error(). If DMA-API debugging is enabled, the debug layer will give a warning if dma_mapping_error() has not been used. This patch adds proper error handling to omap_gem_dma_sync(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 579ef2541b9d3734979628ba81f8822902d2e508 Author: Tomi Valkeinen Date: Tue Jan 5 11:43:14 2016 +0200 drm/omap: use dma_mapping_error in omap_gem_attach_pages omap_gem_attach_pages() calls dma_map_page() but does not check the possible error with dma_mapping_error(). If DMA-API debugging is enabled, the debug layer will give a warning if dma_mapping_error() has not been used. This patch adds proper error handling to omap_gem_attach_pages(). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5bcbab176655f9a8fd6179986648cc45864a1604 Author: Tomi Valkeinen Date: Wed Nov 4 17:10:40 2015 +0200 drm/omap: add define for DISPC_IRQ_WBUNCOMPLETEERROR OMAP4+ DSS has WBUNCOMPLETEERROR irq, which was not defined in the irq list. Add the define. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart include/video/omapdss.h | 1 + 1 file changed, 1 insertion(+) commit d8e316376ccbe3fe365a137d8a667a33eaff1883 Author: Manisha Agrawal Date: Tue Nov 3 15:22:50 2015 -0600 drm/omap: tpd12s015: CT_CP_HPD as optional gpio tpd12s015 HW has LS_OE, CT_CP_HPD and HPD gpios. Out of these gpios, driver only handled LS_OE as optional. The CT_CP_HPD gpio should also be treated as optional gpio as it is just a power saving feature. Some boards hardwire this gpio to be always enable. In this patch, all access to CT_CP_HPD gpio is made optional. Signed-off-by: Manisha Agrawal Acked-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 460543ba2937283ca810f2f544e1bb5b5da3cd9d Author: Manisha Agrawal Date: Tue Nov 3 15:22:49 2015 -0600 drm/omap: tpd12s015: gpio descriptor API Migrated the gpio APIs to descriptor-interface based. Signed-off-by: Manisha Agrawal Acked-by: Tomi Valkeinen Acked-by: Laurent Pinchart .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 79 ++++++++-------------- 1 file changed, 28 insertions(+), 51 deletions(-) commit 45dd63c4798b734bea4e38fb4e5ad06e4b33167e Author: Manisha Agrawal Date: Tue Nov 3 15:22:48 2015 -0600 drm/omap: tpd12s015: remove platform data support All devices using tpd12s015 driver are doing DT boot. No need of further supporting the platform data. This patch removes support for platform data. Signed-off-by: Manisha Agrawal [tomi.valkeinen@ti.com: minor adjustments] Acked-by: Tomi Valkeinen Acked-by: Laurent Pinchart .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 41 +++------------------- include/video/omap-panel-data.h | 15 -------- 2 files changed, 5 insertions(+), 51 deletions(-) commit a7696ea7402fc8140f2023821e60adcf406679fe Author: Jyri Sarha Date: Wed Oct 28 14:00:42 2015 +0200 drm/omap: drm_atomic_get_plane_state() may return ERR_PTR drm_atomic_get_plane_state() may return ERR_PTR. Handle drm_atomic_get_plane_state() return values right in omap_crtc_atomic_set_property(). Signed-off-by: Jyri Sarha Acked-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e54adfd9ccda87bb3d1c7e164029c8ebfa2c255 Author: Tomi Valkeinen Date: Fri Aug 7 14:31:28 2015 +0300 drm/omap: add dmm_read() and dmm_write() wrappers This patch adds wrapper functions for readl() and writel(), dmm_read() and dmm_write(), so that we can implement workaround for DRA7 errata i878. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 39 ++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) commit 2bb2daf3fa8a97e09d3006be003343ae717b3213 Author: Tomi Valkeinen Date: Tue Apr 28 14:01:34 2015 +0300 HACK: drm/omap: always use blocking DMM fill The current driver uses non-blocking DMM fill when releasing memory. This gives us a small performance increase as we don't have to wait for the fill operation to finish. However, the driver does not have any error handling for non-blocking fill. In case of an error, the fill operation may silently fail, leading to leaking DMM engines, which may eventually lead to deadlock if we run out of DMM engines. This patch makes the DMM driver always use blocking fills, so that we can catch the errors. A more complex option would be to allow non-blocking fills, and implement proper error handling, but that is left for the future. This patch is a HACK, as the proper fix is to either decide to always use sync fills and remove all the async related code, or fix the async code. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4e4b53ceb59301b2a1dbf3a9f74ce5e17f64287d Author: Tomi Valkeinen Date: Tue Mar 24 15:46:35 2015 +0200 drm/omap: HDMI: change enable/disable to avoid sync-losts We occasionally see DISPC sync-lost errors when enabling and disabling HDMI. Sometimes we get only a few, which get handled (ignored) by the driver, but sometimes there's a flood of the errors which doesn't seem to stop. The HW team has root caused this to the order in which HDMI and DISPC are enabled/disabled. Currently we enable HDMI first, and then DISPC, and vice versa when disabling. HW team's suggestion is to do it the other way around. This patch changes the order, but this has two side effects as the pixel clock is produced by HDMI, and the clock is not running when we enable/disable DISPC: * When enabling DISPC first, we don't get vertical sync events * When disabling DISPC last, we don't get FRAMEDONE event At the moment we use both of those to verify that DISPC has been enabled/disabled properly. Thus this patch also needs to change the omapdrm and omapdss which handle the DISPC side. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi4.c | 16 ++++++++-------- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 16 ++++++++-------- drivers/gpu/drm/omapdrm/omap_crtc.c | 5 +++++ 3 files changed, 21 insertions(+), 16 deletions(-) commit e21555436f196c241503c7c6240272e57783235c Author: Dave Hansen Date: Tue Mar 1 11:41:33 2016 -0800 x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA Andrey Wagin reported that a simple test case was broken by: 2b5f7d013fc ("mm/core, x86/mm/pkeys: Add execute-only protection keys support") This test case creates an unreadable VMA and my patch assumed that all writes must be to readable VMAs. The simplest fix for this is to remove the pkey-related bits in access_error(). For execute-only support, I believe the existing version is sufficient because the permissions we are trying to enforce are entirely expressed in vma->vm_flags. We just depend on pkeys to get *an* exception, it does not matter that PF_PK was set, or even what state PKRU is in. I will re-add the necessary bits with the full pkeys implementation that includes the new syscalls. The three cases that matter are: 1. If a write to an execute-only VMA occurs, we will see PF_WRITE set, but !VM_WRITE on the VMA, and return 1. All execute-only VMAs have VM_WRITE clear by definition. 2. If a read occurs on a present PTE, we will fall in to the "read, present" case and return 1. 3. If a read occurs to a non-present PTE, we will miss the "read, not present" case, because the execute-only VMA will have VM_EXEC set, and we will properly return 0 allowing the PTE to be populated. Test program: int main() { int *p; p = mmap(NULL, 4096, PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); p[0] = 1; return 0; } Reported-by: Andrey Wagin , Signed-off-by: Dave Hansen Acked-by: Kirill A. Shutemov Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Cc: linux-next@vger.kernel.org Fixes: 62b5f7d013fc ("mm/core, x86/mm/pkeys: Add execute-only protection keys support") Link: http://lkml.kernel.org/r/20160301194133.65D0110C@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/fault.c | 18 ------------------ 1 file changed, 18 deletions(-) commit a288b78b83b6e795409de61dfb842faf5c4c53c3 Author: Sakari Ailus Date: Sun Feb 21 13:25:11 2016 -0300 [media] staging: v4l: omap4iss: Use V4L2 graph PM operations Power on devices represented by entities in the graph through the pipeline state using V4L2 graph PM operations instead of what was in the omap3isp driver. Signed-off-by: Sakari Ailus Cc: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 211 +---------------------------- drivers/staging/media/omap4iss/iss.h | 6 +- drivers/staging/media/omap4iss/iss_video.c | 15 +- drivers/staging/media/omap4iss/iss_video.h | 1 - 4 files changed, 7 insertions(+), 226 deletions(-) commit 506a47eb4cab9706a9c007e22fadaae79c4cf491 Author: Sakari Ailus Date: Sun Feb 21 13:25:10 2016 -0300 [media] v4l: omap3isp: Use V4L2 graph PM operations Power on devices represented by entities in the graph through the pipeline state using V4L2 graph PM operations instead of what was in the omap3isp driver. Signed-off-by: Sakari Ailus Cc: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 213 +---------------------------- drivers/media/platform/omap3isp/isp.h | 4 - drivers/media/platform/omap3isp/ispvideo.c | 13 +- drivers/media/platform/omap3isp/ispvideo.h | 1 - 4 files changed, 6 insertions(+), 225 deletions(-) commit 9495f2648287029fb5545c34a0fa318426ebe84c Author: Kedareswara rao Appana Date: Fri Feb 26 19:33:54 2016 +0530 dmaengine: xilinx_vdma: Use readl_poll_timeout instead of do while loop's It is sometimes necessary to poll a memory-mapped register until its value satisfies some condition use convenience macros that do this instead of do while loop's. This patch updates the same in the driver. Signed-off-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 46 +++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 26c5e36931b3fea7461ba6f0d8b65eb25ce2b917 Author: Kedareswara rao Appana Date: Fri Feb 26 19:33:52 2016 +0530 dmaengine: xilinx_vdma: Simplify spin lock handling This patch simplifies the spin lock handling in the driver by moving locking out of xilinx_dma_start_transfer() API and xilinx_dma_update_completed_cookie() API. Signed-off-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit e2b538a77d99706a9d2dc12925f3f8477c724dcc Author: Kedareswara rao Appana Date: Fri Feb 26 19:33:53 2016 +0530 dmaengine: xilinx_vdma: Fix issues with non-parking mode This patch fixes issues with the Non-parking mode(Cirular mode). With the existing driver in cirular mode if we submit frames less than h/w configured we simply end-up having misconfigured vdma h/w. This patch fixes this issue by configuring the frame count register. Signed-off-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7096f36e5388beb06b80576d3ccc3a0df2760035 Author: Kedareswara rao Appana Date: Fri Feb 26 19:33:51 2016 +0530 dmaengine: xilinx_vdma: Improve SG engine handling The current driver allows user to queue up multiple segments on to a single transaction descriptor. User will submit this single desc and in the issue_pending() we decode multiple segments and submit to SG HW engine. We free up the allocated_desc when it is submitted to the HW. Existing code prevents the user to prepare multiple trasactions at same time as we are overwrite with the allocated_desc. The best utilization of HW SG engine would happen if we collate the pending list when we start dma this patch updates the same. Signed-off-by: Kedareswara rao Appana Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_vdma.c | 127 ++++++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 55 deletions(-) commit a77bf7048addfbd59ec2208f3172207d90d42c9a Author: Mauro Carvalho Chehab Date: Thu Mar 3 12:30:51 2016 -0300 v4l2-mc.h: Add stubs for the V4L2 PM/pipeline routines Let's add stubs for the case where the Kernel gets compiled without MEDIA_CONTROLLER. Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mc.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 76413791a03f8fd8a3d793db135e19b6c2239664 Author: Sakari Ailus Date: Sun Feb 21 13:25:09 2016 -0300 [media] v4l: Add generic pipeline power management code When the Media controller framework was merged, it was decided not to add pipeline power management code for it was not seen generic. As a result, a number of drivers have copied the same piece of code, with same bugfixes done to them at different points of time (or not at all). Add these functions to V4L2. Their use is optional for drivers. [mchehab@osg.samsung.com: Fix merge conflicts] Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mc.c | 183 +++++++++++++++++++++++++++++++++++++- include/media/v4l2-mc.h | 43 ++++++++- 2 files changed, 224 insertions(+), 2 deletions(-) commit aba25a3e96563083389fc7b9f7d35be6bdfe6579 Author: Parav Pandit Date: Wed Mar 2 00:50:29 2016 +0530 IB/core: trivial prink cleanup. 1. Replaced printk with appropriate pr_warn, pr_err, pr_info. 2. Removed unnecessary prints around memory allocation failure which are not required, as reported by the checkpatch script. Signed-off-by: Parav Pandit Reviewed-by: Haggai Eran Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 15 +++++++------- drivers/infiniband/core/cma.c | 14 ++++++------- drivers/infiniband/core/device.c | 28 +++++++++++++------------- drivers/infiniband/core/fmr_pool.c | 37 ++++++++++++++--------------------- drivers/infiniband/core/packer.c | 14 ++++++------- drivers/infiniband/core/sa_query.c | 11 +++++------ drivers/infiniband/core/ucm.c | 8 ++++---- drivers/infiniband/core/ucma.c | 6 +++--- drivers/infiniband/core/ud_header.c | 23 +++++++++++----------- drivers/infiniband/core/uverbs_main.c | 10 +++++----- 10 files changed, 77 insertions(+), 89 deletions(-) commit db9314cd351ebd734970c7afc2995a743e34aa02 Author: Amitoj Kaur Chawla Date: Fri Feb 12 13:16:10 2016 +0530 IB/core: Replace memset with eth_zero_addr Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. The Coccinelle semantic patch used to make this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaebc7d21e102d86b389c77686c7e6258dd6d479 Author: Eli Cohen Date: Sun Feb 14 17:07:49 2016 +0200 IB/core: Modify conditional on ucontext existence Since we allow to call legacy verbs using their extended counterpart, the check on ucontext has to move up to a common area in case this verb is ever extended. Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2dbd5186a39c7ef0d92045c43b4857c23cb117ab Author: Eli Cohen Date: Sun Feb 14 17:07:48 2016 +0200 IB/core: IB/core: Allow legacy verbs through extended interfaces When an extended verb is an extension to a legacy verb, the original functionality is preserved. Hence we do not require each hardware driver to set the extended capability. This will allow the use of the extended verb in its simple form with drivers that do not support the extended capability. Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 74a0b0a5ea6b48f8945e6e900e9c678866aa7520 Author: Eli Cohen Date: Sun Feb 14 17:07:47 2016 +0200 IB/core: Avoid duplicate code Move the check on the validity of the command to a common area. Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit bbdfcf18c3b54818d21bf67a3c31779a090887a0 Merge: fc77dbd 3d943c9 Author: Doug Ledford Date: Thu Mar 3 10:18:41 2016 -0500 Merge branch 'k.o/for-4.5-rc' into HEAD commit 0c426c472b5585ed6e59160359c979506d45ae49 Author: Sakari Ailus Date: Sun Feb 21 13:25:08 2016 -0300 [media] media: Always keep a graph walk large enough around Re-create the graph walk object as needed in order to have one large enough available for all entities in the graph. This enumeration is used for pipeline power management in the future. [mchehab@osg.samsung.com: fix documentation bug: " warning: bad line: graph_mutex"] Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 21 +++++++++++++++++++++ include/media/media-device.h | 3 +++ 2 files changed, 24 insertions(+) commit 4f27dba6d9ff2ab3c5aa371816b3a3c6a18d8d5d Author: Mauro Carvalho Chehab Date: Thu Mar 3 12:14:33 2016 -0300 [media] v4l2-mc: Fix parameter description .//include/media/v4l2-mc.h:138: warning: No description found for parameter 'vdev' .//include/media/v4l2-mc.h:152: warning: No description found for parameter 'vdev' Signed-off-by: Mauro Carvalho Chehab include/media/v4l2-mc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e17cf3a80d4ba0c4e40bf1a89deb1354c2e10e14 Author: Josh Poimboeuf Date: Thu Mar 3 08:53:43 2016 -0600 tools: Support relative directory path for 'O=' Running "make O=foo" (with a relative directory path) fails with: scripts/Makefile.include:3: *** O=foo does not exist. Stop. /home/jpoimboe/git/linux/Makefile:1547: recipe for target 'tools/objtool' failed The tools Makefile gets confused by the relative path and tries to build objtool in tools/foo. Convert the output directory to an absolute path before passing it to the tools Makefile. Reported-by: Sudip Mukherjee Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: linux-next@vger.kernel.org Cc: linux@roeck-us.net Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/94a078c6c998fac9f01a14f574008bf7dff40191.1457016803.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1d45c3abd49b5bf9447e435099c1b000dcde752 Author: Josh Poimboeuf Date: Wed Mar 2 18:39:37 2016 -0600 objtool: Support CROSS_COMPILE When building with CONFIG_STACK_VALIDATION on a ppc64le host with an x86 cross-compiler, Stephen Rothwell saw the following objtool build errors: DESCEND objtool CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/builtin-check.o CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/special.o CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/elf.o CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/objtool.o MKDIR /home/sfr/next/x86_64_allmodconfig/tools/objtool/arch/x86/insn/ CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/libstring.o elf.c:22:23: fatal error: sys/types.h: No such file or directory compilation terminated. CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/exec-cmd.o CC /home/sfr/next/x86_64_allmodconfig/tools/objtool/help.o builtin-check.c:28:20: fatal error: string.h: No such file or directory compilation terminated. objtool.c:28:19: fatal error: stdio.h: No such file or directory compilation terminated. It fails to build because it tries to compile objtool with the cross-compiler instead of the host compiler. Ensure that it always uses the host compiler by ignoring CROSS_COMPILE. In order to do that properly, the libsubcmd.a library needs to be built in tools/objtool/ rather than tools/lib/subcmd/. The latter directory contains the cross-compiled version which is needed for perf and possibly other tools. Note that cross-compiling for x86 on a _big_ endian system would result in a bunch of false positive objtool warnings during the kernel build because it isn't endian-aware. But that's generally a rare edge case and there haven't been any reports of anybody needing that. Reported-by: Stephen Rothwell Signed-off-by: Josh Poimboeuf Cc: Adrian Hunter Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/55b63eefc347f1bb28573f972d8d1adbf1f1c31d.1456962210.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/lib/subcmd/Makefile | 6 ++++-- tools/objtool/Makefile | 17 ++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) commit 19072f23d1d785c093b7f81cb1fb161e7a13ecc0 Author: Josh Poimboeuf Date: Wed Mar 2 18:39:36 2016 -0600 x86/asm/decoder: Use explicitly signed chars When running objtool on a ppc64le host to analyze x86 binaries, it reports a lot of false warnings like: ipc/compat_mq.o: warning: objtool: compat_SyS_mq_open()+0x91: can't find jump dest instruction at .text+0x3a5 The warnings are caused by the x86 instruction decoder setting the wrong value for the jump instruction's immediate field because it assumes that "char == signed char", which isn't true for all architectures. When converting char to int, gcc sign-extends on x86 but doesn't sign-extend on ppc64le. According to the gcc man page, that's a feature, not a bug: > Each kind of machine has a default for what "char" should be. It is > either like "unsigned char" by default or like "signed char" by > default. > > Ideally, a portable program should always use "signed char" or > "unsigned char" when it depends on the signedness of an object. Conform to the "standards" by changing the "char" casts to "signed char". This results in no actual changes to the object code on x86. Note: the x86 decoder now lives in three different locations in the kernel tree, which are all kept in sync via makefile checks and warnings: in-kernel, perf, and objtool. This fixes all three locations. Eventually we should probably try to at least converge the two separate "tools" locations into a single shared location. Signed-off-by: Josh Poimboeuf Cc: Adrian Hunter Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/9dd4161719b20e6def9564646d68bfbe498c549f.1456962210.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/lib/insn.c | 6 +++--- tools/objtool/arch/x86/insn/insn.c | 6 +++--- tools/perf/util/intel-pt-decoder/insn.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit ab8b5e49f742efbeb59471fa0f19361a7afe1922 Author: Olli Salonen Date: Tue Dec 23 13:48:07 2014 -0200 [media] cx23885: incorrect I2C bus used in the CI registration This patch fixes a bug that was introduced by the commit: commit 2b0aac3011bc7a9db27791bed4978554263ef079 Author: Mauro Carvalho Chehab [media] cx23885: move CI/MAC registration to a separate function Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 549626047df99f1129d4e742cce741055bdc2dcb Author: Tejun Heo Date: Thu Mar 3 09:58:01 2016 -0500 cgroup: update css iteration in cgroup_update_dfl_csses() The existing sequences of operations ensure that the offlining csses are drained before cgroup_update_dfl_csses(), so even though cgroup_update_dfl_csses() uses css_for_each_descendant_pre() to walk the target cgroups, it doesn't end up operating on dead cgroups. Also, the function explicitly excludes the subtree root from operation. This is fragile and inconsistent with the rest of css update operations. This patch updates cgroup_update_dfl_csses() to use cgroup_for_each_live_descendant_pre() instead and include the subtree root. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 04313591ae487da8b5781a0d8d444073a3fdee0d Author: Tejun Heo Date: Thu Mar 3 09:58:01 2016 -0500 cgroup: allocate 2x cgrp_cset_links when setting up a new root During prep, cgroup_setup_root() allocates cgrp_cset_links matching the number of existing css_sets to later link the new root. This is fine for now as the only operation which can happen inbetween is rebind_subsystems() and rebinding of empty subsystems doesn't create new css_sets. However, while not yet allowed, with the recent reimplementation, rebind_subsystems() can rebind subsystems with descendant csses and thus can create new css_sets. This patch makes cgroup_setup_root() allocate 2x of the existing css_sets so that later use of live subsystem rebinding doesn't blow up. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ced2518bd3e3a4f01e2122122211f217cd99f4f Author: Tejun Heo Date: Thu Mar 3 09:58:01 2016 -0500 cgroup: make cgroup_calc_subtree_ss_mask() take @this_ss_mask cgroup_calc_subtree_ss_mask() currently takes @cgrp and @subtree_control. @cgrp is used for two purposes - to decide whether it's for default hierarchy and the mask of available subsystems. The former doesn't matter as the results are the same regardless. The latter can be specified directly through a subsystem mask. This patch makes cgroup_calc_subtree_ss_mask() perform the same calculations for both default and legacy hierarchies and take @this_ss_mask for available subsystems. @cgrp is no longer used and dropped. This is to allow using the function in contexts where available controllers can't be decided from the cgroup. v2: cgroup_refres_subtree_ss_mask() is removed by a previous patch. Updated accordingly. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 334c3679ec4b2b113c35ebe37d2018b112dd5013 Author: Tejun Heo Date: Thu Mar 3 09:58:01 2016 -0500 cgroup: reimplement rebind_subsystems() using cgroup_apply_control() and friends rebind_subsystem() open codes quite a bit of css and interface file manipulations. It tries to be fail-safe but doesn't quite achieve it. It can be greatly simplified by using the new css management helpers. This patch reimplements rebind_subsytsems() using cgroup_apply_control() and friends. * The half-baked rollback on file creation failure is dropped. It is an extremely cold path, failure isn't critical, and, aside from kernel bugs, the only reason it can fail is memory allocation failure which pretty much doesn't happen for small allocations. * As cgroup_apply_control_disable() is now used to clean up root cgroup on rebind, make sure that it doesn't end up killing root csses. * All callers of rebind_subsystems() are updated to use cgroup_lock_and_drain_offline() as the apply_control functions require drained subtree. * This leaves cgroup_refresh_subtree_ss_mask() without any user. Removed. * css_populate_dir() and css_clear_dir() no longer needs @cgrp_override parameter. Dropped. * While at it, add WARN_ON() to rebind_subsystem() calls which are expected to always succeed just in case. While the rules visible to userland aren't changed, this reimplementation not only simplifies rebind_subsystems() but also allows it to disable and enable csses recursively. This can be used to implement more flexible rebinding. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 107 +++++++++++++++----------------------------------------- 1 file changed, 28 insertions(+), 79 deletions(-) commit 03970d3c11faf870dc5126bb2e84fd1d692af1b7 Author: Tejun Heo Date: Thu Mar 3 09:58:00 2016 -0500 cgroup: use cgroup_apply_enable_control() in cgroup creation path cgroup_create() manually updates control masks and creates child csses which cgroup_mkdir() then manually populates. Both can be simplified by using cgroup_apply_enable_control() and friends. The only catch is that it calls css_populate_dir() with NULL cgroup->kn during cgroup_create(). This is worked around by making the function noop on NULL kn. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit 945ba1996888809cf510a8da000a9c20a9fab5ad Author: Tejun Heo Date: Thu Mar 3 09:58:00 2016 -0500 cgroup: combine cgroup_mutex locking and offline css draining cgroup_drain_offline() is used to wait for csses being offlined to uninstall itself from cgroup->subsys[] array so that new csses can be installed. The function's only user, cgroup_subtree_control_write(), calls it after performing some checks and restarts the whole process via restart_syscall() if draining has to release cgroup_mutex to wait. This can be simplified by draining before other synchronized operations so that there's nothing to restart. This patch converts cgroup_drain_offline() to cgroup_lock_and_drain_offline() which performs both locking and draining and updates cgroup_kn_lock_live() use it instead of cgroup_mutex() if requested. This combined locking and draining operations are easier to use and less error-prone. While at it, add WARNs in control_apply functions which triggers if the subtree isn't properly drained. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 55 +++++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit f7b2814bb9b6cb1d69333e1592c702260fcb4184 Author: Tejun Heo Date: Thu Mar 3 09:58:00 2016 -0500 cgroup: factor out cgroup_{apply|finalize}_control() from cgroup_subtree_control_write() Factor out cgroup_{apply|finalize}_control() so that control mask update can be done in several simple steps. This patch doesn't introduce behavior changes. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 81 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 23 deletions(-) commit 15a27c362d54378f17ec078579b2f6af88495a3f Author: Tejun Heo Date: Thu Mar 3 09:57:59 2016 -0500 cgroup: introduce cgroup_{save|propagate|restore}_control() While controllers are being enabled and disabled in cgroup_subtree_control_write(), the original subsystem masks are stashed in local variables so that they can be restored if the operation fails in the middle. This patch adds dedicated fields to struct cgroup to be used instead of the local variables and implements functions to stash the current values, propagate the changes and restore them recursively. Combined with the previous changes, this makes subsystem management operations fully recursive and modularlized. This will be used to expand cgroup core functionalities. While at it, remove now unused @css_enable and @css_disable from cgroup_subtree_control_write(). Signed-off-by: Tejun Heo Acked-by: Zefan Li include/linux/cgroup-defs.h | 2 ++ kernel/cgroup.c | 82 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 64 insertions(+), 20 deletions(-) commit ce3f1d9d19371045981a64815227bab822554878 Author: Tejun Heo Date: Thu Mar 3 09:57:59 2016 -0500 cgroup: make cgroup_drain_offline() and cgroup_apply_control_{disable|enable}() recursive The three factored out css management operations - cgroup_drain_offline() and cgroup_apply_control_{disable|enable}() - only depend on the current state of the target cgroups and idempotent and thus can be easily made to operate on the subtree instead of the immediate children. This patch introduces the iterators which walk live subtree and converts the three functions to operate on the subtree including self instead of the children. While this leads to spurious walking and be slightly more expensive, it will allow them to be used for wider scope of operations. Note that cgroup_drain_offline() now tests for whether a css is dying before trying to drain it. This is to avoid trying to drain live csses as there can be mix of live and dying csses in a subtree unlike children of the same parent. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) commit bdb53bd797dcef46d1a252b9529f8fd511bf714c Author: Tejun Heo Date: Thu Mar 3 09:57:59 2016 -0500 cgroup: factor out cgroup_apply_control_enable() from cgroup_subtree_control_write() Factor out css enabling and showing into cgroup_apply_control_enable(). * Nest subsystem walk inside child walk. The child walk will later be converted to subtree walk which is a bit more expensive. * Instead of operating on the differential masks @css_enable, simply enable or show csses according to the current cgroup_control() and cgroup_ss_mask(). This leads to the same result and is simpler and more robust. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 77 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 30 deletions(-) commit 12b3bb6af862477f96e1adac51b201a143a8f3c4 Author: Tejun Heo Date: Thu Mar 3 09:57:59 2016 -0500 cgroup: factor out cgroup_apply_control_disable() from cgroup_subtree_control_write() Factor out css disabling and hiding into cgroup_apply_control_disable(). * Nest subsystem walk inside child walk. The child walk will later be converted to subtree walk which is a bit more expensive. * Instead of operating on the differential masks @css_enable and @css_disable, simply disable or hide csses according to the current cgroup_control() and cgroup_ss_mask(). This leads to the same result and is simpler and more robust. * This allows error handling path to share the same code. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 74 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 33 deletions(-) commit 1b9b96a12b5433ccc477265111122720ccb4965e Author: Tejun Heo Date: Thu Mar 3 09:57:59 2016 -0500 cgroup: factor out cgroup_drain_offline() from cgroup_subtree_control_write() Factor out async css offline draining into cgroup_drain_offline(). * Nest subsystem walk inside child walk. The child walk will later be converted to subtree walk which is a bit more expensive. * Relocate the draining above subsystem mask preparation, which doesn't create any behavior differences but helps further refactoring. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 77 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 25 deletions(-) commit 5531dc915ba10b78a80dcffa48d7360d3c0bab61 Author: Tejun Heo Date: Thu Mar 3 09:57:58 2016 -0500 cgroup: introduce cgroup_control() and cgroup_ss_mask() When a controller is enabled and visible on a non-root cgroup is determined by subtree_control and subtree_ss_mask of the parent cgroup. For a root cgroup, by the type of the hierarchy and which controllers are attached to it. Deciding the above on each usage is fragile and unnecessarily complicates the users. This patch introduces cgroup_control() and cgroup_ss_mask() which calculate and return the [visibly] enabled subsyste mask for the specified cgroup and conver the existing usages. * cgroup_e_css() is restructured for simplicity. * cgroup_calc_subtree_ss_mask() and cgroup_subtree_control_write() no longer need to distinguish root and non-root cases. * With cgroup_control(), cgroup_controllers_show() can now handle both root and non-root cases. cgroup_root_controllers_show() is removed. v2: cgroup_control() updated to yield the correct result on v1 hierarchies too. cgroup_subtree_control_write() converted. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 72 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 35 deletions(-) commit a5bca2152036de826595723437c5cbe8f6c13983 Author: Tejun Heo Date: Thu Mar 3 09:57:58 2016 -0500 cgroup: factor out cgroup_create() out of cgroup_mkdir() We're in the process of refactoring cgroup and css management paths to separate them out to eventually allow cgroups which aren't visible through cgroup fs. This patch factors out cgroup_create() out of cgroup_mkdir(). cgroup_create() contains all internal object creation and initialization. cgroup_mkdir() uses cgroup_create() to create the internal cgroup and adds interface directory and file creation. This patch doesn't cause any behavior differences. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 72 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 29 deletions(-) commit 195e9b6c4b09434dad6ec3c163fdf037e16b3c96 Author: Tejun Heo Date: Thu Mar 3 09:57:58 2016 -0500 cgroup: reorder operations in cgroup_mkdir() Currently, operations to initialize internal objects and create interface directory and files are intermixed in cgroup_mkdir(). We're in the process of refactoring cgroup and css management paths to separate them out to eventually allow cgroups which aren't visible through cgroup fs. This patch reorders operations inside cgroup_mkdir() so that interface directory and file handling comes after internal object initialization. This will enable further refactoring. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 61 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 88cb04b96a1934ecbfd1d324e7cde55890c1a576 Author: Tejun Heo Date: Thu Mar 3 09:57:58 2016 -0500 cgroup: explicitly track whether a cgroup_subsys_state is visible to userland Currently, whether a css (cgroup_subsys_state) has its interface files created is not tracked and assumed to change together with the owning cgroup's lifecycle. cgroup directory and interface creation is being separated out from internal object creation to help refactoring and eventually allow cgroups which are not visible through cgroupfs. This patch adds CSS_VISIBLE to track whether a css has its interface files created and perform management operations only when necessary which helps decoupling interface file handling from internal object lifecycle. After this patch, all css interface file management functions can be called regardless of the current state and will achieve the expected result. Signed-off-by: Tejun Heo Acked-by: Zefan Li include/linux/cgroup-defs.h | 1 + kernel/cgroup.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 6cd0f5bbaf594f40a97d01dbc565dda41f30d37c Author: Tejun Heo Date: Thu Mar 3 09:57:58 2016 -0500 cgroup: separate out interface file creation from css creation Currently, interface files are created when a css is created depending on whether @visible is set. This patch separates out the two into separate steps to help code refactoring and eventually allow cgroups which aren't visible through cgroup fs. Move css_populate_dir() out of create_css() and drop @visible. While at it, rename the function to css_create() for consistency. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 72 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 29 deletions(-) commit 20b454a61fba59be13de52b4493898583ea26d20 Author: Tejun Heo Date: Thu Mar 3 09:57:57 2016 -0500 cgroup: suppress spurious de-populated events During task migration, tasks may transfer between two css_sets which are associated with the same cgroup. If those tasks are the only tasks in the cgroup, this currently triggers a spurious de-populated event on the cgroup. Fix it by bumping up populated count before bumping it down during migration to ensure that it doesn't reach zero spuriously. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2378d8b8ba3d2adffb4f98c0c60ee2f448b3be69 Author: Tejun Heo Date: Thu Mar 3 09:57:57 2016 -0500 cgroup: re-hash init_css_set after subsystems are initialized css_sets are hashed by their subsys[] contents and in cgroup_init() init_css_set is hashed early, before subsystem inits, when all entries in its subsys[] are NULL, so that cgroup_dfl_root initialization can find and link to it. As subsystems are initialized, init_css_set.subsys[] is filled up but the hashing is never updated making init_css_set hashed in the wrong place. While incorrect, this doesn't cause a critical failure as css_set management code would create an identical css_set dynamically. Fix it by rehashing init_css_set after subsystems are initialized. While at it, drop unnecessary @key local variable. Signed-off-by: Tejun Heo Acked-by: Zefan Li kernel/cgroup.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 78a50a5e6068955494117b37b03379dacaf830b7 Author: Hans Westgaard Ry Date: Wed Mar 2 13:44:28 2016 +0100 IB/ipoib: Add handling for sending of skb with many frags IPoIB converts skb-fragments to sge adding 1 extra sge when SG is enabled. Current codepath assumes that the max number of sge a device support is at least MAX_SKB_FRAGS+1, there is no interaction with upper layers to limit number of fragments in an skb if a device suports fewer sges. The assumptions also lead to requesting a fixed number of sge when IPoIB creates queue-pairs with SG enabled. A fallback/slowpath is implemented using skb_linearize to handle cases where the conversion would result in more sges than supported. Signed-off-by: Hans Westgaard Ry Reviewed-by: Håkon Bugge Reviewed-by: Wei Lin Guay Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 ++ drivers/infiniband/ulp/ipoib/ipoib_cm.c | 23 +++++++++++++++++++++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 18 ++++++++++++++++++ drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 5 ++++- 4 files changed, 45 insertions(+), 3 deletions(-) commit a40973ff101ff8d3a42a8222e3119292f4191b07 Author: Sean Young Date: Fri Feb 19 12:33:53 2016 -0200 [media] igorplugusb: fix leaks in error path Since rc_allocate_device() uses kmalloc, it can returns NULL, so need to check, otherwise, NULL derefenrece can happen. Reported-by: Insu Yun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 050b6c98b42ff77894da2aad34fcf0d4e1fed8e7 Author: Shuah Khan Date: Thu Feb 18 22:28:48 2016 -0200 [media] media: au0828 enable the right media source when input changes Change vidioc_s_input() to enable the media source for the newly selected input. v4l2-core enables source before calling au0828's vidioc_s_input() handler. Hence, when input selection changes, media source for the newly selected input needs to be enabled. Signed-off-by: Shuah Khan drivers/media/usb/au0828/au0828-video.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 35cec70720db028bfd18d739fd3df65f21c34590 Merge: dc92f24 4412bb5 Author: Linus Walleij Date: Thu Mar 3 21:21:26 2016 +0700 Merge branch 'sh-pfc-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel commit 0df6e32b0e36710fe989095241833e09dac3e41d Author: Arnd Bergmann Date: Wed Mar 2 16:58:56 2016 +0100 power: pm2301-charger: use __maybe_unused to hide pm functions The pm2301 charger driver uses nested #ifdefs to check for both CONFIG_PM and CONFIG_PM_SLEEP in an attempt to hide its suspend and runtime-pm operations when they are unused, but it does not hide the clear_lpn_pin() function in the same way, so we get a build warning when everything is disabled: drivers/power/pm2301_charger.c:123:13: error: 'clear_lpn_pin' defined but not used [-Werror=unused-function] This removes all the #ifdef and instead uses __maybe_unused annotations to let the compiler know it can silently drop the function definition. For the PM2XXX_PM_OPS, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann Signed-off-by: Sebastian Reichel drivers/power/pm2301_charger.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 298cb0f19267d8f4bbd7ce74732fb24d92befbea Author: Arnd Bergmann Date: Wed Mar 2 16:58:55 2016 +0100 power: ipaq-micro-battery: use __maybe_unused to hide pm functions The ipaq micro battery driver has suspend/resume functions that are accessed using SIMPLE_DEV_PM_OPS, which hide the reference when CONFIG_PM_SLEEP is not set, resulting in a warning about unused functions: drivers/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function] drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Signed-off-by: Sebastian Reichel drivers/power/ipaq_micro_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb4605ba47e772ff9d62d1d54218a832ec8b3e1d Author: Andi Kleen Date: Tue Mar 1 10:57:52 2016 -0800 perf stat: Check for frontend stalled for metrics Add an extra check for frontend stalled in the metrics. This avoids an extra column for the --metric-only case when the CPU does not support frontend stalled. v2: Add separate init function Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/1456858672-21594-8-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 1 + tools/perf/util/stat-shadow.c | 9 ++++++++- tools/perf/util/stat.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) commit 1b69317d2dc80bc8e1d005e1a771c4f5bff3dabe Author: Colin Ian King Date: Wed Mar 2 13:50:25 2016 +0000 tools/power turbostat: fix various build warnings When building with gcc 6 we're getting various build warnings that just require some trivial function declaration and call fixes: turbostat.c: In function ‘dump_cstate_pstate_config_info’: turbostat.c:1973:1: warning: type of ‘family’ defaults to ‘int’ dump_cstate_pstate_config_info(family, model) turbostat.c:1973:1: warning: type of ‘model’ defaults to ‘int’ turbostat.c: In function ‘get_tdp’: turbostat.c:2145:8: warning: type of ‘model’ defaults to ‘int’ double get_tdp(model) turbostat.c: In function ‘perf_limit_reasons_probe’: turbostat.c:2259:6: warning: type of ‘family’ defaults to ‘int’ void perf_limit_reasons_probe(family, model) turbostat.c:2259:6: warning: type of ‘model’ defaults to ‘int’ Signed-off-by: Colin Ian King Cc: Matt Fleming Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-wbicer8n0s9qe6ql8h9x478e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/power/x86/turbostat/turbostat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e17a0e16ca3a63d1bafbcba313586cf137418f45 Author: Colin Ian King Date: Wed Mar 2 12:55:22 2016 +0000 perf tests: Initialize sa.sa_flags The sa_flags field is not being initialized, so a garbage value is being passed to sigaction. Initialize it to zero. Signed-off-by: Colin Ian King Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1456923322-29697-1-git-send-email-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/rdpmc.c | 1 + 1 file changed, 1 insertion(+) commit 9b240637eb9b9677a9e9bc2dc568f5e0811e04d6 Author: Arnaldo Carvalho de Melo Date: Wed Mar 2 09:58:00 2016 -0300 perf test: Fix hists related entries That got broken by d3a72fd8187b ("perf report: Fix indentation of dynamic entries in hierarchy"), by using the evlist in setup_sorting() without checking if it is NULL, as done in some 'perf test' entries: $ find tools/ -name "*.c" | xargs grep 'setup_sorting(NULL);' tools/perf/tests/hists_output.c: setup_sorting(NULL); tools/perf/tests/hists_output.c: setup_sorting(NULL); tools/perf/tests/hists_output.c: setup_sorting(NULL); tools/perf/tests/hists_output.c: setup_sorting(NULL); tools/perf/tests/hists_output.c: setup_sorting(NULL); tools/perf/tests/hists_cumulate.c: setup_sorting(NULL); tools/perf/tests/hists_cumulate.c: setup_sorting(NULL); tools/perf/tests/hists_cumulate.c: setup_sorting(NULL); tools/perf/tests/hists_cumulate.c: setup_sorting(NULL); $ Fix it. Before: [root@jouet ~]# perf test 15: Test matching and linking multiple hists : FAILED! 16: Try 'import perf' in python, checking link problems : Ok 17: Test breakpoint overflow signal handler : Ok 18: Test breakpoint overflow sampling : Ok 19: Test number of exit event of a simple workload : Ok 20: Test software clock events have valid period values : Ok 21: Test object code reading : Ok 22: Test sample parsing : Ok 23: Test using a dummy software event to keep tracking : Ok 24: Test parsing with no sample_id_all bit set : Ok 25: Test filtering hist entries : FAILED! 26: Test mmap thread lookup : Ok 27: Test thread mg sharing : Ok 28: Test output sorting of hist entries : FAILED! 29: Test cumulation of child hist entries : FAILED! After the patch the above failed tests complete successfully. Acked-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Wang Nan Fixes: d3a72fd8187b ("perf report: Fix indentation of dynamic entries in hierarchy") Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit a66673a07e260807f570db8f08a9c1207932c665 Author: Steven Rostedt (Red Hat) Date: Tue Feb 9 15:40:17 2016 -0500 tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines When a long value is read on 32 bit machines for 64 bit output, the parsing needs to change "%lu" into "%llu", as the value is read natively. Unfortunately, if "%llu" is already there, the code will add another "l" to it and fail to parse it properly. Signed-off-by: Steven Rostedt Cc: Andrew Morton Link: http://lkml.kernel.org/r/20160209204237.337024613@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ec72eafee61f68cd57310a99db129ffb71302f3 Author: Steven Rostedt (Red Hat) Date: Tue Feb 9 15:40:16 2016 -0500 tools lib traceevent: Set int_array fields to NULL if freeing from error Had a bug where on error of parsing __print_array() where the fields are freed after they were allocated, but since they were not set to NULL, the freeing of the arg also tried to free the already freed fields causing a double free. Fix process_hex() while at it. Signed-off-by: Steven Rostedt Cc: Andrew Morton Link: http://lkml.kernel.org/r/20160209204237.188327674@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 3 +++ 1 file changed, 3 insertions(+) commit 21a30100453516004905d4d5f0806ebaffa95131 Author: Chaos.Chen Date: Tue Feb 9 15:40:14 2016 -0500 tools lib traceevent: Fix time stamp rounding issue When rounding to microseconds, if the timestamp subsecond is between .999999500 and .999999999, it is rounded to .1000000, when it should instead increment the second counter due to the overflow. For example, if the timestamp is 1234.999999501 instead of seeing: 1235.000000 we see: 1234.1000000 Signed-off-by: Chaos.Chen Cc: Andrew Morton Link: http://lkml.kernel.org/r/20160209204236.824426460@goodmis.org [ fixed incrementing "secs" instead of decrementing it ] Signed-off-by: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 5 +++++ 1 file changed, 5 insertions(+) commit 979ac257b00c53aacec3eacf86142e8c00bee889 Author: Colin Ian King Date: Tue Mar 1 23:46:20 2016 +0000 perf script: Fix double free on command_line The 'command_line' variable is free'd twice if db_export__branch_types() fails. To avoid this, defer the free'ing of 'command_line' to after this call so that the error return path will just free 'command_line' once. Signed-off-by: Colin Ian King Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: He Kuang Cc: Javi Merino Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1456875980-25606-1-git-send-email-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 676787939ef8ccfcf8039104f766ebe5ebe23924 Author: Masahiro Yamada Date: Mon Feb 1 02:59:00 2016 +0900 tools build: Use .s extension for preprocessed assembler code The "man gcc" says .i extension represents the file is C source code that should not be preprocessed. Here, .s should be used. For clarification, .c ---(preprocess)---> .i .S ---(preprocess)---> .s Signed-off-by: Masahiro Yamada Acked-by: Jiri Olsa Cc: Aaro Koskinen Cc: Adrian Hunter Cc: Lukas Wunner Link: http://lkml.kernel.org/r/1454263140-19670-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44d49a6002595ccb95712e86ad2857cd55207602 Author: Andi Kleen Date: Mon Feb 29 14:36:22 2016 -0800 perf stat: Support metrics in --per-core/socket mode Enable metrics printing in --per-core / --per-socket mode. We need to save the shadow metrics in a unique place. Always use the first CPU in the aggregation. Then use the same CPU to retrieve the shadow value later. Example output: % perf stat --per-core -a ./BC1s Performance counter stats for 'system wide': S0-C0 2 2966.020381 task-clock (msec) # 2.004 CPUs utilized (100.00%) S0-C0 2 49 context-switches # 0.017 K/sec (100.00%) S0-C0 2 4 cpu-migrations # 0.001 K/sec (100.00%) S0-C0 2 467 page-faults # 0.157 K/sec S0-C0 2 4,599,061,773 cycles # 1.551 GHz (100.00%) S0-C0 2 9,755,886,883 instructions # 2.12 insn per cycle (100.00%) S0-C0 2 1,906,272,125 branches # 642.704 M/sec (100.00%) S0-C0 2 81,180,867 branch-misses # 4.26% of all branches S0-C1 2 2965.995373 task-clock (msec) # 2.003 CPUs utilized (100.00%) S0-C1 2 62 context-switches # 0.021 K/sec (100.00%) S0-C1 2 8 cpu-migrations # 0.003 K/sec (100.00%) S0-C1 2 281 page-faults # 0.095 K/sec S0-C1 2 6,347,290 cycles # 0.002 GHz (100.00%) S0-C1 2 4,654,156 instructions # 0.73 insn per cycle (100.00%) S0-C1 2 947,121 branches # 0.319 M/sec (100.00%) S0-C1 2 37,322 branch-misses # 3.94% of all branches 1.480409747 seconds time elapsed v2: Rebase to older patches v3: Document shadow cpus. Fix aggr_get_id argument. Fix -A shadows (Jiri) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/1456785386-19481-4-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 64 +++++++++++++++++++++++++++++++++++++------ tools/perf/util/stat-shadow.c | 7 +++++ 2 files changed, 63 insertions(+), 8 deletions(-) commit 92a61f6412d3a09d6462252a522fa79c9290f405 Author: Andi Kleen Date: Mon Feb 29 14:36:21 2016 -0800 perf stat: Implement CSV metrics output Now support CSV output for metrics. With the new output callbacks this is relatively straight forward by creating new callbacks. This allows to easily plot metrics from CSV files. The new line callback needs to know the number of fields to skip them correctly Example output before: % perf stat -x, true 0.200687,,task-clock,200687,100.00 0,,context-switches,200687,100.00 0,,cpu-migrations,200687,100.00 40,,page-faults,200687,100.00 730871,,cycles,203601,100.00 551056,,stalled-cycles-frontend,203601,100.00 ,,stalled-cycles-backend,0,100.00 385523,,instructions,203601,100.00 78028,,branches,203601,100.00 3946,,branch-misses,203601,100.00 After: % perf stat -x, true .502457,,task-clock,502457,100.00,0.485,CPUs utilized 0,,context-switches,502457,100.00,0.000,K/sec 0,,cpu-migrations,502457,100.00,0.000,K/sec 45,,page-faults,502457,100.00,0.090,M/sec 644692,,cycles,509102,100.00,1.283,GHz 423470,,stalled-cycles-frontend,509102,100.00,65.69,frontend cycles idle ,,stalled-cycles-backend,0,100.00,,,, 492701,,instructions,509102,100.00,0.76,insn per cycle ,,,,,0.86,stalled cycles per insn 97767,,branches,509102,100.00,194.578,M/sec 4788,,branch-misses,509102,100.00,4.90,of all branches or easier readable $ perf stat -x, -o x.csv true $ column -s, -t x.csv 0.490635 task-clock 490635 100.00 0.489 CPUs utilized 0 context-switches 490635 100.00 0.000 K/sec 0 cpu-migrations 490635 100.00 0.000 K/sec 45 page-faults 490635 100.00 0.092 M/sec 629080 cycles 497698 100.00 1.282 GHz 409498 stalled-cycles-frontend 497698 100.00 65.09 frontend cycles idle stalled-cycles-backend 0 100.00 491424 instructions 497698 100.00 0.78 insn per cycle 0.83 stalled cycles per insn 97278 branches 497698 100.00 198.270 M/sec 4569 branch-misses 497698 100.00 4.70 of all branches Two new fields are added: metric value and metric name. v2: Split out function argument changes v3: Reenable metrics for real. v4: Fix wrong hunk from refactoring. v5: Remove extra "noise" printing (Jiri), but add it to the not counted case. Print empty metrics for not counted. v6: Avoid outputting metric on empty format. v7: Print metric at the end v8: Remove extra run, ena fields v9: Avoid extra new line for unsupported counters Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/1456785386-19481-3-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 73 ++++++++++++++++++++++++++++++++++++++++--- tools/perf/util/stat-shadow.c | 2 +- 2 files changed, 70 insertions(+), 5 deletions(-) commit 95c365617aa37878592f2f1c6c64e1abb19f0d4a Author: Wang Nan Date: Fri Feb 26 09:32:17 2016 +0000 perf record: Ensure return non-zero rc when mmap fail perf_evlist__mmap_ex() can fail without setting errno (for example, fail in condition checking. In this case all syscall is success). If this happen, record__open() incorrectly returns 0. Force setting rc is a quick way to avoid this problem, or we have to follow all possible code path in perf_evlist__mmap_ex() to make sure there's at least one system call before returning an error. Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-30-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e1ab48ba63ee6b2494a67bb60bf99692ecdaca7c Author: Wang Nan Date: Fri Feb 26 09:32:10 2016 +0000 perf record: Introduce record__finish_output() to finish a perf.data Move code for finalizing 'perf.data' to record__finish_output(). It will be used by following commits to split output to multiple files. Signed-off-by: He Kuang Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-23-git-send-email-wangnan0@huawei.com Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit c45c86eb70964615bd13b4c1e647bf9ee60c3db9 Author: Wang Nan Date: Fri Feb 26 09:32:07 2016 +0000 perf record: Extract synthesize code to record__synthesize() Create record__synthesize(). It can be used to create tracking events for each perf.data after perf supporting splitting into multiple outputs. Signed-off-by: He Kuang Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-20-git-send-email-wangnan0@huawei.com Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 125 +++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 55 deletions(-) commit d8871ea71281ed689dc3303d1b50eb00c5d06141 Author: Wang Nan Date: Fri Feb 26 09:32:06 2016 +0000 perf record: Use WARN_ONCE to replace 'if' condition Commits in a BPF patchkit will extract kernel and module synthesizing code into a separated function and call it multiple times. This patch replace 'if (err < 0)' using WARN_ONCE, makes sure the error message show one time. Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: He Kuang Cc: Jiri Olsa Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-19-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit f8dd2d5ff953bc498d682ae8022439c940a7d5c4 Author: Wang Nan Date: Fri Feb 26 09:31:57 2016 +0000 perf data: Explicitly set byte order for integer types After babeltrace commit 5cec03e402aa ("ir: copy variants and sequences when setting a field path"), 'perf data convert' gets incorrect result if there's bpf output data. For example: # perf data convert --to-ctf ./out.ctf # babeltrace ./out.ctf [10:44:31.186045346] (+?.?????????) evt: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF810E7DD1, perf_tid = 23819, perf_pid = 23819, perf_id = 518, raw_len = 3, raw_data = [ [0] = 0xC028E32F, [1] = 0x815D0100, [2] = 0x1000000 ] } [10:44:31.286101003] (+0.100055657) evt: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF8105B609, perf_tid = 23819, perf_pid = 23819, perf_id = 518, raw_len = 3, raw_data = [ [0] = 0x35D9F1EB, [1] = 0x15D81, [2] = 0x2 ] } The expected result of the first sample should be: raw_data = [ [0] = 0x2FE328C0, [1] = 0x15D81, [2] = 0x1 ] } however, 'perf data convert' output big endian value to resuling CTF file. The reason is a internal change (or a bug?) of babeltrace. Before this patch, at the first add_bpf_output_values(), byte order of all integer type is uncertain (is 0, neither 1234 (le) nor 4321 (be)). It would be fixed by: perf_evlist__deliver_sample -> process_sample_event -> ctf_stream ... ->bt_ctf_trace_add_stream_class ->bt_ctf_field_type_structure_set_byte_order ->bt_ctf_field_type_integer_set_byte_order during creating the stream. However, the babeltrace commit mentioned above duplicates types in sequence to prevent potential conflict in following call stack and link the newly allocated type into the 'raw_data' sequence: perf_evlist__deliver_sample -> process_sample_event -> ctf_stream ... -> bt_ctf_trace_add_stream_class -> bt_ctf_stream_class_resolve_types ... -> bt_ctf_field_type_sequence_copy ->bt_ctf_field_type_integer_copy This happens before byte order setting, so only the newly allocated type is initialized, the byte order of original type perf choose to create the first raw_data is still uncertain. Byte order in CTF output is not related to byte order in perf.data. Setting it to anything other than BT_CTF_BYTE_ORDER_NATIVE solves this problem (only BT_CTF_BYTE_ORDER_NATIVE needs to be fixed). To reduce behavior changing, set byte order according to compiling options. Signed-off-by: Wang Nan Cc: Jeremie Galarneau Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Jiri Olsa Cc: Jérémie Galarneau Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-10-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data-convert-bt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6122d57e9f7c6cb0f0aa276fbd3a12e3af826ef2 Author: Wang Nan Date: Fri Feb 26 09:31:56 2016 +0000 perf data: Support converting data from bpf_perf_event_output() bpf_perf_event_output() outputs data through sample->raw_data. This patch adds support to convert those data into CTF. A python script then can be used to process output data from BPF programs. Test result: # cat ./test_bpf_output_2.c /************************ BEGIN **************************/ #include struct bpf_map_def { unsigned int type; unsigned int key_size; unsigned int value_size; unsigned int max_entries; }; #define SEC(NAME) __attribute__((section(NAME), used)) static u64 (*ktime_get_ns)(void) = (void *)BPF_FUNC_ktime_get_ns; static int (*trace_printk)(const char *fmt, int fmt_size, ...) = (void *)BPF_FUNC_trace_printk; static int (*get_smp_processor_id)(void) = (void *)BPF_FUNC_get_smp_processor_id; static int (*perf_event_output)(void *, struct bpf_map_def *, int, void *, unsigned long) = (void *)BPF_FUNC_perf_event_output; struct bpf_map_def SEC("maps") channel = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, .key_size = sizeof(int), .value_size = sizeof(u32), .max_entries = __NR_CPUS__, }; static inline int __attribute__((always_inline)) func(void *ctx, int type) { struct { u64 ktime; int type; } __attribute__((packed)) output_data; char error_data[] = "Error: failed to output\n"; int err; output_data.type = type; output_data.ktime = ktime_get_ns(); err = perf_event_output(ctx, &channel, get_smp_processor_id(), &output_data, sizeof(output_data)); if (err) trace_printk(error_data, sizeof(error_data)); return 0; } SEC("func_begin=sys_nanosleep") int func_begin(void *ctx) {return func(ctx, 1);} SEC("func_end=sys_nanosleep%return") int func_end(void *ctx) { return func(ctx, 2);} char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; /************************* END ***************************/ # ./perf record -e bpf-output/no-inherit,name=evt/ \ -e ./test_bpf_output_2.c/map:channel.event=evt/ \ usleep 100000 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.012 MB perf.data (2 samples) ] # ./perf script usleep 14942 92503.198504: evt: ffffffff810e0ba1 sys_nanosleep (/lib/modules/4.3.0.... usleep 14942 92503.298562: evt: ffffffff810585e9 kretprobe_trampoline_holder (/lib.... # ./perf data convert --to-ctf ./out.ctf [ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ] [ perf data convert: Converted and wrote 0.000 MB (2 samples) ] # babeltrace ./out.ctf [01:41:43.198504134] (+?.?????????) evt: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF810E0BA1, perf_tid = 14942, perf_pid = 14942, perf_id = 1044, raw_len = 3, raw_data = [ [0] = 0x32C0C07B, [1] = 0x5421, [2] = 0x1 ] } [01:41:43.298562257] (+0.100058123) evt: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF810585E9, perf_tid = 14942, perf_pid = 14942, perf_id = 1044, raw_len = 3, raw_data = [ [0] = 0x38B77FAA, [1] = 0x5421, [2] = 0x2 ] } # cat ./test_bpf_output_2.py from babeltrace import TraceCollection tc = TraceCollection() tc.add_trace('./out.ctf', 'ctf') d = {1:[], 2:[]} for event in tc.events: if not event.name.startswith('evt'): continue raw_data = event['raw_data'] (time, type) = ((raw_data[0] + (raw_data[1] << 32)), raw_data[2]) d[type].append(time) print(list(map(lambda i: d[2][i] - d[1][i], range(len(d[1]))))); # python3 ./test_bpf_output_2.py [100056879] Committer note: Make sure you have python3-devel installed, not python-devel, which may be for python2, which will lead to some "PyInstance_Type" errors. Also make sure that you use the right libbabeltrace, because it is shipped in Fedora, for instance, but an older version. To build libbabeltrace's python binding one also needs to use: ./configure --enable-python-bindings And then set PYTHONPATH=/usr/local/lib64/python3.4/site-packages/. Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Li Zefan Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1456479154-136027-9-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data-convert-bt.c | 112 +++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) commit 9761dca68c66f6e1305f9c3d5bb5a054512050b3 Author: Colin Ian King Date: Sun Feb 28 19:57:58 2016 +0000 power_supply: 88pm860x_charger: do not pass NULL to power_supply_put In the case where power_supply_get_by_name returns NULL the current error return path calls power_supply_put with a NULL psy which will cause a null pointer dereference. Avoid this with an immediate return. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/88pm860x_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dec4473abe7967c204fe700baf5344ade34e9c8 Author: Andi Kleen Date: Fri Feb 26 16:27:56 2016 -0800 perf stat: Check existence of frontend/backed stalled cycles Only put the frontend/backend stalled cycles into the default perf stat events when the CPU actually supports them. This avoids empty columns with --metric-only on newer Intel CPUs. Committer note: Before: $ perf stat ls Performance counter stats for 'ls': 1.080893 task-clock (msec) # 0.619 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 97 page-faults # 0.090 M/sec 3,327,741 cycles # 3.079 GHz stalled-cycles-frontend stalled-cycles-backend 1,609,544 instructions # 0.48 insn per cycle 319,117 branches # 295.235 M/sec 12,246 branch-misses # 3.84% of all branches 0.001746508 seconds time elapsed $ After: $ perf stat ls Performance counter stats for 'ls': 0.693948 task-clock (msec) # 0.662 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 95 page-faults # 0.137 M/sec 1,792,509 cycles # 2.583 GHz 1,599,047 instructions # 0.89 insn per cycle 316,328 branches # 455.838 M/sec 12,453 branch-misses # 3.94% of all branches 0.001048987 seconds time elapsed $ Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1456532881-26621-2-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 754645342a35e422782f7a59545448ff9e933739 Author: Maarten ter Huurne Date: Sun Feb 28 17:05:48 2016 +0100 jz4740-battery: Correct voltage change check The check is supposed to avoid redundant update notifications, so it should check for the difference between old and new voltage exceeding a threshold. Also make sure the result of a failed read is never stored. Signed-off-by: Maarten ter Huurne Signed-off-by: Sebastian Reichel drivers/power/jz4740-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a5978ac4ede901fa73d7c28ae1c5d89bc2a46a Author: Jiri Olsa Date: Thu Mar 3 10:53:48 2016 +0100 perf tools: Fix locale handling in pmu parsing Ingo reported regression on display format of big numbers, which is missing separators (in default perf stat output). triton:~/tip> perf stat -a sleep 1 ... 127008602 cycles # 0.011 GHz 279538533 stalled-cycles-frontend # 220.09% frontend cycles idle 119213269 instructions # 0.94 insn per cycle This is caused by recent change: perf stat: Check existence of frontend/backed stalled cycles that added call to pmu_have_event, that subsequently calls perf_pmu__parse_scale, which has a bug in locale handling. The lc string returned from setlocale, that we use to store old locale value, may be allocated in static storage. Getting a dynamic copy to make it survive another setlocale call. $ perf stat ls ... 2,360,602 cycles # 3.080 GHz 2,703,090 instructions # 1.15 insn per cycle 546,031 branches # 712.511 M/sec Committer note: Since the patch introducing the regression didn't made to perf/core, move it to just before where the regression was introduced, so that we don't break bisection for this feature. Reported-by: Ingo Molnar Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160303095348.GA24511@krava.redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9052768fe4a4ca773e48654b1dc4297a298e76b9 Author: Colin Ian King Date: Sat Feb 27 12:54:11 2016 +0000 power_supply: lp8788-charger: initialize boolean 'found' The boolean 'found' is not initialized and hence garbage. It should be initialized as false. Found with static analysis using CoverityScan Signed-off-by: Colin Ian King Acked-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/lp8788-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff482f7f6a1750a5ba9bb57a4560716df82338a6 Merge: 931e1c2 37091fd Author: Jens Axboe Date: Thu Mar 3 06:52:13 2016 -0700 Merge tag 'nbd-for-4.6' of git://git.pengutronix.de/git/mpa/linux-nbd into for-4.6/drivers NBD for 4.6 Markus writes: This pull request contains 7 patches for 4.6. Patch 1 fixes some unnecessarily complicated code I introduced some versions ago for debugfs. Patch 2 removes the criticised signal usage within NBD to kill the NBD threads after a timeout. This code was used for the last years and is now replaced by simply killing the tcp connection. Patches 3-6 are some smaller cleanups. Patch 7 uevents for the userspace. This way udev/systemd can react on connected NBD devices. commit 13d268ca2c4c29d6da2ba79419f9a655e602afed Author: Xiao Guangrong Date: Wed Feb 24 17:51:16 2016 +0800 KVM: MMU: apply page track notifier Register the notifier to receive write track event so that we can update our shadow page table It makes kvm_mmu_pte_write() be the callback of the notifier, no function is changed Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 5 +++-- arch/x86/kvm/mmu.c | 19 +++++++++++++++++-- arch/x86/kvm/x86.c | 4 ++-- 3 files changed, 22 insertions(+), 6 deletions(-) commit 5c520e90af3ad546bf328d2c9306c72bf3da6afe Author: Xiao Guangrong Date: Wed Feb 24 17:51:15 2016 +0800 KVM: MMU: simplify mmu_need_write_protect Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) commit 56ca57f9fe553da122472a15e49c2d808123ff0a Author: Xiao Guangrong Date: Wed Feb 24 17:51:14 2016 +0800 KVM: MMU: use page track for non-leaf shadow pages non-leaf shadow pages are always write protected, it can be the user of page track Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 0eb05bf290cfe8610d9680b49abef37febd1c38a Author: Xiao Guangrong Date: Wed Feb 24 17:51:13 2016 +0800 KVM: page track: add notifier support Notifier list is introduced so that any node wants to receive the track event can register to the list Two APIs are introduced here: - kvm_page_track_register_notifier(): register the notifier to receive track event - kvm_page_track_unregister_notifier(): stop receiving track event by unregister the notifier The callback, node->track_write() is called when a write access on the write tracked page happens Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/kvm_page_track.h | 39 +++++++++++++++++++ arch/x86/kvm/page_track.c | 70 +++++++++++++++++++++++++++++++++++ arch/x86/kvm/x86.c | 4 ++ 4 files changed, 114 insertions(+) commit e5691a81e830c12d396b3f219ab999be87a1208f Author: Xiao Guangrong Date: Wed Feb 24 17:51:12 2016 +0800 KVM: MMU: clear write-flooding on the fast path of tracked page If the page fault is caused by write access on write tracked page, the real shadow page walking is skipped, we lost the chance to clear write flooding for the page structure current vcpu is using Fix it by locklessly waking shadow page table to clear write flooding on the shadow page structure out of mmu-lock. So that we change the count to atomic_t Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 22 ++++++++++++++++++++-- arch/x86/kvm/paging_tmpl.h | 4 +++- 3 files changed, 24 insertions(+), 4 deletions(-) commit 3d0c27ad6ee465f174b09ee99fcaf189c57d567a Author: Xiao Guangrong Date: Wed Feb 24 17:51:11 2016 +0800 KVM: MMU: let page fault handler be aware tracked page The page fault caused by write access on the write tracked page can not be fixed, it always need to be emulated. page_fault_handle_page_track() is the fast path we introduce here to skip holding mmu-lock and shadow page table walking However, if the page table is not present, it is worth making the page table entry present and readonly to make the read access happy mmu_need_write_protect() need to be cooked to avoid page becoming writable when making page table present or sync/prefetch shadow page table entries Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_page_track.h | 2 ++ arch/x86/kvm/mmu.c | 44 +++++++++++++++++++++++++++++------ arch/x86/kvm/page_track.c | 15 ++++++++++++ arch/x86/kvm/paging_tmpl.h | 3 +++ 4 files changed, 57 insertions(+), 7 deletions(-) commit f29d4d7810d7fd61442371cd68957e1d37ed79bb Author: Xiao Guangrong Date: Wed Feb 24 17:51:10 2016 +0800 KVM: page track: introduce kvm_slot_page_track_{add,remove}_page These two functions are the user APIs: - kvm_slot_page_track_add_page(): add the page to the tracking pool after that later specified access on that page will be tracked - kvm_slot_page_track_remove_page(): remove the page from the tracking pool, the specified access on the page is not tracked after the last user is gone Both of these are called under the protection both of mmu-lock and kvm->srcu or kvm->slots_lock Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_page_track.h | 7 +++ arch/x86/kvm/page_track.c | 85 +++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit 21ebbedaddf25a35a70fedc001ba7e5f5b9129bc Author: Xiao Guangrong Date: Wed Feb 24 17:51:09 2016 +0800 KVM: page track: add the framework of guest page tracking The array, gfn_track[mode][gfn], is introduced in memory slot for every guest page, this is the tracking count for the gust page on different modes. If the page is tracked then the count is increased, the page is not tracked after the count reaches zero We use 'unsigned short' as the tracking count which should be enough as shadow page table only can use 2^14 (2^3 for level, 2^1 for cr4_pae, 2^2 for quadrant, 2^3 for access, 2^1 for nxe, 2^1 for cr0_wp, 2^1 for smep_andnot_wp, 2^1 for smap_andnot_wp, and 2^1 for smm) at most, there is enough room for other trackers Two callbacks, kvm_page_track_create_memslot() and kvm_page_track_free_memslot() are implemented in this patch, they are internally used to initialize and reclaim the memory of the array Currently, only write track mode is supported Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 10 +++++++ arch/x86/include/asm/kvm_page_track.h | 13 +++++++++ arch/x86/kvm/Makefile | 3 +- arch/x86/kvm/page_track.c | 52 +++++++++++++++++++++++++++++++++++ arch/x86/kvm/x86.c | 5 ++++ 5 files changed, 82 insertions(+), 1 deletion(-) commit aeecee2ea6e2b020de8bb562f4e79ab34eda3e22 Author: Xiao Guangrong Date: Wed Feb 24 17:51:08 2016 +0800 KVM: MMU: introduce kvm_mmu_slot_gfn_write_protect Split rmap_write_protect() and introduce the function to abstract the write protection based on the slot This function will be used in the later patch Reviewed-by: Paolo Bonzini Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 16 +++++++++++----- arch/x86/kvm/mmu.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 547ffaed871af7db8713972eaf630802cac47cb1 Author: Xiao Guangrong Date: Wed Feb 24 17:51:07 2016 +0800 KVM: MMU: introduce kvm_mmu_gfn_{allow,disallow}_lpage Abstract the common operations from account_shadowed() and unaccount_shadowed(), then introduce kvm_mmu_gfn_disallow_lpage() and kvm_mmu_gfn_allow_lpage() These two functions will be used by page tracking in the later patch Reviewed-by: Paolo Bonzini Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 38 +++++++++++++++++++++++++------------- arch/x86/kvm/mmu.h | 3 +++ 2 files changed, 28 insertions(+), 13 deletions(-) commit 92f94f1e9e509caa564353c516c904278999e350 Author: Xiao Guangrong Date: Wed Feb 24 17:51:06 2016 +0800 KVM: MMU: rename has_wrprotected_page to mmu_gfn_lpage_is_disallowed kvm_lpage_info->write_count is used to detect if the large page mapping for the gfn on the specified level is allowed, rename it to disallow_lpage to reflect its purpose, also we rename has_wrprotected_page() to mmu_gfn_lpage_is_disallowed() to make the code more clearer Later we will extend this mechanism for page tracking: if the gfn is tracked then large mapping for that gfn on any level is not allowed. The new name is more straightforward Reviewed-by: Paolo Bonzini Signed-off-by: Xiao Guangrong Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/mmu.txt | 6 +++--- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 25 +++++++++++++------------ arch/x86/kvm/x86.c | 14 ++++++++------ 4 files changed, 25 insertions(+), 22 deletions(-) commit 4d99ba898dd0c521ca6cdfdde55c9b58aea3cb3d Author: Joerg Roedel Date: Mon Feb 29 16:04:45 2016 +0100 kvm: x86: Check dest_map->vector to match eoi signals for rtc Using the vector stored at interrupt delivery makes the eoi matching safe agains irq migration in the ioapic. Signed-off-by: Joerg Roedel Signed-off-by: Paolo Bonzini arch/x86/kvm/ioapic.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 9daa50076f585854f0040aa8403eac020d6f5d64 Author: Joerg Roedel Date: Mon Feb 29 16:04:44 2016 +0100 kvm: x86: Track irq vectors in ioapic->rtc_status.dest_map This allows backtracking later in case the rtc irq has been moved to another vcpu/vector. Signed-off-by: Joerg Roedel Signed-off-by: Paolo Bonzini arch/x86/kvm/ioapic.h | 7 +++++++ arch/x86/kvm/lapic.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 9e4aabe2bb3454c83dac8139cf9974503ee044db Author: Joerg Roedel Date: Mon Feb 29 16:04:43 2016 +0100 kvm: x86: Convert ioapic->rtc_status.dest_map to a struct Currently this is a bitmap which tracks which CPUs we expect an EOI from. Move this bitmap to a struct so that we can track additional information there. Signed-off-by: Joerg Roedel Signed-off-by: Paolo Bonzini arch/x86/kvm/ioapic.c | 13 +++++++------ arch/x86/kvm/ioapic.h | 10 ++++++++-- arch/x86/kvm/irq_comm.c | 2 +- arch/x86/kvm/lapic.c | 10 +++++----- arch/x86/kvm/lapic.h | 7 +++++-- 5 files changed, 26 insertions(+), 16 deletions(-) commit 61ec84f145ef2baac7ea3d6d5604c8f29c0068b7 Merge: 433da86 58ded42 Author: Paolo Bonzini Date: Thu Mar 3 14:35:44 2016 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD The highlights are: * Enable VFIO device on PowerPC, from David Gibson * Optimizations to speed up IPIs between vcpus in HV KVM, from Suresh Warrier (who is also Suresh E. Warrier) * In-kernel handling of IOMMU hypercalls, and support for dynamic DMA windows (DDW), from Alexey Kardashevskiy. Signed-off-by: Paolo Bonzini commit 37a35ced62a1eaf9cc5be9476e655b762ca841f8 Author: Olli Salonen Date: Tue Feb 16 18:17:45 2016 -0200 [media] cx23885: fix reversed I2C bus numbering I2C buses for DVBSky T980C and S950C were numbered in an opposite way compared to every other board in the driver. Switch numbering to a more logical way. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f3c6abcab5e729f208a28ca18a46360247c7713f Author: Olli Salonen Date: Tue Feb 16 15:53:45 2016 -0200 [media] dw2102: convert TechnoTrend S2-4600 to use I2C binding for demod Convert the TT S2-4600 USB tuner to use the I2C binding for attaching the demodulator instead of the old m88ds3103_attach method. Signed-off-by: Olli Salonen Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 71 +++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 28 deletions(-) commit fdb2f37a54470473c6b7c9d680c4c114dd9bc434 Author: Yu Ning Date: Tue Mar 1 23:46:10 2016 +0000 goldfish: Enable ACPI-based enumeration for goldfish battery Add the ACPI bindings to the goldfish battery driver. Signed-off-by: Yu Ning Signed-off-by: Jin Qian Signed-off-by: Alan Cox Signed-off-by: Sebastian Reichel drivers/power/goldfish_battery.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2899d35dc940613bed5912b26728f7947f48979e Author: Philipp Zabel Date: Mon Feb 15 09:08:06 2016 -0200 [media] media-entity: include linux/bug.h for WARN_ON WARN_ON is used by this header file, but none of its direct includes include asm/bug.h by way of linux/bug.h yet. Signed-off-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 1 + 1 file changed, 1 insertion(+) commit 65d687a7b7d6f27e4306fe8cc8a1ca66a1a760f6 Author: Greg Hackmann Date: Fri Feb 26 18:45:30 2016 +0000 power: goldfish_battery: add devicetree bindings Add device tree bindings to the Goldfish virtual platform battery drivers. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian Signed-off-by: Alan Cox Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/goldfish/battery.txt | 17 +++++++++++++++++ drivers/power/goldfish_battery.c | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 426508e61cf49bd6e15bcc718b8efc651da39ae4 Author: Antti Palosaari Date: Sat Feb 6 20:12:05 2016 -0200 [media] rtl2832: move stats polling to read status Do statistics polling on read status in order to avoid unnecessary delayed work. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832.c | 79 ++++++++++++------------------ drivers/media/dvb-frontends/rtl2832_priv.h | 1 - 2 files changed, 30 insertions(+), 50 deletions(-) commit d884acad4fe728b30b55d166089fb9f092b336ed Author: Antti Palosaari Date: Fri Feb 5 18:26:30 2016 -0200 [media] rtl2832: improve slave TS control Add callback parameter to select enable / disable slave TS and use it when slave demod is in use. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832.c | 72 ++++++++++++++++++--------------- drivers/media/dvb-frontends/rtl2832.h | 4 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 24 +++++------ 3 files changed, 54 insertions(+), 46 deletions(-) commit 7908fad99a6cc08a41c666d425df42809b34dce2 Author: Antti Palosaari Date: Thu Feb 4 17:01:51 2016 -0200 [media] mn88473: finalize driver Finalize the driver. It still lacks a lot of features, like all statistics and PLP filtering, but basic functionality and sensitivity is pretty good shape. Signed-off-by: Antti Palosaari Reviewed-by: Benjamin Larsson Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88473.c | 388 ++++++++++++++++++----------- drivers/media/dvb-frontends/mn88473.h | 14 +- drivers/media/dvb-frontends/mn88473_priv.h | 7 +- 3 files changed, 246 insertions(+), 163 deletions(-) commit 877ba50b057f53b761c7acab6f4ae5376513b34f Author: Antti Palosaari Date: Fri Feb 5 08:04:48 2016 +0200 [media] mn88473: move out of staging Move driver to drivers. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 +- drivers/media/dvb-frontends/Kconfig | 8 + drivers/media/dvb-frontends/Makefile | 1 + drivers/media/dvb-frontends/mn88473.c | 522 +++++++++++++++++++++++++++ drivers/media/dvb-frontends/mn88473_priv.h | 37 ++ drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/mn88473/Kconfig | 7 - drivers/staging/media/mn88473/Makefile | 5 - drivers/staging/media/mn88473/TODO | 21 -- drivers/staging/media/mn88473/mn88473.c | 522 --------------------------- drivers/staging/media/mn88473/mn88473_priv.h | 37 -- 12 files changed, 569 insertions(+), 598 deletions(-) commit 9c91738d49259b2aabd136ade053dcc0cd273179 Author: GEORGE Date: Sun Feb 14 19:23:15 2016 -0200 [media] saa7134: Add support for Snazio TvPVR PRO This board has PCI ID: 1779:13cf [mchehab@osg.samsung.com: Make scripts/checkpatch.pl happy] Signed-off-by: Pojar George Signed-off-by: Mauro Carvalho Chehab Documentation/video4linux/CARDLIST.saa7134 | 1 + drivers/media/pci/saa7134/saa7134-cards.c | 38 +++++++++++++++++++++++++++++- drivers/media/pci/saa7134/saa7134-input.c | 21 +++++++++++++++++ drivers/media/pci/saa7134/saa7134.h | 1 + 4 files changed, 60 insertions(+), 1 deletion(-) commit 174ced212c1014cded05c35ff22a970fac3da3ca Author: Shuah Khan Date: Fri Feb 12 21:18:03 2016 -0200 [media] media: au0828 set ctrl_input in au0828_s_input() dev->ctrl_input is set in vidioc_s_input() and doesn't get set in au0828_s_input(). As a result, dev->ctrl_input is left uninitialized until user space calls s_input. It works correctly because the default input value is 0 and which is what dev->ctrl_input gets initialized via kzalloc(). Change to set dev->ctrl_input in au0828_s_input(). Also optimize vidioc_s_input() to return if the new input value is same as the current. Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 32ad61951574d011d363694d6037592e99da9421 Author: Sudip Mukherjee Date: Mon Feb 29 23:32:29 2016 +0530 video: fbdev: sis: remove unused variable The variables modeflag and resinfo were only assigned some value but were never used. Signed-off-by: Sudip Mukherjee Signed-off-by: Tomi Valkeinen drivers/video/fbdev/sis/init301.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c15222bdec75890d2523479615bc175956a9eadb Author: Paul Gortmaker Date: Sun Feb 21 22:13:12 2016 -0500 drivers/video: make fbdev/sunxvr2500.c explicitly non-modular The Kconfig currently controlling compilation of this code is: config FB_XVR2500 bool "Sun XVR-2500 3DLABS Wildcat 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. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. 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. 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: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Tomi Valkeinen drivers/video/fbdev/sunxvr2500.c | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) commit 27844cb8101f1ea60984e04c70126dc754ae97a1 Author: Paul Gortmaker Date: Sun Feb 21 22:13:11 2016 -0500 drivers/video: make fbdev/sunxvr1000.c explicitly non-modular The Kconfig currently controlling compilation of this code is: config FB_XVR1000 bool "Sun XVR-1000 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. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. 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. We don't replace module.h with init.h since the file already has that. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Tomi Valkeinen drivers/video/fbdev/sunxvr1000.c | 42 +++++++--------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) commit d61b0ef7184f3b5a7e068f503ccaa6e2701c00ea Author: Paul Gortmaker Date: Sun Feb 21 22:13:10 2016 -0500 drivers/video: make fbdev/sunxvr500.c explicitly non-modular The Kconfig currently controlling compilation of this code is: config FB_XVR500 bool "Sun XVR-500 3DLABS Wildcat 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_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with 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: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Tomi Valkeinen drivers/video/fbdev/sunxvr500.c | 42 +++++++---------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) commit b21d29e08cc3424622e0b0d800307e254951f425 Author: Philippe Valembois Date: Tue Feb 9 06:09:32 2016 -0200 [media] Fix AverMedia RM-KS remote keymap Fix AverMedia RM-KS keymap using user guide to meet LinuxTV wiki rules. The remote command didn't seem to change in itself since its creation: it's just to make keys more standard and remove the FIXME. Signed-off-by: Philippe Valembois Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/rc-avermedia-rm-ks.c | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit b8ebfafc3289c72a333878c8738cbc225beee421 Author: Philippe Valembois Date: Tue Feb 9 06:08:01 2016 -0200 [media] Add support for Avermedia AverTV Volar HD 2 (TD110) Signed-off-by: Philippe Valembois Reviewed-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb-usb-ids.h | 1 + drivers/media/usb/dvb-usb-v2/af9035.c | 2 ++ 2 files changed, 3 insertions(+) commit 449c1fcd86f5077d5076a955e65c07a7c4cbbf9d Author: Heiner Kallweit Date: Mon Feb 8 17:25:59 2016 -0200 [media] media: rc: nuvoton: support reading / writing wakeup sequence via sysfs This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which allows to read / write the wakeup sequence. In combination with the core extension for exposing the most recent raw packet this allows to easily define and set a wakeup sequence. At least on my Zotac CI321 the BIOS resets the wakeup sequence at each boot to a factory default. Therefore I use a udev rule SUBSYSTEM=="rc", DRIVERS=="nuvoton-cir", ACTION=="add", RUN+="